+ Start a Discussion
Jon MarsonJon Marson 

Inbound integration - custom WSDL

Hi all,

We have a client who is looking to make an inbound SOAP call to Salesforce (i.e. their IBM middleware will initiate a call to push data to Salesforce).   

So far so good, however they are telling me that they already have the WSDL files, as they also send the same data to various other (non Salesforce) systems.  I.e. they have generated the WSDL themselves.

My understanding is that for inbound calls (to Salesforce), they will need to use either the Partner or the Enterprise WSDL generated by Salesforce - and not one created by them.  Is that correct?

If this were an outbound call / callout (from Salesforce) then i know i could consume their existing WSDL, however is it possible to consume a 3rd party WSDL for inbound calls?  

Hope you can help!
Jon
 
Lokesh KumarLokesh Kumar
Yes, you are right you need to send the Enterprise WSDL to the other system because WSDL contains the schema of Salesforce and the customization. And Yes you need to generate an Apex class using the third party WSDL if it is a SOAP API.

here is the link from Salesforce.
https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_callouts_wsdl2apex.htm 
Naren9Naren9
Hi Jon,
As you mentioned, you have the IBM Middleware(M) to take the request (Inbound) from your Application (A) and Push the request to Salesforce Application (S),So it is like A-->M-->S.
The Advantage of using the Middleware is that, they will defined the Inbound XML Structure, so that any application, which is trying to Send the request to IBM Middleware(M), should follow that Structure. So in your case, they mentioned that they have the predefined format WSDL structure.

So, you have to Import the WSDL into Application (A), it will create a Outbound Webservice and call the webserice to connect to IBM Middleware.

Now, IBM Middleware has to send your request to Salesforce (S). So to connect to Salesforce, you have to generate the Salesforce WSDL (Partner or Enterprise) and give it to IBM middleware team.
In the Salesforce WSDL, you have a logincall method. IBM Middleware team has to call that method by passing the userId/Password, then they will receive the Session Id.
In the second call, if you want to update any data in Salesforce, add the session Id with the Update request XML.
I hope you have understand. 
We have so many posts on how to connect to salesforce by using SoAP API tool.

Thanks,
Naren
Jon MarsonJon Marson
Thanks all.  Upon further investigation this is known as a 'top down' approach (i.e. where you agree the WSDL first and then build the code later), as opposed to 'bottom up' (i.e. where you write the code and then generate a WSDL later).

In the Java development world both approaches are valid, but Salesforce only seems to support bottom-up development for inbound calls.  I did find this article with a proposed workaround, but it looks a bit of a hack.

https://chendamok.wordpress.com/2015/09/20/how-to-expose-a-public-salesforce-web-service-using-a-top-down-approach-contract-first-wsdl-interface/

Thought i would post this in case anyone else comes across similar situation.

Thanks
Jon