You need to sign in to do that
Don't have an account?
http callout times out.
I am trying to connect Salesforce to a fishbowl server. Unfortunately I have very little expirience with web services. I have built an apex class that would make the callout but it times out. I know the port is open and the ip are good because I can connect with fishbowl into the server from an outside computer. Any help or advise would be appreciated. If you want to look at fishbowl's docs here they are:
http://www.fishbowlinventory.com/files/release/2012-08-16/fi-2012.7.exe
Here is my code I have changed the IP address to a random one. The port is the actual port that fishbowl uses.
public with sharing class fishExt { public void connect(){ HttpRequest req = new HttpRequest(); req.setEndPoint('http://11.111.111.111:28192'); String xml = '<FbiXml><Ticket/><FbiMsgsRq><LoginRq><IAID>123456</IAID><IAName>FishbowlKyazmaTest</IAName><IADescription>This is a test of the connection</IADescription><UserName>admin</UserName><UserPassword>' + EncodingUtil.base64Encode(blob.valueof('admin')) + '</UserPassword></LoginRq></FbiMsgsRq></FbiXml>'; req.setBody(xml); req.setMethod('GET'); req.setTimeout(120000); Http http = new Http(); HTTPResponse res = http.send(req); System.debug(res.getBody()); } }
Have you add this ip in "All Remote Sites"??
Thanks for the example. I have tried both of those things. I got my hands on a testing mechanism from the company and when I try to use it the connection works when I use 11.111.1.111 as the end point, but when I use http://11.111.1.11 as the end point it does not work. with salesforce when I remove the http I get an error that says no protocol. Is there a way to get salesforce to callout to an ip without the http?