0

I'm trying to send a SOAP request to the marketing cloud api so I can retrieve information from a data extension.

My current request looks like this:

<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:Header>
        <fueloauth xmlns="https://exacttarget.com">[AccessToken]</fueloauth>
   </soapenv:Header>
 <soapenv:Body>
    <RetrieveRequestMsg xmlns="http://exacttarget.com/wsdl/partnerAPI">
        <RetrieveRequest>
            <ObjectType>DataExtensionObject[POC JB 2]</ObjectType>
            <Properties>ID</Properties>
            <Properties>EMAIL</Properties>
            <Properties>HCP_NAME</Properties>
            <Properties>VARIABLE_C</Properties>
            <Properties>PHONE</Properties>
            <Properties>REP_NAME</Properties>
            <Properties>SEND_DATE</Properties>
            <Filter xsi:type="SimpleFilterPart">
                <Property>ID</Property>
                <SimpleOperator>equals</SimpleOperator>
                <Value>4016</Value>
            </Filter>
        </RetrieveRequest>
    </RetrieveRequestMsg>
    </soapenv:Body>
</soapenv:Envelope>

I am trying to grab a specific record in the data extension with an ID of 4016, hence the filter checking if the ID is a value of 4016.

All of the properties in the retrieve request are spelled correctly.

The response I receive is the following:

<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>DescribeResponse</wsa:Action>
      <wsa:MessageID>urn:uuid:eb1d42d5-d3d2-429b-ae93-6fbd6b373e6f</wsa:MessageID>
      <wsa:RelatesTo>urn:uuid:16643c85-0d3b-41a1-bdb3-3f1e15c0b54e</wsa:RelatesTo>
      <wsa:To>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</wsa:To>
      <wsse:Security>
         <wsu:Timestamp wsu:Id="Timestamp-ffdff73a-9aa6-4633-ae5a-54119d9cdd29">
            <wsu:Created>2019-06-11T22:05:24Z</wsu:Created>
            <wsu:Expires>2019-06-11T22:10:24Z</wsu:Expires>
         </wsu:Timestamp>
      </wsse:Security>
   </soap:Header>
   <soap:Body>
      <DefinitionResponseMsg xmlns="http://exacttarget.com/wsdl/partnerAPI">
         <RequestID>c58c10dd-3201-4751-917d-b9200008d2d1</RequestID>
      </DefinitionResponseMsg>
   </soap:Body>
</soap:Envelope>

My request envelope follows the same structure as the example found here: https://developer.salesforce.com/docs/atlas.en-us.noversion.mc-apis.meta/mc-apis/retrieving_data_from_a_data_extension.htm

The issue is, there is not data in the response, yet the example shows that data should be found in the response.

I'd be very grateful if someone could point me in the right direction. Thank you.

3
  • 2
    Check your header on the call (not the header in the envelope) becauee the response is showing a 'describe' action. Which is likely causing the issue. It should be retrieve. I believe the header property should be like SoapAction or similar Commented Jun 11, 2019 at 22:29
  • 1
    @Gortonington That was exactly it. Thank you! I'm using SOAP-UI to send the requests and had been trying to send this request in the wrong method.
    – Conor
    Commented Jun 11, 2019 at 22:34
  • Glad to hear it solved the issue. Once I get back to a computer I will put it as an answer so its easier for others with same issue to reference Commented Jun 11, 2019 at 22:38

1 Answer 1

2

The issue is likely in the header on the call (not the header in the envelope). The header property you need to change is called 'SoapAction'.

I believe currently the response is showing a 'describe' action, which is likely causing the issue. It should instead be retrieve to match your SOAP envelope.

You must log in to answer this question.

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