1

I want to create an account using SoapUI as explained here: https://trailhead.salesforce.com/trails/force_com_dev_intermediate/modules/api_basics/units/api_basics_soap

My request is:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:urn="urn:enterprise.soap.sforce.com" xmlns:urn1="urn:sobject.enterprise.soap.sforce.com">
   <soapenv:Header>

      <urn:AssignmentRuleHeader>
         <urn:assignmentRuleId>?</urn:assignmentRuleId>
         <urn:useDefaultRule>?</urn:useDefaultRule>
      </urn:AssignmentRuleHeader>
      <urn:SessionHeader>
         <urn:sessionId>xxxMYIDxxx</urn:sessionId>
      </urn:SessionHeader>
   </soapenv:Header>
   <soapenv:Body>
      <urn:create>
         <!--Zero or more repetitions:-->
         <urn:sObjects xsi:type="urn1:Account" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
            <!--Zero or more repetitions:-->
            <Name>Sample SOAP Account</Name>

         </urn:sObjects>
      </urn:create>
   </soapenv:Body>
</soapenv:Envelope>

My endpoint is : https://eu11.salesforce.com/services/Soap/m/39.0.

What I get is:

<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:enterprise.soap.sforce.com}create</faultstring>
      </soapenv:Fault>
   </soapenv:Body>
</soapenv:Envelope>

How can I get it fixed?

4

You are sending an enterprise WSDL request to the Metadata API https://eu11.salesforce.com/services/Soap/m/39.0 endpoint. Instead you should send to Enterprise API https://eu11.salesforce.com/services/Soap/c/39.0 endpoint.

Please refer to this Salesforce KNOWLEDGE ARTICLE for more details.

'No operation available for request {urn:enterprise.soap.sforce.com}' error when sending SOAP request

Description

When I send a SOAP request from a third party application into salesforce, I receive the following error message

No operation available for request {urn:enterprise.soap.sforce.com}

Resolution

This can occur when you are sending the request to the wrong endpoint. For example, depending on which WSDL you are using, the endpoint will be different, as follows

Partner WSDL: /services/Soap/u/34.0 Enterprise WSDL: /services/Soap/c/34.0

Notice how the Partner WSDL has a 'u' in the path whereas the Enterprise WSDL has a 'c'. If you log in using the Enterprise WSDL and then use the Partner WSDL endpoint to make API calls, you will see this error. Make sure your API calls are sent to the correct endpoint, based on what WSDL you've chosen to use.

| improve this answer | |
1

I've found that I should have deleted the

<urn:AssignmentRuleHeader>

So, the complete code should be:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:urn="urn:enterprise.soap.sforce.com" xmlns:urn1="urn:sobject.enterprise.soap.sforce.com" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <soapenv:Header>
    <urn:SessionHeader>
      <urn:sessionId>00D0Y000001JXaR!ARgAQOPecVAq.xoTw251d4YEnviWYp5RL8JgCpvBCHlXUeik_M1ktn_aqAI9NecWNInaPgslo.teGXDknV4Ti92bAwz7mhy_</urn:sessionId>
    </urn:SessionHeader>
  </soapenv:Header>
  <soapenv:Body>
    <urn:create>
      <urn:sObjects xsi:type="urn1:Account" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
        <Name>Sample Inbound Account One</Name>
      </urn:sObjects>
    </urn:create>
  </soapenv:Body>
</soapenv:Envelope>
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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