on 08-09-2007 8:41 PM
Hi all,
I have a scenario where sender is a proxy communication synchronously with webservice. Just for testing purpose i just need to ping the webservice and get reponse back.
Hence for this I mapped the constant for request because no data need to send to webservice and responce will be a string and accordingly created it.
I created two synchronous interface for both inbound and outbound and generate the proxy also.
i tried to execute this scenario by create the report as below code
<b>DATA : prxy TYPE REF TO zsynctstoutco_miproxy_syn,
it_req TYPE zsynctstoutdtreq_request,
it_res TYPE zsynctstoutdtres_response.
CREATE OBJECT prxy.
TRY.
CALL METHOD prxy->EXECUTE_SYNCHRONOUS
IMPORTING
input = it_res
EXPORTING
output = it_REQ .
CATCH cx_ai_system_fault .
DATA fault TYPE REF TO cx_ai_system_fault .
CREATE OBJECT fault.
WRITE 😕 fault->errortext.
ENDTRY.
COMMIT WORK.
WRITE : 'tested'.</b>
when I try to compile this I got the error as <b>"OUTPUT" is not expected.</b>.
please let me know where I went wrong...I hope i am in the right track for this scenario.
Regards,
Dhill
Hi
Ref this links
/people/kamaljeet.kharbanda/blog/2005/09/16/xi-bi-integration
Check with this code
REPORT zaaj_out_proxy_tata.
DATA: obj TYPE REF TO zco_mioa_tata,
szdt_tata TYPE zdt_tata,
szmt_tata TYPE zmt_tata,
szdt_tata_employee TYPE zdt_tata_employee,
szdt_tata_employee_tab TYPE zdt_tata_employee_tab.
DATA: itab TYPE STANDARD TABLE OF zcnu_proxy_table,
wa LIKE LINE OF itab.
SELECT name city FROM zcnu_proxy_table INTO (wa-NAME,WA-CITY).
APPEND wa TO itab.
szdt_tata_employee-name = wa-name.
szdt_tata_employee-city = wa-city.
APPEND szdt_tata_employee TO szdt_tata_employee_tab.
szdt_tata-employee = szdt_tata_employee_tab.
szmt_tata-mt_tata = szdt_tata.
ENDSELECT.
TRY.
CREATE OBJECT obj.
CALL METHOD obj->execute_asynchronous
EXPORTING
output = szmt_tata.
COMMIT WORK.
CATCH cx_ai_system_fault.
ENDTRY.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Sridhar,
Thanks, Actually I need to know the responce back from webservice and below code is not having import parameter.
Anybody let me know an example of synchronous communication from proxy to webservice.
sender strucuture(wsdl) of webservice will not have any field and receive strcuture(wsdl) will have only field of string type.
Regards,
Dhill
Hi All,
I made one mistake by giving structure type instead of table type. Now I am able to execute the scenario but I am getting the responce back and in SXMB_MONI I received the error as below
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
- <!-- Request Message Mapping
-->
- <SAP:Error xmlns:SAP="http://sap.com/xi/XI/Message/30" xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/" SOAP:mustUnderstand="1">
<SAP:Category>Application</SAP:Category>
<SAP:Code area="MAPPING">EXCEPTION_DURING_EXECUTE</SAP:Code>
<SAP:P1>com/sap/xi/tf/_MMReq_</SAP:P1>
<SAP:P2>com.sap.aii.utilxi.misc.api.BaseRuntimeException</SAP:P2>
<SAP:P3>RuntimeException in Message-Mapping transformatio~</SAP:P3>
<SAP:P4 />
<SAP:AdditionalText />
<SAP:ApplicationFaultMessage namespace="" />
<SAP:Stack>During the application mapping com/sap/xi/tf/_MMReq_ a com.sap.aii.utilxi.misc.api.BaseRuntimeException was thrown: RuntimeException in Message-Mapping transformatio~</SAP:Stack>
<SAP:Retry>N</SAP:Retry>
</SAP:Error>
but when I test the interface from SPROXY transaction till is executing successfully as below
Outbound procesing
Payload Before Service
<?xml version="1.0" encoding="utf-8" ?>
- <nr1:MTReq xmlns:nr1="http://test/Proxy/SYN">
- <Request>
<Constant>This is a string 1</Constant>
</Request>
</nr1:MTReq>
<b>Note</b> : Not sure when the system is picking upt the contant as "This is a string 1"
Payload After Service
<?xml version="1.0" encoding="UTF-8" ?>
- <ns1:MTRes xmlns:ns1="http://test/Proxy/SYN">
- <Response>
<String>PING SUCCESS - sk80364!</String>
</Response>
</ns1:MTRes>
I hope there will be no connectivity issue because I can execute from SPROXY transaction but please help me out why this is not executing from report.
the code of the report is
*The below code is Synchoronous communication with webservice.
DATA : prxy TYPE REF TO zsynctstoutco_miproxy_syn,
it_req TYPE zsynctstoutmtreq,
it_res TYPE ZSYNCTSTOUTMTRES.
TRY.
CREATE OBJECT prxy.
CALL METHOD prxy->execute_synchronous
EXPORTING
output = it_req
IMPORTING
input = it_res.
COMMIT WORK.
CATCH cx_ai_system_fault .
DATA fault TYPE REF TO cx_ai_system_fault .
CREATE OBJECT fault.
WRITE 😕 fault->errortext.
ENDTRY.
COMMIT WORK.
Regards,
Dhill
Hi Dhil,
The error message you are getting now is <b>not</b> related to the proxy.
This message means that the message mapping occurring in XI is failing. By the looks of it, the <b>request</b> message mapping is failing.
Open the message in SXMB_MONI and scroll down in the top right-hand side frame until you see what looks like a stack trace. Near the beginning of this stack trace you will find exactly which field is producing the error.
If you are still having problems, please attach the trace from SXMB_MONI.
Comment this lines...n try..
WRITE 😕 fault->errortext.
WRITE : 'tested'.
Nilesh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
87 | |
10 | |
10 | |
9 | |
7 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.