function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion

Dreaded No operation available for request on SOAP API call

Hi all,

I'm getting the dreaded "No operation available for request" when sending an API request.

I'm using Curl because it's just a quick describeObject that I need to do.  It works fine via XML-RPC but I'm missing something with the SOAP equivalent.  Here's my command line:

curl -k  "" -H "Content-Type: text/xml" -H "SoapAction: ''"   -d "<?xml version='1.0' encoding='UTF-8' ?> <soap-env:Envelope xmlns:soap-env='' xmlns:tns='salesforce' xmlns:types='salesforce/encodedTypes' xmlns:xsd='' xmlns:xsi='' soap-env:encodingStyle=''> <soap-env:Header> <headerStruct> <version type='string'>2.0</version> </headerStruct> </soap-env:Header> <soap-env:Body> <tns:login xmlns:tns='sfconnector:SalesforceConnector' type='methodCall'> <username type='string'>USERNAME</username> <password type='string'>passwdandtoken</password> </tns:login> </soap-env:Body> </soap-env:Envelope>"

...And the response is:

<?xml version="1.0" encoding="UTF-8"?><soapenv:Envelope xmlns:soapenv=""><soapenv:Body><soapenv:Fault><faultcode>soapenv:Client</faultcode><faultstring>No operation available for request {sfconnector:SalesforceConnector}login</faultstring></soapenv:Fault></soapenv:Body></soapenv:Envelope>

Thanks in advance for any help.

Best Answer chosen by Admin (Salesforce Developers) 

Sorry - my misrtake - should have used the partner WSDL.



All Answers


The namespaces are wrong in your request xml. see the example requests in the wiki for reference.


Thank you Simon -that was helpful.

I'm able to log on, but DescribeSObject still fails.


I'm trying to hit out enterprise server:


Login is OK and returns a SessionID and server:


My Describe Object looks like:

  <soapenv:Envelope xmlns:soapenv=''
     <ns1:SessionHeader soapenv:mustUnderstand='0' xmlns:ns1=''>
     <ns2:sessionId xmlns:ns2=''>fvety54f56135b44f46y4y46y4hf.rh4</ns2:sessionId>
  <describeSObject xmlns=''>


...But response is in error:

<?xml version="1.0" encoding="UTF-8"?>

<soapenv:Envelope xmlns:soapenv="">


<faultstring>No operation available for request {}describeSObject</faultstring></soapenv:Fault></soapenv:Body>


...I just find it strange that the Login goes fine, but the describe crashes.



You're sending an enterprise API request to the partner API endpoint, you need to either switch the enterprise API endpoint, or switch your payload to use the partner API namespaces.


Sorry - my misrtake - should have used the partner WSDL.



This was selected as the best answer