我有一个SOAP请求,我是从SOAP UI生成的,看看如何指定字符串和整数,但我不知道如何为testAddress字段输入数组。这是wsdl,下面是soap请求。不知道我怎么说一个或两个电子邮件地址。 tim@tim.com和tom@tim.com。谢谢!
http://api.stormpost.datranmedia.com/services/SoapRequestProcessor?wsdl
<soapenv:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ser="http://services.web.stormpost.skylist.com">
<soapenv:Header>
<authInfo xsi:type="soap:authentication" xmlns:soap="http://skylist.com/services/SoapRequestProcessor">
<!--You may enter the following 2 items in any order-->
<username xsi:type="xsd:string">username</username>
<password xsi:type="xsd:string">password</password>
</authInfo>
</soapenv:Header>
<soapenv:Body>
<ser:sendTestMessage soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<mailingID xsi:type="xsd:int">#trim(mailingID)#</mailingID>
<testAddresses xsi:type="soap:ArrayOf_soapenc_string" soapenc:arrayType="soapenc:string[]" xmlns:soap="http://skylist.com/services/SoapRequestProcessor" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"/>
<part xsi:type="soapenc:string" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">html</part>
</ser:sendTestMessage>
</soapenv:Body>
</soapenv:Envelope>
答案 0 :(得分:0)
<ser:sendTestMessage soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<cfoutput> <mailingID xsi:type="xsd:int">#trim(mailingID)#</mailingID></cfoutput>
<testAddresses xsi:type="soap:ArrayOf_soapenc_string" soapenc:arrayType="soapenc:string[1]" xmlns:soap="http://skylist.com/services/SoapRequestProcessor" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">
<testAddresses xsi:type="xsd:string">tim@tim.com</testAddresses>
</testAddresses>
<part xsi:type="soapenc:string" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">HTML</part>
</ser:sendTestMessage>