cancel
Showing results for 
Search instead for 
Did you mean: 

Which messages of soap call processes the block exception branch?

Former Member
0 Kudos

Hi guys!

I'm testing a scenario, where I use BPM, have a block, sync web service call inside and have exception branch, which sends original message to the dest system. I'm a little bit confused, cos' I'm not sure, which error messages does exception branch process. Is it only system error? Or is it also application error - means: fault message is returned..

Thanx, Olian!

Accepted Solutions (1)

Accepted Solutions (1)

bhavesh_kantilal
Active Contributor
0 Kudos

The exception handler will be triggered for both System Exception and the Application exceptions triggered by Fault Messages.

If your Synch Message Interface for the Send Synch Step has a Fault Message Associated with it, you can defined a container element for this fault message and you will be able to access the actual fault message in the Exception Handler blocl.

Regards

Bhavesh

Former Member
0 Kudos

Bhavesh, thanx for answer!

I have another one: our web service has 2 input params - 2 integers. result is their div. We have one standard exception - div by zero. But if I send for example string instead of integer as input, I get java system exception. The problem is: both of the exceptions are form other namespace. And also there could be other exception types... How to catch them all (types) and send its content to some receiveer?

Any idea?

Thanx O.

bhavesh_kantilal
Active Contributor
0 Kudos

><i>The problem is: both of the exceptions are form other namespace. And also there could be other exception types</i>

Not sure I followed this . Can you explain further please.

Regards

Bhavesh

Former Member
0 Kudos

ok, If I send 0 as parameter, I get exception:

<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">

<SOAP-ENV:Body>

<SOAP-ENV:Fault>

<faultcode>SOAP-ENV:Client</faultcode>

<faultstring>Division by zero</faultstring>

<detail>

<ns1:div_test.CalcException xmlns:ns1="urn:CalculatorWsd/CalculatorVi" xmlns:pns="urn:test">

<pns:message>Division by zero</pns:message>

</ns1:div_test.CalcException>

</detail>

</SOAP-ENV:Fault>

</SOAP-ENV:Body>

</SOAP-ENV:Envelope>

But When I send one string parameter, I get

<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">

<SOAP-ENV:Body>

<SOAP-ENV:Fault>

<faultcode>SOAP-ENV:Client</faultcode>

<faultstring>Deserializing fails. Nested message: XML Deserialization Error. Can not create instance of [java.lang.Integer] with parameter [ee]..</faultstring>

<detail>

<ns1:com.sap.engine.services.webservices.additions.soaphttp.exceptions.ProcessException xmlns:ns1="http://sap-j2ee-engine/error">Deserializing fails. Nested message: XML Deserialization Error. Can not create instance of [java.lang.Integer] with parameter [ee]..</ns1:com.sap.engine.services.webservices.additions.soaphttp.exceptions.ProcessException>

</detail>

</SOAP-ENV:Fault>

</SOAP-ENV:Body>

</SOAP-ENV:Envelope>

So, these are two possible exceptions... How to get them? Both are two different message types

OR: hot to get detail text to send it to receiver? What steps need to be in the exception branch?

O.

Olian.

bhavesh_kantilal
Active Contributor
0 Kudos

Got it

><i>So, these are two possible exceptions... How to get them? Both are two different message types :(</i>

Arrg... now got the issue. Dont think there is a possiblity to add multiple fault messages to one Synch Interface ( or is there one? I think there is none).

As a workaround, what I would suggest is that you asign any of these fault message to the Synch Interfaces. When the fault is triggered the fault message will be stored in the container element in the BPM for the Synch Step and will be accessible in the Exception Handler with the data.

Now, when try to access this data , do not use a Grpahical Mapping but use any other mapping like Java or XSL mapping. The message will not be validated against the XSD and this way you will have the fault message in the BPM accessible to you and you can do the needful.

Regards

Bhavesh

Former Member
0 Kudos

Thanx BHAVESH, I'll try it!

O.

henrique_pinto
Active Contributor
0 Kudos

> If your Synch Message Interface for the Send Synch

> Step has a Fault Message Associated with it, you can

> defined a container element for this fault message

> and you will be able to access the actual fault

> message in the Exception Handler blocl.

Really? How can you do that?? 😄

> Arrg... now got the issue. Dont think there is a

> possiblity to add multiple fault messages to one

> Synch Interface ( or is there one? I think there is

> none).

You do know you can define more than 1 fault message in Sync and Inbound Async MIs, right?

Just hit the button to the left of the "Fault Message Type" text, it will open a table where you can enter more than 1 fault message type.

If you have more than 1 fault MT in inbound sync mi and in abstract sync mi, then you can have message mappings between those messages in Interface Mapping. Or you could use XSL/Java Mapping to generate more than 1 fault MT from generic fault MT in inbound.

And of course, you can use each of these fault MTs in abstract sync MI to throw different exceptions, in sync send step of BPM.

Regards,

Henrique.

Answers (0)