Marketing Cloud SOAP API ContinueRequest报错:缺失Action
问题
调用Marketing Cloud的SOAP API时,因返回记录数超过2500,使用ContinueRequest获取剩余记录。首次调用成功返回2500条记录,但后续请求返回「WSE012: 缺失action」错误。请求报文及错误响应如下:
请求报文:
<?xml version="1.0" encoding="UTF-8"?> <s:Envelope xmlns:s="http://www.w3.org/2003/05/soap-envelope" xmlns:a="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:u="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"> <s:Header> <a:Action s:mustUnderstand="1">Retrieve</a:Action> <fueloauth xmlns="http://exacttarget.com"> will insert token here</fueloauth> </s:Header> <s:Body xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <RetrieveRequestMsg xmlns="http://exacttarget.com/wsdl/partnerAPI"> <RetrieveRequest> <ContinueRequest>will insert req id here</ContinueRequest> </RetrieveRequest> </RetrieveRequestMsg> </s:Body> </s:Envelope>
错误响应:
<?xml version="1.0" encoding="utf-8"?> <soap:Envelope xmlns:soap="http://www.w3.org/2003/05/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"> <env:Header xmlns:env="http://www.w3.org/2003/05/soap-envelope"> <wsa:Action>http://schemas.xmlsoap.org/ws/2004/08/addressing/fault</wsa:Action> <wsa:MessageID>urn:uuid:1fdaa145-96de-40bb-81c2-35a36112c840</wsa:MessageID> <wsa:To>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</wsa:To> <wsse:Security> <wsu:Timestamp wsu:Id="Timestamp-6247ea86-37ff-4b51-be6a-527b203b412e"> <wsu:Created>2023-04-24T01:07:47Z</wsu:Created> <wsu:Expires>2023-04-24T01:12:47Z</wsu:Expires> </wsu:Timestamp> </wsse:Security> </env:Header> <soap:Body> <soap:Fault> <soap:Code> <soap:Value>soap:Sender</soap:Value> </soap:Code> <soap:Reason> <soap:Text xml:lang="en">WSE012: The input was not a valid SOAP message because the following information is missing: action.</soap:Text> </soap:Reason> </soap:Fault> </soap:Body> </soap:Envelope>
问题分析与解决
请求报文中的a:Action元素值仅为Retrieve,不符合Marketing Cloud SOAP API的要求。对于带ContinueRequest的Retrieve请求,Action必须使用完整命名空间限定的操作名称。
正确的Action值应为:http://exacttarget.com/wsdl/partnerAPI/Retrieve
修正后的请求报文Header部分示例:
<s:Header> <a:Action s:mustUnderstand="1">http://exacttarget.com/wsdl/partnerAPI/Retrieve</a:Action> <fueloauth xmlns="http://exacttarget.com">your-valid-token-here</fueloauth> </s:Header>
额外检查点:
- 确保
ContinueRequest中填入的是首次调用返回的有效RequestID值 - 确认
fueloauth中的token未过期且权限正常
内容的提问来源于stack exchange,提问作者Chandrashekhar Dautpure
相关产品推荐
相关产品推荐

