Invoke webservice with complex types
Hi
I am trying to invoke a .net webservice method that receives an array of strings an i noticed that if i do this:
<cfscript>
text = arraynew(1);
text[1] = "Hello";
text[2] = "world";
</cfscript>
<cfinvoke method="Hello"
webservice="http://localhost/Service1.asmx?wsdl"
returnvariable="response">
<cfinvokeargument name="array" value=#text#/>
</cfinvoke>
I get this error
Cannot perform web service invocation Hello.
The fault returned when invoking the web service operation is:
''java.lang.IlligalArgumentException: argument type mismatch
however if i do this it works well:
<cfscript>
root = structnew();
text = arraynew(1);
text[1] = "Hello";
text[2] = "world";
root.string=text;
</cfscript>
<cfinvoke method="Hello"
webservice="http://localhost/Service1.asmx?wsdl"
returnvariable="response">
<cfinvokeargument name="array" value=#root#/>
</cfinvoke>
I know this has to do with the generated java proxy because he generated a structure called ArrayOfString with a property called string (what i am replicating in the "root" variable).... Is there any way around this, or this is the right way to do it? It is a bit painfull to do it like this...
Thanks.
