cancel
Showing results for 
Search instead for 
Did you mean: 

exception handling with fault message type not working

former_member474221
Participant
0 Kudos

Hi,

I have a sync proxy to proxy scenario and I have created a fault MT and specified in the outbound and Inbound service interface...

*In Inbound proxy I have the following code--*......

.....

RAISE EXCEPTION TYPE z_cx_test_fault

EXPORTING

standard = l_standard_data.

In the sender side abap code which calls the outbound proxy I have the follwing code -

.....

CATCH cx_ai_system_fault INTO lo_cx_ai_system_fault.

txt = lo_cx_ai_system_fault->get_text( ).

WRITE txt.

CATCH z_cx_test_fault INTO lo_cx_test_fault.

txt = lo_cx_standard_message_fault->get_text( ).

WRITE txt.

CATCH cx_ai_application_fault INTO lo_cx_ai_application_fault.

txt = lo_cx_ai_application_fault->get_text( ).

WRITE txt.

when i test the inbound proxy separately I get the custom fault message properly...

however when i run the proxy to proxy sync scenario and the custom exceptionz_cx_test_fault is raised inside the receiver proxy .......control goes to CATCH cx_ai_application_fault and not CATCH z_cx_test_fault .

I understand that cx_ai_application_fault is the super class of all the exception class but why does control go to its exception handling when a custom exception is raised...

Edited by: hema T on Feb 26, 2012 1:16 PM

Edited by: hema T on Feb 26, 2012 1:17 PM

View Entire Topic
former_member206439
Contributor
0 Kudos

Hi Hema,

Please check your fault message class name

You may copied the other object fault class name here.

You have to assign the faulty class assosiated to your Proxy class.

RAISE EXCEPTION TYPE z_cx_test_fault