Don't know if this will help at all, but after much frustration, this was how I was finally able to interact with a SOAP web service.  I didn't have to worry about maintaining session state across multiple requests though.

-Nelson

<cfset soapMethod = "GetInfo">
<cfset soapAction = "http://www.abc.com/GetInfo">

<cfsavecontent variable="xmlSOAPcontent"><cfoutput>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<#soapMethod# xmlns="http://www.abc.com/">
<oRequest>
<oCredentials>
<sCompanyName>DemoCo</sCompanyName>
<sUserName>demo</sUserName>
<sPassword>demo</sPassword>
</oCredentials>
<iID>1234</iID>
</oRequest>
</#soapMethod#>
</soap:Body>
</soap:Envelope>
</cfoutput></cfsavecontent>

<cfset xmlSOAPcontent = REReplace(Trim(xmlSOAPcontent), ">[[:space:]]*<", "><", "All")>

<cfhttp url="" method="POST">
<cfhttpparam type="CGI" name="SOAPAction" value="#soapAction#">
<cfhttpparam type="xml" name="cgi" value="#xmlSOAPcontent#">
</cfhttp>
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

Reply via email to