While trying to call REST web service, i am getting callout exception while doing authentication. follow is the Code spinet, ulr and token is updated for this example.

Http h = new Http();
HttpRequest req = new HttpRequest();
// ** Getting Security Token from STS
String Url = 'https://[namesapec].accesscontrol.windows.net/WRAPv0.9/';
req.setBody('wrap_name=test&wrap_password=N4LGx2cNPTEDFC6K0Wo4+/pTbNjcHLDSASDNnybnykc=&wrap_scope=http://[namesapec].servicebus.windows.net/SampleQueue');          req.setHeader('Content-Type','application/x-www-form-urlencoded');
// Getting error here           
 HttpResponse res = h.send(req);
 String result = res.getBody();
 system.debug('RESULT ::: '+result);

I am following Connecting Force.com to on Premises Resources, Part 2 blog to achieve Azure integration with sfdc


This has to be resolved at the client end to which you are making the webservice callout .

Ask your other Team who have created that webservice and check whether they have white-listed salesforce IP's in their proxy .The Proxy here is not allowing your request to reach the exact end point and its filtering request from the SFDC.


|improve this answer|||||

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.