on 08-29-2011 7:09 PM
Hello,
I have a scenario where I am using webservice to proxy synchronous scenario. When I went to ECC and created out proxy, When I double click on the proxy name, I can see the following methods but nothing showing EXECUTE_SYNCHRONOUS:
- IF_PROXY_BASIS_INTERNAL~CREATE_FRAMEWORK
- IF_PROXY_BASIS~GET_PROTOCOL
- IF_PROXY_BASIS~GET_TRANSPORT_BINDING
- IF_PROXY_CLIENT~EXECUTE
- CONSTRUCTOR
- SI_WSresponse
When I double click on IF_PROXY_CLIENTEXECUTE method, I get popup saying Method IF_PROXY_CLIENTEXECUTE is implemented in class CL_PROXY_CLIENT.
Here is the code for method IF_PROXY_CLIENT~EXECUTE. I did not see anywhere EXECUTE_SYNCHRONOUS in this code. Where do I need to make changes in this code or any other place for this proxy to work? I searched and found these links which helped but could not understand the new proxy class and implementation methods,
http://help.sap.com/saphelp_nw04/helpdata/en/f4/0a1640a991c742e10000000a1550b0/frameset.htm
I have gone through the old posts and blogs but since I could not find the EXECUTE_SYNCHRONOUS or EXECUTE_ASYNCHRONOUS methods and the Z class, I am confused. Can someone help me through the step by step in which class or method to make changes in and where to make the changes to implement the code?
Thanks,
Rajan
method if_proxy_client~execute.
data:
lr_fault type ref to cx_ai_application_fault,
lt_methods type cl_proxy_metadata=>t_outbound_methods,
lt_signatures type sprx_sig_t.
field-symbols:
<method> like line of methods,
<sproxsig> type sproxsig,
<parmbind> like line of parmbind_tab.
read table methods with key method_name = method_name assigning <method>.
if sy-subrc <> 0.
call method cl_proxy_metadata=>get_outbound_proxy_data
exporting
class_name = class_name
method = method_name
importing
methods = lt_methods
signatures = lt_signatures
exceptions
others = 0.
read table lt_methods with key method_name = method_name assigning <method>.
if sy-subrc <> 0.
cl_proxy_runtime_errors=>system_fault_from_params(
id = cx_xms_syserr_proxy=>co_id_object_no_proxy
value1 = 'CLASS_NAME'
value2 = class_name
).
endif.
append <method> to methods.
append lines of lt_signatures to signatures.
endif.
proxy_framework->call_init(
r3_method = method_name
interface_operation = <method>-operation
).
loop at parmbind_tab assigning <parmbind>.
read table signatures with
key param = <parmbind>-name
object1 = sprx_const_method
obj_name1 = method_name
assigning <sproxsig>.
proxy_framework->call_add_parameter(
name = <parmbind>-name
value = <parmbind>-value
direction = <sproxsig>-decl
type_name = <sproxsig>-typename
ifr_name = <sproxsig>-msg_name
ifr_namespace = <sproxsig>-msg_namespace
xml_name = <sproxsig>-xml_msg_name
xml_namespace = <sproxsig>-xml_msg_namespac
).
endloop.
loop at signatures assigning <sproxsig>
where decl = '4'
and object1 = sprx_const_method
and obj_name1 = method_name.
proxy_framework->call_add_exception(
name = <sproxsig>-msg_name
namespace = <sproxsig>-msg_namespace
xml_name = <sproxsig>-xml_msg_name
xml_namespace = <sproxsig>-xml_msg_namespac
exception_class_name = <sproxsig>-typename
).
endloop.
if not tracer is initial.
try.
try.
trace before execution
tracer->trace_before(
method = method_name
operation = <method>-operation
is_synchron = <method>-synchron
parameter = parmbind_tab
).
catch cx_root. "#EC *
endtry.
execution
proxy_framework->call_execute_out( ).
try.
trace after execution
tracer->trace_after(
method = method_name
operation = <method>-operation
is_synchron = <method>-synchron
parameter = parmbind_tab
).
catch cx_root. "#EC *
endtry.
catch cx_ai_application_fault into lr_fault.
trace exception
try.
tracer->trace_exception(
method = method_name
operation = <method>-operation
is_synchron = <method>-synchron
exception = lr_fault
).
catch cx_root. "#EC *
endtry.
propagate exception
raise exception lr_fault.
endtry.
else.
execution without trace
proxy_framework->call_execute_out( ).
endif.
endmethod. "if_proxy_client~execute
If you want to develop code in the proxy (server proxy), you need create the proxy for the inbound interface. If you had generated the proxy for the outbound interface, you would have to call that in another program or report by passing the required data to the proxy call.
VJ
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Vijay,
If you had generated the proxy for the outbound interface, you would have to call that in another program or report by passing the required data to the proxy call.
How do I call that proxy in another program or report or in case of RFC or BAPI? How about proxy class that I could not find? Also, I could not find EXECUTE_SYNCHRONOUS and EXECUTE_ASYNCHRONOUS methods, where do I make changes then?
Sorry about the text format in my original post, for some reason, the typed message did not appear in proper format. Here is the orginal message retyped:
-
Hello,
I have a scenario where I am using webservice to proxy synchronous scenario. When I went to ECC and created out proxy, when I double click on the proxy name, I can see the following methods but nothing showing EXECUTE_SYNCHRONOUS:
- IF_PROXY_BASIS_INTERNAL~CREATE_FRAMEWORK
- IF_PROXY_BASIS~GET_PROTOCOL
- IF_PROXY_BASIS~GET_TRANSPORT_BINDING
- IF_PROXY_CLIENT~EXECUTE
- CONSTRUCTOR
- SI_WSresponse
When I double click on IF_PROXY_CLIENTEXECUTE method, I get popup saying Method IF_PROXY_CLIENTEXECUTE is implemented in class CL_PROXY_CLIENT. Here is the code for method IF_PROXY_CLIENT~EXECUTE. I did not see anywhere EXECUTE_SYNCHRONOUS in this code. Where do I need to make changes in this code or any other place for this proxy to work? I searched and found these links which helped but could not understand the new proxy class and implementation methods:
http://help.sap.com/saphelp_nw04/helpdata/en/f4/0a1640a991c742e10000000a1550b0/frameset.htm
I have gone through the old posts and blogs but since I could not find the EXECUTE_SYNCHRONOUS or EXECUTE_ASYNCHRONOUS.
Hi,
you cannot find EXECUTE_SYNCHRONOUS because you are working with version 7.1 or higher. in pi 7.1 operations are introduced. The method you are looking for has the same name as the corresponding operation in esr.
For Details check:
/people/michal.krawczyk2/blog/2009/06/20/pixi-abap-proxies-say-goodbye-to-executeasynchronous-methodSAPNetworkWeblogs%2528SAPNetworkWeblogs%2529
KR
Felix
Hi Rajan,
From PI7.1 you will not find Execute_synchronous, Execute_asynchronous methods. Your scenario is inbound proxy scenario so in that case you have to code in the proxy method.
I think in your case you have to code in SI_WSresponse method (I found this method from the list of methods you have mentioned above)
i hope it helps
Regards,
Shradha
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
> I can see the following methods but nothing showing EXECUTE_SYNCHRONOUS: -
PI 7.1 and later versions does not support method EXECUTE_SYNCHRONOUS.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
84 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
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.