-
Task
-
Resolution: Done
-
Major
-
None
-
None
wscompile generates two destinct schema elements in types. Currently we write each schema to a temp file and parse them using the xerces schema parser.
<types>
<schema targetNamespace="http://org.jboss.webservice/example/types/arrays/org/jboss/test/webservice/admindevel" xmlns:tns="http://org.jboss.webservice/example/types/arrays/org/jboss/test/webservice/admindevel" xmlns:soap11-enc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ns2="http://org.jboss.webservice/example/types" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns="http://www.w3.org/2001/XMLSchema">
<import namespace="http://org.jboss.webservice/example/types"/>
<complexType name="HelloObjArray">
<sequence>
<element name="value" type="ns2:HelloObj" nillable="true" minOccurs="0" maxOccurs="unbounded"/>
</sequence>
</complexType>
</schema>
<schema targetNamespace="http://org.jboss.webservice/example/types" xmlns:tns="http://org.jboss.webservice/example/types" xmlns:soap11-enc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns="http://www.w3.org/2001/XMLSchema">
<import namespace="http://org.jboss.webservice/example/types/arrays/org/jboss/test/webservice/admindevel"/>
<complexType name="HelloObj">
<sequence>
<element name="msg" type="string" nillable="true"/>
</sequence>
</complexType>
</schema>
</types>
The parser fails with
[Error] JBossWS_org.jboss.webservice.example.types.arrays.org.jboss.test.webservice.admindevel14504.xsd:13:114: src-resolve: Cannot resolve the name 'ns2:HelloObj' to a 'type definition' component.
because ns2:HelloObj is not defined in the first schema.
The jaxrpc-mapping.xml contains no type mapping for the array type, just
<java-xml-type-mapping>
<java-type>org.jboss.test.webservice.admindevel.HelloObj</java-type>
<root-type-qname xmlns:typeNS="http://org.jboss.webservice/example/types">typeNS:HelloObj</root-type-qname>
<qname-scope>complexType</qname-scope>
<variable-mapping>
<java-variable-name>msg</java-variable-name>
<xml-element-name>msg</xml-element-name>
</variable-mapping>
</java-xml-type-mapping>
The client fails with
java.lang.IllegalStateException: Input parameter type not registered:
{http://org.jboss.webservice/example/types/arrays/org/jboss/test/webservice/admindevel}HelloObjArray
at org.jboss.ws.jaxrpc.CallImpl.syncInputParams(CallImpl.java:685)
at org.jboss.ws.jaxrpc.CallImpl.invokeInternal(CallImpl.java:471)
at org.jboss.ws.jaxrpc.CallImpl.invoke(CallImpl.java:330)
at org.jboss.ws.jaxrpc.CallProxy.invoke(CallProxy.java:75)
Any ideas on how we can handle this?