Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Save $650 on Qlik Connect, Dec 1 - 7, our lowest price of the year. Register with code CYBERWEEK: Register
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

[resolved] Bad response: 403Forbidden error using tSoap and client certificate

I am trying to call a SOAP webservice method over HTTPS using a client authentication certificate. I have installed the certificate in java keystore (cacerts), and have used tSetKeyStore in my Talend job to initialize it. Then I use a tSoap component to make the request. I get the following error. Please suggest a solution.
connecting to socket on port 3400
connected
Dec 20, 2013 12:53:54 PM com.sun.xml.internal.messaging.saaj.client.p2p.HttpSOAPConnection post
SEVERE: SAAJ0008: Bad Response; Forbidden
Exception in component tSOAP_1
com.sun.xml.internal.messaging.saaj.SOAPExceptionImpl: com.sun.xml.internal.messaging.saaj.SOAPExceptionImpl: Bad response: (403Forbidden
at com.sun.xml.internal.messaging.saaj.client.p2p.HttpSOAPConnection.call(Unknown Source)
at org.talend.soap.SOAPUtil.invokeSOAP(SOAPUtil.java:109)
at test3.test3_0_1.Test3.tSOAP_1Process(Test3.java:304)
at test3.test3_0_1.Test3.tSetKeystore_1Process(Test3.java:414)
at test3.test3_0_1.Test3.runJobInTOS(Test3.java:610)
at test3.test3_0_1.Test3.main(Test3.java:476)
Caused by: com.sun.xml.internal.messaging.saaj.SOAPExceptionImpl: Bad response: (403Forbidden
at com.sun.xml.internal.messaging.saaj.client.p2p.HttpSOAPConnection.post(Unknown Source)
... 6 more
CAUSE:
com.sun.xml.internal.messaging.saaj.SOAPExceptionImpl: Bad response: (403Forbidden
at com.sun.xml.internal.messaging.saaj.client.p2p.HttpSOAPConnection.post(Unknown Source)
disconnected
at com.sun.xml.internal.messaging.saaj.client.p2p.HttpSOAPConnection.call(Unknown Source)
at org.talend.soap.SOAPUtil.invokeSOAP(SOAPUtil.java:109)
at test3.test3_0_1.Test3.tSOAP_1Process(Test3.java:304)
at test3.test3_0_1.Test3.tSetKeystore_1Process(Test3.java:414)
at test3.test3_0_1.Test3.runJobInTOS(Test3.java:610)
at test3.test3_0_1.Test3.main(Test3.java:476)
CAUSE:
com.sun.xml.internal.messaging.saaj.SOAPExceptionImpl: Bad response: (403Forbidden
at com.sun.xml.internal.messaging.saaj.client.p2p.HttpSOAPConnection.post(Unknown Source)
at com.sun.xml.internal.messaging.saaj.client.p2p.HttpSOAPConnection.call(Unknown Source)
at org.talend.soap.SOAPUtil.invokeSOAP(SOAPUtil.java:109)
at test3.test3_0_1.Test3.tSOAP_1Process(Test3.java:304)
at test3.test3_0_1.Test3.tSetKeystore_1Process(Test3.java:414)
at test3.test3_0_1.Test3.runJobInTOS(Test3.java:610)
at test3.test3_0_1.Test3.main(Test3.java:476)
Job Test3 ended at 12:53 20/12/2013.
Labels (5)
1 Solution

Accepted Solutions
Anonymous
Not applicable
Author

I have figured out the problem. In this case, perhaps the certificate was not being detected properly. I had a pkcs12 certificate provided by the webservice team to be used for client authentication. I had imported it to Java keystore (...\lib\security\cacerts) and had used tSetKeystore component. The trick to solution was to check the "Need client authentication" and provide the pkcs12 certificate path and password.

View solution in original post

2 Replies
Anonymous
Not applicable
Author

I have figured out the problem. In this case, perhaps the certificate was not being detected properly. I had a pkcs12 certificate provided by the webservice team to be used for client authentication. I had imported it to Java keystore (...\lib\security\cacerts) and had used tSetKeystore component. The trick to solution was to check the "Need client authentication" and provide the pkcs12 certificate path and password.
Anonymous
Not applicable
Author

Hi There,

We are also facing the similar problem while invoking the client WebService.

Dec 1, 2015 3:39:28 PM com.sun.xml.internal.messaging.saaj.client.p2p.HttpSOAPConnection post
SEVERE: SAAJ0008: Bad Response; Forbidden
com.sun.xml.internal.messaging.saaj.SOAPExceptionImpl: com.sun.xml.internal.messaging.saaj.SOAPExceptionImpl: Bad response: (403Forbidden
        at com.sun.xml.internal.messaging.saaj.client.p2p.HttpSOAPConnection.call(HttpSOAPConnection.java:160)
        .................................................................................................................................
Caused by: com.sun.xml.internal.messaging.saaj.SOAPExceptionImpl: Bad response: (403Forbidden
        at com.sun.xml.internal.messaging.saaj.client.p2p.HttpSOAPConnection.post(HttpSOAPConnection.java:270)
        at com.sun.xml.internal.messaging.saaj.client.p2p.HttpSOAPConnection.call(HttpSOAPConnection.java:156)
        ... 2 more
CAUSE:
com.sun.xml.internal.messaging.saaj.SOAPExceptionImpl: Bad response: (403Forbidden
        at com.sun.xml.internal.messaging.saaj.client.p2p.HttpSOAPConnection.post(HttpSOAPConnection.java:270)
        at com.sun.xml.internal.messaging.saaj.client.p2p.HttpSOAPConnection.call(HttpSOAPConnection.java:156)
        .................................................................................................................................
CAUSE:
com.sun.xml.internal.messaging.saaj.SOAPExceptionImpl: Bad response: (403Forbidden
        at com.sun.xml.internal.messaging.saaj.client.p2p.HttpSOAPConnection.post(HttpSOAPConnection.java:270)
        at com.sun.xml.internal.messaging.saaj.client.p2p.HttpSOAPConnection.call(HttpSOAPConnection.java:156)

Could you please let me know what exact approach you had taken to fix your problem?

Thank you.