You need to sign in to do that
Don't have an account?
pedz
Can't get started with SOAP
I think I am doing the right thing after all. I am sending the packet below to:
http://www.salesforce.com/services/Soap/c/7.0
or to
https://www.salesforce.com/services/Soap/c/7.0
xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:ZSI="http://www.zolera.com/schemas/ZSI/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
user@happyplace.net
doggy
And I get back this:
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
xmlns:ns1="urn:fault.enterprise.soap.sforce.com">ns1:UNKNOWN_EXCEPTION
UNKNOWN_EXCEPTION: Destination URL not reset. The URL returned
from login must be set in the SforceService
xsi:type="sf:UnexpectedErrorFault"
xmlns:sf="urn:fault.enterprise.soap.sforce.com">
UNKNOWN_EXCEPTION
Destination URL not reset. The URL returned from login
must be set in the SforceService
Please help...
http://www.salesforce.com/services/Soap/c/7.0
or to
https://www.salesforce.com/services/Soap/c/7.0
xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:ZSI="http://www.zolera.com/schemas/ZSI/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
user@happyplace.net
doggy
And I get back this:
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
xmlns:ns1="urn:fault.enterprise.soap.sforce.com">ns1:UNKNOWN_EXCEPTION
UNKNOWN_EXCEPTION: Destination URL not reset. The URL returned
from login must be set in the SforceService
xsi:type="sf:UnexpectedErrorFault"
xmlns:sf="urn:fault.enterprise.soap.sforce.com">
UNKNOWN_EXCEPTION
Destination URL not reset. The URL returned from login
must be set in the SforceService
Please help...
http://www.salesforce.com/services/Soap/c/7.0
or to
https://www.salesforce.com/services/Soap/c/7.0
<SOAP-ENV:Envelope
xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:ZSI="http://www.zolera.com/schemas/ZSI/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<SOAP-ENV:Header>
</SOAP-ENV:Header>
<SOAP-ENV:Body xmlns:ns1="urn:enterprise.soap.sforce.com">
<ns1:login>
<ns1:username>user@happyplace.net</ns1:username>
<ns1:password>doggy</ns1:password>
</ns1:login>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
And I get back this:
<?xml version="1.0" encoding="UTF-8"?>
<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<soapenv:Body>
<soapenv:Fault>
<faultcode
xmlns:ns1="urn:fault.enterprise.soap.sforce.com">ns1:UNKNOWN_EXCEPTION
</faultcode>
<faultstring>
UNKNOWN_EXCEPTION: Destination URL not reset. The URL returned
from login must be set in the SforceService
</faultstring>
<detail>
<sf:fault
xsi:type="sf:UnexpectedErrorFault"
xmlns:sf="urn:fault.enterprise.soap.sforce.com">
<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:fault>
</detail>
</soapenv:Fault>
</soapenv:Body>
</soapenv:Envelope>
Please help...
Sorry to be ignorant but I'm not clear what you are asking. I should have pretty full control over what is being sent out. I'm using Python with ZSI. Its hard for me to use but I think it is pretty versatile.
So, if you can, please point out what I need to change.
Thank you so much for your help. I was afraid it had something to do with some set up problem on my side.
xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:ZSI="http://www.zolera.com/schemas/ZSI/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<SOAP-ENV:Header>
</SOAP-ENV:Header>
<SOAP-ENV:Body xmlns:ns1="urn:enterprise.soap.sforce.com">
<ns1:login>
<ns1:username>user@happyplace.net</ns1:username>
<ns1:password>doggy</ns1:password>
</ns1:login>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
move the bolded attribute somewhere else in the message, e.g.
<SOAP-ENV:Envelope
xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:ZSI="http://www.zolera.com/schemas/ZSI/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<SOAP-ENV:Header>
</SOAP-ENV:Header>
<SOAP-ENV:Body>
<ns1:login xmlns:ns1="urn:enterprise.soap.sforce.com">
<ns1:username>user@happyplace.net</ns1:username>
<ns1:password>doggy</ns1:password>
</ns1:login>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
or
<SOAP-ENV:Envelope
xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:ZSI="http://www.zolera.com/schemas/ZSI/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:ns1="urn:enterprise.soap.sforce.com"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<SOAP-ENV:Header>
</SOAP-ENV:Header>
<SOAP-ENV:Body>
<ns1:login>
<ns1:username>user@happyplace.net</ns1:username>
<ns1:password>doggy</ns1:password>
</ns1:login>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
This problem will be fixed in the upcoming Winter release.
I'll try sending a note to the ZSI mailing list and see if I get some help at making this change.
I replaced www with na1 (I logged in, and hoped it was the same server). I can at least log in. I haven't tried anything else but that got me past that step.
So... if anyone else is trying to follow all this: Python using ZSI, as a temporary work around, log in to the server by hand, look at the url's host, and then do:
# Create the sfapi locator
self.loc = SforceService_services.SforceServiceLocator()
# Create soap interface
self.soap = self.loc.getSoap(url="https://na1.salesforce.com/services/Soap/c/7.0", **kw)
where the na1 will be replaced with the host that you see after you log in by hand to your server. Note, this is just a temporary work around.
I'll post what I get back from the ZSI list as well.
loc = SforceService_services.SforceServiceLocator()
soap = loc.getSoap(
nsdict={ 'ns1' : 'urn:enterprise.soap.sforce.com' }
)
This causes the out going message to move the xmlsn:ns1 attribute up
to the envelope. Thus:
<SOAP-ENV:Envelope
xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:ZSI="http://www.zolera.com/schemas/ZSI/"
xmlns:ns1="urn:enterprise.soap.sforce.com"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<SOAP-ENV:Header>
</SOAP-ENV:Header>
<SOAP-ENV:Body>
<ns1:login>
<ns1:username>pedz@easesoftware.net
</ns1:username>
<ns1:password>gr82bfree
</ns1:password>
</ns1:login>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>