[JBossWS] - Re: Need help : JBossWS Security!
by xinhua
i updated the jbossWS-native in jboss4.2.2GA to jbossws-3.0.1-native-2.0.4.GA
the severside exception is also changed:(
| 12:45:06,234 ERROR [HandlerChainExecutor] Exception during handler processing
| org.jboss.ws.core.CommonSOAPFaultException: This service requires <wsse:Security>, which is missing.
| at org.jboss.ws.extensions.security.WSSecurityDispatcher.convertToFault(WSSecurityDispatcher.java:100)
| at org.jboss.ws.extensions.security.WSSecurityDispatcher.decodeMessage(WSSecurityDispatcher.java:207)
| at org.jboss.ws.extensions.security.jaxws.WSSecurityHandler.handleInboundSecurity(WSSecurityHandler.java:83)
| 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:97)
| at org.jboss.ws.core.server.ServiceEndpointInvoker.callRequestHandlerChain(ServiceEndpointInvoker.java:127)
| at org.jboss.ws.core.server.ServiceEndpointInvoker.invoke(ServiceEndpointInvoker.java:171)
| at org.jboss.wsf.stack.jbws.RequestHandlerImpl.processRequest(RequestHandlerImpl.java:466)
| at org.jboss.wsf.stack.jbws.RequestHandlerImpl.handleRequest(RequestHandlerImpl.java:284)
| at org.jboss.wsf.stack.jbws.RequestHandlerImpl.doPost(RequestHandlerImpl.java:201)
| at org.jboss.wsf.stack.jbws.RequestHandlerImpl.handleHttpRequest(RequestHandlerImpl.java:134)
| 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.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:524)
| 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:595)
| 12:45:06,234 ERROR [SOAPFaultHelperJAXWS] SOAP request exception
| javax.xml.ws.WebServiceException: org.jboss.ws.core.CommonSOAPFaultException: This service requires <wsse:Security>, which is missing.
| 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:97)
| at org.jboss.ws.core.server.ServiceEndpointInvoker.callRequestHandlerChain(ServiceEndpointInvoker.java:127)
| at org.jboss.ws.core.server.ServiceEndpointInvoker.invoke(ServiceEndpointInvoker.java:171)
| at org.jboss.wsf.stack.jbws.RequestHandlerImpl.processRequest(RequestHandlerImpl.java:466)
| at org.jboss.wsf.stack.jbws.RequestHandlerImpl.handleRequest(RequestHandlerImpl.java:284)
| at org.jboss.wsf.stack.jbws.RequestHandlerImpl.doPost(RequestHandlerImpl.java:201)
| at org.jboss.wsf.stack.jbws.RequestHandlerImpl.handleHttpRequest(RequestHandlerImpl.java:134)
| 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.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:524)
| 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:595)
| Caused by: org.jboss.ws.core.CommonSOAPFaultException: This service requires <wsse:Security>, which is missing.
| .....
|
|
|
it seems that request from client is not right. :(
need help....
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4147785#4147785
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4147785
16 years, 8 months
[JBossWS] - Re: Need help : JBossWS Security!
by xinhua
ok, i think ((StubExt) ksb).setConfigName("Standard WSSecurity Client"); is in a wrong place, now i put it under http auth block
| .....
| BindingProvider bp = (BindingProvider)ksb;
| bp.getRequestContext().put(BindingProvider.USERNAME_PROPERTY, "kermit");
| bp.getRequestContext().put(BindingProvider.PASSWORD_PROPERTY, "thefrog");
|
| ((StubExt) ksb).setConfigName("Standard WSSecurity Client");
| .....
|
HTTP authentication: Unauthorized exception by client is gone , but server side runs into trouble:
| $ 11:30:01,343 ERROR [HandlerChainExecutor] Exception during handler processing
| java.lang.NullPointerException
| at org.jboss.ws.extensions.security.Util.matchNode(Util.java:188)
| at org.jboss.ws.extensions.security.Util.matchNode(Util.java:183)
| at org.jboss.ws.extensions.security.Util.findElement(Util.java:89)
| at org.jboss.ws.extensions.security.WSSecurityDispatcher.handleInbound(WSSecurityDispatcher.java:115)
| 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:408)
| at org.jboss.wsf.stack.jbws.RequestHandlerImpl.handleRequest(RequestHandlerImpl.java:272)
| at org.jboss.wsf.stack.jbws.RequestHandlerImpl.doPost(RequestHandlerImpl.java:189)
| at org.jboss.wsf.stack.jbws.RequestHandlerImpl.handleHttpRequest(RequestHandlerImpl.java:122)
| 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.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:524)
| 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:595)
| 11:30:01,343 ERROR [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.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:408)
| at org.jboss.wsf.stack.jbws.RequestHandlerImpl.handleRequest(RequestHandlerImpl.java:272)
| at org.jboss.wsf.stack.jbws.RequestHandlerImpl.doPost(RequestHandlerImpl.java:189)
| at org.jboss.wsf.stack.jbws.RequestHandlerImpl.handleHttpRequest(RequestHandlerImpl.java:122)
| 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.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:524)
| 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:595)
| Caused by: java.lang.NullPointerException
| at org.jboss.ws.extensions.security.Util.matchNode(Util.java:188)
| at org.jboss.ws.extensions.security.Util.matchNode(Util.java:183)
| at org.jboss.ws.extensions.security.Util.findElement(Util.java:89)
| at org.jboss.ws.extensions.security.WSSecurityDispatcher.handleInbound(WSSecurityDispatcher.java:115)
| 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)
| ... 28 more
| 11:30:01,343 ERROR [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.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:408)
| at org.jboss.wsf.stack.jbws.RequestHandlerImpl.handleRequest(RequestHandlerImpl.java:272)
| at org.jboss.wsf.stack.jbws.RequestHandlerImpl.doPost(RequestHandlerImpl.java:189)
| at org.jboss.wsf.stack.jbws.RequestHandlerImpl.handleHttpRequest(RequestHandlerImpl.java:122)
| 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.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:524)
| 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:595)
| Caused by: java.lang.NullPointerException
| at org.jboss.ws.extensions.security.Util.matchNode(Util.java:188)
| at org.jboss.ws.extensions.security.Util.matchNode(Util.java:183)
| at org.jboss.ws.extensions.security.Util.findElement(Util.java:89)
| at org.jboss.ws.extensions.security.WSSecurityDispatcher.handleInbound(WSSecurityDispatcher.java:115)
| 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)
| ... 28 more
|
|
can anyone help?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4147767#4147767
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4147767
16 years, 8 months
[JBossWS] - Need help : JBossWS Security!
by xinhua
Hi all,
i want to use ssl and signature to protect my WS on Jboss4.2.2GA , ssl works perfectly but when i use client to send a request with signature, i always got an error. My codes, configurations and evn listed as followed:
JBoss4.2.2GA
jdk1.5
SSL keyStore&trustStore file: ksbws.keystore
Signature keyStore&trustStore file: ksbws_security.keystore
Server Side:
| @Stateless
| @SecurityDomain("JBossWS")
| @RolesAllowed("friend")
| @WebService(endpointInterface="de.xxx.xxx.KSBService")
| @WebContext(contextRoot="/KSBService",
| urlPattern="/*",
| authMethod="BASIC",
| transportGuarantee="CONFIDENTIAL",
| secureWSDLAccess=false)
| @EndpointConfig(configName = "Standard WSSecurity Endpoint")
| public class KSBServiceBean implements KSBService,KSBServiceRemote,KSBServiceLocal{
|
| private static final Logger log = Logger.getLogger(KSBServiceBean.class);
|
| @EJB
| KSBManagerLocal ksb;
|
| public sting validateLogin(Long userNo, String password) {
| // doSomething
| }
|
| }
in META-INF/ i putted ksbws_security.keystore and jboss-wsse-server.xml
here is my jboss-wsse-server.xml:
| <jboss-ws-security xmlns="http://www.jboss.com/ws-security/config"
| xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
| xsi:schemaLocation="http://www.jboss.com/ws-security/config
| http://www.jboss.com/ws-security/schema/jboss-ws-security_1_0.xsd">
| <key-store-file>META-INF/ksbws_security.keystore</key-store-file>
| <key-store-password>test</key-store-password>
| <trust-store-file>META-INF/ksbws_security.keystore</trust-store-file>
| <trust-store-password>test</trust-store-password>
| <config>
| <sign type="x509v3" alias="KSBWS_SECURITY" />
| <requires>
| <signature />
| </requires>
| </config>
| </jboss-ws-security>
|
Server side jar deployed without exception
Client:
codes
| public static void main(String[] args) {
| KSBService ksb = null;
| try {
| //SSL keystore
| System.setProperty("javax.net.ssl.keyStore", "c:\\ksbws.keystore");
| System.setProperty("javax.net.ssl.trustStore", "c:\\ksbws.keystore");
| System.setProperty("javax.net.ssl.keyStorePassword", "test");
| System.setProperty("javax.net.ssl.trustStorePassword", "test");
| System.setProperty("javax.net.ssl.keyStoreType", "jks");
| System.setProperty("javax.net.ssl.trustStoreType", "jks");
| System.setProperty("org.jboss.security.ignoreHttpsHost","true");
|
| //Signature keystore
| System.setProperty("org.jboss.ws.wsse.keyStore","c:\\ksbws_security.keystore");
| System.setProperty("org.jboss.ws.wsse.trustStore","c:\\ksbws_security.keystore");
| System.setProperty("org.jboss.ws.wsse.keyStorePassword", "test");
| System.setProperty("org.jboss.ws.wsse.trustStorePassword", "test");
| System.setProperty("org.jboss.ws.wsse.keyStoreType", "jks");
| System.setProperty("org.jboss.ws.wsse.trustStoreType", "jks");
|
| Service service = Service.create(new URL("http://localhost:8180/KSBService/KSBServiceBean?wsdl"),
| new QName("http://xxx.xxx.de/","KSBServiceBeanService") );
|
|
|
|
| ksb= service.getPort(KSBService.class);
|
| ((StubExt) ksb).setConfigName("Standard WSSecurity Client");
|
| BindingProvider bp = (BindingProvider)ksb;
| bp.getRequestContext().put(BindingProvider.USERNAME_PROPERTY, "kermit");
| bp.getRequestContext().put(BindingProvider.PASSWORD_PROPERTY, "thefrog");
|
|
| } catch (Exception e) {
| ....
| ...
|
|
|
also, i putted jboss-wsse-client.xml in META-INF/
| <jboss-ws-security xmlns="http://www.jboss.com/ws-security/config"
| xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
| xsi:schemaLocation="http://www.jboss.com/ws-security/config
| http://www.jboss.com/ws-security/schema/jboss-ws-security_1_0.xsd">
| <config>
| <sign type="x509v3" alias="KSBWS_SECURITY"/>
| <requires>
| <signature/>
| </requires>
| </config>
| </jboss-ws-security>
|
But when i run client , an Exception like this:
| java.lang.ClassCastException: $Proxy23 cannot be cast to org.jboss.ws.core.StubExt
| at dexxxxx.xxxx.xxxx.MultiThreadsTest.main(MultiThreadsTest.java:43)
| Exception in thread "Thread-1" com.sun.xml.ws.client.ClientTransportException: request requires HTTP authentication: Unauthorized
| at com.sun.xml.ws.transport.http.client.HttpClientTransport.checkResponseCode(HttpClientTransport.java:197)
| at com.sun.xml.ws.transport.http.client.HttpTransportPipe.process(HttpTransportPipe.java:137)
| at com.sun.xml.ws.transport.http.client.HttpTransportPipe.processRequest(HttpTransportPipe.java:74)
| at com.sun.xml.ws.api.pipe.Fiber.__doRun(Fiber.java:559)
| at com.sun.xml.ws.api.pipe.Fiber._doRun(Fiber.java:518)
| at com.sun.xml.ws.api.pipe.Fiber.doRun(Fiber.java:503)
| at com.sun.xml.ws.api.pipe.Fiber.runSync(Fiber.java:400)
| at com.sun.xml.ws.client.Stub.process(Stub.java:235)
| at com.sun.xml.ws.client.sei.SEIStub.doProcess(SEIStub.java:120)
| at com.sun.xml.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.java:230)
| at com.sun.xml.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.java:210)
| at com.sun.xml.ws.client.sei.SEIStub.invoke(SEIStub.java:103)
| at $Proxy23.validateLogin(Unknown Source)
|
It seems that jboss-wsse-client.xml was not readed by client.
If i remove codes and configs for signature, SSL works fine.
can anyone help me???
thanks
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4147754#4147754
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4147754
16 years, 8 months
[JBossWS] - Performance issue with WSProvide Ant Task (Windows only)
by pingus
I'm using WSProvide and WSConsume to create a Web Service client library. Using it on a Linux machine performs well. Switching to Windows it's ~ 20 times slower.
After several attempts to solve this, e.g. adjusting the memory parameters, I checked the network traffic having in mind it could by some kind of "timeout" problem while accessing resources. Using Wireshark I've seen several NetBIOS Name queries like this:
NBNS Name query NB JBOSS-4.2.2.GA<00>
NBNS Name query NB LOG4J.JAR;C<00>
NBNS Name query NB MAIL.JAR;C<00>
All of them get the Answer
NBNS Name query response, Requested name does not exist
As a first-try workaround I've deactivated NetBIOS over TCP/IP in the Network settings and it's fast as expected.
But, what is the reason for this? Why NBNS queries for JBOSS-4.2.2.GA?
Is there any better way to solve this, e.g. a Java option to deactivate NetBIOS requests?
Thanks in advance
Pingus
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4147710#4147710
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4147710
16 years, 8 months
[JBossWS] - how to modify a client so that it works with rpc instead of
by peiguo
On server side, I changed the style annotation of my service: from RPC to DOCUMENT. The client side stopped working. When I first started writing this post, I found teh client side imports javax.xml.rpc.*. i searched through J2EE API and there is no javax.xml.document.
How should I modify my client code? Why is the API's not consistent for those two styles?
| package org.jboss.tutorial.webservice.client;
|
| import org.jboss.tutorial.webservice.bean.Calculator;
|
| import javax.xml.namespace.QName;
| import javax.xml.rpc.Service;
| import javax.xml.rpc.ServiceFactory;
| import java.net.URL;
| import java.io.File;
|
| public class Client
| {
| public static void main(String[] args) throws Exception
| {
| URL url = new URL("http://localhost:8080/tutorial/CalculatorBean?wsdl");
|
| ServiceFactory factory = ServiceFactory.newInstance();
| Service service = factory.createService(url, null);
|
| Calculator calculator = (Calculator) service.getPort(Calculator.class);
|
| System.out.println("" + calculator.add(Integer.parseInt(args[0]), Integer.parseInt(args[1]), args[2]));
| System.out.println("" + calculator.subtract(Integer.parseInt(args[0]), Integer.parseInt(args[1])));
| }
| }
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4147684#4147684
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4147684
16 years, 8 months