6

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.setEndpoint(Url);
req.setMethod('POST');           
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

1 Answer 1

7

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.

http://www.salesforcegeneral.com/salesforce-articles/ip-whitelists-for-salesforce.html

1

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .