1
我使用ColdFusion 8.我有一個SOAP極其有限的經驗。什麼是適當的SOAP操作?
我試圖發送一個SOAP請求。我的SOAP體看起來是這樣的:
<cfsavecontent variable="SoapBody">
<cfoutput>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:v2="http://www.a2zshow.com/DataServices/v2/" >
<soapenv:Header>
<a2zAuthenticationHeader xmlns="http://www.a2zshow.com/DataServices/v2/">
<Key>#Key#</Key>
<UserName>#UserName#</UserName>
<Password>#Password#</Password>
<InstallName>#InstallName#</InstallName>
</a2zAuthenticationHeader>
</soapenv:Header>
<soapenv:Body>
<DataService xmlns="http://www.a2zshow.com/DataServices/ExhibitorListRequest/v1">
<Request>
<a2zXMLRootNode>
<RequestHeader>
<RequestAttribute Search="NONE"/>
</RequestHeader>
<RequestCriteria>
<EventID>#EventID#</EventID>
</RequestCriteria>
</a2zXMLRootNode>
</Request>
</DataService>
</soapenv:Body>
</soapenv:Envelope>
</cfoutput>
</cfsavecontent>
我的SOAP請求如下所示:
<cfhttp
url="#PostURL#"
method="post"
result="httpResponse">
<cfhttpparam
type="header"
name="SOAPAction"
value="#SOAPAction#" />
<cfhttpparam
type="xml"
value="#trim(soapBody)#"/>
</cfhttp>
的SOAPAction的變量設置是這樣的:
SOAPAction = "http://www.a2zshow.com/getExhibitorList";
我想我成功地張貼到正確的地方,但我收到一條錯誤消息,指出客戶端無法識別SOAPAction。這是我的錯誤:
soap:ClientServer did not recognize the value of HTTP Header SOAPAction: http://www.a2zshow.com/getExhibitorList.
此錯誤似乎告訴我,我沒有SOAPAction正確。另一端的那個人告訴我,我已經把所有的東西都設置好了,它應該能夠工作。有什麼遺漏嗎?
你試圖跨越的SOAPBody發送爲'TYPE =「體」'而不是XML?上週我有一個類似的問題,那就是我發送錯誤的類型。 – 2012-03-06 19:39:51
我剛試過,沒有運氣。我確信我被困在有錯誤的SOAPAction,但我們的供應商沒有響應。我只需要知道我是否做了明顯錯誤的事情。 – 2012-03-06 21:08:58
你有沒有嘗試設置「http://www.a2zshow.com/」作爲POSTURL和「getExhibitorList」作爲SOAP行動? – Sureround 2012-03-07 03:01:36