I am working on a project to create Salesforce.com library for Python. I always wished for fastest web service invocation when it comes to multiple systems interacting with each other. Salesforce.com's Force.com platform exposes its API through enterprise, partner and metadata WSDL. For this purpose I scrutinized the WSDL file very closely and used SoapUI to generate the stub.
Lets jump into steps on how we do it:
1. Create a new project and select WSDL file to load and generate stub by hitting OK button.
Once the stub is generated you can expand the node to see the list of operations exposed by the server as SOAP interface :
3. Login method:
On expanding any service node, you will see "Request" under it. Double click it to open new window on right side pane. This window will allow you to make HTTP POST requests to server. You can see the SOAP enevelope is already created in left pane in new window. All you need to do is fill in the parameters for the request and hit submit button. IMP: Make sure you set the endpoint properly. You can find this endpoint in bottom part of WSDL file as an attribute of any of SOAP 1.1 or 1.2 binding.
I entered my username and password(password+security token) here and submitted the request. On right side pane you can see the response envelope with my data like sessionId, serverURL, userInfo.
4. Creating Sobject records:
In case you need to perform further operations you need to pay extra attention here. Consider we need to create a case record through SoapUI. Double click on create operation and get the request window. Fill the parameter values as shown. Before submitting make sure you set the endpoint as the URL returned as serverUrl in the response of login method.
On successfully executing this server will return the recordId of Sobject record.
I hope this blog helps you get started on understanding how API works and more specifically the detailed flow of data on HTTP using SoapUI.
Cheers!
Kartik
Lets jump into steps on how we do it:
1. Create a new project and select WSDL file to load and generate stub by hitting OK button.
Once the stub is generated you can expand the
On expanding any service node, you will see "Request" under it. Double click it to open new window on right side pane. This window will allow you to make HTTP POST requests to server. You can see the SOAP enevelope is already created in left pane in new window. All you need to do is fill in the parameters for the request and hit submit button. IMP: Make sure you set the endpoint properly. You can find this endpoint in bottom part of WSDL file as an attribute of any of SOAP 1.1 or 1.2 binding.
4. Creating Sobject records:
In case you need to perform further operations you need to pay extra attention here. Consider we need to create a case record through SoapUI. Double click on create operation and get the request window. Fill the parameter values as shown. Before submitting make sure you set the endpoint as the URL returned as serverUrl in the response of login method.
On successfully executing this server will return the recordId of Sobject record.
I hope this blog helps you get started on understanding how API works and more specifically the detailed flow of data on HTTP using SoapUI.
Cheers!
Kartik