Now that we’ve gone thru the basics of invoking a Web Service from within DataStage we can cover some of the more interesting stuff. Here are some guidelines and best practices for using each of the capabilities within Web Services Pack, whether it’s a Web Service Routine (Server) or WSClient or WSTransformer Stages.
WSRoutines
These are Server side Routines (create via Import Web Services Function Definitions after you’ve imported the WSDL). Nice because they can be included directly in a Transformer. Of course, that also means that they are not as visual.
- Better for Boolean WS invocation (getting back a true/false) when used in the Constraints of a Transformer.
- Better for when you are calling many Web Services conditionally, or in conjunction with each other, for many columns within a link.
- Best when used with RPC style Web Services
- Best for single output argument, one or more input arguments
- Great for quick testing/prototypes, particularly because of the “Test” function within the Routine editor.
NOT so easily used when:
- Proxy is needed
- Multi-argument out is needed
- Complex XML or array output is needed
- Web Service has a void input message
(these can be done in Routines, but not without difficulty. These really only should be handled in the WSTransformer, where there is a lot more flexibility and support for things like security and proxy)
WS Transformer Stage
-
Best for single invocations (one call needed per row for a particular service)
-
Complements the graphical design metaphor
-
Best when proxy or security options are needed
-
Consistent for both RPC or complex output scenarios
-
More easily hack-able for extracting SOAP bodies/envelopes, etc.
-
Try to always Load link meta data via the Message Load button and NOT via the Column grid load button, especially when you are first using the Stage.
-
BEST PRACTICE: When first building a job with WSTranformer (or with WSClient, for that matter, connect ONLY empty links to your WS Stage [ie….don’t ‘carry’ meta data from some other plugin over to the WS Stage] and LOAD the meta data only from your imported WSDL!!!!!!). One easy trick is to always surround a new WSTransformer with standard transformers…you can always remove them later once you have things working and you are aware of the behavior of the job and the Service.
WS Client Stage
- Designed for single call (target or source) functionality
- As a source, is easily driven by Job Parameters
- Easiest for void input message signatures (when used as source)
- Easiest for void output message signatures (when used as a target)


January 9, 2008 at 9:08 pm
Hi,
I’m preety new to Web services in DS. I need to integrate with SalesForce from DS. Am not able to send XML chunks, used for bulk upserts, to the WS tranformer. I’m getting Java null pointer exception if I give a XML element as a parameter to the transformer.
Thanks
November 16, 2011 at 9:50 am
From your post:
WS Client Stage
•Designed for single call (target or source) functionality
•As a source, is easily driven by Job Parameters
•Easiest for void input message signatures (when used as source)
But i am getting error if i use void input arguments,
CustomeContractList..Sequential_File_18.IDENT1: com.ascentialsoftware.wsclient.ServiceInvocationException: Service invocation exception:
ns1:HTTP
(404)Not Found
return code: 404
at com.ascentialsoftware.wsclient.OperationCall.handleRemoteException(OperationCall.java:369)
at com.ascentialsoftware.wsclient.OperationCall.invoke(OperationCall.java:274)
at com.ascentialsoftware.wsclient.WebService.callServiceInternal(WebService.java:1685)
at com.ascentialsoftware.wsclient.WebService.callService(WebService.java:1591)
at com.ascentialsoftware.wsclient.WebService.callService(WebService.java:1544)
at com.ascentialsoftware.wspack.Transformer.process(Transformer.java:104)
at com.ascentialsoftware.jds.StageFactory.runStage(StageFactory.java:544)
at com.ascentialsoftware.jds.StageFactory.runSource(StageFactory.java:335)
February 22, 2012 at 2:14 pm
Hi Ernie – Question on ISD Load balancing – If I have multiple engine servers, and one Services Tier with ISD running, will ISD load balancer spread the requests across the engine servers, and is this true for an “always on” job as well?
February 22, 2012 at 3:27 pm
Hi John. The answer is “yes”. This assumes, as you noted, that you have two individual “engines” in your Information Server domain, that both are available as Information Providers as configured in the Info Server Console (the ISD “client” tooling), and that you have properly migrated (via .dsx usually) the DataStage/QualityStage job to both server engines and compiled it. The “logic” for the load balancing is noted at the Operation page of the ISD deployment client, and can be round-robin or algorithm. I have found round-robin to be the most effective method. The way you actually get them both to be part of the service is at the “deployed application workspace” where you will see the option to “add additional providers”. It is a valid strategy for both standard and “always on” services based DataStage/QualityStage Jobs.
Ernie