HCI – Demo – Consuming Synchronous Web Services in SAP Cloud for Customer via HANA Cloud Integration

Introduction

The below blog post highlights how to consume a synchronous web service for integration via SAP HANA Cloud Integration

Scenario

It is technical demonstration of basic custom iFlow scenario. We are going to implement currency conversion scenario via HCI. Since the same WSDL will be used for triggering the SOAP request, HCI will act as a pass through.

Pre-requisites

SOAP UI

Eclipse with HCI plug-ins

Tenant ID and access to HCI

Procedure:

1. Import WSDL

Open http://www.webservicex.com/CurrencyConvertor.asmx?op=ConversionRate and download the WSDL.

Remove the highlighted part

Consuming Synchronous WS in C4C via HCI_html_1.gif

Consuming Synchronous WS in C4C via HCI_html_2.gif

Consuming Synchronous WS in C4C via HCI_html_3.gif

Import this WSDL in a SOAP UI project.

  1. HCI Activities

Open Integration Designer perspective. In the menu, Window → Open Perspective → Others

Consuming Synchronous WS in C4C via HCI_html_4.gif

Create a new project of type Integration Project

Consuming Synchronous WS in C4C via HCI_html_5.gif

Consuming Synchronous WS in C4C via HCI_html_6.gif

Consuming Synchronous WS in C4C via HCI_html_7.gif

Consuming Synchronous WS in C4C via HCI_html_8.gif

Select Sender system and go to properties

Consuming Synchronous WS in C4C via HCI_html_9.gif

Drag and drop your previously saved WSDL in src.main.resources.wsdl.

Now open Sender channel and select SOAP as a sender type

Consuming Synchronous WS in C4C via HCI_html_a.gif

In Adapter Specific tab, mention a URL in the Address. This URL will be used by the sending system to send the message to your iFlow and also specify recently imported wsdl as well.

Consuming Synchronous WS in C4C via HCI_html_b.gif

Open receiver channel and specify SOAP adapter and in Adapter Specific setting provide below settings.

Consuming Synchronous WS in C4C via HCI_html_c.gif

Now save the iFlow, right click

Consuming Synchronous WS in C4C via HCI_html_d.gif

If there are any errors you will see it in the Console. Otherwise, select Deploy Integration Content.

On successful deployment, you will see below in ConsoleConsuming Synchronous WS in C4C via HCI_html_e.gif

  1. Runtime

Open Integration Operations Perspective

Select your node and open Deployed Artifacts tab, your project will be listed there.

Now double click on VM in Node explorer and open the services tab

Consuming Synchronous WS in C4C via HCI_html_f.gif

Find your service and copy paste its URL in SOAP UI and trigger a message

Consuming Synchronous WS in C4C via HCI_html_g.gif

If the scenario is successful a response message is generated with the current exchange rate.

This message can also be checked in the message monitoring in Eclipse.

Consuming Synchronous WS in C4C via HCI_html_h.gif

To report this post you need to login first.

5 Comments

You must be Logged on to comment or reply to a post.

  1. Abinash Nanda

    Hi Anirudh,

    Just one comment though. You should use SOAP 1.x as the message protocol instead of SAP RM as the latter is used for asynchronous messages (reliable messaging). In future version you will not be able to use SAP RM for synchronous calls.

    Best regards, Abinash

    (0) 
  2. diptee s

    Hi Anirudh,

    I am trying to execute this scenario and I receive the following fault message in SOAP UI

    <soap:Envelope xmlns:soap=”http://www.w3.org/2003/05/soap-envelope“>

       <soap:Body>

          <soap:Fault>

             <soap:Code>

                <soap:Value>soap:Receiver</soap:Value>

             </soap:Code>

             <soap:Reason>

                <soap:Text xml:lang=”en”>Unauthorized</soap:Text>

             </soap:Reason>

          </soap:Fault>

       </soap:Body>

    </soap:Envelope>

    Could you help with getting around this?

    Regards,

    Diptee

    (0) 
  3. Ricardo Martins

    Hi,

    I’m having the same problem described in the previous post (Unauthorized) response from soap. I belive the problem is related with SSL comunications. Can you give me some possible solution of this kind of problem?

    Thanks in advance.

    Best Regards.

    Ricardo.

    (0) 

Leave a Reply