[JBossWS] - A problem with complexType
by david.edery
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
17 years, 4 months
[JBossWS] - ArrayIndexOutOfBoundsException with wstools in jboss 2.0
by matt_law
I am trying to generate client stubs from a 3rd party WSDL. I am running jboss ws 2.0.0 GA on jboss 4.0.5 with jboss ejb 3.0 rc9 installed. I invoke the wstools task through ant. Initially I got the following error
| Caused by: org.jboss.ws.WSException: [JAX-RPC 2.3.1.2] Unable to unwrap model group with multiple particles.
| at org.jboss.ws.tools.helpers.ReturnTypeUnwrapper.unwrapModelGroup(ReturnTypeUnwrapper.java:120)
| at org.jboss.ws.tools.helpers.ReturnTypeUnwrapper.unwrap(ReturnTypeUnwrapper.java:87)
| at org.jboss.ws.tools.WSDLToJava.getReturnType(WSDLToJava.java:696)
| at org.jboss.ws.tools.WSDLToJava.appendDocParameters(WSDLToJava.java:401)
| at org.jboss.ws.tools.WSDLToJava.appendMethods(WSDLToJava.java:290)
| at org.jboss.ws.tools.WSDLToJava.createSEIFile(WSDLToJava.java:650)
| at org.jboss.ws.tools.WSDLToJava.createSEI(WSDLToJava.java:682)
| at org.jboss.ws.tools.WSDLToJava.generateSEI(WSDLToJava.java:185)
| at org.jboss.ws.tools.helpers.ToolsHelper.handleWSDLToJavaGeneration(ToolsHelper.java:303)
| at org.jboss.ws.tools.WSTools.process(WSTools.java:147)
| at org.jboss.ws.tools.WSTools.generate(WSTools.java:69)
| at org.jboss.ws.tools.WSTools.generate(WSTools.java:123)
| at org.jboss.ws.tools.ant.wstools.execute(wstools.java:101)
|
I added the attribute parameter-style="bare" to the wsdl config, and re ran wstools, and got this
| java.lang.ArrayIndexOutOfBoundsException: 0
| at org.jboss.ws.tools.helpers.ToolsHelper.handleWSDLToJavaGeneration(ToolsHelper.java:313)
| at org.jboss.ws.tools.WSTools.process(WSTools.java:147)
| at org.jboss.ws.tools.WSTools.generate(WSTools.java:69)
| at org.jboss.ws.tools.WSTools.generate(WSTools.java:123)
| at org.jboss.ws.tools.ant.wstools.execute(wstools.java:101)
| at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
| at org.apache.tools.ant.Task.perform(Task.java:364)
| at org.apache.tools.ant.Target.execute(Target.java:341)
| at org.apache.tools.ant.Target.performTasks(Target.java:369)
| at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1216)
| at org.apache.tools.ant.Project.executeTarget(Project.java:1185)
| at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:40)
| at org.eclipse.ant.internal.ui.antsupport.EclipseDefaultExecutor.executeTargets(EclipseDefaultExecutor.java:32)
| at org.apache.tools.ant.Project.executeTargets(Project.java:1068)
| at org.eclipse.ant.internal.ui.antsupport.InternalAntRunner.run(InternalAntRunner.java:423)
| at org.eclipse.ant.internal.ui.antsupport.InternalAntRunner.main(InternalAntRunner.java:137)
|
What can I do to fix it ? I can't change the wsdl, it's not something I've got ownership of.
I don't understand what part of the WSDL is causing the problem either.
I've read in JIRA that focus is being applied to jaxws, and this might not get fixed. Is this the case ?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4072031#4072031
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4072031
17 years, 4 months
[JBossWS] - Re: JBossWS with JBoss 4.2.0 and Axis 1.4 don't work with WS
by iantonijevic
Yes, I use wss4j and Axis.
Now, i change Key identifier type from:
builder.setKeyIdentifierType(WSConstants.ISSUER_SERIAL);
to:
builder.setKeyIdentifierType(WSConstants.BST_DIRECT_REFERENCE);
Now I get new error, but signature verification is successful.
I have in server.log:
2007-08-07 13:23:41,899 DEBUG [org.jboss.ws.core.jaxws.handler.HandlerChainExecutor] Enter: handleIn BoundMessage
2007-08-07 13:23:41,899 DEBUG [org.jboss.ws.extensions.security.SecurityStore] loadStore: file:/C:/jboss-4.2.0.GA/server/default/tmp/deploy/tmp64291jaxws-samples-wssecurity-sign-exp.war/WEB-INF/wsse.keystore
2007-08-07 13:23:41,899 DEBUG [org.jboss.ws.extensions.security.SecurityStore] loadStore: file:/C:/jboss-4.2.0.GA/server/default/tmp/deploy/tmp64291jaxws-samples-wssecurity-sign-exp.war/WEB-INF/wsse.truststore
2007-08-07 13:23:41,899 DEBUG [org.jboss.ws.core.soap.SOAPContentElement] -----------------------------------
2007-08-07 13:23:41,899 DEBUG [org.jboss.ws.core.soap.SOAPContentElement] Transitioning from XML_VALID to DOM_VALID
2007-08-07 13:23:41,899 DEBUG [org.jboss.ws.core.soap.SOAPContentElement] -----------------------------------
2007-08-07 13:23:41,899 DEBUG [org.jboss.ws.core.soap.SOAPContentElement] -----------------------------------
2007-08-07 13:23:41,899 DEBUG [org.jboss.ws.core.soap.SOAPContentElement] Transitioning from XML_VALID to DOM_VALID
2007-08-07 13:23:41,899 DEBUG [org.jboss.ws.core.soap.SOAPContentElement] -----------------------------------
2007-08-07 13:23:41,899 INFO [org.apache.xml.security.signature.Reference] Verification successful for URI "#id-32801378"
2007-08-07 13:23:41,915 DEBUG [org.jboss.ws.core.soap.SOAPMessageDispatcher] getDispatchDestination: null
2007-08-07 13:23:41,915 ERROR [org.jboss.ws.core.jaxws.handler.HandlerChainExecutor] Exception during handler processing
java.lang.NullPointerException
at org.jboss.ws.extensions.security.WSSecurityDispatcher.handleInbound(WSSecurityDispatcher.java:159)
at org.jboss.ws.extensions.security.jaxws.WSSecurityHandler.handleInboundSecurity(WSSecurityHandler.java:78)
at org.jboss.ws.extensions.security.jaxws.WSSecurityHandlerServer.handleInbound(WSSecurityHandlerServer.java:41)
at org.jboss.ws.core.jaxws.handler.GenericHandler.handleMessage(GenericHandler.java:55)
at org.jboss.ws.core.jaxws.handler.HandlerChainExecutor.handleMessage(HandlerChainExecutor.java:295)
at org.jboss.ws.core.jaxws.handler.HandlerChainExecutor.handleMessage(HandlerChainExecutor.java:140)
at org.jboss.ws.core.jaxws.handler.HandlerDelegateJAXWS.callRequestHandlerChain(HandlerDelegateJAXWS.java:87)
at org.jboss.ws.core.server.AbstractServiceEndpointInvoker.callRequestHandlerChain(AbstractServiceEndpointInvoker.java:112)
at org.jboss.ws.core.server.AbstractServiceEndpointInvoker.invoke(AbstractServiceEndpointInvoker.java:162)
at org.jboss.ws.core.server.ServiceEndpoint.processRequest(ServiceEndpoint.java:212)
at org.jboss.ws.core.server.ServiceEndpointManager.processRequest(ServiceEndpointManager.java:448)
at org.jboss.ws.core.server.AbstractServiceEndpointServlet.doPost(AbstractServiceEndpointServlet.java:114)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:710)
at org.jboss.ws.core.server.AbstractServiceEndpointServlet.service(AbstractServiceEndpointServlet.java:75)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:179)
at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104)
at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:156)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:241)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:580)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
at java.lang.Thread.run(Thread.java:595)
2007-08-07 13:23:41,915 DEBUG [org.jboss.ws.core.jaxws.handler.HandlerChainExecutor] Exit: handleIn BoundMessage with status: false
2007-08-07 13:23:41,915 DEBUG [org.jboss.ws.core.jaxws.handler.MessageContextJAXWS] Begin response processing
2007-08-07 13:23:41,915 DEBUG [org.jboss.ws.core.soap.MessageContextAssociation] popMessageContext: org.jboss.ws.core.jaxws.handler.SOAPMessageContextJAXWS@f2a0ef (Thread http-127.0.0.1-8080-2)
2007-08-07 13:23:41,915 DEBUG [org.jboss.ws.core.soap.MessageContextAssociation] pushMessageContext: org.jboss.ws.core.jaxws.handler.SOAPMessageContextJAXWS@3fcfb (Thread http-127.0.0.1-8080-2)
2007-08-07 13:23:41,915 ERROR [org.jboss.ws.core.jaxws.SOAPFaultHelperJAXWS] SOAP request exception
javax.xml.ws.WebServiceException: java.lang.NullPointerException
at org.jboss.ws.core.jaxws.handler.HandlerChainExecutor.processHandlerFailure(HandlerChainExecutor.java:276)
at org.jboss.ws.core.jaxws.handler.HandlerChainExecutor.handleMessage(HandlerChainExecutor.java:155)
at org.jboss.ws.core.jaxws.handler.HandlerDelegateJAXWS.callRequestHandlerChain(HandlerDelegateJAXWS.java:87)
at org.jboss.ws.core.server.AbstractServiceEndpointInvoker.callRequestHandlerChain(AbstractServiceEndpointInvoker.java:112)
at org.jboss.ws.core.server.AbstractServiceEndpointInvoker.invoke(AbstractServiceEndpointInvoker.java:162)
at org.jboss.ws.core.server.ServiceEndpoint.processRequest(ServiceEndpoint.java:212)
at org.jboss.ws.core.server.ServiceEndpointManager.processRequest(ServiceEndpointManager.java:448)
at org.jboss.ws.core.server.AbstractServiceEndpointServlet.doPost(AbstractServiceEndpointServlet.java:114)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:710)
at org.jboss.ws.core.server.AbstractServiceEndpointServlet.service(AbstractServiceEndpointServlet.java:75)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:179)
at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104)
at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:156)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:241)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:580)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
at java.lang.Thread.run(Thread.java:595)
Caused by: java.lang.NullPointerException
at org.jboss.ws.extensions.security.WSSecurityDispatcher.handleInbound(WSSecurityDispatcher.java:159)
at org.jboss.ws.extensions.security.jaxws.WSSecurityHandler.handleInboundSecurity(WSSecurityHandler.java:78)
at org.jboss.ws.extensions.security.jaxws.WSSecurityHandlerServer.handleInbound(WSSecurityHandlerServer.java:41)
at org.jboss.ws.core.jaxws.handler.GenericHandler.handleMessage(GenericHandler.java:55)
at org.jboss.ws.core.jaxws.handler.HandlerChainExecutor.handleMessage(HandlerChainExecutor.java:295)
at org.jboss.ws.core.jaxws.handler.HandlerChainExecutor.handleMessage(HandlerChainExecutor.java:140)
... 27 more
....
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4071557#4071557
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4071557
17 years, 4 months