【发布时间】:2022-01-18 23:59:58
【问题描述】:
我是 SOAP 新手。
我正在尝试获取发送对象信息,并且我能够提取我需要的所有数据,除了
发送ID
这是我在邮递员中提出的要求
<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>{{sf_ps_access_token}}</fueloauth>
</soapenv:Header>
<soapenv:Body>
<RetrieveRequestMsg xmlns="http://exacttarget.com/wsdl/partnerAPI">
<RetrieveRequest>
<ObjectType>Send</ObjectType>
<Properties>ID</Properties>
<Properties>BCCEmail</Properties>
<Properties>SendID</Properties>
<Properties>Client.PartnerClientKey</Properties>
<Properties>PartnerKey</Properties>
<Properties>CreatedDate</Properties>
<Properties>ModifiedDate</Properties>
<Properties>Client.ID</Properties>
<Properties>Email.ID</Properties>
<Properties>Email.PartnerKey</Properties>
<Properties>SendDate</Properties>
<Properties>FromAddress</Properties>
<Properties>FromName</Properties>
<Properties>Duplicates</Properties>
<Properties>InvalidAddresses</Properties>
<Properties>HardBounces</Properties>
<Properties>SoftBounces</Properties>
<Properties>OtherBounces</Properties>
<Properties>ForwardedEmails</Properties>
<Properties>UniqueClicks</Properties>
<Properties>UniqueOpens</Properties>
<Properties>NumberSent</Properties>
<Properties>NumberDelivered</Properties>
<Properties>NumberTargeted</Properties>
<Properties>NumberErrored</Properties>
<Properties>NumberExcluded</Properties>
<Properties>Unsubscribes</Properties>
<Properties>MissingAddresses</Properties>
<Properties>Subject</Properties>
<Properties>PreviewURL</Properties>
<Properties>SentDate</Properties>
<Properties>EmailName</Properties>
<Properties>Status</Properties>
<Properties>EmailSendDefinition.ObjectID</Properties>
<Properties>EmailSendDefinition.CustomerKey</Properties>
<Properties>Client.PartnerClientKey</Properties>
<Properties>Email.PartnerKey</Properties>
<Filter xsi:type="ns1:SimpleFilterPart" xmlns:ns1="http://exacttarget.com/wsdl/partnerAPI">
<Property>CreatedDate</Property>
<SimpleOperator>between</SimpleOperator>
<DateValue>2018-01-01</DateValue>
<DateValue>2021-12-09</DateValue>
</Filter>
</RetrieveRequest>
</RetrieveRequestMsg>
</soapenv:Body>
</soapenv:Envelope>
这是我得到的错误:
错误:选择列表中的列 'dbo.tblJobs.SendID' 无效,因为它既不包含在聚合函数中,也不包含在 GROUP BY 子句中
如何在 xml SOAP 请求中编写 SQL?
【问题讨论】:
-
错误来自数据库。听起来好像接收者正在从请求中构造一些 SQL,并且 SQL 在某种程度上是无效的。不知道为什么您认为问题出在您的 SOAP 请求中。
-
有一个问题,因为我在尝试获取 SendID 时没有得到任何响应,但是如果我远程它,我会得到除 SendID 之外的所有我想要的数据
-
问题不在您的请求中。问题出在接收应用程序中。它正在构建无效的 SQL。您需要联系维护您调用的 SOAP 服务的技术团队。
-
知道了。非常感谢
标签: sql xml soap salesforce-marketing-cloud