javax.net.ssl.sslhandshakeexception tWebServiceInput in advanced

Four Stars

javax.net.ssl.sslhandshakeexception tWebServiceInput in advanced

Good evening ,
sorry my English is not good, I'm doing a job with Talend 5.3.1r104014 32 bit on operating system windows 7  using the component tWebServiceInput ,in attached the steps that I do.
in  component advanced  He returned the error :"javax.net.ssl.SSLHandshakeException" when i do click "WSDL2JAVA".
I have put the certificate.cer of the certifying body in trusted certificates using the Java keytool.
I also put in the root  directory "C:\Program Files (x86)\Java\jdk1.7.0_21\jre\lib\security".
my alias of the trusted store is "C:\CodeSite\cer_inpscerdomus"
how do I get the certificate from the job when I press wsdl2java.

 
Thanks vittorio.
                                                                                                     
                                                                                                 
Moderator

Re: javax.net.ssl.sslhandshakeexception tWebServiceInput in advanced

Hi,
Are you sure the certification you use here is the same with that on web service server? 
Could you please try to use TalendHelpCenter:tSetKeystore component to submit authentication data of a truststore to see if it works?
Please check the related scenario in component reference.
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.
Four Stars

Re: javax.net.ssl.sslhandshakeexception tWebServiceInput in advanced

Thanks for the reply,
but I think I have to set the certified before I launch the job .When I press the button wsdl2java him only catch me l 'wsdl address and not TrustStore file and not TrustStore password ,and not    create routines.
I created the routines from development which does not have the certificate, then I changed the routines locator and set the certificate, has worked fine.
This I have done is not a clean way, because development and production do not always coincide
perhaps it is impossible to put the certificate in wsdl2java tool in Talend
the code is ok

routines.ServiceStatoDomSoap_PortType   weatherSoap = new routines.ServiceStatoDomLocator().getServiceStatoDomSoap();
routines.ServiceStatoDomSoap_BindingStub stub = (routines.ServiceStatoDomSoap_BindingStub)weatherSoap;
org.apache.axis.message.SOAPHeaderElement authentication = new org.apache.axis.message.SOAPHeaderElement("", "Identity");

javax.xml.soap.SOAPElement appName = authentication.addChildElement("AppName");
appName.addTextNode("myuser");

javax.xml.soap.SOAPElement appKey = authentication.addChildElement("AppKey");

    appKey.addTextNode("mypassword");
javax.xml.soap.SOAPElement userId = authentication.addChildElement("UserId");

    userId.addTextNode("BATCH");

javax.xml.soap.SOAPElement identityProvider = authentication.addChildElement("IdentityProvider");

    identityProvider.addTextNode("BATCH");

System.setProperty("javax.net.ssl.trustStore","C:/CodeSite/mykey.jks");

    System.setProperty("javax.net.ssl.trustStorePassword","Talend123");

String n="3300"

myNum result = (myNum)   weatherSoap.num(n) ;





row1.NUMERO2 = result.getNumero();
Four Stars

Re: javax.net.ssl.sslhandshakeexception tWebServiceInput in advanced

hello Sabrina some ideas for the problems exposed.
Best regards.
Four Stars

Re: javax.net.ssl.sslhandshakeexception tWebServiceInput in advanced

I tried the tSetKeystore component but does not work
Moderator

Re: javax.net.ssl.sslhandshakeexception tWebServiceInput in advanced

Hi,
What's the error message you are getting when you use tSetKeystore in your job?
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.
Four Stars

Re: javax.net.ssl.sslhandshakeexception tWebServiceInput in advanced

Hi Sabrina,
I solved in linux operating system, these are the steps that I have done:
I turned cer in pem:  "openssl x509 -inform der -in /Talend/CodeSite/my.cer  -out my.pem".
I Imported a certificate in a keystore (cacert is to java default) with the default password changeit: keytool -import -file my.pem -alis MY_CA_Root -keystore cacerts -storepass changeit.
Talend works well, need to be careful in the setting of java_home and set everything in the Security folder JAVA_HOME / jre / lib / security in cacert with default passwords changeit.
 
           
thanks for everything ,
best regards
Vittorio