I am trying to consume a WSDL from ColdFusion using cfinvoke tag and I am having problems passing arguments. If it's a simple STRING or NUMERIC argument, it works good. The problem is when I need to pass this argument:
<part name="options" type="soap-enc:Array"/>
Well, I tried different ways: pass a ColdFusion ARRAY, STRUCT, simple string, etc. Nothing works. In some cases I got a response from the web service telling that the parameter is missing and when I pass a structure, I am getting this error:
Error converting CFML arguments to Java classes for web service invocation. Unable to create web service argument class [Ljava.lang.Object;. Error: java.lang.InstantiationException: [Ljava.lang.Object;. Often this is because the web service defines an abstract complexType as an input to an operation. You must create an actual instance of this type in Java.
You can see the script in action here:
There you have the link to the web service definitions. What should I do? How do I pass simple Array objects to WSLD from ColdFusion?
ws = createObject("webservice", "https://api.iritravel.ro/?wsdl");. Dump the result and take a look at thegetRooms()signature: token (string), idHotel (int)<cfscript> ws = createObject("webservice", "https://api.iritravel.ro/?wsdl"); res = ws.getCountries(token = "137e8f1a094-1031"); </cfscript>But how do I provide the second parameter for getTowns method? It should be an array with CountryId code (use CountryId = 2 if you want to test)