[JBossWS] - Jboss web service and Websphere Client Access
by kalai_p@yahoo.com
Hi,
I am using a webservice provided by a client of ours running in jboss 4.2.1(Recently migrated from JBoss 4.2).
Before the migration I was able to access the webservice from my client generated by IBM WSDL2Java tool in RAD 7.0. But now when I access the webservice, I am getting a nullpointer error in my client side where they get soapbody out of the message.
When I analysed, I found RAD sends the soap message without spaces and line breaks between tags.
Eg:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:urn="urn:com:abc.system:ping:request:v1"><soapenv:Header/><soapenv:Body><urn:pingRequest><urn:Header traceLevel="DEBUG"/><urn:Context employeeId="empid" employeePassword="pass" languageCode="EN"/><urn:EchoMessage text="BOO"/></urn:pingRequest></soapenv:Body></soapenv:Envelope>
This fails. But if the same message is sent with spaces between tags, it works fine.(Tested using SoapUI)
Is there any setting we have to put in JBoss to avoid this error.
Thanks
Kalai
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4109355#4109355
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4109355
17 years, 1 month
[JBossWS] - Re: Java Client Application using Stub with WS-Security
by method_ben
Ok, I enabled the log on the client and I turned on the debug option. Finally, I found my error. My target namespace ("rrrr") is the cause of my problem.
I changed my namespace to another pattern like "urn:com:test" and everything works now.
But, when I remove the VM argument :
-Dlog4j.configuration=file:log4j.properties
... I get an error. Client side :
|
| Exception in thread "main" javax.xml.ws.soap.SOAPFaultException: org.jboss.ws.core.CommonSOAPFaultException: Signature is invalid.
| at org.jboss.ws.core.jaxws.SOAPFaultHelperJAXWS.getSOAPFaultException(SOAPFaultHelperJAXWS.java:72)
| at org.jboss.ws.core.jaxws.binding.SOAP11BindingJAXWS.throwFaultException(SOAP11BindingJAXWS.java:109)
| at org.jboss.ws.core.CommonSOAPBinding.unbindResponseMessage(CommonSOAPBinding.java:553)
| at org.jboss.ws.core.CommonClient.invoke(CommonClient.java:371)
| at org.jboss.ws.core.jaxws.client.ClientImpl.invoke(ClientImpl.java:243)
| at org.jboss.ws.core.jaxws.client.ClientProxy.invoke(ClientProxy.java:164)
| at org.jboss.ws.core.jaxws.client.ClientProxy.invoke(ClientProxy.java:150)
| at $Proxy14.hello(Unknown Source)
| at com.main.MainTest.main(MainTest.java:34)
|
server side :
|
| 2007-11-30 09:27:08,733 DEBUG [org.jboss.wsf.stack.jbws.RequestHandlerImpl] handleWSDLRequest: jboss.ws:context=test,endpoint=Test
| 2007-11-30 09:27:08,733 DEBUG [org.jboss.wsf.stack.jbws.RequestHandlerImpl] WSDL request, using host: 127.0.0.1
| 2007-11-30 09:27:08,858 DEBUG [org.jboss.wsf.stack.jbws.RequestHandlerImpl] handleWSDLRequest: jboss.ws:context=test,endpoint=Test
| 2007-11-30 09:27:08,858 DEBUG [org.jboss.wsf.stack.jbws.RequestHandlerImpl] WSDL request, using host: 127.0.0.1
| 2007-11-30 09:27:08,952 DEBUG [org.jboss.wsf.stack.jbws.RequestHandlerImpl] handleWSDLRequest: jboss.ws:context=test,endpoint=Test
| 2007-11-30 09:27:08,952 DEBUG [org.jboss.wsf.stack.jbws.RequestHandlerImpl] WSDL request, using host: 127.0.0.1
| 2007-11-30 09:27:11,233 DEBUG [org.jboss.wsf.stack.jbws.RequestHandlerImpl] doPost: /test/Test
| 2007-11-30 09:27:11,248 DEBUG [org.jboss.wsf.stack.jbws.RequestHandlerImpl] handleRequest: jboss.ws:context=test,endpoint=Test
| 2007-11-30 09:27:11,248 DEBUG [org.jboss.ws.core.soap.MessageContextAssociation] pushMessageContext: org.jboss.ws.core.jaxws.handler.SOAPMessageContextJAXWS@1b99628 (Thread http-127.0.0.1-8080-1)
| 2007-11-30 09:27:11,248 DEBUG [org.jboss.wsf.stack.jbws.RequestHandlerImpl] BEGIN handleRequest: jboss.ws:context=test,endpoint=Test
| 2007-11-30 09:27:11,248 DEBUG [org.jboss.ws.core.soap.MessageFactoryImpl] createMessage: [contentType=text/xml; charset=UTF-8]
| 2007-11-30 09:27:11,248 DEBUG [org.jboss.ws.core.jaxws.handler.HandlerDelegateJAXWS] callRequestHandlerChain: POST
| 2007-11-30 09:27:11,248 DEBUG [org.jboss.ws.core.jaxws.handler.HandlerResolverImpl] getHandlerChain: [type=POST,info=[service={urn:com:myca:si}TestService,port={urn:com:myca:s...]
| 2007-11-30 09:27:11,248 DEBUG [org.jboss.ws.core.jaxws.handler.HandlerChainExecutor] Create a handler executor: [WSSecurity Handler]
| 2007-11-30 09:27:11,248 DEBUG [org.jboss.ws.core.jaxws.handler.HandlerChainExecutor] Enter: handleIn BoundMessage
| 2007-11-30 09:27:11,248 DEBUG [org.jboss.ws.extensions.security.SecurityStore] loadStore: file:/C:/servers/jboss-4.2.2.GA/server/default/tmp/deploy/tmp5956test-exp.war/WEB-INF/wsse.keystore
| 2007-11-30 09:27:11,248 DEBUG [org.jboss.ws.extensions.security.SecurityStore] loadStore: file:/C:/servers/jboss-4.2.2.GA/server/default/tmp/deploy/tmp5956test-exp.war/WEB-INF/wsse.truststore
| 2007-11-30 09:27:11,248 DEBUG [org.jboss.ws.core.soap.SOAPContentElement] -----------------------------------
| 2007-11-30 09:27:11,248 DEBUG [org.jboss.ws.core.soap.SOAPContentElement] Transitioning from XML_VALID to DOM_VALID
| 2007-11-30 09:27:11,248 DEBUG [org.jboss.ws.core.soap.SOAPContentElement] -----------------------------------
| 2007-11-30 09:27:11,248 DEBUG [org.jboss.ws.core.soap.SOAPContentElement] -----------------------------------
| 2007-11-30 09:27:11,248 DEBUG [org.jboss.ws.core.soap.SOAPContentElement] Transitioning from XML_VALID to DOM_VALID
| 2007-11-30 09:27:11,248 DEBUG [org.jboss.ws.core.soap.SOAPContentElement] -----------------------------------
| 2007-11-30 09:27:11,280 WARN [org.apache.xml.security.signature.Reference] Verification failed for URI "#element-1-1196432830499-23083996"
| 2007-11-30 09:27:11,280 INFO [org.apache.xml.security.signature.Reference] Verification successful for URI "#timestamp"
| 2007-11-30 09:27:11,280 ERROR [org.jboss.ws.extensions.security.WSSecurityDispatcher] Internal error occured handling inbound message:
| org.jboss.ws.extensions.security.FailedCheckException: Signature is invalid.
| at org.jboss.ws.extensions.security.SignatureVerificationOperation.process(SignatureVerificationOperation.java:59)
| at org.jboss.ws.extensions.security.SecurityDecoder.decode(SecurityDecoder.java:123)
| at org.jboss.ws.extensions.security.SecurityDecoder.decode(SecurityDecoder.java:185)
| at org.jboss.ws.extensions.security.WSSecurityDispatcher.handleInbound(WSSecurityDispatcher.java:147)
| 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.ServiceEndpointInvoker.callRequestHandlerChain(ServiceEndpointInvoker.java:126)
| at org.jboss.ws.core.server.ServiceEndpointInvoker.invoke(ServiceEndpointInvoker.java:170)
| at org.jboss.wsf.stack.jbws.RequestHandlerImpl.processRequest(RequestHandlerImpl.java:414)
| at org.jboss.wsf.stack.jbws.RequestHandlerImpl.handleRequest(RequestHandlerImpl.java:273)
| at org.jboss.wsf.stack.jbws.RequestHandlerImpl.doPost(RequestHandlerImpl.java:190)
| at org.jboss.wsf.stack.jbws.RequestHandlerImpl.handleHttpRequest(RequestHandlerImpl.java:123)
| at org.jboss.wsf.stack.jbws.EndpointServlet.service(EndpointServlet.java:84)
| 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:127)
| at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
| at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157)
| at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
| at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:262)
| at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
| at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
| at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:446)
| at java.lang.Thread.run(Thread.java:619)
| 2007-11-30 09:27:11,280 ERROR [org.jboss.ws.core.jaxws.handler.HandlerChainExecutor] Exception during handler processing
| org.jboss.ws.core.CommonSOAPFaultException: Signature is invalid.
| at org.jboss.ws.extensions.security.WSSecurityDispatcher.convertToFault(WSSecurityDispatcher.java:105)
| at org.jboss.ws.extensions.security.WSSecurityDispatcher.handleInbound(WSSecurityDispatcher.java:177)
| 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.ServiceEndpointInvoker.callRequestHandlerChain(ServiceEndpointInvoker.java:126)
| at org.jboss.ws.core.server.ServiceEndpointInvoker.invoke(ServiceEndpointInvoker.java:170)
| at org.jboss.wsf.stack.jbws.RequestHandlerImpl.processRequest(RequestHandlerImpl.java:414)
| at org.jboss.wsf.stack.jbws.RequestHandlerImpl.handleRequest(RequestHandlerImpl.java:273)
| at org.jboss.wsf.stack.jbws.RequestHandlerImpl.doPost(RequestHandlerImpl.java:190)
| at org.jboss.wsf.stack.jbws.RequestHandlerImpl.handleHttpRequest(RequestHandlerImpl.java:123)
| at org.jboss.wsf.stack.jbws.EndpointServlet.service(EndpointServlet.java:84)
| 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:127)
| at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
| at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157)
| at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
| at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:262)
| at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
| at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
| at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:446)
| at java.lang.Thread.run(Thread.java:619)
| 2007-11-30 09:27:11,280 DEBUG [org.jboss.ws.core.jaxws.handler.HandlerChainExecutor] Exit: handleIn BoundMessage with status: false
| 2007-11-30 09:27:11,280 DEBUG [org.jboss.ws.core.jaxws.handler.MessageContextJAXWS] Begin response processing
| 2007-11-30 09:27:11,280 DEBUG [org.jboss.ws.core.soap.MessageContextAssociation] popMessageContext: org.jboss.ws.core.jaxws.handler.SOAPMessageContextJAXWS@1b99628 (Thread http-127.0.0.1-8080-1)
| 2007-11-30 09:27:11,280 DEBUG [org.jboss.ws.core.soap.MessageContextAssociation] pushMessageContext: org.jboss.ws.core.jaxws.handler.SOAPMessageContextJAXWS@9042c8 (Thread http-127.0.0.1-8080-1)
| 2007-11-30 09:27:11,280 ERROR [org.jboss.ws.core.jaxws.SOAPFaultHelperJAXWS] SOAP request exception
| javax.xml.ws.WebServiceException: org.jboss.ws.core.CommonSOAPFaultException: Signature is invalid.
| 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.ServiceEndpointInvoker.callRequestHandlerChain(ServiceEndpointInvoker.java:126)
| at org.jboss.ws.core.server.ServiceEndpointInvoker.invoke(ServiceEndpointInvoker.java:170)
| at org.jboss.wsf.stack.jbws.RequestHandlerImpl.processRequest(RequestHandlerImpl.java:414)
| at org.jboss.wsf.stack.jbws.RequestHandlerImpl.handleRequest(RequestHandlerImpl.java:273)
| at org.jboss.wsf.stack.jbws.RequestHandlerImpl.doPost(RequestHandlerImpl.java:190)
| at org.jboss.wsf.stack.jbws.RequestHandlerImpl.handleHttpRequest(RequestHandlerImpl.java:123)
| at org.jboss.wsf.stack.jbws.EndpointServlet.service(EndpointServlet.java:84)
| 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:127)
| at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
| at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157)
| at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
| at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:262)
| at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
| at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
| at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:446)
| at java.lang.Thread.run(Thread.java:619)
| Caused by: org.jboss.ws.core.CommonSOAPFaultException: Signature is invalid.
| at org.jboss.ws.extensions.security.WSSecurityDispatcher.convertToFault(WSSecurityDispatcher.java:105)
| at org.jboss.ws.extensions.security.WSSecurityDispatcher.handleInbound(WSSecurityDispatcher.java:177)
| 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
| 2007-11-30 09:27:11,280 DEBUG [org.jboss.ws.core.jaxws.SOAPFaultHelperJAXWS] Cannot obtain fault meta data for: class javax.xml.ws.WebServiceException
| 2007-11-30 09:27:11,280 DEBUG [org.jboss.ws.core.jaxws.handler.HandlerDelegateJAXWS] callFaultHandlerChain: PRE
| 2007-11-30 09:27:11,280 DEBUG [org.jboss.ws.core.jaxws.handler.HandlerDelegateJAXWS] callFaultHandlerChain: ENDPOINT
| 2007-11-30 09:27:11,280 DEBUG [org.jboss.ws.core.jaxws.handler.HandlerDelegateJAXWS] callFaultHandlerChain: POST
| 2007-11-30 09:27:11,280 DEBUG [org.jboss.ws.core.jaxws.handler.HandlerChainExecutor] Enter: handleOutBoundFault
| 2007-11-30 09:27:11,280 DEBUG [org.jboss.ws.core.jaxws.handler.HandlerChainExecutor] Exit: handleOutBoundFault with status: true
| 2007-11-30 09:27:11,280 DEBUG [org.jboss.ws.core.jaxws.handler.HandlerDelegateJAXWS] closeHandlerChain
| 2007-11-30 09:27:11,280 DEBUG [org.jboss.ws.core.jaxws.handler.HandlerDelegateJAXWS] closeHandlerChain
| 2007-11-30 09:27:11,280 DEBUG [org.jboss.ws.core.jaxws.handler.HandlerDelegateJAXWS] closeHandlerChain
| 2007-11-30 09:27:11,280 DEBUG [org.jboss.ws.core.jaxws.handler.HandlerChainExecutor] close
| 2007-11-30 09:27:11,280 DEBUG [org.jboss.ws.metadata.umdm.EndpointMetaData] Configure SOAPBinding
| 2007-11-30 09:27:11,280 ERROR [org.jboss.ws.core.jaxws.SOAPFaultHelperJAXWS] SOAP request exception
| javax.xml.ws.WebServiceException: org.jboss.ws.core.CommonSOAPFaultException: Signature is invalid.
| 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.ServiceEndpointInvoker.callRequestHandlerChain(ServiceEndpointInvoker.java:126)
| at org.jboss.ws.core.server.ServiceEndpointInvoker.invoke(ServiceEndpointInvoker.java:170)
| at org.jboss.wsf.stack.jbws.RequestHandlerImpl.processRequest(RequestHandlerImpl.java:414)
| at org.jboss.wsf.stack.jbws.RequestHandlerImpl.handleRequest(RequestHandlerImpl.java:273)
| at org.jboss.wsf.stack.jbws.RequestHandlerImpl.doPost(RequestHandlerImpl.java:190)
| at org.jboss.wsf.stack.jbws.RequestHandlerImpl.handleHttpRequest(RequestHandlerImpl.java:123)
| at org.jboss.wsf.stack.jbws.EndpointServlet.service(EndpointServlet.java:84)
| 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:127)
| at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
| at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157)
| at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
| at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:262)
| at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
| at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
| at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:446)
| at java.lang.Thread.run(Thread.java:619)
| Caused by: org.jboss.ws.core.CommonSOAPFaultException: Signature is invalid.
| at org.jboss.ws.extensions.security.WSSecurityDispatcher.convertToFault(WSSecurityDispatcher.java:105)
| at org.jboss.ws.extensions.security.WSSecurityDispatcher.handleInbound(WSSecurityDispatcher.java:177)
| 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
| 2007-11-30 09:27:11,280 DEBUG [org.jboss.ws.core.jaxws.SOAPFaultHelperJAXWS] Cannot obtain fault meta data for: class javax.xml.ws.WebServiceException
| 2007-11-30 09:27:11,280 DEBUG [org.jboss.wsf.stack.jbws.RequestHandlerImpl] END handleRequest: jboss.ws:context=test,endpoint=Test
| 2007-11-30 09:27:11,280 DEBUG [org.jboss.ws.core.soap.MessageContextAssociation] popMessageContext: org.jboss.ws.core.jaxws.handler.SOAPMessageContextJAXWS@9042c8 (Thread http-127.0.0.1-8080-1)
| 2007-11-30 09:27:33,931 DEBUG [com.arjuna.ats.arjuna.logging.arjLogger] Periodic recovery - first pass <Fri, 30 Nov 2007 09:27:33>
| 2007-11-30 09:27:33,931 DEBUG [com.arjuna.ats.arjuna.logging.arjLogger] StatusModule: first pass
| 2007-11-30 09:27:33,931 DEBUG [com.arjuna.ats.txoj.logging.txojLoggerI18N] [com.arjuna.ats.internal.txoj.recovery.TORecoveryModule_3] - TORecoveryModule - first pass
| 2007-11-30 09:27:33,931 DEBUG [com.arjuna.ats.jta.logging.loggerI18N] [com.arjuna.ats.internal.jta.recovery.info.firstpass] Local XARecoveryModule - first pass
|
|
Why it doesnt recognize my signature when I remove my VM argument ?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4109339#4109339
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4109339
17 years, 1 month
[JBossWS] - Authorization Failure using secure end point
by mendaye
Hello All:
I follow the user guide on JBOSSWS2.0.GA to create basic authentication for the web services created using secure EJB3.0 end-point. However, I am getting authorization error when the consumer request the service.
Can some one help me to resolve this issue? Below is consumer, statless EJB, service end-point interface and exception thrown...
Consumer Code:
| import java.net.URL;
| import java.util.ArrayList;
| import java.util.Vector;
| import java.util.HashMap;
|
| import javax.xml.namespace.QName;
| import javax.xml.ws.Service;
| import javax.xml.ws.BindingProvider;
|
| import com.panduit.acmnms.db.Device;
| import com.panduit.acmnms.db.DeviceType;
| import com.panduit.pvng.service.api.db.interfaces.PVNGDeviceEndPoint;
| import com.panduit.pvng.service.api.db.ejb.TestDeviceBean;
| import com.panduit.acmnms.beans.*;
|
|
| public class WsClientTest {
|
|
| static void printDeviceObj(DeviceTypeObject devTypeObj){
| System.out.println("----------------------------------------------------");
| System.out.println("deviceType = "+ devTypeObj.getDeviceType());
| System.out.println("deviceType = "+ devTypeObj.getDescription());
| System.out.println("deviceType = "+ devTypeObj.getNumberPorts());
| System.out.println("deviceType = "+ devTypeObj.getNumRackSpaces());
| System.out.println("deviceType = "+ devTypeObj.getVendorId());
| System.out.println("deviceType = "+ devTypeObj.getIconFilePath());
| System.out.println("deviceType = "+ devTypeObj.getIsactive());
| System.out.println("deviceType = "+ devTypeObj.getIsdualPort());
| System.out.println("deviceType = "+ devTypeObj.getDeviceCategoryDesc());
| System.out.println("deviceType = "+ devTypeObj.getIsSwitchType());
| System.out.println("deviceType = "+ devTypeObj.getPartNumber());
| System.out.println("deviceType = "+ devTypeObj.getPortGroupCount());
| System.out.println("----------------------------------------------------");
|
| }
|
| /**
| * @param args
| */
| public static void main(String[] args) throws Exception {
| // TODO Auto-generated method stub
| //URL url = new URL("http://localhost:8080/api-service-1/PVNGDevice?wsdl");
| URL url = new URL("http://127.0.0.1:8080/pvng-api-service-1.0/TestDeviceBean?wsdl");
| QName qname = new QName("http://api.service.pvng.panduit.com/deviceaccess", "DeviceService");
| Service service = Service.create(url, qname);
|
|
| PVNGDeviceEndPoint deviceEndPoint = (PVNGDeviceEndPoint) service.getPort(PVNGDeviceEndPoint.class);
| //This was added to support basic Authentications
| BindingProvider bp = (BindingProvider)deviceEndPoint;
| bp.getRequestContext().put(BindingProvider.USERNAME_PROPERTY, "kermit");
| bp.getRequestContext().put(BindingProvider.PASSWORD_PROPERTY, "thefrog");
|
| DeviceTypeObject deviceTypObj = (DeviceTypeObject) deviceEndPoint.getSingleDeviceType(1);
| if( deviceTypObj != null ){
| System.out.println(" ***** Device Type when ID is 1");
| WsClientTest.printDeviceObj( deviceTypObj);
| }
|
|
| ArrayList deviceWsObjs = deviceEndPoint.getAllExistingDeviceTypes();
| if( deviceWsObjs != null && deviceWsObjs.size() > 0){
| System.out.println("****** All Device Type data");
| for( int i = 0; i < deviceWsObjs.size(); i++ ){
| WsClientTest.printDeviceObj((DeviceTypeObject)deviceWsObjs.get(i));
| }
| }
| }
| }
|
|
|
EJB service end point code:
|
| package com.panduit.pvng.service.api.db.ejb;
| import java.util.ArrayList;
|
| import com.panduit.acmnms.beans.DeviceTypeObject;
| import com.panduit.acmnms.db.Device;
| import com.panduit.acmnms.db.DeviceType;
| import com.panduit.pvng.service.api.db.dao.PVNGAPIDeviceDAO;
| import com.panduit.pvng.service.api.db.interfaces.TestDevice;
| import com.panduit.pvng.service.exception.PVNGAPIException;
|
| import javax.annotation.Resource;
| import javax.annotation.security.DeclareRoles;
| import javax.annotation.security.RolesAllowed;
| import javax.annotation.security.DeclareRoles;
| import javax.ejb.Remote;
| import javax.ejb.Stateless;
| import javax.jws.WebParam;
| import javax.jws.WebService;
| import javax.jws.WebMethod;
| import javax.jws.soap.SOAPBinding;
| import javax.xml.ws.WebServiceContext;
|
| import org.jboss.annotation.ejb.RemoteBinding;
| import org.jboss.annotation.security.SecurityDomain;
|
| @Stateless
| @SecurityDomain("JBossWS")
| //@DeclareRoles("friend")
| @RolesAllowed("friend")
| @Remote(TestDevice.class)
| @RemoteBinding(jndiBinding="ejb3/TestDevice")
| @WebService(name = "PVNGDeviceEndPoint", targetNamespace = "http://api.service.pvng.panduit.com/deviceaccess", serviceName = "DeviceService")
| @SOAPBinding(style = SOAPBinding.Style.DOCUMENT, use=SOAPBinding.Use.LITERAL)
| public class TestDeviceBean implements TestDevice{
|
|
| @WebMethod(operationName = "getAllExistingDeviceTypes")
| public ArrayList <DeviceTypeObject> getAllDevicesTypes() throws PVNGAPIException{
| PVNGAPIDeviceDAO loPVNGAPIDeviceDAO = new PVNGAPIDeviceDAO();
| // call the business method in DAO class
| ArrayList <DeviceTypeObject>lalPortInfo = loPVNGAPIDeviceDAO.getAllDeviceTypes();
| // Return the information back to the calling program
| return lalPortInfo;
| }
|
|
| @WebMethod(operationName = "getSingleDeviceType")
| public DeviceTypeObject getDeviceType(@WebParam (name="DeviceTypeID") int deviceTypeId) throws PVNGAPIException{
| PVNGAPIDeviceDAO loPVNGAPIDeviceDAO = new PVNGAPIDeviceDAO();
| // call the business method in DAO class
| DeviceTypeObject deviceTypeObj = loPVNGAPIDeviceDAO.getDeviceTypeById(deviceTypeId);
| // Return the information back to the calling program
| System.out.println(" **** EJB Called and ArrayList for Device Type name :"+ deviceTypeObj.getDescription());
| return deviceTypeObj;
| }
| }
|
|
Service End Point Interface:
| package com.panduit.pvng.service.api.db.interfaces;
|
| import java.rmi.Remote;
| import java.rmi.RemoteException;
| import java.util.ArrayList;
|
| import javax.jws.WebMethod;
| import javax.jws.WebParam;
| import javax.jws.WebService;
| import javax.jws.soap.SOAPBinding;
|
| import com.panduit.acmnms.beans.DeviceTypeObject;
| import com.panduit.pvng.service.exception.PVNGAPIException;
|
| @WebService(name = "PVNGDeviceEndPoint", targetNamespace = "http://api.service.pvng.panduit.com/deviceaccess", serviceName = "DeviceService")
| @SOAPBinding(style = SOAPBinding.Style.DOCUMENT, use=SOAPBinding.Use.LITERAL)
|
| public interface PVNGDeviceEndPoint extends Remote {
| @WebMethod(operationName = "getSingleDeviceType")
| public DeviceTypeObject getSingleDeviceType(@WebParam (name="DeviceTypeID", partName="DeviceTypeID") int deviceTypeId) throws RemoteException, PVNGAPIException;
| //public ArrayList<DeviceTypeObject> getAllDevicesTypes() throws PVNGAPIException;
| @WebMethod(operationName = "getAllExistingDeviceTypes")
| public ArrayList<DeviceTypeObject> getAllExistingDeviceTypes() throws RemoteException, PVNGAPIException;
| }
|
|
Here is the exception thrown when consumer request the service.
| [java] DEBUG [main] (MessageContextAssociation.java:75) - popMessageContext
| : org.jboss.ws.core.jaxws.handler.SOAPMessageContextJAXWS@17918f0 (Thread main)
| [java] Exception in thread "main" javax.xml.ws.soap.SOAPFaultException: Aut
| horization failure
| [java] at org.jboss.ws.core.jaxws.SOAPFaultHelperJAXWS.getSOAPFaultExce
| ption(SOAPFaultHelperJAXWS.java:69)
| [java] at org.jboss.ws.core.jaxws.binding.SOAP11BindingJAXWS.throwFault
| Exception(SOAP11BindingJAXWS.java:109)
| [java] at org.jboss.ws.core.CommonSOAPBinding.unbindResponseMessage(Com
| monSOAPBinding.java:553)
| [java] at org.jboss.ws.core.CommonClient.invoke(CommonClient.java:371)
| [java] at org.jboss.ws.core.jaxws.client.ClientImpl.invoke(ClientImpl.j
| ava:243)
| [java] at org.jboss.ws.core.jaxws.client.ClientProxy.invoke(ClientProxy
| .java:164)
| [java] at org.jboss.ws.core.jaxws.client.ClientProxy.invoke(ClientProxy
| .java:150)
| [java] at $Proxy13.getSingleDeviceType(Unknown Source)
| [java] at ejb.WsClientTest.main(WsClientTest.java:70)
| [java] Java Result: 1
|
I checked security data for JBossWS in login-config.xml, jbossws-user.properties and jbossws-role.properties. I don't see any problem, all of them are correct. I am not sure what is going on here... Help Help..
Thanks,
Surafel
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4109303#4109303
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4109303
17 years, 1 month
[JBossWS] - [SchemaTypeCreator] JAX-RPC does not allow collection types
by webjavier
Hi,
I have a serious problem when i deploy a web service in JBoss 4.0.5
when i invoke the service i can't access to SSSSS222 beacuse in my client don't be created that class SSSSS2222....
I mapped schemas to java with jaxb2.0.5.
I'm using:
JAXB 2.0 .5
JSR181
| My schema is:
| <xs:schema......>
| <xs:element name="PPPPPP">
| <xs:complexType>
| <xs:all>
| <xs:element ref="AAAAAAA"/>
| <xs:element ref="SSSSS111"/>
| </xs:all>
| </xs:complexType>
| </xs:element>
| <xs:element name="SSSSS111">
| <xs:complexType>
| <xs:sequence>
| <xs:element ref="SSSSS222" maxOccurs="unbounded"/>
| </xs:sequence>
| </xs:complexType>
| </xs:element>
| <xs:element name="SSSSS222">
| <xs:complexType>
| <xs:all>
| <xs:element ref="DDDDDD"/>
| <xs:element ref="DEDEDEDE" minOccurs="0"/>
| </xs:all>
| </xs:complexType>
| </xs:element>
| </xs:schema>
|
Error:
13:24:23,271 WARN [SchemaTypeCreator] JAX-RPC does not allow collection types skipping: com.java.SSSSS111.SSSSS222
A part of wsdl generated is:
| <complexType name="SSSSS111">
| <sequence/> *****error comparing with schema
| </complexType>
|
My web service is:
| @WebMethod(operationName="WS1")
| @WebResult(name = "Resp",
| targetNamespace = "http://www.example.com/resp")
| @RequestWrapper(localName = "validacionWS",
| targetNamespace = "http://www.example.com/pet",
| className = "com.java.ValidacionWS")
| @ResponseWrapper(localName = "validacionFWSResponse",
| targetNamespace = "http://www.example.com/resp",
| className = "com.java.Respuesta")
| public Respuesta validacionPeticion(@WebParam(name = "peticion",
| targetNamespace = "http://www.example.com/pet")
| Peticion peticion)throws MyException,
|
Please, help me...
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4109284#4109284
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4109284
17 years, 1 month