+ Start a Discussion

call to webservice

I have a webservice located on my local for testing http://localhost:2114/WS_ClientOrigination/Service.asmx
how to make salesforce to call a function in this webservice?
Jon Mountjoy_Jon Mountjoy_

It looks like you want to invoke an external web service from the platform. 

Check out chapter 8, in particular the section "SOAP Services: Defining a Class from a WSDL Document" in the Apex Language Reference.

What you might want to do is
 a) generate the WSDL for your local web service
 b) generate the Apex classes from that WSDL (as shown in that chapter)
 c) call the Apex classes from your other code, which will in turn invoke your web service

Of course you must make sure that your web service is callable from an external server (ie. visible on the internet), and ensure that you have the appropriate IP addresses in network security to allow the platform to communicate out to your server.

Hope that helps

Message Edited by Jon Mountjoy_ on 01-02-2009 09:35 AM
Thank you