[SalesForce] SOAP API – No operation available for request

I am trying to access Salesforce via the SOAP API (at the moment just using the python requests library). I have a developer account.

I am trying to use an existing OAuth access token as described in http://blogs.developerforce.com/developer-relations/2011/03/oauth-and-the-soap-api.html

I have an HTTP POST request with headers

SOAPAction: ""
Content-Type: text/xml; charset=utf-8

I am using the url from the "partner" member of the id response as in the blog post. Tried with both

https://na14.salesforce.com/services/Soap/u/25.0/00Dd0000000hsSa

and

https://na14.salesforce.com/services/Soap/u/25.0

A sample query body looks like:

<?xml version="1.0" ?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:urn="urn:parner.soap.sforce.com">
  <soapenv:Header>
    <urn:SessionHeader>
      <urn:sessionId>00Dd0000000hsSa!AREAQJN0ojV25Ra2uVqAQsAFTvhcetdBcxmTBJnPg6IwceRIAl9tbCsMy3P.qG3g7NRitIHXaaGH_ObF8oC0BSL9VXAGkCPT</urn:sessionId>
    </urn:SessionHeader>
  </soapenv:Header>
  <soapenv:Body>
    <urn:describeSObject>
      <urn:sObjectType>Account</urn:sObjectType>
    </urn:describeSObject>
  </soapenv:Body>
</soapenv:Envelope>

Response looks like:

<?xml version="1.0" ?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
  <soapenv:Body>
    <soapenv:Fault>
      <faultcode>soapenv:Client</faultcode>
      <faultstring>No operation available for request {urn:parner.soap.sforce.com}describeSObject</faultstring>
    </soapenv:Fault>
  </soapenv:Body>
</soapenv:Envelope>

What am I missing?

Best Answer

You have a typo in the xml namespace, you have

xmlns:urn="urn:parner.soap.sforce.com"

it should be

xmlns:urn="urn:partner.soap.sforce.com"
Related Topic