Message Signing in ebMS

167 views
Skip to first unread message

H Krishna K

unread,
Mar 6, 2015, 6:15:21 AM3/6/15
to cecid-...@googlegroups.com
HI ,

I am testing loop back test in ebms for sending message over https with signing but I got struck with below error (javax.net.ssl.SSLHandshakeException: java.security.cert.CertificateException: Certificate chain not trusted). Here I have attached my sample partnership set-up and my corvus module and ebms module config files. Not sure If I missed out anything.Please suggest me on this.





18:56:49,678 INFO  [hk.hku.cecid.ebms.spa] (http-/127.0.0.1:8380-1) Outbound payload received - cpaId: cpaid, service: https://localhost:8743/corvus/h
ttpd/ebms/inbound, serviceType:null, action: action, convId: cpaid, fromPartyId: fromPartyId, fromPartyType: fromPartyType, toPartyId: toPartyId, toPa
rtyType: toPartyType, refToMessageId: null
18:56:49,678 INFO  [hk.hku.cecid.ebms.spa] (http-/127.0.0.1:8380-1) Generating message id: 20150306-1...@127.0.0.1
18:56:49,678 INFO  [hk.hku.cecid.ebms.spa] (http-/127.0.0.1:8380-1) extracting attachments com.sun.xml.messaging.saaj.soap.AttachmentPartImpl@20573e
18:56:49,678 INFO  [hk.hku.cecid.ebms.spa] (http-/127.0.0.1:8380-1) Attachments content type application/octet-stream
18:56:49,678 INFO  [hk.hku.cecid.ebms.spa] (http-/127.0.0.1:8380-1) in process Outgoing message request source is : hk.hku.cecid.piazza.commons.soap.W
ebServicesRequest@13fa782
18:56:49,678 INFO  [hk.hku.cecid.ebms.spa] (http-/127.0.0.1:8380-1) request is of webservice: hk.hku.cecid.piazza.commons.soap.WebServicesRequest@13fa
782
18:56:49,678 INFO  [hk.hku.cecid.ebms.spa] (http-/127.0.0.1:8380-1) inside classifymessageType for message with service :  https://localhost:8743/corv
us/httpd/ebms/inbound
18:56:49,678 INFO  [hk.hku.cecid.ebms.spa] (http-/127.0.0.1:8380-1) inside classifymessageType for message with action :  action
18:56:49,678 INFO  [hk.hku.cecid.ebms.spa] (http-/127.0.0.1:8380-1) inside store outgoing message for message of type :  Order
18:56:49,694 INFO  [hk.hku.cecid.ebms.spa] (http-/127.0.0.1:8380-1) Store outgoing message: 20150306-1...@127.0.0.1
18:56:49,694 INFO  [hk.hku.cecid.ebms.spa] (http-/127.0.0.1:8380-1) Outbound payload processed - cpaId: cpaid, service: https://localhost:8743/corvus/
httpd/ebms/inbound, action: action, convId: cpaid, fromPartyId: fromPartyId, fromPartyType: fromPartyType, toPartyId: toPartyId, toPartyType: toPartyT
ype, refToMessageId: null
18:56:49,756 INFO  [hk.hku.cecid.ebms.spa] (Thread-162) inside classifymessageType for message with service :  https://localhost:8743/corvus/httpd/ebm
s/inbound
18:56:49,756 INFO  [hk.hku.cecid.ebms.spa] (Thread-162) inside classifymessageType for message with action :  action
18:56:49,756 INFO  [hk.hku.cecid.ebms.spa] (Thread-162) Sign the message: 20150306-1...@127.0.0.1
18:56:49,803 INFO  [hk.hku.cecid.ebms.spa] (Thread-162) Party URL that is loaded : https://localhost:8743/corvus/httpd/ebms/inbound
18:56:49,803 INFO  [hk.hku.cecid.ebms.spa] (Thread-162) Send message 20150306-1...@120.0.0.1 to https://localhost:8743/corvus/httpd/ebms/in
bound
18:56:49,834 ERROR [hk.hku.cecid.ebms.spa] (Thread-162) Cannot send the message: hk.hku.cecid.piazza.commons.net.ConnectionException: Unable to send H
TTP SOAP request
        by javax.net.ssl.SSLHandshakeException: java.security.cert.CertificateException: Certificate chain not trusted
        by java.security.cert.CertificateException: Certificate chain not trusted
        at hk.hku.cecid.piazza.commons.soap.SOAPHttpConnector.send(SOAPHttpConnector.java:112) [piazza-commons.jar:]
        at hk.hku.cecid.ebms.spa.task.OutboxTask.sendMsgByHttp(OutboxTask.java:575)
        at hk.hku.cecid.ebms.spa.task.OutboxTask.execute(OutboxTask.java:445)
        at hk.hku.cecid.piazza.commons.module.ActiveThread.run(ActiveThread.java:90) [piazza-commons.jar:]
        at java.lang.Thread.run(Thread.java:745) [rt.jar:1.7.0_75]
Caused by: javax.net.ssl.SSLHandshakeException: java.security.cert.CertificateException: Certificate chain not trusted
        at sun.security.ssl.Alerts.getSSLException(Alerts.java:192) [jsse.jar:1.7.0_75]
        at sun.security.ssl.SSLSocketImpl.fatal(SSLSocketImpl.java:1904) [jsse.jar:1.7.0_75]
        at sun.security.ssl.Handshaker.fatalSE(Handshaker.java:279) [jsse.jar:1.7.0_75]
        at sun.security.ssl.Handshaker.fatalSE(Handshaker.java:273) [jsse.jar:1.7.0_75]
        at sun.security.ssl.ClientHandshaker.serverCertificate(ClientHandshaker.java:1446) [jsse.jar:1.7.0_75]
        at sun.security.ssl.ClientHandshaker.processMessage(ClientHandshaker.java:209) [jsse.jar:1.7.0_75]
        at sun.security.ssl.Handshaker.processLoop(Handshaker.java:901) [jsse.jar:1.7.0_75]
        at sun.security.ssl.Handshaker.process_record(Handshaker.java:837) [jsse.jar:1.7.0_75]
        at sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:1023) [jsse.jar:1.7.0_75]
        at sun.security.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1332) [jsse.jar:1.7.0_75]
        at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1359) [jsse.jar:1.7.0_75]
        at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1343) [jsse.jar:1.7.0_75]
        at sun.net.www.protocol.https.HttpsClient.afterConnect(HttpsClient.java:563) [rt.jar:1.7.0_75]
        at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(AbstractDelegateHttpsURLConnection.java:185) [rt.jar:1.7.0_75]
        at sun.net.www.protocol.http.HttpURLConnection.getOutputStream(HttpURLConnection.java:1092) [rt.jar:1.7.0_75]
        at sun.net.www.protocol.https.HttpsURLConnectionImpl.getOutputStream(HttpsURLConnectionImpl.java:250) [rt.jar:1.7.0_75]
        at hk.hku.cecid.piazza.commons.soap.SOAPHttpConnector.send(SOAPHttpConnector.java:84) [piazza-commons.jar:]
        ... 4 more
Caused by: java.security.cert.CertificateException: Certificate chain not trusted
        at hk.hku.cecid.piazza.commons.security.KeyStoreTrustManager.checkTrusted(KeyStoreTrustManager.java:96) [piazza-commons.jar:]
        at hk.hku.cecid.piazza.commons.security.KeyStoreTrustManager.checkServerTrusted(KeyStoreTrustManager.java:131) [piazza-commons.jar:]
        at sun.security.ssl.AbstractTrustManagerWrapper.checkServerTrusted(SSLContextImpl.java:885) [jsse.jar:1.7.0_75]
        at sun.security.ssl.ClientHandshaker.serverCertificate(ClientHandshaker.java:1428) [jsse.jar:1.7.0_75]
        ... 16 more

18:56:49,944 ERROR [hk.hku.cecid.ebms.spa] (Thread-162) Error in outbox task: hk.hku.cecid.ebms.spa.task.DeliveryException: Cannot send the message
        by hk.hku.cecid.piazza.commons.net.ConnectionException: Unable to send HTTP SOAP request
        by javax.net.ssl.SSLHandshakeException: java.security.cert.CertificateException: Certificate chain not trusted
        by java.security.cert.CertificateException: Certificate chain not trusted
        at hk.hku.cecid.ebms.spa.task.OutboxTask.sendMsgByHttp(OutboxTask.java:578)
        at hk.hku.cecid.ebms.spa.task.OutboxTask.execute(OutboxTask.java:445)
        at hk.hku.cecid.piazza.commons.module.ActiveThread.run(ActiveThread.java:90) [piazza-commons.jar:]
        at java.lang.Thread.run(Thread.java:745) [rt.jar:1.7.0_75]
Caused by: hk.hku.cecid.piazza.commons.net.ConnectionException: Unable to send HTTP SOAP request
        by javax.net.ssl.SSLHandshakeException: java.security.cert.CertificateException: Certificate chain not trusted
        by java.security.cert.CertificateException: Certificate chain not trusted
        at hk.hku.cecid.piazza.commons.soap.SOAPHttpConnector.send(SOAPHttpConnector.java:112) [piazza-commons.jar:]
        at hk.hku.cecid.ebms.spa.task.OutboxTask.sendMsgByHttp(OutboxTask.java:575)
        ... 3 more
Caused by: javax.net.ssl.SSLHandshakeException: java.security.cert.CertificateException: Certificate chain not trusted
        at sun.security.ssl.Alerts.getSSLException(Alerts.java:192) [jsse.jar:1.7.0_75]
        at sun.security.ssl.SSLSocketImpl.fatal(SSLSocketImpl.java:1904) [jsse.jar:1.7.0_75]
        at sun.security.ssl.Handshaker.fatalSE(Handshaker.java:279) [jsse.jar:1.7.0_75]
        at sun.security.ssl.Handshaker.fatalSE(Handshaker.java:273) [jsse.jar:1.7.0_75]
        at sun.security.ssl.ClientHandshaker.serverCertificate(ClientHandshaker.java:1446) [jsse.jar:1.7.0_75]
        at sun.security.ssl.ClientHandshaker.processMessage(ClientHandshaker.java:209) [jsse.jar:1.7.0_75]
        at sun.security.ssl.Handshaker.processLoop(Handshaker.java:901) [jsse.jar:1.7.0_75]
        at sun.security.ssl.Handshaker.process_record(Handshaker.java:837) [jsse.jar:1.7.0_75]
        at sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:1023) [jsse.jar:1.7.0_75]
        at sun.security.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1332) [jsse.jar:1.7.0_75]
        at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1359) [jsse.jar:1.7.0_75]
        at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1343) [jsse.jar:1.7.0_75]
        at sun.net.www.protocol.https.HttpsClient.afterConnect(HttpsClient.java:563) [rt.jar:1.7.0_75]
        at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(AbstractDelegateHttpsURLConnection.java:185) [rt.jar:1.7.0_75]
        at sun.net.www.protocol.http.HttpURLConnection.getOutputStream(HttpURLConnection.java:1092) [rt.jar:1.7.0_75]
        at sun.net.www.protocol.https.HttpsURLConnectionImpl.getOutputStream(HttpsURLConnectionImpl.java:250) [rt.jar:1.7.0_75]
        at hk.hku.cecid.piazza.commons.soap.SOAPHttpConnector.send(SOAPHttpConnector.java:84) [piazza-commons.jar:]
        ... 4 more
Caused by: java.security.cert.CertificateException: Certificate chain not trusted
        at hk.hku.cecid.piazza.commons.security.KeyStoreTrustManager.checkTrusted(KeyStoreTrustManager.java:96) [piazza-commons.jar:]
        at hk.hku.cecid.piazza.commons.security.KeyStoreTrustManager.checkServerTrusted(KeyStoreTrustManager.java:131) [piazza-commons.jar:]
        at sun.security.ssl.AbstractTrustManagerWrapper.checkServerTrusted(SSLContextImpl.java:885) [jsse.jar:1.7.0_75]
        at sun.security.ssl.ClientHandshaker.serverCertificate(ClientHandshaker.java:1428) [jsse.jar:1.7.0_75]
        ... 16 more

18:57:22,350 INFO  [hk.hku.cecid.ebms.spa] (Thread-82) 1 message(s) has been marked re-sending.
18:57:22,366 INFO  [hk.hku.cecid.ebms.spa] (Thread-166) inside classifymessageType for message with service :  https://localhost:8743/corvus/httpd/ebm
s/inbound
18:57:43,335 INFO  [hk.hku.cecid.ebms.spa] (Thread-166) inside classifymessageType for message with action :  action
18:57:43,335 INFO  [hk.hku.cecid.ebms.spa] (Thread-166) Sign the message: 20150306-1...@127.0.0.1
18:57:43,397 INFO  [hk.hku.cecid.ebms.spa] (Thread-166) Reliable message (20150306-1...@127.0.0.1) - no acknowledgement received until maxi
mum retries
18:57:43,397 INFO  [hk.hku.cecid.ebms.spa] (Thread-166) Mark as failed (Message id: 20150306-1...@127.0.0.1)
18:57:43,428 INFO  [hk.hku.cecid.ebms.spa] (Thread-166) Generate delivery failure error message
18:57:43,444 INFO  [hk.hku.cecid.ebms.spa] (Thread-166) inside classifymessageType for message with service :  urn:oasis:names:tc:ebxml-msg:service
18:57:43,444 INFO  [hk.hku.cecid.ebms.spa] (Thread-166) inside classifymessageType for message with action :  MessageError
18:57:43,538 INFO  [hk.hku.cecid.ebms.spa] (Thread-169) Ebxml Message (20150306-1...@127.0.0.1) is stored in inbox with order number: 17


Regards,
Harikrishna

Partnership.png
ebms.module.xml
corvus.module.xml

H Krishna K

unread,
Mar 9, 2015, 3:59:34 AM3/9/15
to cecid-...@googlegroups.com
HI ,
I could able to resolve this by adding the .p12 file in the truststore. Thanks.
Regards,
Harikrishna
18:57:43,397 INFO  [hk.hku.cecid.ebms.spa] (Thread-166) Reliable message (20150306-185649-67802@127.0.0.1) - no acknowledgement received until maxi
mum retries
18:57:43,397 INFO  [hk.hku.cecid.ebms.spa] (Thread-166) Mark as failed (Message id: 20150306-1...@127.0.0.1)
18:57:43,428 INFO  [hk.hku.cecid.ebms.spa] (Thread-166) Generate delivery failure error message
18:57:43,444 INFO  [hk.hku.cecid.ebms.spa] (Thread-166) inside classifymessageType for message with service :  urn:oasis:names:tc:ebxml-msg:service
18:57:43,444 INFO  [hk.hku.cecid.ebms.spa] (Thread-166) inside classifymessageType for message with action :  MessageError
18:57:43,538 INFO  [hk.hku.cecid.ebms.spa] (Thread-169) Ebxml Message (20150306-185743-42803@127.0.0.1) is stored in inbox with order number: 17


Regards,
Harikrishna

Reply all
Reply to author
Forward
0 new messages