I am going about an integration with an external system and they are providing me with two WSDL files.

  1. Salesforce2Parter.wsdl
  2. Partner2Salesforce.wsdl

I am able to import the Salesforce2Partner.wsdl and use that for when it comes to sending SOAP messages to the external system, but my question is around the Partner2Salesforce.wsdl.

From my understanding you would use a WSDL that was exported from System1 and use it in System2 to know how to structure your messages being sent to System1 from System2.

I understand in Salesforce the normal route would be to create the web service method in a global class and then export that WSDL from Salesforce and provide it to the external system, but they appear to want me to use their provided WSDL in place of me exporting a WSDL from Salesforce.

Is this type of functionality even supported in Salesforce or is there any way of doing this that I may not be aware of?


1 Answer 1


Generally speaking there isn't automated support to implement a predefined WSDL someone else provided in Salesforce. Salesforce has expectations around how the Session will be handled in the header.

A couple of options:

  1. See if the external system can accept a WSDL that you provide from Salesforce. This will need to handle the authentication requirements as well to get a valid Session Id.

  2. Use an additional external system to implement Partner2Salesforce.wsdl and then relay the requests to Salesforce using the expected API format. This could handle the Salesforce authentication requirements.

  3. Use a public facing REST API to accept the POST request. Then painstakingly parse the SOAP request from the body. Process the request. Form a suitable POST response.

    a. As Guy commented, you could use WSDL2Apex to generate the initial Apex classes from the REST service to serialize with. The FuseIT SFDC Explorer (Disclaimer: My current employer) has an alternative version of WSDL2Apex that can generate XML parser for the raw SOAP responses. You might find that useful as well to get the initial Apex classes.

  • additionally, you could use the provided WSDL to generate an example class in SFDC as a starting point for your global class. Certainly if it's a more complicated data structure Oct 31, 2016 at 20:55
  • @Guy. Good point. I've made an alternative version of WSDL2Apex that will also generate much of the XML parsing in Apex from the WSDL. Oct 31, 2016 at 21:16

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .