0

Based on this question I a trying to get a list of my Salesforce Marketing Cloud DataExtensions using the following XML in SoapUI (auth added automatically)

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:par="http://exacttarget.com/wsdl/partnerAPI">
     <soapenv:Body>
        <RetrieveRequestMsg xmlns="http://exacttarget.com/wsdl/partnerAPI">
           <RetrieveRequest>
              <ObjectType>DataExtension</ObjectType>
              <Properties>CustomerKey</Properties>
              <Properties>Name</Properties>
              <Properties>CategoryID</Properties>
           </RetrieveRequest>
        </RetrieveRequestMsg>
     </soapenv:Body>
</soapenv:Envelope>

Whatever I do, the response has the very helpful OverallStatus message 'Error'. No error code or description.

<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">
   <soap:Header>
      <wsa:Action>QueryResponse</wsa:Action>
      <wsa:MessageID>urn:uuid:08402dfb-1b44-413a-b474-cdbaa276cdea</wsa:MessageID>
      <wsa:RelatesTo>urn:uuid:ba4a56e6-3116-4cc0-b1e4-1719f07e83cb</wsa:RelatesTo>
      <wsa:To>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</wsa:To>
      <wsse:Security>
         <wsu:Timestamp wsu:Id="Timestamp-943ea217-eb5d-4b5a-b041-78434f5ab20a">
            <wsu:Created>2018-02-08T18:12:13Z</wsu:Created>
            <wsu:Expires>2018-02-08T18:17:13Z</wsu:Expires>
         </wsu:Timestamp>
      </wsse:Security>
   </soap:Header>
   <soap:Body>
      <QueryResponseMsg xmlns="http://exacttarget.com/wsdl/partnerAPI">
         <OverallStatus>Error</OverallStatus>
         <RequestID>f3dd242f-0843-4203-adae-71264a7a815c</RequestID>
      </QueryResponseMsg>
   </soap:Body>
</soap:Envelope>

Two questions:

  1. What am I doing wrong?
  2. Any way to get a more expressive error message? Error is not helpful.
2

OK sorted. Cause: User error.

I didn't understand that the 'folders' in SoapUI have significance. They set the SOAPAction header. I'd put my RetrieveRequest in the Query folder, when it needed to be the Retrieve folder.

wrong folder in SoapUI

Lesson learned!

1
  • Yes, if you do it in another app, ie: Postman, you need to add the header: SOAPAction:"Retrieve" in this case – SebOB Feb 9 '18 at 11:24
0

I am doing it using the fueloauth param, ie:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" 
xmlns:par="http://exacttarget.com/wsdl/partnerAPI">
   <soapenv:Header>
   <fueloauth xmlns="http://exacttarget.com">YOUR TOKEN</fueloauth>
  </soapenv:Header>
   <soapenv:Body>
      <RetrieveRequestMsg xmlns="http://exacttarget.com/wsdl/partnerAPI">
         <RetrieveRequest>
            <ObjectType>DataExtension</ObjectType>
            <Properties>Name</Properties>     
            <Properties>CustomerKey</Properties>         
        </RetrieveRequest>
      </RetrieveRequestMsg>
   </soapenv:Body>
</soapenv:Envelope>

I think you should add the header with the token or the username/token header:

<soapenv:Header>
      <wsse:Security soapenv:mustUnderstand="1" xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">
         <wsse:UsernameToken>
             <wsse:Username>YOUR USERNAME</wsse:Username>
            <wsse:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText">YOUR PASSWORD_</wsse:Password>
         </wsse:UsernameToken>
      </wsse:Security>
   </soapenv:Header>
2
  • thanks for your response. Trying your first code snippet using a token retrieved from the REST endpoint /v1/requestToken gives the same error for me shown in the question. The same when disabling SoapUI's Basic Authentication and using your second code snippet. Authentication looks to work both ways, so are there additional permissions needed? – PeterB Feb 9 '18 at 11:15
  • Are you giving permissions over Data Extension > Read to your "API Integration" component? – SebOB Feb 9 '18 at 11:22

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.