What should ColdFusion use to map to the tns: ArrayOfString SOAP type?

If one cfinvokeSOAP web service with a type parameter sets to tns:ArrayOfString, it will receive:

Unable to make a web service call. The error was returned when calling the web service operation: '' java.lang.IlligalArgumentException: argument type mismatch

How to call a web service with a type tns:ArrayOfString?

According to http://forums.adobe.com/message/4337438

It works:

<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>

Now the question is, why does it work?

+2
source share
1 answer

, , ArrayOfString. , . wsdl, ArrayOfString string, type="s:string":

<s:complexType name="ArrayOfString">
   <s:sequence>
     <s:element minOccurs="0" maxOccurs="unbounded" 
           name="string" nillable="true" type="s:string" /> 
   </s:sequence>
</s:complexType>

, CF- , (string) ( ).

    root.string = [ arrayOfStrings ];
+2

Source: https://habr.com/ru/post/1617347/


All Articles