Web Service Function Not Returning Optional Error

I have an imported webservice function that the WSDL contains three elements:

<wsdl:input message="impl:GetRequest" name="GetRequest"/>
<wsdl:output message="impl:GetResponse" name="GetResponse">
<wsdl:fault message="impl:FaultDetails" name="FaultDetails">

When called inside a DS job and producing an error I only get responses in the:

AL_ERROR_NUM - correspondign to the
and
AL_ERROR_MSG - corresponding to the

elements of the $REPLY_SCHEMA

Yet, when the same function is called from SOAPUI with the same input as caused the error message response in DS - I get the “FaultDetails” element as specified in the WSDL along with the and .

What am I missing?


Simple Simon :uk: (BOB member since 2007-09-07)

yes, this is correct, the faultDetails returned by webservice are populated in the AE_ERROR_NUM and AR_ERROR_MSG

faultDetails is not an output of the operation, it’s for exception handling

if you want to do different action in DF based on this, you can add a case statement after the response query to handle successful operation and failed operations

by Design, one function call failure with faultDetails will not cause the DF to fail, the Job will complete successfully


manoj_d (BOB member since 2009-01-02)

Thanks for your response manoj_d.

I think I wasn’t exactly clear. :wink:

What I meant was:

The and elements - which are part of the definition, which in turn is the definition for <wsdl:fault message> work, as you’ve outlined, in conjunction with AL_ERROR_NUM and AL_ERROR_MSG.

When the called function returns an error:

[list]In SoapUI I see an extra couple of elements returned in the function response - and which are elements in which is in turn the definition for .
In DS I just see the population of AL_ERROR_NUM and AL_ERROR_MSG[/list]

I’m thinking is an optional return but, DS just doesn’t bring it into the DataFlow - more than likely as it doesn’t get imported with the function so there’s no structure in the DataFlow to populate. :hb:

I hope that clarifies my dilema.

Sorry for the confusion - I was a little stressed at the time and mixed up the names of the XML tags. :x

Simple Simon :uk: (BOB member since 2007-09-07)

Yep. AL_ERROR_NUM is populated by the tags insoapenv:Fault and AL_ERROR_MSG </soapenv:Fault>. As simple Simon says. And it is good as it fits the SOAP standard.
The wrinkle is this:
If the detail lies OUTSIDE YouLoseThisBit</soapenv:Fault>.
Otherwise if the detail is nested INSIDE and AL_ERROR_MSG is set to as large as you can make it:
YouGetThisBit</soapenv:Fault>
You then play with extract_from_xml to get what you need.
Alter the WSDL and re-import.
Just to add some more:
The SOAP definition defines as a simple type. So we can’t insert the detail fragment without breaking SOAP things generally. This means that DS will just deliver the simple text between tags and nothing else. If your web service returns SOAP detail, expect it to be ignored by DS UNLESS you map the fragment to another part of the WSDL you’re using. Spending far too much time on this…


johnroster (BOB member since 2007-08-06)

The real answer is too stupid for words. The SOAP fault returned has and, optionally, .
DS seems to behave like this:
If faultcode is populated then:
Set AL_ERROR_NUM to a non-zero value
And copy all the contents including and between
soapenv:Fault </soapenv:Fault> to AL_ERROR_MSG.

Too bad if AL_ERROR_MSG is set to VARCHAR(255) (which is the default when you import the web service) and the contents is longer than that, 255 is all you get.

You solve it by increasing the size of the AL_ERROR_MSG. You can’t seem to do this using the data store editor.(in 3.2, anyway) So you have to export the function, edit the resultant file and import it again.


johnroster (BOB member since 2007-08-06)