function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
StormConsultingStormConsulting 

Consume external web service with Apex code

Hi,

How can I consume an external web service using Apex code? I have seen a post here from two years ago that says it's impossible. There is a news article saying that Salesforce have implemented this functionality - http://blogs.zdnet.com/BTL/?p=5097

How can it be done?

Cheers
soofsoof
It IS possible now.  All you need is the WSDL of your web service, and Salesforce.com will generate all the required code to callout the external webservice for you.  Here's the link to the developers' guide page that describes the process: http://www.salesforce.com/us/developer/docs/apexcode/Content/apex_web_services_wsdl2apex.htm
 
Please read therough the complete documentation on this page, and make sure that your WSDL is of the same type that Salesforce.com accepts (details mentioned in the guide).  I hope this helps.
 
Thanks.
NS_ForceNS_Force

Hi,

Can it be possible to call the Salesforce API methods like changePassword,upsert and so on from the apex code.

I saw a lot of threads using javascript.But I need to access it from the Apex code rather than javascript.

Please help me with some code sample if it is possible with Apex.

Regards