on 04-19-2006 9:20 AM
Hi all,
I have created an ABAP proxy for a HTTP-XI-RFC scenario
(synchronous). The proxy is for outbound interface. The case is that 2 no.s are passed from proxy to XI which calls RFC, which in turn returns the sum of 2 no.s
The problem is that When I run the proxy report, no output is returned by RFC and '0' is displayed as answer.
In SXMB_MONI, both - the request and response - messages are shown as successfully processed.
Here is the report, for your reference:
*----
REPORT ZSSB_REPPROXYTEST.
DATA prxy TYPE REF TO ZPWACO_OBIF_CALC.
CREATE OBJECT prxy.
DATA it TYPE ZPWAMT_CALC_SEND.
DATA res TYPE ZPWAMT_CALC_REC.
TRY.
it-MT_CALC_SEND-NUM1 = 2.
it-MT_CALC_SEND-NUM2 = 7.
CALL METHOD prxy->EXECUTE_SYNCHRONOUS
EXPORTING
output = it
importing
input = res.
commit work.
CATCH cx_ai_system_fault .
DATA fault TYPE REF TO cx_ai_system_fault .
CREATE OBJECT fault.
WRITE 😕 fault->errortext.
ENDTRY.
write:/ 'Num1 = ', it-MT_CALC_SEND-NUM1, / 'Num2 = ', it-MT_CALC_SEND-NUM2.
write:/ 'Sum = ', res-MT_CALC_REC-SUM.
*----
Is the 'CALL METHOD' part of above code correct ?
Regards,
Hi Shankar ,
try prxy=>EXECUTE_SYNCHRONOUS
instead of
prxy->EXECUTE_SYNCHRONOUS
A commit work is not neccesary in case of synchr call.
Catch system errrors:
DATA fault TYPE REF TO cx_ai_system_fault .
catch cx_ai_system_fault into fault.
WRITE 😕 fault->errortext.
Regards,
Udo
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Udo,
1) prxy=>EXECUTE_SYNCHRONOUS gave syntax error.
2) After modifying the Catch clause as per your suggestion, I got following error in report output.
<b>Error during XML => ABAP Conversion (Response Message; Error ID:CX_ST_GROUP_MISSING_CASE; (1SAI/TX000000000000000020 XML bytepos. : 126 </b>
What is this 'Missing Case' ? Is it related to uppercase/lowercase stuff ?
Regards,
Hi Vijaya,
I guess by <b>output 'it' (ur sum)</b> you mean sum field in structure 'res' declared in my report i.e. result sum which is INCOMING to proxy from RFC, right ?
Well, it is not getting updated. I cheked this using a breakpoint, and that's why I am stuck up.
Regards,
Message was edited by: Shankar Bhate
Hi all,
Well, my problem is solved. I had done a silly mistake, but that proved to be a good learning for me...
In HTTP - XI - RFC scenario, where both the interfaces are synchronous, I had done only request message mapping but NOT response message mapping.
However, this didn't create the problem when I tested through HTTP client. Whatever was the result returned by RFC, it was simply passed through XI - <b>without any mapping</b> and directly displayed backed in HTTP client in XML form only. Hence I didn't come to know about my mistake.
But when I used ABAP proxy, it gave error because response message from RFC was not mapped into proxy's message format.
I searched for meaning of the error that I got viz.
<b>Error during XML => ABAP Conversion (Response Message; Error ID:CX_ST_GROUP_MISSING_CASE</b>
This error comes when there is problem in "deserializing" i.e. during conversion of message from XML to ABAP.
Anyways, thanks to all for your prompt help..
Regards,
Hi Shankar,
Please can you check that the sum data is coming from the RFC in your Response message correctly.
YOu can actually put a breakpoint to check the data coming in output 'it'.
IF yes then your write statement is incorrect.
Regards
Vijaya
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Vijaya Kumari
Yes, I have checked the payload of response message and it does contain the answer value.
In SXMB_MONI, when I saw details of response message, the sender service was the one that is actually the receiver service which I had created for RFC.
However, for this message (i.e. response of RFC), no information about receiver determination, interface determination is displayed, but only the following is shown in the left-side pane
XML Messgage
> Call Adapter (header, body, payloads)
> Request Message Mapping (header, body, payloads)
I think we should be able to see our actual sender service as the receiver service when viewed from RFC side.
Regards,
User | Count |
---|---|
84 | |
24 | |
12 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.