cancel
Showing results for 
Search instead for 
Did you mean: 

Throw an Exception inside a Java-Mapping

Former Member
0 Kudos

Hi,

we have PI7.0.

I wanna throw an exception inside a JAVA-Mapping, but the error should be displayed inside the Monitoring SXMB_MONI in SOAP-HEader/Error - and not only inside the trace.

Is it possible to change the error type to APPLICATION-Error(restartable).

In SXMB_MONI this special ERROR should be displayed in the status-column with a "red arrow (application error-restartable)" and not a "red flag (system-error restartable)".

How can I do it.

I read the blog "XI/PI: Throwing Generic Exceptions from any type of Mapping" - good blog but I don't wanna use an ABAP-Mapping.

Thanks vor your help.

Regards

Wolfgang

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

Refer this blog :

You can use the same API's in Java Mapping also.

Thanks

FF

Former Member
0 Kudos

Thanx a lot for all your help - I check it and write you back!

Regards

Wolfgang

Answers (3)

Answers (3)

prateek
Active Contributor
0 Kudos

U may follow the same methodology as provided in the blog "XI/PI: Throwing Generic Exceptions from any type of Mapping". The difference would be in reading the adapter specific attributes in java mapping instead of abap mapping using this:

http://help.sap.com/saphelp_nw04/helpdata/en/43/09b16006526e72e10000000a422035/frameset.htm

U may use a try catch block here.

Regards,

Prateek

henrique_pinto
Active Contributor
0 Kudos

I'm not sure, but maybe throwing a StreamTransformationException within a Java mapping will have the same result of the blog. You could try it.

Regarding the Application Error, though, I'm not sure it's feasible.

Regards,

Henrique.

Former Member
0 Kudos

Hi Wolfgang,

Yah, you can definitely do this.

Refer the blog:

I had implemented in my project on the same lines. Do let me know if you require any other information.

Adios

RAVIJEET