+ Start a Discussion

Which outbound way is better?



I wanted to understand which option of calling external web service is better?

Is it using 


option 1) Get the wsdl of the webservice and parse the wsdl in salesforce


option 2) Creating a soap envelope and sending the request to endpoint url using httpRequest class and parse the http request.


Please let me know?




Ankit AroraAnkit Arora

Either way is good, but I prefer to go with first one as I don't need to do much in it ;)



Ankit Arora

Blog | Facebook | Blog Page

Sforce ChrisSforce Chris

Probably best-practice to go for the first one, but the WSDL2Apex is rather limited on its parsing capabilities. You may need to rework your WSDL a lot before being able to parse it. It's why I go rather on the solution 2 which is usually more straightforward.


Thank you Ankit and Chris !!!