如何进行PushEvent和PushEvents SOAP调用 | ACC
如果您想要在Adobe Campaign和Adobe Campaign Classic中进行 PushEvent 和 PushEvents SOAP 调用,本文将为您提供解决方法。
描述 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>login/password</urn:sessiontoken>
解决方法 resolution
推送事件:
此调用将在触发RT实例上的 unique 事件时使用。
模板(示例中的 "test")需要在RT上从控制实例成功发布。
在< urn:domEvent>中,为类型的事件 < rtEvent>的定义必须将 类型 作为模板类型,电子邮件 作为收件人电子邮件地址。
在< 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>
< firstName> ABC< /firstName>
< lastName> DEF< /lastName>
< /ctx>
< /rtEvent>
< /urn:domEvent>
< /urn:PushEvent>
< /soapenv:Body>< /soapenv:Envelope>
成功响应:
<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实例上的 多个 事件时,将使用此调用。
所有要求与第一次调用相同。
必须在 <urn:domEventCollection> . 中定义多个< rtEvent>
调用示例:
<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:Envelope>
注意: 如果在此调用中只定义了1个元素,则RT实例将收到该元素,响应为200 OK,但 不会触发、处理任何事件,也不会在事件中显示,并且不会在Web日志中显示任何内容。
您会收到此类响应,这意味着它到达了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>
未触发该事件的原因是 PUSH EVENTS 仅适用于多个事件。 如果调用只针对一个事件,则需要 PUSH EVENT 调用。