Page 1 of 1

Web service invocation error -Service invocation exception:

Posted: Tue Feb 24, 2009 5:26 am
by srai
Hi All,

I have a simple web service operation that is to echo message.
It takes message as input and suppose to returns the same message as input.

My DataStage job designe is like-

Seqfile_SRC->Transformerstage->WStransformer-Trasformer->Seqfile_TGT.

From seqfil_SRC I am trying to pass the echo input constant values and after invoking wes service it was suppose to return the same as output that I am storing in target seq file.

case1-When I am running the job it shows 1 row return but in actually there is no data.

case-2 When I select "user defined message" in input message tab I am Error phontom error as "Service invocation exception: Content is not allowed in prolog"

Please help me where I am wrong. Its avery simple web service call.
Is there any configuration mistake?

Thanks in advance.

Santosh

Posted: Tue Feb 24, 2009 6:33 am
by chulett
Hard to say... did you capture the webservice metadata and load it properly into the WSTransformer stage?

Posted: Tue Feb 24, 2009 7:28 am
by eostic
As Craig notes, the metadata you bring into the WSTransformer is critical....... for something that is simple, and especially on your first use of the WSTransformer, leave the "user defined" pull-down alone. That is an advanced use case for when you need to manually build your own SOAP bodies, and hopefully you won't need it. Select your Web Service using the main tab when you open the stage (assuming that earlier you were already 100% successful at importing the WSDL operation via Import...Table Definitions....WSDL.....), and then go to the message tabs for input and output links and do an import there. You may also need to do an import for the namespaces on input and output links. If things are set up correctly, your input and output "column" tabs should automatically be populated.

Ernie

Posted: Tue Feb 24, 2009 10:59 pm
by srai
eostic wrote:As Craig notes, the metadata you bring into the WSTransformer is critical....... for something that is simple, and especially on your first use of the WSTransformer, leave the "user defined" pull-down alone. That is an advanced use case for when you need to manually build your own SOAP bodies, and hopefully you won't need it. Select your Web Service using the main tab when you open the stage (assuming that earlier you were already 100% successful at importing the WSDL operation via Import...Table Definitions....WSDL.....), and then go to the message tabs for input and output links and do an import there. You may also need to do an import for the namespaces on input and output links. If things are set up correctly, your input and output "column" tabs should automatically be populated.

Ernie
Hi Ernie,

As you have mentioned about configuration of WSTransformer, same way I am trying to design my DataStage job.

I have already imported WSDL metadata and that is 100% successful.
In WStranformer stage this time I am not using user defined" pull-down at all and Job is running fine as well. The input/output stage of WST I am loading "Laod Message Information" which automatically populating the input/output column tab.
The problem is as I mentioned earlier that I am not getting any output as a return from Web Service.
This is normal ECHO web service, means whatever string input we provide same should be as output. When DataStage job runs, it shows 1 row as return but my Target Seq file does not have any record.

Does anybody has any idea why in return I am not getting data..while its shwoing 1 row as in return.

Santosh

Posted: Wed Feb 25, 2009 6:37 am
by eostic
For starters, can we assume that you also did the same thing on the output link side? (Load Message ....)....

If not, be sure to do that correctly.

What are the downstream stages? Are you going directly to a flat file or a Peek, or something else? These should be your initial unit testing stages downstream for something like this.

Next --- have you fully tested the service outside of DataStage using a SOAP testing tool, like the one in DataStudio or Rational Data Architect, or one that I like, SOAPscope? You need this as a comparison.

Lastly, just to be sure that the SOAP body isn't getting parsed incorrectly with bad xpath, delete the columns on your output link and "load" the BuiltIn table definition called SOAPbody onto your link (or just put a big varchar there). Put a single slash in the Description property and then, at the output message tab, select this column in the user defined pull down. If "anything" is coming back, it will get captured here.

Also --- are you in 8.1? I haven't had time to test whether they fixed a problem with the trace facility (it didn't work in 8.0, but worked in 7.x)....I won't have time today to try it.... when you are in the "Run" dialog, select your Web Services Transformer Stage on the left, and then check ALL four tracing boxes on the right. If the tracing is working, you will get a long set of details in the DS Log....buried in the middle of that log, you will see an entry for the input xml soap envelope going out.....and the return soap envelope coming back in....or you may see errors in the soap envelope here also......... [if the trace isn't working, the job will just abort and no tracing will exist in the log]. It's a great way to determine if the message is truly being delivered over the wire but just not being read by your link.

Ernie

Posted: Fri Sep 10, 2010 4:26 pm
by kduke
Ernie

We have 8.1, is there a way to get this trace back into version 8.1?

Posted: Sat Sep 11, 2010 6:36 am
by eostic
I have it working in 8.1 with FP1, and have used it at several customer sites with the same configuration.

Also --- vary the job type --- I've seen cases where WSPack works ok in Server and not in PX...

Ernie