[jboss-user] [JBossWS] - A problem with complexType
david.edery
do-not-reply at jboss.com
Wed Aug 8 16:09:47 EDT 2007
Hello
I'v created a webservice using the following technologies:
jboss-4.0.5.GA
jbossws-native-2.0.0.GA
jdk1.5.0_09
At first, the webservice had only simple-type-parameter functions and everything worked well (deployment and usage of the webservice)
When i tried (for stress purposes) to add a complex (a class) as a parameter to the stress function, the client i'v created did not succeed in creating the webservice anymore telling me that it can't find the class i'm using.
I'v taken a step back, and created (using the wsconsume tool) the relevant code for my application, and used the generated code in the server and client side. It didn't help.
Below you can find the exception thrown at the client side and the .wsdl file which is loaded directly from JBoss (using the http://localhost:8080/myTest/Topology?wsdl address).
If more information is needed, i'd be happy to supply it.
I can really use some help about that.
Thanks allot
David Edery.
The exception from the client:
| org.jboss.ws.WSException: Cannot obtain java type mapping for: {http://myTest/}myType
| at org.jboss.ws.metadata.builder.jaxrpc.JAXRPCMetaDataBuilder.buildInputParameter(JAXRPCMetaDataBuilder.java:266)
| at org.jboss.ws.metadata.builder.jaxrpc.JAXRPCMetaDataBuilder.buildParameterMetaDataRpc(JAXRPCMetaDataBuilder.java:566)
| at org.jboss.ws.metadata.builder.jaxrpc.JAXRPCMetaDataBuilder.setupOperationsFromWSDL(JAXRPCMetaDataBuilder.java:210)
| at org.jboss.ws.metadata.builder.jaxrpc.JAXRPCClientMetaDataBuilder.buildMetaDataInternal(JAXRPCClientMetaDataBuilder.java:217)
| at org.jboss.ws.metadata.builder.jaxrpc.JAXRPCClientMetaDataBuilder.buildMetaData(JAXRPCClientMetaDataBuilder.java:134)
| at org.jboss.ws.metadata.builder.jaxrpc.JAXRPCClientMetaDataBuilder.buildMetaData(JAXRPCClientMetaDataBuilder.java:86)
| at org.jboss.ws.core.jaxrpc.client.ServiceImpl.<init>(ServiceImpl.java:111)
| at org.jboss.ws.core.jaxrpc.client.ServiceFactoryImpl.createService(ServiceFactoryImpl.java:157)
| at org.jboss.ws.core.jaxrpc.client.ServiceFactoryImpl.createService(ServiceFactoryImpl.java:128)
| at topologyClient.Client.createWebServiceInterface(Client.java:24)
| at topologyClient.Client.checkWebServiceInterface(Client.java:130)
|
The wsdl file:
| <definitions name='TopologyService' targetNamespace='http://myTest/' xmlns='http://schemas.xmlsoap.org/wsdl/' xmlns:soap='http://schemas.xmlsoap.org/wsdl/soap/' xmlns:tns='http://myTest/' xmlns:xsd='http://www.w3.org/2001/XMLSchema'>
| <types>
| <xs:schema targetNamespace='http://myTest/' version='1.0' xmlns:tns='http://myTest/' xmlns:xs='http://www.w3.org/2001/XMLSchema'>
| <xs:complexType name='MyType'>
| <xs:sequence>
| <xs:element minOccurs='0' name='_str' type='xs:string'/>
| <xs:element name='_lng' type='xs:long'/>
| <xs:element name='_bool' type='xs:boolean'/>
| <xs:element minOccurs='0' name='_myType' type='tns:MyType'/>
| </xs:sequence>
| </xs:complexType>
| </xs:schema>
| </types>
|
| <message name='ITopologyWebservice_stressCheckComplexResponse'>
| <part name='return' type='tns:MyType'></part>
| </message>
|
| <message name='ITopologyWebservice_stressCheckComplex'>
| <part name='my_type' type='tns:MyType'></part>
| </message>
|
| <message name='ITopologyWebservice_stressCheck'>
| <part name='initiator' type='xsd:string'></part>
| </message>
|
| <message name='ITopologyWebservice_stressCheckResponse'>
| <part name='return' type='xsd:long'></part>
| </message>
|
| <portType name='ITopologyWebservice'>
| <operation name='stressCheck' parameterOrder='initiator'>
| <input message='tns:ITopologyWebservice_stressCheck'></input>
| <output message='tns:ITopologyWebservice_stressCheckResponse'></output>
| </operation>
|
| <operation name='stressCheckComplex' parameterOrder='my_type'>
| <input message='tns:ITopologyWebservice_stressCheckComplex'></input>
| <output message='tns:ITopologyWebservice_stressCheckComplexResponse'></output>
| </operation>
| </portType>
|
| <binding name='ITopologyWebserviceBinding' type='tns:ITopologyWebservice'>
| <soap:binding style='rpc' transport='http://schemas.xmlsoap.org/soap/http'/>
| <operation name='stressCheck'>
| <soap:operation soapAction=''/>
| <input>
| <soap:body namespace='http://myTest/' use='literal'/>
| </input>
| <output>
| <soap:body namespace='http://myTest/' use='literal'/>
| </output>
| </operation>
| <operation name='stressCheckComplex'>
| <soap:operation soapAction=''/>
| <input>
| <soap:body namespace='http://myTest/' use='literal'/>
| </input>
| <output>
| <soap:body namespace='http://myTest/' use='literal'/>
| </output>
| </operation>
| </binding>
|
| <service name='TopologyService'>
| <port binding='tns:ITopologyWebserviceBinding' name='TopologyPort'>
| <soap:address location='http://localhost:8080/myTest/Topology'/>
| </port>
| </service>
|
| </definitions>
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4072189#4072189
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4072189
More information about the jboss-user
mailing list