4

Am hoping that someone can help me out, I have looked on some previous threads but just seem to be missing something.

I am trying to make the below SOAP call:

GET: https://webservice.s6.exacttarget.com/Service.asmx

Headers:

Content-Type: text/xml; charset=utf-8

Body:

<?xml version="1.0" encoding="utf-8"?>

<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>
  <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 wsu:Id="UsernameToken-24440876" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
        <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>
</soapenv:Header>
<soapenv:Body>
  <RetrieveRequestMsg xmlns="http://exacttarget.com/wsdl/partnerAPI">
     <RetrieveRequest>
        <ObjectType>DataExtensionObject[ED91E930-1FBA-4C19-93F2-78B74842F60D]</ObjectType>
        <Properties>CampaignName</Properties>
        <Properties>Description</Properties>
        <Properties>CommunicationType</Properties>
        <Filter xsi:type="SimpleFilterPart">
           <Property>CampaignName</Property>
           <SimpleOperator>equals</SimpleOperator>
           <Value>Touch Base with Client</Value>
        </Filter>
     </RetrieveRequest>
   </RetrieveRequestMsg>
 </soapenv:Body>

Response:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title>Error</title>
    <meta name="GENERATOR" content="Microsoft Visual Studio .NET 7.1" />
    <meta name="CODE_LANGUAGE" content="C#" />
    <meta name="vs_defaultClientScript" content="JavaScript" />
    <meta name="vs_targetSchema" content="http://schemas.microsoft.com/intellisense/ie5" />
</head>
<body style="margin: 0px; padding: 0px; font-family: Arial;">
    <table style="height:100%; width:100%;" border="0" cellpadding="5" cellspacing="0">
        <tr style="height:10%; background-color:#808080">
            <td>
                <div style="color:#ffffff; font-size: 16px;">An error has occurred and has been logged by our system.
                    <br />
                    Thank you. </div>
            </td>
        </tr>
        <tr valign="top">
            <td>
                <div id="errorTxt">&nbsp;</div>
            </td>
        </tr>
    </table>
</body>
</html>

Thanks, Garth

  • what is the issue? have you tried to use SOAPUI to diagnose what is happening? – AtulRajguru9 Aug 10 '16 at 4:28
  • I have added the response to the original query above. I am currently using Boomerang for testing – Garth Powell Aug 10 '16 at 6:03
  • Try putting brackets around [Touch Base with Client]. If that doesnt work, try double quotes. Let me know if that resolves it. – David Jackman Aug 10 '16 at 13:34
  • Hi David, thanks for the suggestion, unfortunately neither of the above 2 options had any impact on the response. I even tried removing the filter but this had no impact. – Garth Powell Aug 11 '16 at 2:12
1
  1. It should be HTTPPOST not HTTPGET, you also need to have these two in headers:

    Content-Type:text/xml; charset=utf-8

    SOAPAction:"Retrieve"

2.The Body Content looks wrong for retrieving DataExtensionField objects. It should look something like below:

 <soapenv:Body><RetrieveRequestMsg xmlns="http://exacttarget.com/wsdl/partnerAPI">
 <RetrieveRequest>
    <ObjectType>DataExtensionField</ObjectType>
    <Properties>Name</Properties>
    <Properties>FieldType</Properties>
    <Filter xsi:type="SimpleFilterPart">
       <Property>DataExtension.CustomerKey</Property>
       <SimpleOperator>equals</SimpleOperator>
       <Value>ED91E930-1FBA-4C19-93F2-78B74842F60D</Value>
    </Filter>
 </RetrieveRequest></RetrieveRequestMsg></soapenv:Body>

Check this link for more properties you can retrieve for DataExtensionField Object

  • 1
    Hi Bobio7, Thanks, this is where I think I was going wrong, I have applied the code that you have provided & this has successfully made the call. – Garth Powell Aug 17 '16 at 23:30

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.