Using the REST Adapter

Objectives

After completing this lesson, you will be able to:
  • Use the REST adapter
  • Expose a function module as RESTful service
  • Consume a synchronous RESTful service

REST Adapter

Introduction

Representational state transfer (REST) or RESTful web services are a way of providing interoperability between computer systems on the Internet. REST-compliant web services allow requesting systems to access and manipulate textual representations of web resources using a uniform and predefined set of stateless operations. Other forms of web services exist which expose their own arbitrary sets of operations such as WSDL and SOAP.

"Web resources" were first defined on the World Wide Web as documents or files identified by their URLs, but today they have a much more generic and abstract definition encompassing every thing or entity that can be identified, named, addressed, or handled, in any way whatsoever, on the web. In a RESTful web service, requests made to a resource's URL will elicit a response that may be in XML, HTML, JSON, or some other defined format. The response may confirm that some alteration has been made to the stored resource, and it may provide hypertext links to other related resources or collections of resources. Using HTTP, as is most common, the kind of operations available include those predefined by the CRUD HTTP methods GET, POST, PUT, DELETE, and so on.

By using a stateless protocol and standard operations, REST systems aim for fast performance, reliability, and the ability to grow, by re-using components that can be managed and updated without affecting the system as a whole, even while it is running.

Architectural Constraints are:

  • Client-server architecture

  • Statelessness

  • Cacheability

  • Layered system

  • Uniform interface

  • Resource identification in requests

  • Resource manipulation through representations

  • Self-descriptive messages

The figure illustrates, how the RESTFUL adapter works.

How the RESTFUL Adapter Works

A client sends a message about the HTTP application protocol to a REST API interface.

The presentation format can be JSON, XML, RSS/ATMO feed or any other format.

The API layer that implements the HTTP application protocol has distributed the request to the application layer that resolves the URL to a specific resource.

The resource is delivered by the data layer with the concrete data.

One of the requirements for a REST interface was a universal interface for all clients. This is achieved by using HTTP methods or verbs. The functionality of the app implementation is determined by these verbs. For example, an update is determined with PUT or POST.

REST Adapter – Overview

The figure illustrates an overview about REST adapters.

The following are further details about the directions:

From REST to XI and Back

What the REST Adapter mainly does is to allow mapping information between HTTP calls and XI messages.

For HTTP calls, the adapter can access information from the URL and the URL parameters, from the HTTP operation (GET, POST, PUT, DELETE), from the HTTP Header (for example, cookie or encoding information) and the payload itself. On XI Messages the adapter can access information from the XI message header and payload.

From HTTP Call to XI Message

When converting a HTTP call into a XI Message, selected information, except the payload, are taken from the HTTP call and written into XI Header variables.

For convenience, the REST adapter defines a predefined set of XI Header variables like (URL, service, resource, ID, operation, and so on) that can be filled with information from a HTTP call for later use in the Integration Flow or diagnostic purposes.

The payload can be taken as it is, converted into UTF-8 code page and can be converted from JSON into XML and the other way around.

For XI Messages that expect XML and are bound to an interface or operation, the adapter can enclose the payload XML with a given or calculated interface or operation name, based on the incoming HTTP call information.

From XI Message to HTTP Call

On receiver side, the REST Adapter generates dynamically an HTTP URL from information provided in the configuration and from XI Header and XI Payload. Based on given rules, the interface or operation name can be used to determine the HTTP operation to use (POST, PUT, GET and DELETE). The payload can be converted to format (XML, JSON) and a code page that the REST service is expecting.

Let’s have a look what is happening behind the scenes.

Incoming REST Services – Servicing REST APIs

Using the REST Adapter, you can create an Integration Flow with a REST API on sender side. The adapter would then convert incoming HTTP calls into XI messages and the other way around (for synchronous scenarios).

The REST Adapter allows dynamic dispatching of an incoming HTTP call to a sender channel by using the URL, the HTTP operation, or parts of the content as selection criteria.

In general REST Adapter is processing requests under the following URL root:

http:<myHost:<myPort/RESTAdapter/

Incoming Rest Services Step 1: Find Channel from URL, Payload and HTTP Operation

The Fixed URL Part

In most cases, you will want to bind the fixed part of your REST URL to a specific PI channel. You have to set up the channel endpoint name, so that it looks like the following:

http:<myHost:<myPort/RESTAdapter/API/V2.0/Customer

The Dynamic URL Part

If you want to serve just a single REST API, the dynamic part is rather static like the following:

http:<myHost:<myPort/RESTAdapter/API/V2.0/Customer_Create

If you want more than one REST URL to be bound to a single channel, you can use URL patterns like the following:

…/RESTAdapter/API/V2.0/{resource}/{id}?operation={opname}

This URL pattern would serve the following:

…/RESTAdapter/API/V2.0/customer/123?operation=create

as well as the following:

…/RESTAdapter/API/V2.0/order/222?operation=delete

But it would not match the following:

…/RESTAdapter/API/V2.0/order?operation=create

Because the {id} part is missing in the URL.

Content Based Channel Filter

The fixed endpoint name does not have to be unique between PI channels. For channel selection the adapter also uses the dynamic part of the URL as well as a simple filter based on the payload content. You can limit the channel only to process incoming messages with a specific value in a JSON object or XML tag.

Having this dynamic channel selection feature, you can hide complex message processing landscapes behind a few APIs.

HTTP Operation-Based Filter

You can also use the HTTP operation (get, put, post, delete) as a selection criteria for a channel. That allows you for example to set up two Integration Flows with the same URL, but one used for insert operations (POST) and the other used for updates (PUT).

Result of this step is that the Adapter found a matching channel for further processing of the message. If no channel was found, a HTTP error will be returned.

Step 2: Payload Conversion

REST services usually use JSON as payload format, while PI used to work on XML documents, therefore, the adapter allows converting an incoming JSON payload into XML. For synchronous calls the result message can also be converted on its way back.

It is also possible here to specify the charset of the payload.

Because the adapter allows using data of the payload for dynamic configuration, the payload conversion is done at an early stage.

Step 3: Extracting Information from URL, Header and Payload

In this step, the information of the various parts of the incoming HTTP are processed and stored in custom or predefined variables. The placeholders in the URL pattern allow the specifying of dynamic parts of the URL. In addition, the adapter allows in this step to map information from the HTTP call to predefined or custom variables for later use in the integration flow. These variables are stored in the XI message header.

Step 4: REST Operation Detection

A REST call has a predefined operation semantic that is usually bound to the HTTP operation, such as the following:

  • GET for fetching data.

  • POST for creating an object.

  • PUT for updating an object.

  • DELETE for deleting an object.

For example a HTTP DELETE on http://myhost:myport/customer/99 is a common URL pattern that in this case allows the deletion of the object customer with id 99. But the logical REST operation can also be encoded in the URL or an URL parameter and does override the HTTP operation, so the REST operation is part of the URL. Such a REST API could look like the following:

HTTP POST on http://myhost:myport/customer/99?operation=remove

In this step, the REST adapter sets the logical REST operation, based on the user configuration. After this step, we have mapped all necessary information from the incoming call to the new XI message.

Step 5: Mapping to PI Interface or Operation

XI channels are usually bound to an interface or operation and XI expects in such cases that the payload is in XML format and that the outermost element contains the interface or operation name.

Assume that the incoming payload is not PI aware and is in JSON format. The adapter would then convert the JSON to XML and in this step add the missing interface or operation name.

Because the channel allows processing of multiple REST URLs, the user has to configure rules for adding the correct outer XML element, based on the information of the incoming call. The rules can make use of the predefined or custom variables and do allow a simple pattern matching type, called Glob.

Text Pattern Matching Using Globs

If you want to match a group of values and not only an exact value, you use a Glob expression. The rest adapter supports two wildcard characters.

Step 6: Sending Message to PI

In this final step, the message is sent from the REST Adapter to the PI message system.

Optional: Processing the Result Message

For synchronous calls with result message, the returning XI message is converted back into the desired format and code page and returned as the result of the incoming HTTP call with a HTTP status of 200.

Optional: Custom Error Handling

Custom Error Handling is an optional feature that allows to ignore or to create error conditions.

On sender side this feature can be triggered by any error (Exception) within the adapter, like JSON/XML conversion error, configuration error, and so on.

In addition the feature can be triggered by the content of a result message in synchronous call scenarios (JSON object value, XML element value, Text). When checking the value, text Globs can be used.

The behavior of the feature after being triggered can be customized by the chosen strategy. This can be one of the following:

  • Error – Log an error and treat message delivery as NOT successful.

  • Ignore Error – Log the error and treat message delivery as successful.

  • Custom Result – Set the message delivery as successful and returns a custom HTTP status code and message payload.

Outgoing REST Services – Calling Remote REST APIs

Using the REST Adapter, you can call other REST services as part of your Integration Flow. The adapter converts outgoing XI messages into HTTP calls and in synchronous scenarios, sends back the HTTP result as XI message.

Outgoing REST Services Step 1: Read XI Message

In the first step, the outgoing message is taken from the PI messaging system and payload as well as the dynamic header variables is extracted for further processing.

Using the REST Adapter you can call other REST services as part of you Integration Flow. The adapter converts outgoing XI messages into HTTP calls and in synchronous scenarios sends back the HTTP result as XI message.

Step 1: Read XI Message

In the first step, the outgoing message is taken from the PI messaging system and payload as well as the dynamic header variables is extracted for further processing.

Step 2: Operation Rules

If the incoming payload is XML, the adapter extracts the interface or operation name from the outermost XML element. You can add own rules defining how to map the interface or operation along with its namespace name to dynamic variables.

Step 3: Generating Dynamic URL

The URL to be called can either be a static URL or a dynamically generated URL by using placeholder variable values that have been set up during the previous steps.

For dynamically generated URLs, you have to specify the dynamic parts of the URL with placeholder variables in curly brackets (similar to sender channel configuration), so that it looks like the following:

http://www.google.com/finance/info?q={stock_symbol}.

The custom placeholder variable "stock symbol" has now to be bound to the source where the value is coming from.

Types of sources are as follows:

  • Manual Value: Just provide a manual value yourself.
  • Adapter Specific Attribute: Refer to an XI Header variable.
  • XPath: Reference an XML element from the incoming XML payload.
  • JSON Expression: Reference a JSON object.
  • Binding: Specify a value from the channel interface binding.

For each incoming message, a new URL will be generated.

Step 4: Determining the HTTP Operation

Similar to the previous step, the HTTP operation to be used for the HTTP call can be either static and manually set up or can be calculated based on the incoming XI message.

If the HTTP operation has to be determined dynamically, you specify the source of the value to be used as selection criteria and provide a matching value or GLOB expression for each of the four HTTP operations. The source types are the same is in previous step when generating the URL.

For rare cases when you need more than one rule per HTTP operation, the UI provides a table where you can add more rules.

Step 5: Setting up the HTTP Header

If the REST service requires certain HTTP Header values, these can be set up as manual values or can reference dynamic variables set up in the previous steps.

Step 6: Converting Payload

In case the XI message is in XML format and does contain the interface/operation as the outermost element and this element is not expected by the REST service you are calling, you can set up the adapter to strip it off.

If the payload from the XI message system does not match the target format you can again add code page and format conversion is this step.

Step 7: Calling REST Service

Last step is then to call the remote REST service. Depending on the returned HTTP status code, the processing is then successful or not.

Optional: Result message processing and Response Determination

In case of a synchronous scenario, the result message returned from the HTTP server will be sent back to the PI messaging system.

This step also contains optional code page and format conversions.

If the channel is bound to an interface or operation, the result has to be in XML format and has to contain the response interface or operation as the outermost element. This is done automatically by the adapter. You just have to specify rules in order to determine which interface or operation to be used.

The configuration is similar to the operation rules, but instead of setting variable and value, you can set response interface or operation and namespace.

Optional: Custom Error Handling

Similar to the sender channel, the receiver allows setting up custom handling of error conditions.

This feature can be triggered by any kind of error in the receiver adapter (errors during conversion, configuration, invalid URL, and so on) or based on the HTTP result (status code, status text, payload content).

If a rule that you specify on this information is triggered, you can force an error condition, you can ignore the error or create a custom result message that, if in synchronous scenario, then will be sent back to the PI messaging system.

This feature is necessary especially on REST receiver channels. Imagine you want to call a remote server in order to delete a customer with a certain ID and the URL is dynamically created by the adapter. The remote REST URL could look like the following:

http://server:port/API/Customer/222?op=delete

If the HTTP server returns a HTTP code of 404 (not found), the adapter cannot decide whether the URL is incorrect or whether the customer with ID 222 just does not exist. The semantic of the HTTP result is dependent on the implementation of the specific REST API and so it needs to be configurable.

Advanced Topics

In addition to the basic applications (Consuming synchronous RESTful service and exposing a function module as RESTful service), there are others that are of interest. These are briefly described below:

There is a series of blogs that deal in detail with these topics. These blogs can be found at https://blogs.sap.com/2014/12/18/pi-rest-adapter-blog-overview/

Consume a Synchronous RESTful Service

Business Scenario

The Bing Maps REST Service Application Programming Interface (API) provides a REST interface that provides geocoding and reverse geocoding of addresses. You can also perform tasks such as creating a static map with pushpins, retrieving imagery metadata or creating a route.

Geocoding is the process of converting addresses (like a street address) into geographic coordinates (like latitude and longitude), which you can use to place markers on a map, or position the map.

Reverse geocoding is the process of converting geographic coordinates into a human-readable address.

We would like to determine geographic coordinates, such as latitude and longitude based on a given address. This conversion is called geocoding. Here, we use Bing’s Maps REST Service API in the following format:

http://dev.virtualearth.net/REST/v1/Locations?q=<given_address>&key=<API-key>

You will find the URLs in this exercise, the required API key, as well as the required payload in your Group Share folder: Y:\group##\BIT500. Open file Payload_and_DeveloperKey.txt to find the required values.

You will also find the links mentioned in this exercise in this file.

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.

Consume a Synchronous RESTful Service - Part 1

Consume a Synchronous RESTful Service - Part 2

Consume a Synchronous RESTful Service - Part 3

Consume a Synchronous RESTful Service - Part 4

Task 1: Test the RESTful Service

Steps

  1. Explore the RESTful Service API.

    1. Navigate to https://msdn.microsoft.com/de-de/library/ff701713.aspx. Then navigate to Getting Started → Locations → Find a Location by Query, and explore the interface.

    2. Find out which of the URL parameters we need.

  2. Get an API key.

    You must specify a key in your request, included as the value of a key parameter. A key is your application's API key. 

    The instructor will provide you with a working API key if you are not able to get your own from Microsoft.

    As of November 2018, a working API key was:

    AlNS-1Mgnpuse65m0nO92Zq8Ly-HQUfPTjawwtVH3NqdtMB4__FvSvXxTQdaJm_e

  3. Test the API with the Google Chrome Browser.

    1. Open Google Chrome.

    2. Insert http://dev.virtualearth.net/REST/v1/Locations?query=Tower%20of%20London&output=xml&key=AlNS-1Mgnpuse65m0nO92Zq8Ly-HQUfPTjawwtVH3NqdtMB4__FvSvXxTQdaJm_e in the URL line.

    3. SelectEnter.

      Result

      If everything works fine, you will get the XMLresult.

Task 2: Create Design Objects

Steps

  1. Create two software components in SLD: product P_BIT500_REST_## and software component SC_BIT500_REST_##.

    1. Open SLD with http://nwktdc00.wdf.sap.corp:50000/sld.

    2. Select the link Software Catalog → Products.

    3. In the Software Catalog window, to create a new software product, select the New ... button.

    4. On the Action Type step of the wizard, choose the Create a new product and version radio button.

    5. Select Next.

    6. In the Product step, insert the following data:

      FieldValue

      Product Name

      P_BIT500_REST_##

      Product Vendor

      training.sap.com

      Product Version

      1.0

    7. Select Next.

    8. In the Product Instance step, in the Instance Name field, insert the following data: bit500_instance.

    9. Select Next.

    10. In the Create Software Component and Version step, insert the following data:

      FieldValue

      Name

      SC_BIT500_REST_##

      Version

      1.0

    11. To complete the wizard, select Finish.

    12. To check the result, filter for P_BIT500_##.

    13. Choose the Software Components tab to see the assigned Software Component SC_BIT500_REST_## 1.0 of training.sap.com

  2. Import the Software Component SC_BIT500_REST_## to the ESR Browser in SAP NWDS.

    1. Log in with your user and password.

    2. Open SAP NW Developer Studio and navigate to Enterprise Service Repository Browser.

    3. In the left menu panel, place your mouse cursor in an empty area, and use the context menu to choose New → Software Component Version.

    4. In the New Software Component Version dialog box, select the Import from SLD radio button and insert the search string SC_BIT500_REST_##.

      Result

      The result show the software component SC_BIT500_REST_## 1.0 of training.sap.com.
    5. Set the Original language to English.

    6. Select Finish.

      Result

      You will see the entry in the left menu pane. In the Detail window, you will see the details of the imported Software Component.
    7. In the detail window in the Details area, choose the tab Namespaces.

    8. Select the Edit button to create two namespaces.

    9. To create the namespaces, select Add.

    10. Insert the following data:

      Name

      Description

      urn:bit500_##:rest:outbound

      Namespace for outbound – Sender data

      urn:bit500_##:rest:inbound

      Namespace for inbound – Receiver data

      urn:bit500_##:rest:common

      Namespace for inbound – Receiver data

    11. Save your entries by choosing File → Save.

    12. Activate your change list.

    13. It is possible that the namespaces have already been assigned. This warning can be ignored.

    14. The result should be as follows:

Task 3: Create Design Objects in ESR

Steps

  1. Create Data Type DT_GeoData and Message Type MT_GeoData.

    1. Open the Enterprise Service Browser in SAP NW Developer Studio.

    2. Navigate to the Namespace SC_BIT500_REST_## > urn: bit500_##:rest:common.

    3. Use the context menu New → Data Type.

    4. In the dialog box, in the Name field, enter DT_GeoData.

    5. Select Finish.

    6. If required, create a new change list. In the Select Change List window, choose New .... In the New Change List window, enter a display name of your choice, for example, CL.

    7. You will see the detail view Data Type Details.

    8. Using Add Element, create the following data types:

      Name

      Type

      Namespace

      street

      String

      http://www.w3.org/2001/XMLSchema

      city

      String

      http://www.w3.org/2001/XMLSchema

      zip

      String

      http://www.w3.org/2001/XMLSchema

      country

      String

      http://www.w3.org/2001/XMLSchema

      region

      String

      http://www.w3.org/2001/XMLSchema

    9. Save your work.

    10. Create in the same Namespace, urn:bit500_##:rest:common, a message type with the following data:

      FieldValue

      Name

      MT_GeoData

      Data Type

      DT_GeoData

    11. Select Finish.

    12. Save your work and assign your changes to a change list.

    13. The result should be as follows:

  2. Create the Inbound Service Interface SI_GeoData_inb.

    1. In the Namespace urn:bit500_##:rest:inbound create a service interface with the following data.

      FieldValue

      Name

      SI_GeoData_inb

      Namespace

      urn:bit500_##:rest:inbound

    2. Select Finish and assign your interface to a change list.

    3. You will see the Service Interface Definition window.

    4. Navigate to the Definition tab.

    5. Choose the SI_GeoData_inb entry.

    6. Change the type from Asynchronous to Synchronous.

    7. Select SI_GeoData_inb → Input and add the Input Message, MT_GeoData, by using Add Input Message.

    8. Confirm your entries with Finish.

    9. Using the same method as for the input message, add same Message Type MT_GeoData to the Output message.

    10. Save your Service Interface.

  3. Create the outbound Service Interface SI_GeoData_outb.

    1. Create in the same manner as in step 2 a service interface in namespace urn: bit500_##:rest:outbound. Use the message type MT_GeoData for the service interface SI_GeoData_outb.

      FieldValue

      Name

      SI_GeoData_outb

      Namespace

      urn:bit500_##:rest:outbound

    2. Change the Category to Outbound under tab Overview → Advanced → Category.

    3. In the Definition tab, select the Service Interface SI_GeoData_outb, and change the type to Synchronous.

    4. Add the message type MT_GeoData to the Input message.

    5. Add the message type MT_GeoData to the Output message.

    6. Save your work.

    7. Activate your change list.

Task 4: Create Communication Profiles

Steps

  1. Define business component, BC_SOAP_SENDER_##.

    1. Open the perspective SAP Process Integration Designer in your SAP NW Developer Studio.

    2. Log in to the PI Explorer with your user and password.

    3. Use the context menu under Systems to create a New Business Component.

    4. In the Name field, enter BC_SOAP_SENDER_##.

    5. Confirm your entries by selecting Finish.

    6. Add the Sender Interface, SI_GeoData_outb in the Sender Interface table by using the Add button.

    7. Save your work.

  2. Define the business component, BC_REST_RECEIVER_##.

    1. Create a second business component for the Receiver, BC_REST_RECEIVER_##, using the same method as in step 1.

    2. Add the Receiver Interface, SI_GeoData_inb in the Receiver Interface table by using the Add button.

    3. Save your work.

  3. Define the SOAP communication channel, CC_SOAP_SENDER_##.

    1. Navigate to BC_SOAP_SENDER_##, and, from the context menu, choose New Channel to create a SOAP communication channel.

    2. In the Channel Name field, enter CC_SOAP_SENDER_##.

    3. Confirm by selecting Finish.

    4. In the CC_SOAP_SENDER_## Detail view, in the General tab, enter the following data.

      FieldValue

      Direction

      Sender

      Adapter Type

      SOAP | ..| SAP BASIS 7.50

      Transport Protocol

      HTTP

      Message Protocol

      SOAP 1.1

    5. Switch to the Adapter-Specific tab, and, under Process Parameters, set the Quality of Service field to Best Effort.

      Best Effort means a synchronous communication.

    6. Save your work and activate your change list.

  4. Define REST communication channel, CC_REST_RECEIVER_##.

    1. Navigate to BC_REST_RECEIVER_##, and create a new Channel with the following data on the General tab.

      FieldValue

      Name

      CC_REST_RECEIVER_##

      Direction

      Receiver

      Adapter Type

      REST| ..|SAP BASIS 7.50

      Transport Protocol

      HTTP

      Message Protocol

      REST

    2. Switch to the Adapter-Specific tab.

    3. Select the Use Proxy checkbox, and insert the following data:

      FieldValue

      Proxy Host

      proxy

      Proxy Port

      8080

    4. Switch to the REST URL tab.

    5. In the URL Pattern field, enter http://dev.virtualearth.net/REST/v1/Locations?query={city}&{zip}&output=xml&key=AlNS-1Mgnpuse65m0nO92Zq8Ly-HQUfPTjawwtVH3NqdtMB4__FvSvXxTQdaJm_e

    6. In the Pattern Variable Replacement area, change the value source and the other fields as described in the following table.

      FieldValue

      Value Source

      XPath Expression

      Pattern Element Name

      zip

      Static Value

      //zip

    7. Repeat this for a second element. For reasons of clarity, we use only two parameters, city and zip.

      Value Source

      Pattern Element Name

      Static Value

      XPath Expression

      city

      //city

    8. Save your work.

    9. Switch to the REST Operation tab, and make the changes detailed in the following table.

      FieldValue

      Value Source

      Manual Value

      Static Value

      GET

    10. Save your work.

    11. Switch to the Data Format tab, and insert the data from the following table.

      FieldValue

      Request Format > Data Format

      XML

      Request Format >Character Set Name

      UTF-8

      Response Format > Data Format

      XML

      Response Format >Character Set

      HTTP Header

    12. Save your work, and activate your change list.

Task 5: Create an Integrated Configuration

Steps

  1. Create the iFlow, SOAP2REST_##.

    1. Navigate to SAP Process Integration Designer.

    2. In the PI Explorer View, choose Integration Flows. Create a new Integration Flow via context menu.

    3. Enter the data from the following table.

      FieldValue

      Name

      SOAP2REST_##

      Pattern

      Point-to-Point

    4. Select Next.

    5. On the Sender System tab, select the following values:

      FieldValue

      Communication Component

      BC_SOAP_SENDER_##

      Interface and Operation

      SI_GeoData_outb

    6. In the Receiver Systems tab, use the Add Button to add the Business Component using the values in the following table.

      FieldValue

      Communication Component

      BC_REST_RECEIVER_##

      Interface

      SI_GeoData_inb

    7. Select Finish.

    8. Select the line between the sender component BC_SOAP_SENDER_## and the envelope, until the color changes to orange. Open the context menu, and select Assign Referenced Channel.

    9. Choose CC_SOAP_SENDER_##, and save.

    10. Select the line between the envelope and the receiver component BC_SOAP_RECEIVER_##, until the color changes to orange.

      Open the context menu, and select Assign Referenced Channel.

      Choose CC_REST_RECEIVER_##, and save.

  2. Change the runtime configuration.

    1. Navigate to the properties view, select Runtime Configuration, and change the Staging and Logging tables.

    2. Staging: set all to Store

    3. Logging: set all to Log

    4. Save, activate, and deploy your iFlow.

Task 6: Run Your Scenario

Note

If you have some issues sending the message, try another browser.

Steps

  1. Send a request with SOAP client.

    1. Open the SOAP Client from the tools site.

    2. Insert the data from the following table. City and street can be filled in accordance with your requirements.

      Note

      Tower of London is just one example you can use in this exercise. As zip you can also use enter the value 69190. As the corresponding city, enter the value Walldorf.

      URL

      http://nwktdc00.wdf.sap.corp:50000/XISOAPAdapter/MessageServlet?channel=:BC_SOAP_SENDER_##:CC_SOAP_SENDER_##

      Type in XML

      <?xml version="1.0" encoding="UTF-8"?>

      <n0:Envelope xmlns:n0="http://schemas.xmlsoap.org/soap/envelope/">

      <n0:Body>

      <ns0:MT_GeoData xmlns:ns0="urn:bit500_##:rest:common">

      <street/>

      <city>Tower of London</city>

      <zip></zip>

      <country/>

      <region/>

      </ns0:MT_GeoData></n0:Body>

      </n0:Envelope>

  2. Explore the response.

    1. If everything works fine, you will get the result according to your entries.

    2. Check the Message Monitor for the Request BC_SOAP_SENDER_## -> BC_REST_RECEIVER_##.

    3. And the response BC_REST_RECEIVER_## -> BC_SOAP_SENDER_##.

Log in to track your progress & complete quizzes