Five Stars

Did I miss something with tWebServiceInput ?


Hi All,

I want to consume Magento SOAP webservice in Talend. The newbie solution I tried first was to write manually soap messages in custom routines. It works but not viable at long term and really painful to maintain. You guess it's the first time I deal with SOAP.

Now I've discovered code generation using wsdl2java in tWebServiceInput. I got the following new routines: BindingStub, MagentoService, MagentoServiceLocator, Porttype.

In a tJava, I wrote:

String wsdl = "http://mymagento.localhost/index.php/api/soap/";
routines.PortType porttype = new routines.MagentoServiceLocator().getPort(new;
String resp= porttype.login("myusername", "mypassword");

But when I run it, I got the following error.

Exception in thread "main" java.lang.NoClassDefFoundError: javax/xml/rpc/Service

 How do I install this missing class ?

Tags (3)

Re: Did I miss something with tWebServiceInput ?


There are two ways for you to import and use an external jar.
1)Using tLibraryload component to load the jar file at the begininig of job. for example:
tJava(on tJava, use the external API)

2)Creating custom routine, import the external jar file by clicking on the routine name and editing the routine libraries, and then call this routine in the job.

Best regards


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