Using WebService in datastage 8.0

Dedicated to DataStage and DataStage TX editions featuring IBM<sup>®</sup> Service-Oriented Architectures.

Moderators: chulett, rschirm

Post Reply
Shello
Participant
Posts: 3
Joined: Thu Nov 22, 2007 6:07 am

Using WebService in datastage 8.0

Post by Shello »

Hi,

I have WSDl which will give me certain set of fields by giving one input. I need an XML output out of it.
The WSDL is provided to me exists on some machine which is actually a remote machine.

I have used Teradata API to get an input field value. On the asis of which i will get the output fields values.
Then i used a transformer stage between Teradat API and Web Service Transformer. Then used a XML output stage.

I have imported the WSDL in teh Web service transformer stage. Automatically my Input header and columens and output header and output columns are displayed.

i executed the job but it always gives me error "Unknow host exception : <remote machine name>

Just wanted to let you know, In the Advanced button of Web Service Transformer. Port Address link is working (it is some HTML page)
WSDL adress link is also working
but there is a link specified at Input namespace value : which is not working.

Please let me know Am i going on the right path first.. Why i am getting this error. What else is required to excecute this.
Thanks
Shivani
eostic
Premium Member
Premium Member
Posts: 3838
Joined: Mon Oct 17, 2005 9:34 am

Post by eostic »

Hi....

Sounds like you are doing things right, but just to be sure, try getting this Web Service to work correctly in the WSTransformer...

http://developerdays.com/cgi-bin/tempco ... pConverter

It's a very simple Service...as you import the meta data, pick one of the two Operations (CtoF or FtoC). THen build a job that at its core has a Transformer to WSTransformer to Transformer. Open the WSTransformer and select the Operation, then go to first the Input tab and Message Tab and "load" the message info ...and do the same for the output tab (it should load the link column grids automatically). THen fill in the rest of the job outside your transformers (putting the transformers around the WSTransformer seems like extra baggage --- but trust me, it's a best practice that will keep you sane once you start building more complex scenarios that use XMLPack.).... make sure this works before moving onto something more complex.

Let us know how this goes and then we can move on to the more complex steps.

Ernie
Shello
Participant
Posts: 3
Joined: Thu Nov 22, 2007 6:07 am

Post by Shello »

Thanks Ernie

You know i used the webservice which you provided by using the following job structure:

Teradata ----> Transformer ---> Web Service ---> XML Output
API transformer


The job ran fine :-) . I have given 0 as input to CtoF and got 32.

But now i am suprised why my Webservice couldn't work. I have one question in my mind.
Is this because I am calling a WSDL and Webservice which are located on a remote machine. Does datastage only support webservice operations which are present on Web( registered to UDDI ). I think this may be the cause. Please let me know.
The person's machine which has WSDL link and webservice located, that person provided me the Java Client. I selected the method and given input..it gaves the required output....

Also i have checked that webservice doesn't has Encoding style available. This can be one of the cause..

Please explain....
Thanks
Shivani
eostic
Premium Member
Premium Member
Posts: 3838
Joined: Mon Oct 17, 2005 9:34 am

Post by eostic »

Great! At least we know that the environment is working at the mechanics are all in place.

There are a myriad of reasons why a particular Web Service won't work from within DataStage....from headers to security to structure of the SOAP body, and more..... but it certainly doesn't matter if it's remote, on your local machine, or out on the web. Take a look at the end-point inside the WSDL...it's also in the "Advanced" tab after you've imported the WSDL into the Stage. From the command line at the machine where DataStage is running, can you ping the host? Is there a firewall in the way? Do you need to add the entry to your DataStage machine's host file?

Also, have you tried running the service from your machine using some other SOAP tool? (such as SOAPscope at www.mindreef.com) ?

Ernie
Shello
Participant
Posts: 3
Joined: Thu Nov 22, 2007 6:07 am

Using WebService in datastage 8.0

Post by Shello »

The server <host> has been added to the data stage host file. Now I am getting different below mentioned error :



Webservice_google_query_server1..Web_Services_Transformer_3: com.ascentialsoftware.wsclient.ServiceInvocationException: Service invocation exception: <ns1:Fault xmlns:ns1="http://schemas.xmlsoap.org/soap/envelope/">

<faultcode>soapenv:Server.userException</faultcode>

<faultstring>java.net.ConnectException: Connection timed out</faultstring>

<detail>

<ns1:stackTrace xmlns:ns1="http://xml.apache.org/axis/">java.net.ConnectException: Connection timed out

at java.net.PlainSocketImpl.socketConnect(Native Method)

at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:336)

at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:201)

at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:188)

at java.net.Socket.connect(Socket.java:478)

at java.net.Socket.connect(Socket.java:428)

at java.net.Socket.<init>(Socket.java:335)

at java.net.Socket.<init>(Socket.java:150)

at org.apache.axis.components.net.DefaultSocketFactory.create(DefaultSocketFactory.java:129)

at org.apache.axis.transport.http.HTTPSender.getSocket(HTTPSender.java:157)

at org.apache.axis.transport.http.HTTPSender.invoke(HTTPSender.java:114)

at org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:71)

at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:150)

at org.apache.axis.SimpleChain.invoke(SimpleChain.java:120)

at org.apache.axis.client.AxisClient.invoke(AxisClient.java:180)

at org.apache.axis.client.Call.invokeEngine(Call.java:2564)

at org.apache.axis.client.Call.invoke(Call.java:2553)

at org.apache.axis.client.Call.invoke(Call.java:1753)

at com.ascentialsoftware.wsclient.OperationCall.invoke(OperationCall.java:266)

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.runTransformer(StageFactory.java:361)

</ns1:stackTrace>

</detail>

</ns1:Fault>

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.runTransformer(StageFactory.java:361)





This is connection timeout. I tried doing Telnet on this machine. Here is the description of the telnet.

C:\>telnet <host> 80

Connecting To <host>...Could not open connection to the host, on port 80: Connect failed

The other Telnet I tried is on Port 9080, on which the WSDl points.

C:\>telnet <Host> 9080

here is the description I got. Please go through it and let me know what could be the cause.

HTTP/1.1 408 Request Timeout
Connection: Close
Content-Length: 0
Server : Websphere Application Server/6.1


Connection to host lost




I suppose there should be some problem with the Port connection or the Port is not opening as I am not able to connect to the remote server through telnet.

Kindly help and let me know if am doing wrong.
Thanks
Shivani
eostic
Premium Member
Premium Member
Posts: 3838
Joined: Mon Oct 17, 2005 9:34 am

Post by eostic »

Well... a couple of things to consider... first, it sounds like the Web Service is being hosted on a WebSphere Application Server, as it typically uses 9080 by default (it could be any type, and no big deal, that's just an interesting fact)....but try to find the WAS administrator and owner of the service to see what's up with the Service. This isn't a WISD Service, is it?

Second, you need a SOAP test tool.... don't try to validate a service's functionality with WSPack -- it's too hard...it's not designed for simple unit testing....but there are tools that are. I happen to like SOAPscope from Mindreef (www.mindreef.com), but neotys is a fine tool, as is SOAPUI.

Let's find out if it works outside of DS.

Ernie
Post Reply