Take the 2-minute tour ×
Salesforce Stack Exchange is a question and answer site for Salesforce administrators, implementation experts, developers and anybody in-between. It's 100% free, no registration required.

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?

share|improve this question

1 Answer 1

up vote 3 down vote accepted

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"
share|improve this answer
    
Does indeed work now. Fail :( Thanks –  leighman Feb 7 '13 at 16:59

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.