Six Stars

PriviligedActionException at tSOAP component, in SoapUI works fine

Hi all, 

 

I've build a small job, which just extracts values from one XML and fills with those values a SOAP request for a webservice. 

However, when I run it, it gives an error, PriviligedActionException. While if I log the request and put it in SoapUI, then I get a succes response. 

 

What could be causing this difference between using tSOAP in Talend and just using SoapUI? There is no authentication needed or anything, and I just put the whole request including Header in Talend. I hope you can help me!

 

This is the errormessage I get: 

SEVERE: SAAJ0009: Message send failed
Exception in component tSOAP_1 (PIM)
com.sun.xml.messaging.saaj.SOAPExceptionImpl: java.security.PrivilegedActionException: com.sun.xml.messaging.saaj.SOAPExceptionImpl: Message send failed
at com.sun.xml.messaging.saaj.client.p2p.HttpSOAPConnection.call(HttpSOAPConnection.java:191)
at org.talend.soap.SOAPUtil.invokeSOAP(SOAPUtil.java:147)
at pim_development.pim_0_1.PIM.tSOAP_1Process(PIM.java:3318)
at pim_development.pim_0_1.PIM.tFixedFlowInput_2Process(PIM.java:2897)
at pim_development.pim_0_1.PIM.tSetGlobalVar_4Process(PIM.java:2436)
at pim_development.pim_0_1.PIM.tFileInputXML_3Process(PIM.java:4940)
at pim_development.pim_0_1.PIM.tFileInputXML_1Process(PIM.java:1137)
at pim_development.pim_0_1.PIM.tFileList_1Process(PIM.java:5345)
at pim_development.pim_0_1.PIM.runJobInTOS(PIM.java:5671)
at pim_development.pim_0_1.PIM.main(PIM.java:5459)
Caused by: java.security.PrivilegedActionException: com.sun.xml.messaging.saaj.SOAPExceptionImpl: Message send failed
at java.security.AccessController.doPrivileged(Native Method)
at com.sun.xml.messaging.saaj.client.p2p.HttpSOAPConnection.call(HttpSOAPConnection.java:185)
... 9 more
Caused by: com.sun.xml.messaging.saaj.SOAPExceptionImpl: Message send failed
at com.sun.xml.messaging.saaj.client.p2p.HttpSOAPConnection.post(HttpSOAPConnection.java:389)
at com.sun.xml.messaging.saaj.client.p2p.HttpSOAPConnection$PriviledgedPost.run(HttpSOAPConnection.java:214)
... 11 more
Caused by: java.net.ConnectException: Connection refused: connect
at java.net.TwoStacksPlainSocketImpl.socketConnect(Native Method)
at java.net.AbstractPlainSocketImpl.doConnect(Unknown Source)
at java.net.AbstractPlainSocketImpl.connectToAddress(Unknown Source)
at java.net.AbstractPlainSocketImpl.connect(Unknown Source)
at java.net.PlainSocketImpl.connect(Unknown Source)
at java.net.SocksSocketImpl.connect(Unknown Source)
at java.net.Socket.connect(Unknown Source)
at java.net.Socket.connect(Unknown Source)
at sun.net.NetworkClient.doConnect(Unknown Source)
at sun.net.www.http.HttpClient.openServer(Unknown Source)
at sun.net.www.http.HttpClient.openServer(Unknown Source)
at sun.net.www.http.HttpClient.<init>(Unknown Source)
at sun.net.www.http.HttpClient.New(Unknown Source)
at sun.net.www.http.HttpClient.New(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.plainConnect0(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.plainConnect(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.connect(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.getOutputStream0(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.getOutputStream(Unknown Source)
at com.sun.xml.messaging.saaj.client.p2p.HttpSOAPConnection.post(HttpSOAPConnection.java:346)
... 12 more

CAUSE:

java.security.PrivilegedActionException: com.sun.xml.messaging.saaj.SOAPExceptionImpl: Message send failed
at java.security.AccessController.doPrivileged(Native Method)
at com.sun.xml.messaging.saaj.client.p2p.HttpSOAPConnection.call(HttpSOAPConnection.java:185)
at org.talend.soap.SOAPUtil.invokeSOAP(SOAPUtil.java:147)
at pim_development.pim_0_1.PIM.tSOAP_1Process(PIM.java:3318)
at pim_development.pim_0_1.PIM.tFixedFlowInput_2Process(PIM.java:2897)
at pim_development.pim_0_1.PIM.tSetGlobalVar_4Process(PIM.java:2436)
at pim_development.pim_0_1.PIM.tFileInputXML_3Process(PIM.java:4940)
at pim_development.pim_0_1.PIM.tFileInputXML_1Process(PIM.java:1137)
at pim_development.pim_0_1.PIM.tFileList_1Process(PIM.java:5345)
at pim_development.pim_0_1.PIM.runJobInTOS(PIM.java:5671)
at pim_development.pim_0_1.PIM.main(PIM.java:5459)
Caused by: com.sun.xml.messaging.saaj.SOAPExceptionImpl: Message send failed
at com.sun.xml.messaging.saaj.client.p2p.HttpSOAPConnection.post(HttpSOAPConnection.java:389)
at com.sun.xml.messaging.saaj.client.p2p.HttpSOAPConnection$PriviledgedPost.run(HttpSOAPConnection.java:214)
... 11 more
Caused by: java.net.ConnectException: Connection refused: connect
at java.net.TwoStacksPlainSocketImpl.socketConnect(Native Method)
at java.net.AbstractPlainSocketImpl.doConnect(Unknown Source)
at java.net.AbstractPlainSocketImpl.connectToAddress(Unknown Source)
at java.net.AbstractPlainSocketImpl.connect(Unknown Source)
at java.net.PlainSocketImpl.connect(Unknown Source)
at java.net.SocksSocketImpl.connect(Unknown Source)
at java.net.Socket.connect(Unknown Source)
at java.net.Socket.connect(Unknown Source)
at sun.net.NetworkClient.doConnect(Unknown Source)
at sun.net.www.http.HttpClient.openServer(Unknown Source)
at sun.net.www.http.HttpClient.openServer(Unknown Source)
at sun.net.www.http.HttpClient.<init>(Unknown Source)
at sun.net.www.http.HttpClient.New(Unknown Source)
at sun.net.www.http.HttpClient.New(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.plainConnect0(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.plainConnect(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.connect(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.getOutputStream0(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.getOutputStream(Unknown Source)
at com.sun.xml.messaging.saaj.client.p2p.HttpSOAPConnection.post(HttpSOAPConnection.java:346)
... 12 more

CAUSE:

java.security.PrivilegedActionException: com.sun.xml.messaging.saaj.SOAPExceptionImpl: Message send failed
at java.security.AccessController.doPrivileged(Native Method)
at com.sun.xml.messaging.saaj.client.p2p.HttpSOAPConnection.call(HttpSOAPConnection.java:185)
at org.talend.soap.SOAPUtil.invokeSOAP(SOAPUtil.java:147)
at pim_development.pim_0_1.PIM.tSOAP_1Process(PIM.java:3318)
at pim_development.pim_0_1.PIM.tFixedFlowInput_2Process(PIM.java:2897)
at pim_development.pim_0_1.PIM.tSetGlobalVar_4Process(PIM.java:2436)
at pim_development.pim_0_1.PIM.tFileInputXML_3Process(PIM.java:4940)
at pim_development.pim_0_1.PIM.tFileInputXML_1Process(PIM.java:1137)
at pim_development.pim_0_1.PIM.tFileList_1Process(PIM.java:5345)
at pim_development.pim_0_1.PIM.runJobInTOS(PIM.java:5671)
at pim_development.pim_0_1.PIM.main(PIM.java:5459)
Caused by: com.sun.xml.messaging.saaj.SOAPExceptionImpl: Message send failed
at com.sun.xml.messaging.saaj.client.p2p.HttpSOAPConnection.post(HttpSOAPConnection.java:389)
at com.sun.xml.messaging.saaj.client.p2p.HttpSOAPConnection$PriviledgedPost.run(HttpSOAPConnection.java:214)
... 11 more
Caused by: java.net.ConnectException: Connection refused: connect
at java.net.TwoStacksPlainSocketImpl.socketConnect(Native Method)
at java.net.AbstractPlainSocketImpl.doConnect(Unknown Source)
at java.net.AbstractPlainSocketImpl.connectToAddress(Unknown Source)
at java.net.AbstractPlainSocketImpl.connect(Unknown Source)
at java.net.PlainSocketImpl.connect(Unknown Source)
at java.net.SocksSocketImpl.connect(Unknown Source)
at java.net.Socket.connect(Unknown Source)
at java.net.Socket.connect(Unknown Source)
at sun.net.NetworkClient.doConnect(Unknown Source)
at sun.net.www.http.HttpClient.openServer(Unknown Source)
at sun.net.www.http.HttpClient.openServer(Unknown Source)
at sun.net.www.http.HttpClient.<init>(Unknown Source)
at sun.net.www.http.HttpClient.New(Unknown Source)
at sun.net.www.http.HttpClient.New(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.plainConnect0(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.plainConnect(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.connect(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.getOutputStream0(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.getOutputStream(Unknown Source)
at com.sun.xml.messaging.saaj.client.p2p.HttpSOAPConnection.post(HttpSOAPConnection.java:346)
... 12 more

 

 

Thanks in advance!

3 REPLIES
Moderator

Re: PriviligedActionException at tSOAP component, in SoapUI works fine

Hello,

Please post some job setting screenshots on forum which will get more visibility and more help.

Best regards

Sabrina

--
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.
Five Stars

Re: PriviligedActionException at tSOAP component, in SoapUI works fine

Is your SOAP endpoint a HTTPS one? If so you'll need to set up a truststore with the certificate and use tSetKeystore to connect to it. We have ours as part of the prejob flow so the job can use it properly.

 

SoapUI and Postman can both disregard self-signed certificates but Talend doesn't. It's also worth pointing out that the certificate's hostname must match the URL of the SOAP endpoint, one selfsigned to localhost won't work.

 

Oracle have a good truststore guide here, then the Talend reference docs for tSetKeystore should work for the rest.

Six Stars

Re: PriviligedActionException at tSOAP component, in SoapUI works fine

are you using ..asmx?wsdl as your endpoint

your soap action is in the wsdl

output in document

put xml in between " "

replace all " with ' inside XML