Consume WCF Service from Coldfusion 7

I am trying to figure out a way to use a WCF service I have (wsdl) from Coldfusion. I need to pass values ​​in the request header. I can't seem to find any good examples. Anyone?

+2


a source to share


2 answers


I think the functions you want are

AddSOAPRequestHeader(webservice, namespace, name, value [, mustunderstand])
AddSOAPResponseHeader(namespace, name, value[, mustunderstand])

      



They allow you to add XML to the request and response headers of your web service.

+3


a source


In ColdFusion, you can consume web services with cfinvoke

<cfinvoke  
webservice="http://www.somewebservice.com/WebService.wsdl" 
method="getWebServiceMethod" 
returnvariable="webServiceResult"> 
<cfinvokeargument name="arg1" value="Arg1"/> 
<cfinvokeargument name="arg2" value="Arg2"/> 
</cfinvoke> 
<cfoutput>The Result is #webServiceResult#</cfoutput>

      



or CreateObject

<cfscript> 
ws = CreateObject("webservice",  
"http://www.somewebservice.com/WebService.wsdl"); 
webServiceResult = ws.getWebServiceMethod("Arg1","Arg2"); 
writeoutput(webServiceResult); 
</cfscript>

      

0


a source







All Articles