I have a client who is utilizing a CAMS sever to perform their API sends.

I put together a SOAP envelope for the to run a triggered send that works fine in SOAP UI, but when testing within the CAMS server environment, they receive a "Missing SOAP Action" error code 2 response.

Here is the initial envelope : I have removed the client account details.

note: I have also tried placing the "Create" action in the header which when run through the client's system provides a blank response.

I am note sure if something is being appended to the header when being sent from their system...

Any help is very much appreciated!

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"  xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" xmlns:ns1="http://exacttarget.com/wsdl/partnerAPI">
      <wsse:Security soap:mustUnderstand="1">
            <wsse:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText">PASSWORD</wsse:Password>
         <ns1:Objects xsi:type="ns1:TriggeredSend">

I recently had a very similar issue with Apex making a SOAP callout to a webservice using the proxy code generated by wsdl2apex.

If you look at the CALLOUT_REQUEST in the debug log you can see both the outbound SOAP message and a second entry with a JSON representation. The JSON version ends with something like:

::SFDC_STACK_DEPTH=1 SOAPAction="https://www.example.com/api/SecretSquirrelService" User-Agent=SFDC-Callout/29.0 Accept=text/xml Content-Type=text/xml; charset=UTF-8

These look like the the HTTPRequest headers that are sent with the request.

Here the SOAPAction corresponds to the second string in the array passed to WebServiceCallout.invoke in the generated proxy class.

public WS.Foo GetFoo() {

        // snip

          new String[]{endpoint_x,
          'https://www.example.com/api/SecretSquirrelService', // <=== This gets sent as the SOAPAction HttpRequest header
        response_x = response_map_x.get('response_x');
        return response_x.GetFooResult;

In my case the WSDL was modified incorrectly to get it to pass through wsdl2apex and the SOAPAction ended up as the empty string.


Here is what the client ended up needing. The header was required so that their server knew the appropriate action to take.

I appended this to the top of the envelope.

POST https://webservice.exacttarget.com/Service.asmx HTTP/1.1
Accept-Encoding: gzip,deflate
Content-Type: text/xml;charset=UTF-8
SOAPAction: "Create"
Content-Length: 1354
Host: webservice.exacttarget.com
Connection: Keep-Alive

Thanks again for the assistance.

  • may be worthwhile to award the answer above, as @DanielBallinger guided in the direction of populating the SOAPAction HTTP header. Jan 25 '14 at 15:46

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.