cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

difference b/w server Proxy and Client Proxy.

Former Member
0 Likes
2,603

Hi experts,

What is the difference b/w server Proxy and Client Proxy. when we will use client proxy and when we will use sever proxy?

Could anybody help me ?

Thanks in advance.....

Manoj

View Entire Topic
Former Member
0 Likes

Hi,

Client proxy which is an OUTBOUND proxy,sending data from SAP system,Server proxy id INBOUND proxy which receive data from Legacy side to SAP.

Client Proxy

You can use a client proxy to do the following:

· To call a service using the SAP XI Integration Server

· To call a Web service

How the server proxy is used depends on the runtime configuration.

Customers that do not have SAP XI Release 3.0 or higher installed cannot access the Integration Repository or exchange messages directly using XI.

The general programming model of the ABAP proxy runtime supports synchronous communication. The XI runtime also supports asynchronous communication.

Procedure

To send a message using the ABAP proxy runtime, call the corresponding client proxy in your application program.

You can select a client proxy in the Object Navigator and drag it to the editor by using Drag&Drop.

...

1. Declare the following variables:

DATA:

  • Reference variables for proxy and exception class

lo_clientProxy TYPE REF TO ,

lo_sys_exception TYPE REF TO cx_ai_system_fault,

  • Structures to set and get message content

ls_request TYPE ,

ls_response TYPE .

2. Complete the structure ls_request for the request message.

3. Instantiate your client proxy.

TRY.

  • create proxy client

CREATE OBJECT lo_clientProxy( ‘LOGICAL_PORT_NAME’ ).

LOGICAL_PORT_NAME is the name of the logical port that you want to use, which is used to define the receiver. You can omit this parameter if you are using a default port or the XI runtime (see runtime configuration).

4. To send a message, call the corresponding client proxy method. WSDL allows several such methods (specified by the element ). In XI, there is only one method, with the default name EXECUTE_SYNCHRONOUS or EXECUTE_ASYNCHRONOUS. Catch at least the exception cx_ai_system_fault:

  • do synchronous client proxy call

CALL METHOD lo_clientProxy->execute_synchronous

EXPORTING output = ls_request

IMPORTING input = ls_response.

CATCH cx_ai_system_fault INTO lo_sys_exception.

  • Error handling

ENDTRY.

Server Proxy

Web services are primarily used to publish an implemented service already existing in a system so that it can be called by other users (for example, by using a client proxy on the SAP Web AS). However, it is also possible to describe a service interface in WSDL independently of the system, and then implement it later in an application system.

The ABAP proxy runtime supports this scenario, with the limitation that you can only generate server proxies using the message interfaces of the XI Integration Repository. You can use a server proxy to do the following:

· To implement a service that can be addressed by the SAP XI Integration Server

· To implement a service that can be called as a Web service

How the server proxy is used depends on the runtime configuration.

Customers that do not have SAP XI Release 3.0 or higher installed cannot access the Integration Repository or exchange messages directly using XI.

Procedure

..

Server proxies are ABAP object interfaces. Implement a class for your generated ABAP object interface and enter it on the Properties tab page of the server proxy by calling transaction SE80 or transaction SPROXY. 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

Regards,

Phani

Reward points if Helpful