on 05-07-2009 10:58 PM
Hi to everyone.
I have created an asynchronous Web Service in SAP R3, which I want to use in SAP PI later.
When I test the Web Service using WS Navigator or XMLSpy the following error occurs:
SOAP Runtime Protocol: ABAP Runtime exception: 1F09B73915F6B645E10000000A11447B occurred in program CL_SOAP_APPLICATION_PROXY=====CP CP in include CL_SOAP APPLICATIONPROXY=====CM008 at position 110
SOAP Runtime Protocol: Exception message: An exception with the type CX_SY_REF_IS_INITIAL occurred, but was neither handled locally, nor declared in a RAISING clause
I tested another synchronous Web Service developed by me in the same system, and the error does not occurs.
I just searched an OSS Note and does not find anything.
There are some restrictions in Web Service type developed in SAP R/3?
Thanks in advance.
Rafael Rojas.
Finally I decided to build synchronous scenarios using WS-RM.
Thank you everybody.
Rafael Rojas.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi.
I think I must clarify my question.
The Web Service is not called inside SAP R/3 but externally. For testing pourpose I actually use WS Navigator and XMLSpy.
The method inside ABAP Server Proxy which is exposed as a Web Server in SAP R/3 system is the following. Note that the Web Service is Asynchronous.
METHOD zpi_ii_test_ws_4_in~test_ws_4_in.
DATA: lwa_zpi_test TYPE zpi_test.
lwa_zpi_test-mandt = input-mt_test-record-client.
lwa_zpi_test-bukrs = input-mt_test-record-company.
lwa_zpi_test-belnr = input-mt_test-record-document.
lwa_zpi_test-gjahr = input-mt_test-record-year.
INSERT zpi_test FROM lwa_zpi_test.
COMMIT WORK.
ENDMETHOD.
I have created another Web Service in SAP R/3 which is Synchronous, and the error does not occurs. The following is the method inside ABAP Server Proxy which is exposed as a Web Service in SAP R/3 system.
METHOD zpi_ii_test_ws_3_in~test_ws_3_in.
DATA: l_bukrs TYPE bukrs,
l_belnr TYPE belnr_d,
l_gjahr TYPE gjahr,
lr_belnr TYPE RANGE OF belnr_d,
lwa_zpi_test TYPE zpi_test.
l_bukrs = input-mt_req-msg+0(4).
l_gjahr = input-mt_req-msg+4(4).
SELECT MAX( belnr ) INTO l_belnr
FROM zpi_test
WHERE bukrs EQ l_bukrs
AND belnr IN lr_belnr
AND gjahr EQ l_gjahr.
IF l_belnr IS INITIAL.
l_belnr = '4700000000'.
ELSE.
l_belnr = l_belnr + 1.
ENDIF.
lwa_zpi_test-mandt = sy-mandt.
lwa_zpi_test-bukrs = l_bukrs.
lwa_zpi_test-belnr = l_belnr.
lwa_zpi_test-gjahr = l_gjahr.
INSERT zpi_test FROM lwa_zpi_test.
COMMIT WORK.
output-mt_resp-msg = l_belnr.
ENDMETHOD.
I hope to have clarified my question.
Rafael Rojas.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Rafael,
See this link:
http://help.sap.com/saphelp_nw04/helpdata/en/62/8a5f3c31727d59e10000000a114084/content.htm
It says that you have to use the method EXECUTE_ASYNCHRONOUS for async scenarios.
Have you done the same?
Regards,
Ravi
Ravi,
Help SAP link you cited says:
"Upon receipt of a message, the ABAP proxy runtime calls the method EXECUTE_SYNCHRONOUS of the implementing class (in asynchronous communication: EXECUTE_ASYNCHRONOUS).
Therefore, the application must simply implement the class for the server proxy. Proxy generation automatically creates a class with an appropriate signature and empty method. The name of this class is located on the tab page Properties. The application can, however, also enter any class with a suitable signature."
I do not need to call the method EXECUTE_ASYNCHRONOUS, ABAP proxy runtime do that.
According with that, I simply implemented the class for the server proxy as Help SAP indicates.
Regards.
Rafael Rojas.
Hi Rafael,
This is the Exception Raised from your Application Program. Have a look at your reference you have created to create the instance of the class and also use try and catch to handle the exception in your application.
Exception message: An exception with the type CX_SY_REF_IS_INITIAL occurred, but was neither handled locally, nor declared in a RAISING clause
Regards,
Prasanna
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
It is talking about a logical error which is being caused in your program. You did not handle it in your code. Proxies are object oriented and you must implement exception handling. Try running the program separately on the abap engine and debug.
VJ
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
78 | |
10 | |
9 | |
7 | |
6 | |
6 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.