WS transformer

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

Moderators: chulett, rschirm

Post Reply
India2000
Participant
Posts: 274
Joined: Sun Aug 22, 2010 11:07 am

WS transformer

Post by India2000 »

Hi,

After importing wsdl definition for currency converter example,I don't see anything the "operations" of the web services browser to select it from the transformer's 'select web service operation' button. Am I missing license or anything here? Please anyone let me know.

thanks,
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Is the WSDL import successful? While importing, are the operations defined in the WSDL displayed?
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
India2000
Participant
Posts: 274
Joined: Sun Aug 22, 2010 11:07 am

Post by India2000 »

Thank you Ray,

I see the operations while importing WSDL definitions. But once I imported the IN and OUT table definitions, I see the operations window empty to select it from the transformer web services operations button.
eostic
Premium Member
Premium Member
Posts: 3838
Joined: Mon Oct 17, 2005 9:34 am

Post by eostic »

Look in the Web Services category of Table definitions..there should be a lot of table defs created when you finish the import...if not, something went wrong during the import of the wsdl.....at the very least you should see an _OUT, and _IN, and a _MSGOUT and a _MSGIN, or similar......

Ernie
Ernie Ostic

blogit!
<a href="https://dsrealtime.wordpress.com/2015/0 ... ere/">Open IGC is Here!</a>
India2000
Participant
Posts: 274
Joined: Sun Aug 22, 2010 11:07 am

Post by India2000 »

Eostic,

It does successfully create table definitions under web services categroy,but not many as you said....Only 2 OUT and IN definitions for the currency converter.

There are also a default web services operations table definitions under that folder.. example for 'weather'. but I don;t see any of the existing operations in the web service browser while selecting web services operations thro the transformer or thro web services browser.
eostic
Premium Member
Premium Member
Posts: 3838
Joined: Mon Oct 17, 2005 9:34 am

Post by eostic »

you should be getting as many as 6 or 7. If not try other wsdl's. The import is not working correctly if you don't get the message in and message out table defs as well as the others for the basic Operation itself.

For testing, there are lots of really good ones at www.xmethods.net . Do a search (control-f) and look for "Temperature Conversions"...there's a great wsdl there that has some FtoC and CtoF functions.

Ernie
Ernie Ostic

blogit!
<a href="https://dsrealtime.wordpress.com/2015/0 ... ere/">Open IGC is Here!</a>
India2000
Participant
Posts: 274
Joined: Sun Aug 22, 2010 11:07 am

Post by India2000 »

Hi,

After installing a fix pack1 it started importing correctly without any issues.
I'm new to Webservice.
I want to know what should be the request message format to webservice and response format from webservice? If I'm extracting paramters from a database can I directly request webservice or do I need to format this request to xml before sending it to the webservice?In otherwords, how do I determine request and response format for a given service end point. Please can anyone let guide me?

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

Post by eostic »

Like a lot of things, "it depends". If the service is simple single-row-in and single-row-out, and has just single fine grained parameters, just import the wsdl, select your Operation at the main Stage button, and then "Load" the messages on the input and output link. You will see how that automatically puts the columns on each link......you're done. It's why I insist that sites learning this find a simple web service like the one suggested above as an initial test. No extra formatting required.

If the service has an array, or a complex body, then yes, you will need to independently learn how to use the xml stages to potentially build, and then possibly to parse, the SOAP that is sent/returned. That is a separate exercise and learning curve. Once both are things you are comfortable with you can put them together.

Look at my blog (link below) and find the table of contents......there are numerous posts on getting started with web services.

Ernie
Ernie Ostic

blogit!
<a href="https://dsrealtime.wordpress.com/2015/0 ... ere/">Open IGC is Here!</a>
India2000
Participant
Posts: 274
Joined: Sun Aug 22, 2010 11:07 am

Post by India2000 »

I get the following error.. I have 4 fields in the request.. its a soap request in xml format. I tried giving parameters using both directly as 4 parameters and as a single xml request. I get the following authentication error in the flow. My DS server is on AIX.

"<ns1:Fault xmlns:ns1="http://schemas.xmlsoap.org/soap/envelope/">
<faultcode xmlns:ns1="http://xml.apache.org/axis/">ns1:HTTP</faultcode>
<faultstring>(401)Unauthorized</faultstring>
<detail>
<string>return code: 401
<?xml version="1.0" encoding="UTF-8"?>

<soap-env:Envelope xmlns:soap-env="http://schemas.xmlsoap.org/soap/envelope/">

when I asked the services team, they said there is a generic soap header with user ID and password. How do I need to provide this header in the request? Can anyone please help me??

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

Post by eostic »

As noted above, check out the details in the blog url. One of the key things you will see is to find yourself a testing tool, such as SOAPui or Actional Soap Tester, and install and use it. Get to know the service very well, and its behavior, and its execution requirements (headers, etc.) using an effective debugging tool like one of these or many other free ones on the web......and then implement it with DataStage. DataStage can call Web Services...but it is not the tool of choice for debugging them or getting to know them.

Ernie
Ernie Ostic

blogit!
<a href="https://dsrealtime.wordpress.com/2015/0 ... ere/">Open IGC is Here!</a>
India2000
Participant
Posts: 274
Joined: Sun Aug 22, 2010 11:07 am

Post by India2000 »

Hi Eostic,
End point does respond in soapUI if I embed security header with username and password in the request using the WS security configuration of the Soap UI.

I have the following question now..

I have the xsd of the request and wsdl of the response. Can I generate xml definition using the xml of the soap UI to get header and body of the request or do I need to pass header separately?
Post Reply