You need to sign in to do that
Don't have an account?
pedz
Which URL? (quasi Python specific)
I am trying to use Python. I'm using ZSI as my SOAP/WSDL library. I guess my first question is, for login, what URL do I start out at? If I put "http://www.salesforce.com" like the documentation implies, ZSI is not happy because it gets back html instead of xml and I get this message:
TypeError: Response is "text/html", not "text/xml"
Plus, what I get back is not soap but just the regular front page to salesforce.com
If I let it go to the URL that is embedded in the WSDL file, then I get back this message:
ZSI.FaultException: UNKNOWN_EXCEPTION: Destination URL not reset. The URL returned from login must be set in the SforceService
I've tried a few alternate things -- just guesses. But, so far, I haven't found the magic URL to go to.
Can anyone help?
TypeError: Response is "text/html", not "text/xml"
Plus, what I get back is not soap but just the regular front page to salesforce.com
If I let it go to the URL that is embedded in the WSDL file, then I get back this message:
ZSI.FaultException: UNKNOWN_EXCEPTION: Destination URL not reset. The URL returned from login must be set in the SforceService
I've tried a few alternate things -- just guesses. But, so far, I haven't found the magic URL to go to.
Can anyone help?
Park
The recommendation I received from the ZSI list was to do this:
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>
I hope this helps someone.