Four Stars

Talend Job as Web Service Client in NetBeans (6.8)

Has anyone been able to call their Talend job in a NetBeans project?
I am hosting my Talend job in a glassfish server and was able to generate classes using the web service client generator in netbeans...I am able to reach my service with my project, however it is not performing its actual talend job.
Can anyone help?
Here is the code:
try {
// Call Web Service Operation
krfs.jefferies.FTPGetService service = new krfs.jefferies.FTPGetService();
krfs.jefferies.FTPGet port = service.getFTPGet();

// TODO initialize WS operation arguments here
krfs.jefferies.Args args = new krfs.jefferies.Args();
args.getItem().add("--context_param ftpHost="+ftpHost);
args.getItem().add("--context_param ftpLogin="+ftpLogin);
args.getItem().add("--context_param ftpPassword="+ftpPassword);
args.getItem().add("--context_param ftpPort="+ftpPort);
args.getItem().add("--context_param localDir="+localDir);
args.getItem().add("--context_param remoteDir="+remoteDir);
args.getItem().add("--context_param fileNameRegEx=20100115");
krfs.jefferies.RunJobReturn result = port.runJob(args);

System.out.println("Result = "+result.getItem().listIterator());
} catch (Exception ex) {
// TODO handle custom exceptions here
}
4 REPLIES
One Star

Re: Talend Job as Web Service Client in NetBeans (6.8)

hi jkrfs,
I'm a newbie in Talend and I'm also trying to integrate Talend and glassfish. Can you please assist or give me some guidelines on how I can implement it.
Thanks!
Four Stars

Re: Talend Job as Web Service Client in NetBeans (6.8)

Absolutely! We stopped using our Talend services with glassfish so I may be a little rusty however I still have all the code. First things first, extract your talend war file and host it on to glassfish. Using your IDE (in my case, Netbeans) use the Webservice call to receive WSDL info.
The code I have above is the same I have now, except I added some stuff to return errors. Let me know if there is anything I can help with.
One Star

Re: Talend Job as Web Service Client in NetBeans (6.8)

Hi jkrfs,
You can directly deploy your esdl file in browser by keeping the war file in the webapps folder of glassfish
Best Regards
Honey
Four Stars

Re: Talend Job as Web Service Client in NetBeans (6.8)

Right, but if you want to create code (similar to what I have above) so that you can interface your webservice with your application, you will need to create classes derived from the wsdl that is hosted in glassfish.