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
JBabuJBabu 

Which outbound way is better?

Hi,

 

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

(or)

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?

 

Thanks,

Babu.

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 ;)

 

Thanks

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.

JBabuJBabu

Thank you Ankit and Chris !!!