0

I am struggling to find a reason why this API call is failing. Obviously the username and password are incorrect - but that should at least give an error message of access denied. Can anyone see why this is a invalid SOAP message?

I am just getting this 500 Internal Server Error.

<soap:Reason>
<soap:Textxml:lang="en">
WSE012: The input was not a valid SOAP message 
because the following information is missing: action.
</soap:Text>
</soap:Reason>

My SOAP Call

 <Envelope xmlns="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
   <Header>
      <Security xmlns="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">
         <UsernameToken>
            <Username>MYSUERNAME</Username>
            <Password>PASSWORD</Password>
         </UsernameToken>
      </Security>
   </Header>
   <Body>
      <CreateRequest xmlns="http://exacttarget.com/wsdl/partnerAPI ">
         <Objects xsi:type="TriggeredSend">
            <PartnerKey xsi:nil="true"/>
            <ObjectID xsi:nil="true"/>
            <TriggeredSendDefinition>
               <PartnerKey xsi:nil="true"/>
               <ObjectID xsi:nil="true"/>
               <CustomerKey>Definition_Key</CustomerKey>
            </TriggeredSendDefinition>
            <Subscribers>
               <PartnerKey xsi:nil="true"/>
               <ObjectID xsi:nil="true"/>
               <EmailAddress>[email protected]</EmailAddress>
               <SubscriberKey>[email protected]</SubscriberKey>
               <Attributes>
                  <Name>HTML__BODY</Name>
                  <Value>????????????????????</Value>
               </Attributes>
            </Subscribers>
         </Objects>
      </CreateRequest>
   </Body>
</Envelope>
2

2 Answers 2

1

The SOAP Action has to be specified in either the HTTP Header or the SOAP XML Header:

HTTP Header:

SOAPAction: Create

Soap Header:

<s:Header>
   <a:Action s:mustUnderstand="1">Create</a:Action>
   <a:MessageID>urn:uuid:f7579936-b92f-4596-9050-327b8252f4e2</a:MessageID>
   <a:To s:mustUnderstand="1">https://webservice.exacttarget.com/Service.asmx</a:To>
   <o:Security s:mustUnderstand="1" xmlns:o="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">
      <o:UsernameToken u:Id="uuid-df86d8b8-5103-442e-93d9-258256222ce0-1">
         <o:Username>ccc</o:Username>
         <o:Password>ccc</o:Password>
      </o:UsernameToken>
   </o:Security>
</s:Header>

If you are using SOAPUI, it automatically builds out the HTTP header with the appropriate SOAP action based on what is selected under SoapBinding in the Projects explorer. You can see this by clicking the raw tab when looking at a request.

0

You may want to attempt to include the below in your "Header". The 500 Internal Server Error is just a generic error message, given when an unexpected condition was encountered and no more specific message is suitable.

<wsa:Action>Create</wsa:Action> 

Also, below is a working SOAP Envelope that I use in SOAPUI without any issues, that doesn't need the above:

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://exacttarget.com/wsdl/partnerAPI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
   <soap:Header>
      <wsse:Security soap:mustUnderstand="1" xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">
         <wsse:UsernameToken>
            <wsse:Username>USERNAME</wsse:Username>
            <wsse:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText">PASSWORD</wsse:Password>
         </wsse:UsernameToken>
      </wsse:Security>
   </soap:Header>
   <soap:Body>
      <CreateRequest xmlns="http://exacttarget.com/wsdl/partnerAPI">
     <!--    <ns1:Options>
            <ns1:SendResponseTo>
               <ns1:ResponseType>email</ns1:ResponseType>
               <ns1:ResponseAddress>[email protected]</ns1:ResponseAddress>
               <ns1:RespondWhen>OnCallComplete</ns1:RespondWhen>
               <ns1:IncludeResults>true</ns1:IncludeResults>
               <ns1:IncludeObjects>true</ns1:IncludeObjects>
               <ns1:OnlyIncludeBase>false</ns1:OnlyIncludeBase>
            </ns1:SendResponseTo>
            <ns1:RequestType>Asynchronous</ns1:RequestType>
            <ns1:QueuePriority>High</ns1:QueuePriority>
         </ns1:Options> -->
         <Objects xsi:type="TriggeredSend">
           <!-- <Client>
               <ID>12345</ID>
            </Client> -->
            <ObjectID xsi:nil="true"/>
            <TriggeredSendDefinition>
               <ObjectID xsi:nil="true"/>
               <CustomerKey>EXTERNALKEY</CustomerKey>
            </TriggeredSendDefinition>
            <Subscribers>
               <PartnerKey xsi:nil="true"/>
               <ObjectID xsi:nil="true"/>
               <EmailAddress>[email protected]</EmailAddress>
               <SubscriberKey>[email protected]</SubscriberKey>
               <Attributes>
                  <Name>HTML__Body</Name>
                  <Value><![CDATA[<HTML><BODY><P>TEST</BODY></HTML>]]></Value>
               </Attributes>
            </Subscribers>
         </Objects>
      </CreateRequest>
   </soap:Body>
</soap:Envelope>
0

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .