[JBossWS] - consume WS over https no longer works when upgraded to jboss
by ajay662
My web-service client application is running fine in jboss 4.0.5. I am accessing service over "https" and am using my own KeyManager and TrustManager for SSL.
However when I upgraded to jboss 4.2.3, the client application stopped working and I get following exception
2008-10-08 13:24:35,057 INFO [STDOUT] WorkManager(2)-8
| 2008-10-08 13:24:35,057 INFO [STDOUT] , SEND TLSv1 ALERT:
| 2008-10-08 13:24:35,057 INFO [STDOUT] fatal,
| 2008-10-08 13:24:35,057 INFO [STDOUT] description = certificate_unknown
| 2008-10-08 13:24:35,057 INFO [STDOUT] WorkManager(2)-8, WRITE: TLSv1 Alert, length = 2
| 2008-10-08 13:24:35,057 INFO [STDOUT] WorkManager(2)-8, called closeSocket()
| 2008-10-08 13:24:35,057 INFO [STDOUT] WorkManager(2)-8, handling exception: javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: No trusted certificate found
| 2008-10-08 13:24:35,057 DEBUG [org.jboss.remoting.transport.http.HTTPClientInvoker] Unable to retrieve response message
| javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: No trusted certificate found
| at com.sun.net.ssl.internal.ssl.Alerts.getSSLException(Alerts.java:150)
| at com.sun.net.ssl.internal.ssl.SSLSocketImpl.fatal(SSLSocketImpl.java:1518)
| at com.sun.net.ssl.internal.ssl.Handshaker.fatalSE(Handshaker.java:174)
| at com.sun.net.ssl.internal.ssl.Handshaker.fatalSE(Handshaker.java:168)
| at com.sun.net.ssl.internal.ssl.ClientHandshaker.serverCertificate(ClientHandshaker.java:848)
| at com.sun.net.ssl.internal.ssl.ClientHandshaker.processMessage(ClientHandshaker.java:106)
| at com.sun.net.ssl.internal.ssl.Handshaker.processLoop(Handshaker.java:495)
| at com.sun.net.ssl.internal.ssl.Handshaker.process_record(Handshaker.java:433)
| at com.sun.net.ssl.internal.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:818)
| at com.sun.net.ssl.internal.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1030)
| at com.sun.net.ssl.internal.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1057)
| at com.sun.net.ssl.internal.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1041)
| at sun.net.www.protocol.https.HttpsClient.afterConnect(HttpsClient.java:402)
| at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(AbstractDelegateHttpsURLConnection.java:170)
| at sun.net.www.protocol.http.HttpURLConnection.getOutputStream(HttpURLConnection.java:861)
| at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:920)
| at java.net.HttpURLConnection.getResponseCode(HttpURLConnection.java:367)
| at java.net.HttpURLConnection.getResponseMessage(HttpURLConnection.java:433)
| at sun.net.www.protocol.https.HttpsURLConnectionImpl.getResponseMessage(HttpsURLConnectionImpl.java:362)
| at org.jboss.remoting.transport.http.HTTPClientInvoker.useHttpURLConnection(HTTPClientInvoker.java:340)
| at org.jboss.remoting.transport.http.HTTPClientInvoker.transport(HTTPClientInvoker.java:137)
| at org.jboss.remoting.MicroRemoteClientInvoker.invoke(MicroRemoteClientInvoker.java:122)
| at org.jboss.remoting.Client.invoke(Client.java:1634)
| at org.jboss.remoting.Client.invoke(Client.java:548)
| at org.jboss.ws.core.client.HTTPRemotingConnection.invoke(HTTPRemotingConnection.java:233)
| at org.jboss.ws.core.client.SOAPProtocolConnectionHTTP.invoke(SOAPProtocolConnectionHTTP.java:73)
| at org.jboss.ws.core.CommonClient.invoke(CommonClient.java:339)
| at org.jboss.ws.core.jaxws.client.ClientImpl.invoke(ClientImpl.java:302)
| at org.jboss.ws.core.jaxws.client.ClientProxy.invoke(ClientProxy.java:172)
| at org.jboss.ws.core.jaxws.client.ClientProxy.invoke(ClientProxy.java:152)
| at $Proxy161.getBuildInfo(Unknown Source)
| at com.covergence.enms.status.PollClusterMDB.pollCluster(PollClusterMDB.java:86)
| at com.covergence.enms.status.PollClusterMDB.onMessage(PollClusterMDB.java:140)
| at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
| at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:585)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:112)
| at org.jboss.ejb3.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:166)
| at org.jboss.ejb3.interceptor.EJB3InterceptorsInterceptor.invoke(EJB3InterceptorsInterceptor.java:63)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
| at org.jboss.ejb3.entity.TransactionScopedEntityManagerInterceptor.invoke(TransactionScopedEntityManagerInterceptor.java:54)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
| at org.jboss.ejb3.AllowedOperationsInterceptor.invoke(AllowedOperationsInterceptor.java:47)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
| at org.jboss.ejb3.tx.BMTInterceptor.handleStateless(BMTInterceptor.java:71)
| at org.jboss.ejb3.tx.BMTInterceptor.invoke(BMTInterceptor.java:131)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
| at org.jboss.ejb3.stateless.StatelessInstanceInterceptor.invoke(StatelessInstanceInterceptor.java:62)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
| at org.jboss.aspects.security.RunAsSecurityInterceptor.invoke(RunAsSecurityInterceptor.java:83)
| at org.jboss.ejb3.security.RunAsSecurityInterceptor.invoke(RunAsSecurityInterceptor.java:54)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
| at org.jboss.ejb3.mdb.MessagingContainer.localInvoke(MessagingContainer.java:249)
| at org.jboss.ejb3.mdb.inflow.MessageInflowLocalProxy.delivery(MessageInflowLocalProxy.java:268)
| at org.jboss.ejb3.mdb.inflow.MessageInflowLocalProxy.invoke(MessageInflowLocalProxy.java:138)
| at $Proxy105.onMessage(Unknown Source)
| at org.jboss.resource.adapter.jms.inflow.JmsServerSession.onMessage(JmsServerSession.java:178)
| at org.jboss.mq.SpyMessageConsumer.sessionConsumerProcessMessage(SpyMessageConsumer.java:906)
| at org.jboss.mq.SpyMessageConsumer.addMessage(SpyMessageConsumer.java:170)
| at org.jboss.mq.SpySession.run(SpySession.java:323)
| at org.jboss.resource.adapter.jms.inflow.JmsServerSession.run(JmsServerSession.java:237)
| at org.jboss.resource.work.WorkWrapper.execute(WorkWrapper.java:204)
| at org.jboss.util.threadpool.BasicTaskWrapper.run(BasicTaskWrapper.java:275)
| at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:756)
| at java.lang.Thread.run(Thread.java:595)
| Caused by: sun.security.validator.ValidatorException: No trusted certificate found
| at sun.security.validator.SimpleValidator.buildTrustedChain(SimpleValidator.java:304)
| at sun.security.validator.SimpleValidator.engineValidate(SimpleValidator.java:107)
| at sun.security.validator.Validator.validate(Validator.java:203)
| at com.sun.net.ssl.internal.ssl.X509TrustManagerImpl.checkServerTrusted(X509TrustManagerImpl.java:172)
| at com.sun.net.ssl.internal.ssl.JsseX509TrustManager.checkServerTrusted(SSLContextImpl.java:320)
| at com.sun.net.ssl.internal.ssl.ClientHandshaker.serverCertificate(ClientHandshaker.java:841)
| ... 61 more
I am using JDK 1.5.0_15. Has anything changed in jboss 4.2.3 (vs jboss 4.0.5) to explain above exception. Why is my TrustManager class not being called above to verify server certificate? Any help would be much appreciated.
Thanks.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4181088#4181088
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4181088
16 years, 2 months
[JBossWS] - Ant tests FAILED
by bkenison
I just installed jbossws-native-3.0.3.GA. I'm using jboss 4.2.3. I ran the "ant tests" and passed most of them, however, I'm failing on XOPBareTestCase and XOPHandlerTestCase
Here is the output from those tests:
[junit] Running org.jboss.test.ws.jaxws.samples.xop.doclit.XOPBareTestCase
[junit] Tests run: 7, Failures: 1, Errors: 0, Time elapsed: 8.48 sec
[junit] Corrupt JPEG DATA: 1 extraneous bytes before marker 0xc4
[junit] Corrupt JPEG DATA: 1 extraneous bytes before marker 0xc4
[junit] Test.org.jboss.test.ws.jaxws.samples.xop.doclit.XOPBareTestCase FAILED
[junit] Running org.jboss.test.ws.jaxws.samples.xop.doclit.XOPHandlerTestCase
[junit] Tests run: 7, Failures: 1, Errors: 0, Time elapsed: 8.516 sec
[junit] Corrupt JPEG DATA: 1 extraneous bytes before marker 0xc4
[junit] Corrupt JPEG DATA: 1 extraneous bytes before marker 0xc4
[junit] Test.org.jboss.test.ws.jaxws.samples.xop.doclit.XOPHandlerTestCase FAILED
In the output files, the following information was recorded:
Testsuite: org.jboss.test.ws.jaxws.samples.xop.doclit.XOPBareTestCase
Tests run: 7, Failures: 1, Errors: 0, Time elapsed: 8.485 sec
Testcase: testDataHandlerRoundtrip took 2.75 sec
Testcase: testDataHandlerResponseOptimzed took 0.453 sec
Testcase: testImgRoundtrip took 1.734 sec
Testcase: testImgResponseOptimized took 1.079 sec
Testcase: testSourceRoundtrip took 0.39 sec
Testcase: testSourceResponseOptimized took 0.547 sec
Testcase: testAttachmentpartSwap took 0.375 sec
FAILED
Attachment part swap file does still exist: JBossWSattachment32227.dat
junit.framework.AssertionFailedError: Attachment part swap file does still exist: JBossWSattachment32227.dat
at org.jboss.test.ws.jaxws.samples.xop.doclit.XOPBase.testAttachmentpartSwap(XOPBase.java:155)
at junit.extensions.TestDecorator.basicRun(TestDecorator.java:22)
at junit.extensions.TestSetup$1.protect(TestSetup.java:19)
at junit.extensions.TestSetup.run(TestSetup.java:23)
There was the same error for XOPHandlerTestCase.
We are planning to use XOP with these web services, so I am concerned about the test failure. Can anyone give me more information on what I might do to pass these tests?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4180857#4180857
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4180857
16 years, 2 months
[JBossWS] - Share JSESSIONID between multiple services
by nias
i'm trying to share a session between more then one webservice endpoint for statefull webservices (via seam to use conversations).
i've tried to get each port via:
| URL wsdlLocation = new URL("...");
| QName serviceName = new QName(..., ...);
| Service service = Service.create(wsdlLocation, serviceName);
| port1 res = (port1)service.getPort(port1.class);
| BindingProvider bp = (BindingProvider)res;
| bp.getRequestContext().put(BindingProvider.USERNAME_PROPERTY, "admin");
| bp.getRequestContext().put(BindingProvider.PASSWORD_PROPERTY, "admin");
| bp.getRequestContext().put(StubExt.PROPERTY_AUTH_TYPE, StubExt.PROPERTY_AUTH_TYPE_WSSE);
| URL securityURL = new File("src/test/webservices/META-INF/jboss-wsse-client.xml").toURL();
| ((StubExt)bp).setSecurityConfig(securityURL.toExternalForm());
| ((StubExt)bp).setConfigName("Standard WSSecurity Client");
| bp.getRequestContext().put(BindingProvider.SESSION_MAINTAIN_PROPERTY, true);
|
all calls from one port are working fine inside the session but now i wan't to take the JSESSIONID from port1 after first call and use them for port2 with the following code:
| final Map responseMap = ((BindingProvider)port1).getResponseContext();
| final Map headerValues = (Map)responseMap.get(MessageContext.HTTP_RESPONSE_HEADERS);
| final List<String> cookieHeaders = (List<String>) headerValues.get("Set-Cookie");
| for(String x : cookieHeaders) {
| if(xl[0].equals("JSESSIONID")) {
| Map<String, List<String>> headers = (Map<String, List<String>>) ((BindingProvider)port2).getRequestContext().get(MessageContext.HTTP_REQUEST_HEADERS);
| if (headers == null) {
| headers = new HashMap<String, List<String>>();
| ((BindingProvider)port2).getRequestContext().put(MessageContext.HTTP_REQUEST_HEADERS, headers);
| } else { System.out.println("headers exists"); }
|
| List<String> cookie = headers.get("Cookie");
| if (cookie == null) {
| cookie = new ArrayList<String>();
| headers.put("Cookie", cookie);
| } else { System.out.println("cookies exists"); }
| cookie.add("JSESSIONID="+xl[1]);
|
The cookie would be extracted but ignored on first call for port2, therefore a new session starts on port2.
how can i solve this?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4180783#4180783
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4180783
16 years, 2 months