I have created a webservice which is running fine on BEA Weblogic, the WDSL is
generated automatically.
When I try to invoke the ws method "getFile" from coldfusion it states ...
ILLEGAL ARGUMENT EXCEPTION ...
I suppose this is because there is a problem with the ARRAYOFSTRING definition
in the WSDL or in the interpretation from COLDFUSION of this complex-type.
Is this so and what to do about it?
WSDL extract ::
<s:element name="getFile">
<s:complexType>
<s:sequence>
<s:element name="id" type="ope:ArrayOfString" minOccurs="0"/>
</s:sequence>
</s:complexType>
</s:element>
...
<s:complexType name="ArrayOfString">
<s:sequence>
<s:element name="String" type="s:string" nillable="true" minOccurs="0"
maxOccurs="unbounded"/>
</s:sequence>
</s:complexType>
COLDFUSION extract ::
<cfset myarray=ArrayNew(1)>
<cfset myarray[1]="one">
<cfset myarray[2]="two">
<CFINVOKE WEBSERVICE="http://serverwebservice.jws?WSDL"
METHOD="getFile" returnVariable="result">
<CFINVOKEARGUMENT name="id" value="myarray"/>
<CFINVOKE>
tsja - 28 Feb 2005 11:04 GMT
Solved myself.
CFM code has to be ...
:)
<cfset myArray = ArrayNew(1)>
<cfset myArray[1] = "01">
<cfset myArray[2] = "02">
<cfset aArrayOfString=StructNew()>
<cfset aArrayOfString.string=#myArray#>