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
MaumanMauman 

AXIS engine could not find a target service to invoke!

I'm trying to 'roll my own' SOAP messages in order to 'opt-out' contacts from one of our ASP pages on our website.  I can login alright, but then when I try sending the update, I get back "The AXIS engine could not find a target service to invoke! targetService is u/2.5".  I am sending this message the url that is returned with the login (https://na1-api.salesforce.com/services/Soap/u/2.5).

Any ideas what the issue is?  Is it a problem with the namespace?

Sorry if the following does not appear formatted.

 

The Request (note: I modified the session string):

<SOAP-ENV:Envelope xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
 <SOAP-ENV:Header>
  <ns1:SessionHeader SOAP-ENV:mustUnderstand="0" xmlns:ns1="SoapService">
   <ns2:sessionId xmlns:ns2="urn:enterprise.soap.sforce.com">WrLj2MGF5bFg1Nm5b</ns2:sessionId>
  </ns1:SessionHeader>
 </SOAP-ENV:Header>
 <SOAP-ENV:Body>
  <update xmlns:ns="urn:enterprise.soap.sforce.com">
   <sObjects xsi:type="ns3:Contact" xmlns:ns3="urn:sobject.enterprise.soap.sforce.com">
    <ns3:Id>00330000002Uxn2</ns3:Id>
    <ns3:HasOptedOutOfEmail>true</ns3:HasOptedOutOfEmail>
   </sObjects>
  </update>
 </SOAP-ENV:Body>
</SOAP-ENV:Envelope>

 

The Response:


<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
 <soapenv:Body>
  <soapenv:Fault>
   <faultcode xmlns:ns1="http://xml.apache.org/axis/">ns1:Server.NoService</faultcode>
   <faultstring>The AXIS engine could not find a target service to invoke! targetService is u/2.5</faultstring>
   <detail/>
  </soapenv:Fault>
 </soapenv:Body>
</soapenv:Envelope>

DevAngelDevAngel

Hi Mauman,

The clues to the answer lie in the namespaces your are using and the url returned from the login.  The url contains "u/2.5".  This means you logged in using the partner api namespace.  In the request you are Jobing together (Job is a brand of cigarette paper) contains a namespace that is inconsistent with what is expected by the end point. 

To solve the problem, replace enterprise with partner is all your namespace declarations and give it a whirl.

Cheers.

MaumanMauman

I tried that before the original posting.

When setting it to partner.soap.sforce.com in both the login and the update SOP message I get the same "The AXIS engine could not find a target service to invoke! targetService is u/2.5" message I got in the first posting.

Any other ideas???

MaumanMauman

Here is the message I send:

<SOAP-ENV:ENVELOPE XMLNS:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" XMLNS:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" XMLNS:XSD="http://www.w3.org/2001/XMLSchema" XMLNS:XSI="http://www.w3.org/2001/XMLSchema-instance">
    <SOAP-ENV:HEADER>
        <NS1:SESSIONHEADER SOAP-ENV:MUSTUNDERSTAND="0" XMLNS:NS1="SoapService">
            <NS2:SESSIONID XMLNS:NS2="urn:partner.soap.sforce.com">9NDoxKHn</NS2:SESSIONID>
        </NS1:SESSIONHEADER>
    </SOAP-ENV:HEADER>
    <SOAP-ENV:BODY>
        <UPDATE XMLNS:NS="urn:partner.soap.sforce.com">
            <SOBJECTS XMLNS:NS3="urn:sobject.partner.soap.sforce.com" XSI:TYPE="ns3:Contact">
                <NS3:ID>00330000002Uxn2</NS3:ID>
                <NS3:HASOPTEDOUTOFEMAIL>true</NS3:HASOPTEDOUTOFEMAIL>
            </SOBJECTS>
        </UPDATE>
    </SOAP-ENV:BODY>
</SOAP-ENV:ENVELOPE>

 

And here is the response:

 

<SOAPENV:ENVELOPE XMLNS:SOAPENV="http://schemas.xmlsoap.org/soap/envelope/" XMLNS:XSD="http://www.w3.org/2001/XMLSchema" XMLNS:XSI="http://www.w3.org/2001/XMLSchema-instance">
    <SOAPENV:BODY>
        <SOAPENV:FAULT>
            <FAULTCODE XMLNS:NS1="http://xml.apache.org/axis/">ns1:Server.NoService</FAULTCODE>
            <FAULTSTRING>The AXIS engine could not find a target service to invoke! targetService is u/2.5</FAULTSTRING>
            <DETAIL></DETAIL>

        </SOAPENV:FAULT>
    </SOAPENV:BODY>
</SOAPENV:ENVELOPE>

DevAngelDevAngel

Hi Mauman,

Do you need to prefix the call with the namespaces you have defined?

<SOAP-ENV:ENVELOPE XMLNS:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" XMLNS:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" XMLNS:XSD="http://www.w3.org/2001/XMLSchema" XMLNS:XSI="http://www.w3.org/2001/XMLSchema-instance">
    <SOAP-ENV:HEADER>
        <NS1:SESSIONHEADER SOAP-ENV:MUSTUNDERSTAND="0" XMLNS:NS1="SoapService">
            <NS2:SESSIONID XMLNS:NS2="urn:partner.soap.sforce.com">9NDoxKHn</NS2:SESSIONID>
        </NS1:SESSIONHEADER>
    </SOAP-ENV:HEADER>
    <SOAP-ENV:BODY>
        <NS:UPDATE XMLNS:NS="urn:partner.soap.sforce.com">
            <NS3:SOBJECTS XMLNS:NS3="urn:sobject.partner.soap.sforce.com" XSI:TYPE="ns3:Contact">
                <NS3:ID>00330000002Uxn2</NS3:ID>
                <NS3:HASOPTEDOUTOFEMAIL>true</NS3:HASOPTEDOUTOFEMAIL>
            </NS3:SOBJECTS>
        </NS:UPDATE>
    </SOAP-ENV:BODY>
</SOAP-ENV:ENVELOPE>

 

MaumanMauman
Oh yeah!  Oops!  That was problem exactly!  Thanks!!!
tyomatyoma
Mauman: Hi. I have similar problem with Axis (I can do only login), all other actions (*describes, query etc)
return Fault in response. Can your tell me how did you gether XML request and response? and how to prefix
the call with namespaces? You can email me srg_olh[at]fm.com.ua
Thanks!