You need to sign in to do that
Don't have an account?
Error while creating contact from SOAPUI
Hi Folks,
I am using SOAPUI tool test salesforce wsdl and able test login successfully from SOAPUI tool, now i want to create contact or any object from SOAPUI so to create a object we need to pass 3 values:seesionId,URL,object(parameters), my i/p xml file is as follows:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:urn="urn:enterprise.soap.sforce.com"
xmlns:urn1="urn:sobject.enterprise.soap.sforce.com">
<soapenv:Header>
<urn:SessionHeader>
<urn:sessionId>Ypvyk.2X0HR6tw3mXLByAabOyG5DtZYXSN78N5l_Jg2tFGAQcJ9P0FqJ</urn:sessionId>
</urn:SessionHeader>
<urn:CallOptions>
</urn:CallOptions>
</soapenv:Header>
<soapenv:Body>
<urn:create>
<!--Zero or more repetitions:-->
<urn:sObjects>
<urn:type>Contact</urn1:type>
<lastName>EXAMPLE</lastName>
<firstName>EXAMPLE</firstName>
</urn:sObjects>
</urn:create>
</soapenv:Body>
</soapenv:Envelope>
but i got following error which is:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:sf="urn:fault.enterprise.soap.sforce.com" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<soapenv:Body>
<soapenv:Fault>
<faultcode>UNKNOWN_EXCEPTION</faultcode>
<faultstring>UNKNOWN_EXCEPTION: Destination URL not reset. The URL returned from login must be set in the SforceService</faultstring>
<detail>
<sf:UnexpectedErrorFault xsi:type="sf:UnexpectedErrorFault">
<sf:exceptionCode>UNKNOWN_EXCEPTION</sf:exceptionCode>
<sf:exceptionMessage>Destination URL not reset. The URL returned from login must be set in the SforceService</sf:exceptionMessage>
</sf:UnexpectedErrorFault>
</detail>
</soapenv:Fault>
</soapenv:Body>
</soapenv:Envelope>
How to set the destination URL? do i need to set in calloptions if so do i need to set "ServerUrl" or "metadataServerUrl"? and finally how to set the values in calloptions.
Any sample examples available like how to pass data in xml format in salesforce?
Thanks,
SFUser.
All Answers
Change the endpoint URL on top after login
from https://www.salesforce.com/services/Soap/u/22.0
to https://XX9-api.salesforce.com/services/Soap/u/22.0/00D300000000XXX
How do I change the server end point? I see the serverUrl value but not what to do with it. I am using php nusoap examples.