如何进行PushEvent和PushEvents SOAP调用 | ACC
如果您想要,本文会为您提供解决方法 Pushevent 和 PushEvents SOAP Adobe Campaign和Adobe Campaign Classic中的调用。
描述 description
环境
- Campaign Classic
- Campaign
- Campaign Classic v7
- Campaign v8
问题/症状
先决条件:
-
下载用于触发调用的SOAP UI
-
正在上传WSDL (
<
服务器url>
/nl/jsp/schemawsdl.jsp?schema=nms:rtEvent)到SOAP UI -
测试计算机的IP必须获得授权,否则您将收到错误“访问被拒绝”。
-
要放入的有效身份验证凭据(通常为mc用户)
<
urn:sessiontoken>
登录/密码<
/urn:sessiontoken>
解决方法 resolution
推送事件:
此调用在触发 独特 RT实例上的事件。
模板("test" 在示例中)需要在RT上从控制实例成功发布。
在 <
urn:domEvent>
,类型为的事件 <
rtEvent>
必须使用进行定义 type 模板类型和 电子邮件 是收件人的电子邮件地址。
在 <
ctx>
,必须定义模板上使用的所有属性。 在此示例中,模板包含以下内容:
<
P
>Your email is: <%= rtEvent.email %><
P
> -> is using the attribute email directly as email in define within rtEvent
<
P
>Your first name: <%= rtEvent.ctx.firstName %><
P
> -> is using ctx.firstname as ctx is an inner element of rtEvent
<
P
>Your last name: <%= rtEvent.ctx.lastName %><
P> -> is using ctx.lastname as ctx is an inner element of rtEvent
调用示例:
<
soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:urn="urn:nms:rtEvent”>
<
soapenv:Header/>
<
soapenv:Body>
<
urn:PushEvent>
<
urn:sessiontoken>
登录/密码<
/urn:sessiontoken>
<
urn:domEvent>
<
rtEvent type="test" email="xxx@gmail.com">
<
ctx>
<
名字>
ABC<
/firstName>
<
姓氏>
DEF<
/lastName>
<
/ctx>
<
/rtEvent>
<
/urn:domEvent>
<
/urn:PushEvent>
<
/soapenv:Body>
<
/soapenv:信封>
成功响应:
<
soap-ENV:Envelope xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ns="urn:nms:rtEvent" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
<
SOAP-ENV:Body>
<
PushEventResponse SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns="urn:nms:rtEvent”>
<
plId xsi:type="xsd:long">
0000000000<
/plId>
<
/PushEventResponse>
<
/SOAP-ENV:Body>
<
/SOAP-ENV:Envelope>
接收PIID表示已成功接收事件并且正在处理该事件。
推送事件:
触发时将使用此调用 多个 RT实例上的事件。
所有要求与第一次调用相同。
多个 <
rtEvent>
必须在以下位置定义 <
urn:domEventCollection>
.
调用示例:
<
soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:urn="urn:nms:rtEvent”>
<
soapenv:Header/>
<
soapenv:Body>
<
urn:PushEvents>
<
urn:sessiontoken>
?<
/urn:sessiontoken>
<
urn:domEventCollection>
<
! — 此时可输入ANY元素。 需要1个以上的元素 — >
<
/urn:domEventCollection>
<
/urn:PushEvents>
<
/soapenv:Body>
<
/soapenv:信封>
注意: 如果此调用中只定义了1个元素,则RT实例将收到该元素,响应为200 OK,但 不会触发、处理任何事件,也不会在事件中显示 而且不会有任何内容显示在网络日志中。
您会收到此类响应,这意味着它到达了RT,但不会发生任何情况:
<
soap-ENV:Envelope xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ns="urn:nms:rtEvent" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
<
SOAP-ENV:Body>
<
PushEventsResponse SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns="urn:nms:rtEvent”>
<
pdomIds xsi:type="ns:Element" SOAP-ENV:encodingStyle="http://xml.apache.org/xml-soap/literalxml">
<
rtEvent email="xxx@gmail.com" type="test"/>
<
/pdomIds>
<
/PushEventsResponse>
<
/SOAP-ENV:Body>
<
/SOAP-ENV:Envelope>
未触发事件的原因是 推送事件 仅适用于多个事件的情况。 如果调用只包含一个事件,则 推送事件 调用为必填。