我正在做一个 SOAP 调用以从下面的 wsdl 访问方法 getMailingReports 并且可以正常访问它。我的问题是当我必须使用 createEmailMailing 但必须传入两个作为对象的参数(Mailing 和 EmailContent)时。这是来自stormpost(pulsepoint),所以如果有人有这方面的经验,我会很感激。下面是我使用 ColdFusion 进行的 wsdl 和 SOAP 调用。同样,这个 SOAP 调用工作正常,但不确定如何模仿它并使用方法 createEmailMailing。
http://api.stormpost.datranmedia.com/services/SoapRequestProcessor?wsdl
<cfsavecontent variable="soap">
<?xml version="1.0" encoding="UTF-8"?><SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<SOAP-ENV:Header>
<ns0:username SOAP-ENV:actor="http://schemas.xmlsoap.org/soap/actor/next" xmlns:ns0="http://services.web.stormpost.skylist.com">fakelogin</ns0:username>
<ns0:password SOAP-ENV:actor="http://schemas.xmlsoap.org/soap/actor/next" xmlns:ns0="http://services.web.stormpost.skylist.com">fakepassword</ns0:password>
</SOAP-ENV:Header>
<SOAP-ENV:Body SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:s0="http://www.w3.org/2001/XMLSchema" xmlns:s1="http://schemas.xmlsoap.org/soap/encoding/">
<ns0:getMailingReports xmlns:ns0="http://services.web.stormpost.skylist.com">
<from xsi:type="xsd:dateTime"><cfoutput>#dateFormat(arguments.from, "yyyy-mm-dd")#</cfoutput>T00:00:00.000</from>
<to xsi:type="xsd:dateTime"><cfoutput>#dateFormat(arguments.to, "yyyy-mm-dd")#</cfoutput>T23:00:00.000</to>
<type xsi:type="xsd:string">Mailings</type>
<channel xsi:type="xsd:string">EMAIL</channel>
<listid xsi:type="xsd:int">0</listid>
<limit xsi:type="xsd:int">#arguments.numRowsReturned#</limit>
</ns0:getMailingReports>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
</cfsavecontent>
<cfhttp url="https://api.stormpost.datranmedia.com/services/SoapRequestProcessor" method="POST">
<cfhttpparam type="header" name="Content-Type" value="text/xml">
<cfhttpparam type="header" name="SOAPAction" value="">
<cfhttpparam type="header" name="content-length" value="#len(trim(soap))#">
<cfhttpparam type="header" name="charset" value="utf-8">
<cfhttpparam type="XML" name="message" value="#trim(soap)#">
</cfhttp>