Using Proxy Technology

Objectives

After completing this lesson, you will be able to:
  • Use the proxy configuration
  • Use the server proxy
  • Use the client proxy
  • Analyze the proxy configuration

Proxy Technology

Application systems that have a local Integration Engine (IE) can directly use the SAP Process Integration (PI) protocol to exchange messages with the central IE. A local IE and a proxy runtime are available for SAP systems (as of SAP NetWeaver Application Server 6.20 or later) in the ABAP and Java stack.

The data exchange between the application system and the Integration Server is based on the SAP NetWeaver Exchange Infrastructure message protocol, using HTTP or HTTPS.

Note

Proxy technology is somehow similar to Web service technology. You create an interface based on a WSDL document that describes the interface.

You still need to create a SOAP adapter communication channel, but you need to choose XI 3.0 as the protocol so the adapter does not make any conversions.

Advantages of Proxy Technology

  • Separates application logic from integration technology
  • Provides technical integration with PI, including guaranteed delivery Exactly Once (EO) and Exactly Once In Order (EOIO)
  • Provides automatic mapping of XML to language-specific data objects
  • Uses the same concept for ABAP and Java

SAP delivers such proxies with the SAP applications (for example, SAP ERP Central Component (ECC)). Although both client and server proxies are discussed, it is not necessary to use proxy technology on both sides.

Similar to the Adapter Engine, the proxy runtime is responsible for the conversion between process integration XML data format and ABAP and Java data formats. So SAP systems may exchange messages with process integration without adapter, or with adapter (for example, RFC or IDoc adapter), depending on the scenario.

To Use Proxy Objects

Server proxies in an SAP back end (based on an inbound service interface) can receive PI messages and SAP Process Integration Simple Object Access Protocol (SOAP) messages without an adapter. You can execute transaction SOAMANAGER in the SAP back end to configure the server proxy as a Web service. You access the interface directly (with or without SAP Process Integration), based on the standard SOAP protocol.

This procedure is outlined in the following steps.

Steps

  1. Designing the interfaces in the Enterprise Services Repository (ESR)

    In this step you design the service interface, message types, and data types. The direction of the service interface (inbound or outbound) determines whether client or server proxy objects are generated in the next step.

  2. Generating proxy objects

    The system generates the proxy objects for development environment (ABAP or Java) from a defined service interface – classes, methods, and structure definitions.

  3. Using proxy objects

    In the inbound case, use the proxy objects to implement the business logic to process an inbound message that corresponds to the service interface.

    In the outbound case, the proxy objects create and send an outbound message that corresponds to the service interface.

Result

You find the interface in the ESR and the implementation in the SAP back end to use a proxy delivered by SAP. Therefore, these proxies are ready to be used.

Interface Design in the Enterprise Services Repository (ESR)

You specify whether the service interface is inbound or outbound during design time in the ESR.

During the design of the services interfaces, you consider the business process, the messages, and the data formats that the service interfaces require. You save the interfaces in the ESR, regardless of whether the later development language is ABAP or Java, using typical XML document standards such as XML Schema Definition (XSD) and Web Services Description Language (WSDL).

Proxy Object Generation

Proxy object generation for the ABAP development environment takes place directly in the application system. The configuration settings must be correct so that the information about the service interfaces can be read from the ESR. Transaction SPROXY (integrated in SE80) lists the available interfaces and enables you to generate the ABAP proxy interface, the ABAP proxy class, and the required dictionary objects.

For the Java development environment, the proxy objects are generated directly in the ESR in the form of a Java archive and then made available to the Java server.

During the generation of the proxy objects, the language-independent data formats are mapped to the respective development environment, that is, XML data types to ABAP data types or Java data types.

Server Proxy

In the case of a server proxy, first implement the server method that is creating the application logic that is executed in the case of an inbound message.

Proxy technology can be compared to Web services technology. A Web service provider has an interface description, based on the WSDL standard.

WSDL is the standard for describing the interface, based on XML.

A Web service consumer can use this WSDL document to generate a consumer proxy.

For persistence, the messages are stored in the SAP systems and on the SAP PI server. SAP systems have their own local IEs and their own message monitor to provide information about the processing of messages in the system. To go into the monito, you execute transaction SXMB_MONI or SXI_MONITOR.

Check Server Proxy

Business Scenario

You want to use a server proxy and examine the interface in the target system.

Exercise Information

Note

In this exercise, when the values include ##, replace the character with a two-digit number (01–30).

Exercise Options

You can perform this exercise in two ways:

  1. Live Environment: choose Start Exercise, and from the entry page choose Open PDF Document. Follow the steps described in this pdf in your own system landscape.
  2. Simulation: choose Start Exercise, and from the entry page choose Start Tutorial. Watch the step-by-step instructions within the simulation.

Note

We recommend running the simulation first.

Task 1: Check the Server Proxy SI_Material_Details in ZME

Steps

  1. Log on to the business system (ZME, client 800).

    Note

    The system name and the client are subject to change.
    1. On the Log On screen, enter your user and password.

  2. Navigate to the server proxy SI_Material_Details in SWCV SC_BIT400_C. Check the proxy.

    1. Execute transaction SPROXY.

    2. If the Enterprise Service Browser dialog box displays, choose Continue (Enter).

    3. On the Object Navigator screen, choose SourceESRSWCsSC_BIT400_C 1.0 of education.com:BIT400:CNamespacesurn:education.com:BIT400:CObjects.

    4. Double-click SI_Material_Details.

    5. On the Display Service Provider SI_Material_Details screen, choose the Properties tab page.

    6. On the Properties tab page, check the information provided about the data for the service interface.

    7. In the Service Provider screen area, see the name of the ABAP proxy class that has been created in the back-end system.

    8. Choose the External View tab. On the External View tab page, check the entries provided.

    9. Check the other details of this object.

  3. Test the proxy and view the results in the Test tool.

    1. On the Display SI_Material_Details screen, choose the Test (F8) button.

    2. The Test Service Provider window appears. Choose Execute (F8).

    3. On the Test Service Provider: Display Request screen, choose XML Editor (CTRL + F2).

    4. On the Test Service Provider: Change Request screen, replace String 1 with p-100.

    5. Choose Execute.

    6. On the Test Service Provider: Display Response screen, check that the result displays for the material you specified.

Result

Client Proxy

An inbound service interface corresponds to a server (or provider) proxy. An outbound service interface corresponds to a client or consumer proxy. In both cases, the proxy classes contain a method for the service operation. In the case of a client proxy, you call the proxy method in an application, providing corresponding local data. The proxy converts the local data into XML representation and sends a message to SAP PI.

How to Configure the SOAP Adapter for Proxy Use

Note

This demo is optional. This destination won't be used in any other exercise or demo, unless you want to show "HTTP Address" as Addressing Mode in the demo, How to Test a Client Proxy. In that case, you can use the TRAINING_PROXY_IN Destination.

Steps

  1. Create the Communication Channel TRAINING_PROXY_IN.

    1. Log on to NetWeaver Administrator: http://nwktdc00.wdf.sap.corp:50000/nwa.

    2. Navigate to ConfigurationInfrastructureDestinations.

    3. Choose Create.

    4. Enter TRAINING_PROXY_IN as the Destination Name and HTTP as the Destination Type.

    5. Enter the ZME details.

      FieldValue
      URLhttp://zmetdc00.wdf.sap.corp:55080/sap/xi/engine?type=entry
      System IDZME
      Client800
      LanguageEN
      AuthenticationBasic
      User IDPIAPPLUSER
      Passwordxipass12

      Note

      Don't ping the destination as an error may occur.
    6. In SAP NWDS in the SAP Process Integration Designer perspective, navigate to SystemsTraining.

    7. Right-click and choose New Channel.

    8. Enter TRAINING_PROXY_IN as the name. Choose Finish.

    9. Choose SOAP as theAdapter Type.

    10. Choose XI 3.0 as the Message Protocol.

    11. Choose Receiver.

    12. In the Adapter-Specific tab, assign HTTP Destination to the Addressing mode.

    13. For the HTTP Destination, enter TRAINING_PROXY_IN.

    14. Save and activate.

    15. Optionally, show the new communication channel in the Communication Channel Monitor in PIMON.

How to Activate the Client Proxy

Steps

  1. Activate the Client Proxy

    1. in ZME/801 sytsem, run transaction SPROXY.

    2. On the Object Navigator screen, choose Enterprise Services Browser. The design objects of the ESR display on the lower left side of the screen.

    3. Choose SourceESRSWCsSC_BIT400_A 1.0 of education.comNamespacesurn:education.com:BIT400:AObjects.

    4. Choose SI_Material_Request.

    5. Use the right mouse button to Generate the client Proxy.

    6. The window Enterprise Service: Create Service Consumer appears. Flag Local Object and enter ZXX_ in the Prefix field.

    7. Choose Continue.

    8. In the Finish step, choose Complete.

    9. You will see the Service Consumer SI_Material_Request with status New (Revised) in the main window.

    10. Choose the Activate all used inactive objects (CTRL + F3) button to active the Client Proxy.

Check Client Proxy

Business Scenario

You want to check a proxy inbound interface.

Check that the client proxy for the interface SI_Material_Request from software component version (SWCV) SC_BIT400_A is in the training business system you use, and start a test call.

Exercise Information

Note

In this exercise, when the values include ##, replace the character with a two-digit number (01–30).

Exercise Options

You can perform this exercise in two ways:

  1. Live Environment: choose Start Exercise, and from the entry page choose Open PDF Document. Follow the steps described in this pdf in your own system landscape.
  2. Simulation: choose Start Exercise, and from the entry page choose Start Tutorial. Watch the step-by-step instructions within the simulation.

Note

We recommend running the simulation first.

Task 1: Check Client Proxy

Steps

  1. Log on to the training business system.

    Note

    The training business system corresponds to client 801 of the SAP Back-end System ZME.

    1. To test the Client Proxy on the sender system, log on to client 801 of the SAP Back-end system ZME, using your user name and password.

  2. Start the proxy object overview and open the detail view of the proxy.

    1. In the ZME/801 system, run transaction SPROXY.

    2. On the Object Navigator screen, choose Enterprise Services Browser. The design objects of the ESR display on the lower left side of the screen.

    3. Choose SourceESRSWCsSC_BIT400_A 1.0 of education.comNamespacesurn:education.com:BIT400:AObjects.

    4. Choose SI_Material_Request.

    5. On the Display Service Consumer SI_Material_Request screen, choose the Properties tab page.

    6. On the Properties tab page, the data for the service interface to which the proxy belongs displays in the External View screen area.

    7. In the Service Consumer screen area, the name of the ABAP proxy class that has been generated in the back end system displays in the ABAP Name field.

    8. On the Objects tab page, navigate all the fields to see the objects created during proxy generation.

    9. On the Properties tab page, double-click ZXX_CO_SI_MATERIAL_REQUEST in the ABAP Name field to get the overview of ABAP proxy class methods.

  3. Check the Service Interfaces SI_Material_Request.

    1. In NWDS, choose Enterprise Services Repository Perspective.

    2. Choose SC_BIT400_A 1.0 of education.comurn:education.com:BIT400:AService InterfacesSI_Material_Request.

    3. On the Service Interface Overview screen, expand the Advanced area and verify the settings:

      Field

      Value

      Category

      Outbound

      Interface Pattern

      Stateless (XI30-Compatible

      Security Profile

      Basic

    4. Choose Definition tab.

    5. Verify that MT_MaterialID is assigned as Input Message Type and MT_MaterialDetail is assigned as Output Message Type.

    6. Examine the assigned Data Type for each Message Type by choosing the Associated Data Type.

  4. Check the Business System configuration for ZME_801 and SAP_BACKEND.

    1. Open the System Landscape Directory (SLD) and enter your User and Password if required.

    2. Choose Business Systems.

    3. Search for ZME_801 and SAP_BACKEND and examine if Product_BIT400 1.0 is assigned to each of the Business System.

    4. Check which Software Components of Product_BIT400 1.0 are assigned to the Business Systems.

Result

How to Test a Client Proxy

How to Test a Client Proxy - Part 1

How to Test a Client Proxy - Part 2

Steps

  1. Create a SOAP Sender Communication Channel for ZME_801 and a SOAP Receiver Communication Channel for SAP_BACKEND.

    1. In NWDS, open the SAP Process Integration Designer Perspective. If required reconnect to NWK and log on with your user credentials.

    2. Select Business Systems ZME_801 and choose New Channel from the context menu.

    3. As Channel Name, enter CC_SOAP_SENDER_##. Maintain the values as shown in the table:

      Field

      Value

      Direction

      Sender

      Adapter Type

      SOAP (SAP BASIS 7.50)

      Message Protocol

      XI 3.0

    4. Select Business System SAP_BACKEND and choose New Channel from the context menu.

    5. As Channel Name, enter CC_SOAP_RECEIVER_##. Maintain the values as shown in the table:

      Field

      Value

      Direction

      Receiver

      Adapter Type

      SOAP (SAP BASIS 7.50)

      Message Protocol

      XI 3.0

    6. Choose the Adapter Specific tab and maintain the fields as detailed in the table.

      Field

      Value

      Addressing Mode

      URL address

      Target URL

      http://ZMEtdc00.wdf.sap.corp:55080/sap/xi/engine?type=entry

      Authentication Mode

      Use logo data to SAP System

      User Name

      BIT500-##

      User password

      Maintain your password

      Logon Language

      EN

      Logon client

      800

    7. Save and activate your objects.

  2. Show the Operation Mapping OM_MaterialGetDetail_Proxy, which consists of the Message Mapping MM_MaterialRequest_Proxy for the Request Message and a Message Mapping MM_MaterialDetails_Response_Proxy for the Response Message.

    1. Navigate to SC_BIT_MAP 1.0 of educationsap.comurn:educationsap.com:BIT500:Mapping.

    2. Double-click OM_MaterialGetDetail_Proxy and explain the Operation Mapping.

    3. Double-click MM_MaterialRequest_Proxy and explain the Message Mapping.

    4. Double-click MM_MaterialDetails_Response_Proxy and explain the Message Mapping.

  3. Create an iFlow iFlow00_MaterialRequest_Proxy in NWDS using ZME_801 as Sender System and SAP_BACKEND as Receiver System.

    1. Open SAP Process Integration Designer Perspective in NWDS and choose PI Explorer view.

    2. Create a new Integration Flow iFlow00_MaterialRequest_Proxy.

    3. Choose the Point to Point Channel pattern.

    4. On the Sender System tab, use the Browse button to select the ZME_801 communication component.

    5. Using the Browse button, choose the Interface and the Operation SI_Material_Request | SC_BIT400_A 1.0 of education.com.

    6. Switch to the Receiver tab.

    7. Using the Browse button, choose SAP_BACKEND as communication component.

    8. Choose the Interface SI_Material_Details | SC_BIT400_C 1.0 of education.com.

    9. Choose Finish.

    10. In the iFlow, select the line between the two envelopes and choose Add Mapping and assign Operation Mapping OM_MaterialGetDetail_Proxy | urn:education.com:BIT500:Mapping | SC_BIT_MAP 1.0 of educationsap.com to this Mapping step.

    11. Assign the Communication Channels for the Sender ZME_801 and the Receiver SAP_BACKEND by using the Assign Referenced Channel function.

      Communication Component

      Communication Channel

      ZME_801

      CC_SOAP_SENDER_##

      SAP_BACKEND

      CC_SOAP_RECEIVER_##

    12. Save, activate, and deploy your objects.

  4. Test the client proxy and view the results in the message monitor.

    1. In the ZME/801 system, run transaction SPROXY.

    2. On the Object Navigator screen, choose Enterprise Services Browser. The design objects of the ESR display on the lower left side of the screen.

    3. Choose SourceESRSWCsBIT400_A 1.0 of education.comNamespacesurn:education.com:BIT400:AObjects.

    4. Choose SI_Material_Request.

    5. On the Display Service Consumer SI_Material_Request screen, from the button bar, choose the Test (F8) button to test the proxy object.

    6. In the Test Service Consumer dialog box, choose Execute while keeping all default parameters.

    7. On the Test Service Consumer: Display Request screen, from the button bar, choose the XML Editor button to open the editor view, in which you can edit the payload.

    8. On the Test Service Consumer: Change Request screen, replace the given entry String 1 with a material number, for example p-100.

    9. To start the test call, choose Execute.

    10. On the Test Service Consumer: Display Response screen, check that the result displays for the material you specified.

  5. In the Configuration and Monitoring Home, check the message.

    1. Go back to the SAP Process Integration screen and choose Configuration and Monitoring Home.

    2. On the Monitoring tab page, choose Adapter EngineMessage Monitor.

    3. On the Message Monitoring: PI Messages screen, choose Advanced.

    4. Select the Message Header Area.

    5. In the Sender Component column, enter ZME_801 and choose Go.

      Result

      The message should have status Delivered. Check some of the messages and look specifically at the Log to understand what happened during processing.

Connectivity Configuration

Proxy technology allows SAP systems to connect to SAP Process Integration (PI) directly, that is, without using an adapter, because the SAP system can send and receive the XI message protocol. However, SAP PI requires a specific configuration for the message exchange, for example, the host to which you need to send the message. You configure this in the Integration Directory (ID) in a communication channel of Adapter Type Simple Object Access Protocol (SOAP) with Message protocol XI 3.0.

Service Interface Pattern

The figure, Proxy Generation — Stateless (XI 3.0 Compatible), shows stateless (XI 3.0-compatible) proxy generation.

Proxy Generation – Stateless

The difference between the stateless (XI 3.0-compatible) and stateless interface patterns is that the stateless interface pattern uses Web service technology and makes point-to-point connections possible without SAP PI. Furthermore, stateless service interfaces can define several operations that lead to several methods of the proxy classes with the Web service proxies in the back-end system.

The figure, Proxy Generation — Stateless, illustrates the relationship.

Hint

Abstract interfaces can only be of the stateless (XI 3.0-compatible) or stateless type.

Configure Server Proxy as a Target Interface

Business Scenario

You want to use a Server Proxy via an HTTP client.

Configure an iFlow in which an HTTP client with sender communication component BC_CI_Requestor_## (SI_Material_Request) calls SAP_BACKEND (SI_Material_Details).

Exercise Information

Note

In this exercise, when the values include ##, replace the character with a two-digit number (01–30).

Exercise Options

You can perform this exercise in two ways:

  1. Live Environment: choose Start Exercise, and from the entry page choose Open PDF Document. Follow the steps described in this pdf in your own system landscape.
  2. Simulation: choose Start Exercise, and from the entry page choose Start Tutorial. Watch the step-by-step instructions within the simulation.

Note

We recommend running the simulation first.

Task 1: Create a Business Component and a Communication Channel

Steps

  1. Open NWDS using SAP Process Integration Designer Perspective to configure the objects.

    1. In NWDS, from the menu choose FileNewBusiness Component.

  2. Create Business Component BC_CI_Requestor_##.

    1. In the Create Business Component window, enter Name: BC_CI_Requestor_##.

    2. Add the Sender Interface by choosing the Add button. Choose the interface SI_Material_Request from the list.

    3. Save your business component.

  3. Create Communication Channel CC_CI_Req_##_HTTP_Sender.

    1. Right-click Business Component BC_CI_Requestor_## and choose New Channel from the context menu.

    2. In the Name field, enter CC_CI_Req_##_HTTP_Sender and maintain the following values.

      Field

      Value

      Direction

      Sender

      Adapter Type

      HTTP_AAE (SAP BASIS 7.50)

      Transport Protocol

      HTTP 1.1

      Message Protocol

      POST

    3. Save and activate your changes.

  4. Create a SOAP Receiver Communication Channel for SAP_BACKEND.

    1. Select Business System SAP_BACKEND and chooseNew Channel from the Context Menu.

    2. As Channel Name enter CC_SOAP_RECEIVER_##. Maintain the values as shown in the table:

      Field

      Value

      Direction

      Receiver

      Adapter Type

      SOAP (SAP BASIS 7.50)

      Message Protocol

      XI 3.0

    3. Choose the Adapter Specific tab and maintain the fields as described in the following table.

      Field

      Value

      Addressing Mode

      URL address

      Target URL

      http://zmetdc00.wdf.sap.corp:55080/sap/xi/engine?type=entry

      Authentication Mode

      Use logo data to SAP System

      User Name

      BIT500-##

      User password

      Maintain your password

      Logon Language

      EN

      Logon client

      800

    4. Save and activate your objects.

Task 2: Create and Assign an iFlow

Steps

  1. Create an iFlow called iFlow_##_MaterialRequest. Right-click in the Integration Flows and choose New Integration Flow from the context menu.

    1. Enter iFlow_##_MaterialRequest as the Name and ID.

    2. Choose the Point to Point Channel pattern.

    3. In the Sender System tab, use the Browse button to select the BC_CI_Requestor_## communication component.

    4. Choose OK.

    5. Using the Browse button, choose the interface and the operation SI_Material_Request.

    6. Choose OK.

    7. In the Receiver Systems tab, choose Add.

    8. Choose the SAP_BACKEND and OK.

    9. In the Interface column press the … (ellipsis) button that appears when you select it and choose SI_Material_Details | SC_BIT400_C 1.0 of education.com interface.

    10. Choose Finish.

  2. Assign sender communication channel CC_CI_Req_##_HTTP_Sender.

    1. Select the arrow from the BC_CI_Requestor_## to the iFlow until the color changes to orange.

    2. Right-click and choose Assign Referenced channel.

    3. Select the CC_CI_Req_##_HTTP_Sender channel and choose OK.

  3. Assign receiver communication channel CC_SOAP_RECEIVER_##.

    1. Select the arrow from the iFlow to the SAP_BACKEND.

    2. Right-click and choose Assign Referenced channel.

    3. Select the CC_SOAP_RECEIVER_## Receiver channel and choose OK.

  4. Add operation mapping OM_MaterialGetDetail_Proxy.

    1. Select the line between the two envelopes.

    2. Right-click and choose Add Mapping.

    3. Right click in the new mapping step and choose Assign Mapping.

    4. Select OM_MaterialGetDetail_Proxy from SC_BIT_MAP 1.0urn:education.com:BIT500:MappingOperation Mappings and choose OK.

  5. Save, activate, and deploy your iFlow.

    1. Choose Save, Activate and Deploy.

  6. Start the HTTP Client and send Messages to Test the Message Flow

    1. To open the HTTP Client, enter http://nwktdc00.wdf.sap.corp:50000/dir and choose HTTP Client Proxy NWK.

    2. On the HTTP Client for PI 7.5 AEX page, replace XX with your group number in all fields.

    3. In the Payload screen area, verify that MaterialID is set to P-100.

    4. Choose the Send button.

      Because the communication is synchronous, you can see the result (the response) immediately at the bottom of the HTTP client form.

      If you receive an empty XML document as a result, the material is probably not available in the target system. Use a material ID that exists in the target (for example, p-100).

Task 3: Check the Generated Messages

Steps

  1. Check the generated messages in the message monitor of the central Integration Engine (AEX) and the non-central Integration Engine (SAP_BACKEND).

    1. On the SAP Process Integration screen, choose Configuration and Monitoring Home.

    2. On the Monitoring tab page, choose Adapter EngineMessage Monitor.

    3. On the Message Monitoring: PI Messages screen, choose Advanced.

    4. Select the Message Header Area.

    5. In the Integration Scenario column, selectiFlow_##_MaterialRequest using the F4 help.

    6. Choose Go.

    7. The messages should have the status Delivered. Check some of the messages and look specifically at the Log to understand what happened during processing

Log in to track your progress & complete quizzes