Hi all,
Im trying to call a webservice with a complex-within-complex structure. Here an extract form the wsdl:
<simpleType name="ProductType">
<restriction base="xsd:string">
<enumeration value="Car"/>
<enumeration value="Truck"/>
</restriction>
</simpleType>
<complexType name="Product">
<sequence>
<element name="id" type="xsd:string"/>
<element name="type" type="impl:ProductType"/>
</sequence>
</complexType>
If i call the webservice with a structure as Parameter
<cfset local.ws.addProduct( {
id: 'p01234',
type: 'Truck'
} )>
I get an Error.
Cannot perform web service invocation addProduct. | |
The fault returned when invoking the web service operation is:org.apache.axis2.AxisFault: product cannot be null!! |
If i change the wsdl file, so the Type of the element "type" is also "xsd:string", then it works perfectly. Problem is, changing the wsdl file by myself is a absolute no-go, since i have to consume it form our customers.
Based on reserches i've found that older Axis2 version didn't implement the Enumeration-Type, but the one shipped with CF10 should (Axis2 v1.7).
I've found this Thread: http://forums.adobe.com/thread/88154
I tried to copy the generated stubs for productType in the cfusion/wwwroot/WEB-INF/classes and create a object with createObject("java","productType") which -of course- generated an Error saying that i cannot create from abstract classes. sigh.
Did anyone managed to call an Webservice with Enumerations in WSDL?
Best regards,
Maertsch