Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Problem Accessing Protocol Classes in INBOUND PROXY

Former Member
0 Likes
434

Hi guys.

Im having problems accessing Protocol Classes in a inbound proxy.

I have this code that is copied from:

http://help.sap.com/saphelp_nw04/helpdata/en/a7/3b2a2d45a34a23b75e3b18745c63bc/frameset.htm


 DATA:  lo_server_context   TYPE REF TO if_ws_server_context,
             lo_payload_protocol TYPE REF TO if_wsprotocol_payload.

lo_server_context   = cl_proxy_access=>get_server_context( ).
lo_payload_protocol =
     lo_server_context->get_protocol( if_wsprotocol=>payload ).

But Im getting this error:

The result type of the function method cannot be converted into the type lo_payload_protocol

If I try to get the attachment protocol with this code:

 
DATA: lo_server_context TYPE REF TO if_ws_server_context,
lo_attachment_prtcl TYPE REF TO IF_WSPROTOCOL_ATTACHMENTS.
lo_server_context = cl_proxy_access=>get_server_context( ).
lo_attachment_prtcl = lo_server_context->get_protocol( if_wsprotocol=>ATTACHMENTS ).

Im getting the same error.

What am I doing wrong? It' s code copied fror SAP Library!!!

Thanks a lot.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
373

hi,

you are choosing wrong type for lo_payload_protocol.

you must change like this

lo_payload_protocol TYPE REF TO IF_WSPROTOCOL.

regards,

orhan

1 REPLY 1
Read only

Former Member
0 Likes
374

hi,

you are choosing wrong type for lo_payload_protocol.

you must change like this

lo_payload_protocol TYPE REF TO IF_WSPROTOCOL.

regards,

orhan