Question
wsdl problem - why do i need to name output vars?
I have a web service that is working (WSDL:
http://getanagram.com/wsdevel.wsdl).
I can access it from ColdFusion but not in the standard way. See
below for examples. The problem is that I don't want to specify the
output variables up front inside the call to the web service. I
want the two output variables to go into a single struct like all
the coldfusion documentation implies.
I'd like to be able to access it this way:
<cfinvoke
webservice=" http://getanagram.com/wsdevel.wsdl"
method="GetTypeScores"
returnvariable="foo">
<cfinvokeargument name="text" value="123 456 7890"/>
</cfinvoke>
Output: <cfoutput>#foo#</cfoutput>
But I get the error "Web service operation "GetTypeScores" with parameters {text={123 456 7890}} could not be found."
Accessing it this way works PERFECTLY without errors but requires I name the output variables in the call, which I do not want:
<cfscript>
ws = CreateObject("webservice", " http://getanagram.com/wsdevel.wsdl");
ws.GetTypeScores(text='123 456 7890',ContactScore="ContactScore",EventScore="EventScore");
</cfscript>
Contact Score: <cfdump var="#ContactScore#" /><br>
Event Score: <cfdump var="#EventScore#" />
Exactly why is this happening?
I'd like to be able to access it this way:
<cfinvoke
webservice=" http://getanagram.com/wsdevel.wsdl"
method="GetTypeScores"
returnvariable="foo">
<cfinvokeargument name="text" value="123 456 7890"/>
</cfinvoke>
Output: <cfoutput>#foo#</cfoutput>
But I get the error "Web service operation "GetTypeScores" with parameters {text={123 456 7890}} could not be found."
Accessing it this way works PERFECTLY without errors but requires I name the output variables in the call, which I do not want:
<cfscript>
ws = CreateObject("webservice", " http://getanagram.com/wsdevel.wsdl");
ws.GetTypeScores(text='123 456 7890',ContactScore="ContactScore",EventScore="EventScore");
</cfscript>
Contact Score: <cfdump var="#ContactScore#" /><br>
Event Score: <cfdump var="#EventScore#" />
Exactly why is this happening?