Querying salesforce data from SOAP UI through Enterprise WSDL
We can test salesforce data in SOAP UI with the help of Enterprise wsdl generated from salesforce(Setup>>Develop >> API >>Enterprise WSDL>>Generate Enterprise WSDL).
Once Enterprise WSDL is generated save this file in your system and create a new soap project with project name & import Enterprise WSDL(xml file) which you saved recently.
After Expanding your soap binding inside soap project, you will see a list of below available methods in image.
Once you done with step 4 as shown in above picture, Copy the sessionId(<sessionId >) and serverURL( <serverUrl>) from the response received on the soap ui right panel.
Then open “query” soap binding from soapUI project menu and update URL with copied server URL as shown below
After that copy the below xml and paste it on your “query” soap binding from soapUI project menu and provide your copied session id there, after that click on execute green button to see the results returned from the salesforce soql query on the parallel right panel as shown above.
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:urn="urn:enterprise.soap.sforce.com"> <soapenv:Header> <urn:SessionHeader> <urn:sessionId>Provide your copied session id here</urn:sessionId> </urn:SessionHeader> </soapenv:Header> <soapenv:Body> <urn:query> <urn:queryString>select id, name from contact limit 6</urn:queryString> </urn:query> </soapenv:Body> </soapenv:Envelope>
For building APEX REST API click here :- http://www.sfdcpanda.com/exposing-salesforce-data-through-apex-rest-api/
How to avoid TLS 1.0 disablement Error in SOAP UI ? :-
This issue will occur in SOAPUI because of TLS 1.0 disabled in salesforce and the SOAPUI tool you are using has not updated TLS,
So for that you need to add the below piece of code in the ‘SoapUI-5.3.0.vmoptions’ file which can be found under this location ‘C:\Program Files (x86)\SmartBear\SoapUI-5.3.0\bin’