0

Following is my SOAP request:

{
  uri: 'https://webservice.s6.exacttarget.com/Service.asmx',
  method: 'POST',
  headers: {
    'User-Agent': 'node-fuel/1.3.1',
    'Content-Type': 'text/xml',
    SOAPAction: 'Retrieve'
  },
  body: '<Envelope
    xmlns="http://schemas.xmlsoap.org/soap/envelope/"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">\n  
    <Header>\n    
        <To>https://webservice.s6.exacttarget.com/Service.asmx</To>\n    
        <fueloauth
            xmlns="http://exacttarget.com">xxxxxxxxxxxxx
        </fueloauth>\n  
    </Header>\n  
    <Body>\n    
        <RetrieveRequestMsg
            xmlns="http://exacttarget.com/wsdl/partnerAPI">\n      
            <RetrieveRequest>\n        
                <ObjectType>AsyncActivityStatus</ObjectType>\n        
                <Properties>Status</Properties>\n        
                <Properties>StatusMessage</Properties>\n        
                <Client>\n          
                    <ID>12XXX09</ID>\n        
                </Client>\n        
                <Filter xsi:type="SimpleFilterPart">\n          
                    <Property>TaskID</Property>\n          
                    <SimpleOperator>equals</SimpleOperator>\n          
                    <Value>34XXX08</Value>\n        
                </Filter>\n      
            </RetrieveRequest>\n    
        </RetrieveRequestMsg>\n  
    </Body>\n
</Envelope>'
}

I am getting following response from salesforce marketing cloud:

{
  "body": {
    "OverallStatus": "OK",
    "RequestID": "xxxxx-xxx-xx-xxxxxxxxxxx",
    "Results": [
      {
        "PartnerKey": "",
        "ObjectID": "",
        "Type": "AsyncActivityStatus",
        "Properties": {
          "Property": [
            {
              "Name": "Status",
              "Value": "FatalError"
            },
            {
              "Name": "StatusMessage",
              "Value": "QueryDefinition perform called successfully"
            }
          ]
        }
      }
    ]
  },
  "res": {
    "statusCode": 200,
    "body": "<?xml version=\"1.0\" encoding=\"utf-8\"?>
<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>RetrieveResponse</wsa:Action>
        <wsa:MessageID>urn:uuid:xxx-xxxx-xxx-xxx-xxx-xxx</wsa:MessageID>
        <wsa:RelatesTo>urn:uuid:xxx-xxx-xxx-xxx-xxx-xxx</wsa:RelatesTo>
        <wsa:To>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</wsa:To>
        <wsse:Security>
            <wsu:Timestamp wsu:Id=\"Timestamp-xxxx-xxxx-xxx-xxx\">
                <wsu:Created>2018-08-08T17:35:02Z</wsu:Created>
                <wsu:Expires>2018-08-08T17:40:02Z</wsu:Expires>
            </wsu:Timestamp>
        </wsse:Security>
    </soap:Header>
    <soap:Body>
        <RetrieveResponseMsg
            xmlns=\"http://exacttarget.com/wsdl/partnerAPI\">
            <OverallStatus>OK</OverallStatus>
            <RequestID>xxxx-xxx-xxx-xxx-xxx</RequestID>
            <Results xsi:type=\"ObjectExtension\">
                <PartnerKey xsi:nil=\"true\" />
                <ObjectID xsi:nil=\"true\" />
                <Type>AsyncActivityStatus</Type>
                <Properties>
                    <Property>
                        <Name>Status</Name>
                        <Value>FatalError</Value>
                    </Property>
                    <Property>
                        <Name>StatusMessage</Name>
                        <Value>QueryDefinition perform called successfully</Value>
                    </Property>
                </Properties>
            </Results>
        </RetrieveResponseMsg>
    </soap:Body>
</soap:Envelope>,
    "headers": {
      "cache-control": "private, max-age=0,no-store",
      "pragma": "no-cache",
      "content-length": "1520",
      "content-type": "text/xml; charset=utf-8",
      "server": "Microsoft-IIS/7.5",
      "x-aspnet-version": "4.0.30319",
      "x-powered-by": "ASP.NET",
      "strict-transport-security": "max-age=7776000; includeSubDomains",
      "x-xss-protection": "1; mode=block",
      "x-content-type-options": "nosniff",
      "referrer-policy": "strict-origin-when-cross-origin",
      "x-frame-options": "DENY",
      "date": "Wed, 08 Aug 2018 17:35:01 GMT",
      "connection": "close"
    },
    "request": {
      "uri": {
        "protocol": "https:",
        "slashes": true,
        "auth": null,
        "host": "webservice.s6.exacttarget.com",
        "port": 443,
        "hostname": "webservice.s6.exacttarget.com",
        "hash": null,
        "search": null,
        "query": null,
        "pathname": "/Service.asmx",
        "path": "/Service.asmx",
        "href": "https://webservice.s6.exacttarget.com/Service.asmx"
      },
      "method": "POST",
      "headers": {
        "User-Agent": "node-fuel/1.3.1",
        "Content-Type": "text/xml",
        "SOAPAction": "Retrieve",
        "content-length": 848
      }
    }
  }
}

What is wrong with my SOAP request and response. Please help me.

Thanks in advance.

  • 1
    I could be reading this wrong as it has been years since I worked with AsyncActivityStatus, but it looks like the call worked perfect, it is the program that failed. – Gortonington Aug 9 '18 at 12:51
1

Your SOAP call worked successfully. You have received the proper Response containing the Object and Object properties you have asked for.

The status property of the AsyncActivityStatus object you have requested is 'Fatal Error'. The fatal error has nothing to do with your SOAP request format.

  • This is the answer, tho. The author is asking what is wrong with his Soap request. There isn't anything wrong with his Soap request. – Mike Aug 9 '18 at 16:31
  • 1
    You are right, my bad. I missed the last part after the code dump – glls Aug 9 '18 at 16:42
  • @Mike thanks for your reply. I did not request FatalError. AsyncActivityStatus SOAP request always returns some valid status like as Completed, Queued and Cancel. But in my case, it's returning FatalError instead of valid status. I think something is wrong in salesforce side or in my SOAP request. – Krishan Kant Sharma Aug 10 '18 at 7:27
  • I know you did not specifically request 'FatalError -- you requested status and that is the status it returned. There isnt anything wrong with the SOAP request or response, your program failed with a FatalError. Id recommend opening a support request if you need to drill down further as I do not know of a way to get more detailed error messages on an error. – Mike Aug 13 '18 at 13:59

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.