DataStage – use Web Services Client

3 Aug

Create a Server of Parallel Job with a Web Services Client stage going into a Sequential File.

Go into the Web Services Client properties:
Click “Select Web Service Operation”->”Launch the Web Service Meta Data Importer”

Enter in the WSDL into the “Address” bar
I used the WSDL at: http://developerdays.com/cgi-bin/tempconverter.exe/wsdl/ITempConverter

Click “Import”.

Select the “Operation” – in my case “CtoF”.

Now you should be back on the Web Services Client properties page.
Click the “Output” tab.
Click the “Input Arguments” tab and click the “Load Arguments Information…” button
Click the “Output Message” tab and click the “Load Message Information” button.
————————————————————-
I got the following error when i tired to do this without setting the “Web Services Client”->”Output”->”Output Message” Namespace information.

APT_CombinedOperatorController,0: Fatal Error: Fatal: 0011`:`[WebService] javax.xml.transform.TransformerException: Prefix must resolve to a namespace: ns1
 at org.apache.xpath.compiler.XPathParser.error(XPathParser.java:602)
 at org.apache.xpath.compiler.Lexer.mapNSTokens(Lexer.java:638)
 at org.apache.xpath.compiler.Lexer.tokenize(Lexer.java:265)
 at org.apache.xpath.compiler.Lexer.tokenize(Lexer.java:96)
 at org.apache.xpath.compiler.XPathParser.initXPath(XPathParser.java:108)
 at org.apache.xpath.XPath.(XPath.java:170)
 at org.apache.xpath.XPath.(XPath.java:205)
 at org.apache.xpath.XPath.(XPath.java:225)
 at com.ascentialsoftware.wsclient.MappingHandler.compileRules(MappingHandler.java:331)
 at com.ascentialsoftware.wsclient.MappingHandler.toArray(MappingHandler.java:230)
 at com.ascentialsoftware.wsclient.ResponseHandler.getBodyAsArray(ResponseHandler.java:213)
 at com.ascentialsoftware.wsclient.WebService.getResponseBodyArray(WebService.java:1455)
 at com.ascentialsoftware.wspack.Transformer.setResponseValues(Transformer.java:350)
 at com.ascentialsoftware.wspack.Transformer.process(Transformer.java:139)
 at com.ascentialsoftware.jds.StageFactory.runStage(StageFactory.java:544)
 at com.ascentialsoftware.jds.StageFactory.runSource(StageFactory.java:335)

————————————————————-
I got the following error when i tried to send a Sequential File into a WS but did not set the “Web Services Client”->”Input”->”Input Message”->”Load Message Information”…
(Its a bit of a cryptic error message).

APT_CombinedOperatorController,0: Fatal Error: Fatal: 0026`:`com.ascentialsoftware.wsclient.xml.DerivationParser$XPathException: Rule [0] " ", XPath error:
 at com.ascentialsoftware.wsclient.xml.DerivationParser.parse(DerivationParser.java:134)
 at com.ascentialsoftware.wsclient.xml.TreeBuilder.compileRules(TreeBuilder.java:84)
 at com.ascentialsoftware.wsclient.MappingHandler.fromArray(MappingHandler.java:304)
 at com.ascentialsoftware.wsclient.InputRequest.buildRequestBodyDocument(InputRequest.java:908)
 at com.ascentialsoftware.wsclient.WebService.callServiceInternal(WebService.java:1625)
 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.runTarget(StageFactory.java:348)
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: