Skip to Content

Introduction

For SOAP-based integration, SOAP receiver channels are used to consume web services whilst SOAP sender channels are used to expose HCI as a web service. When the target system is a SOAP web service, we can easily implement a passthrough interface in HCI and reuse the target system’s WSDL in the SOAP sender channel of HCI’s iFlow. Currently HCI only supports SOAP adapter as sender channel to expose synchronous web service interfaces. So if the target system is not SOAP-based (i.e. REST or OData), we will need to manually define the WSDL for the sender side of the iFlow in order to expose the service as a SOAP web service via HCI.

For those who are used to PI/PRO development, this is normally achieved by creating a sender Service Interface using Data Type (and Message Type) defined with the built-in Data Type Editor.

However, the current HCI development tool on Eclipse does not come with an easy-to-use Data Type Editor. For those who have a working PI/PRO installation, Service Interface definitions can be imported from PI/PRO. However, those who do not have PI/PRO, the WSDL for the sender will have to be manually created using other XML tools like XMLSpy, Oxygen, etc.

Fortunately, Eclipse also comes with it’s own native WSDL Editor. In this blog, I will share the steps on how the WSDL Editor can be used to generate a WSDL to be used in the sender SOAP channel of an HCI iFlow.

Component Details

Below are component versions of the Eclipse plugins that still do no have a native Data Type Editor. Hopefully SAP will port NWDS’s ESR Data Type Editor to a future version of HCI.

Eclipse Plugin Versions: Adapter 2.11.1, Designer 2.11.1, Operations 2.10.0

Creating WSDL for Sender SOAP Channel

For the example, we will create a WSDL for a synchronous interface. This WSDL will be configured in the sender SOAP channel of the iFlow. It will have the following structure.

Request

Segment/Field Name Occurrence
OrderKeys 1 – unbounded
> orderNo 1
> orderDate 0 – 1

Response

Segment/Field Name Occurrence
OrderDetails 0 – unbounded
> OrderName 1
> OrderID 1
> ItemCount 1

Step 1 – Create a new WSDL file

Right click on the wsdl folder and select New > Other…

/wp-content/uploads/2016/01/new_861708.png

Select WSDL File from the wizard, and provide a name for the file.

/wp-content/uploads/2016/01/wizard_861709.png

In the options screen, specify additionally the namespace and prefix, and accept the rest of the default values.

/wp-content/uploads/2016/01/options1_861720.png

A skeleton WSDL file will be created and it will be opened in the WSDL Editor’s Design view as shown below.

/wp-content/uploads/2016/01/skeleton1_861721.png

Step 2 – Rename Operation

Operation is similar to a Service Interface’s operation in PI/PRO. Highlight the default NewOperation value generated by the wizard and rename it accordingly as shown below. The names for the input and output parameters will be updated automatically.

/wp-content/uploads/2016/01/operation1_861722.png

Step 3 – Define request structure

Define the request structure as per the above table.

Click the arrow next the to input parameter. An inline schema editor will be opened. By default, the input parameter is just a single string field named in.

/wp-content/uploads/2016/01/def_req_861723.png

Change the properties of the input parameter as shown below. For Type, select New, to create an inline Complex Type using any arbitrary name (Key is used in the example).

/wp-content/uploads/2016/01/req_type_861724.png

The input parameter will be updated as shown below. Basically it means that the input parameter is of Key complex type which can occur 1 or more times.

/wp-content/uploads/2016/01/new_req_861725.png

Next we proceed to define the structure for the Key complex type. In order to do this, click the button at the top left Show schema index view.

/wp-content/uploads/2016/01/schema_view_861726.png

An overview of the schema with all elements, types will be displayed. To edit the complex type Key, double click on it.

/wp-content/uploads/2016/01/key_861727.png

It will bring us to the definition of Key. Here we can add additional elements to Key by right-clicking and selecting Add Element.

/wp-content/uploads/2016/01/add_elem_861731.png

Add the first field orderNo of type xsd:string as shown below.

/wp-content/uploads/2016/01/add_elem2_861733.png

Repeat for the second field so that the final definition of Key is as shown below.

/wp-content/uploads/2016/01/key_def_861732.png

Step 4 – Define response structure

Repeat the steps above for the response structure per the definition table.

For the final outcome, the output parameter is named OrderDetails of complex type OrderDetail and occurs 0 or more times.

/wp-content/uploads/2016/01/resp1_861734.png

Similarly, the OrderDetail complex type is defined as follows with three mandatory fields.

/wp-content/uploads/2016/01/detail_def_861735.png

With this, we complete the definition of the WSDL file.

Step 5 – Import WSDL into PI to verify (Optional)

As an optional step, we can import the WSDL into PI as an external definition to view and verify that the structures have been defined correctly.

/wp-content/uploads/2016/01/pi_view_861736.png

Using WSDL in iFlow

Once the WSDL has been fully defined, it can be included in the SOAP sender channel of the iFlow.

/wp-content/uploads/2016/01/soap_sender1_861821.png

After the iFlow development is completed and deployed. The actual WSDL for the HCI web service can be downloaded from the tenant. Select the IFLMAP node from the Node Explorer. Switch to Services in the Properties tab. Select the corresponding Endpoint of the HCI iFlow, right-click and select Download WSDL > Standard.

/wp-content/uploads/2016/01/wsdl_861822.png

This final WSDL that is downloaded will be very similar to the WSDL created for the sender channel, except it will contain the endpoint to the service on the HCI tenant.

Additional Info

The WSDL Editor can be also used to create the WSDL file for asynchronous interfaces. For these, just delete the output parameter from the skeleton WSDL created by the wizard.

/wp-content/uploads/2016/01/async_861823.png

Conclusion

As shown above, we can utilize Eclipse’s built in WSDL Editor to assist us in defining WSDL files for SOAP based interfaces. It is relatively easy to use, and more importantly free compared to other license based XML editors like XMLSpy or Oxygen. We can also work with it within the same development environment for HCI iFlows without needing to launch another external tool.

Ideally it would be great if SAP ports the NWDS ESR Data Type Editor to HCI, but in the meantime we can at least rely on Eclipse’s editor.

Reference

Introduction to the WSDL Editor – Eclipsepedia

To report this post you need to login first.

10 Comments

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

  1. stewart till

    hi Eng Swee Yeoh,

    thanks for the detailed blog.

    synchronous interface wsdl is getting created following your blog.

    but how to create asynchronous interface, which may act as service provider in ECC system. basically the idea is to create an asynchronous interface, get its wsdl file, use it in HCI iflow on target system and use this wsdl file for service provider creation in ecc system using se80 and external wsdl. i tried many trial runs,but somehow the wsdl does not get properly created, which ecc system can use when we try to create a service provider web-service in se80 and then later configure it through soamanager.

    so how to get asynchronous service interface wsdl? any ideas, thanks.

    (0) 
      1. stewart till

        i just saw your additional info section – but i tried this thing myself in eclipse as a trial run, but the wsdl which is generated, does not seem to be proper from ecc system’s perspective – please see my below message. any ideas. pls suggest. thanks.

        (0) 
    1. stewart till

      to refine the problem: for asynchronous, i deleted the output part, saved the wsdl file in eclipse. then copied that wsdl to my local file system. then in ecc, in se80, in creating an enterprise service, type service provider, i used external wsdl option, then local file, then selected this wsdl file, but it is not going to the next step of wizard to create the service provider and it is giving exception – Exception occurred in library handler – Exception of class CX_PROXY_GEN_ERROR.

      so how to generate asynchronous service interface WSDL to generate a service provider asynchronous web-service in ECC system? any ideas, thanks.

      (0) 
      1. Eng Swee Yeoh Post author

        Hi Stewart

        Unfortunately, I don’t have developer access to an ECC system to try this out. I’d suggest you try generating the service provider using some other WSDL file, and if it is successful, then to compare the structure to see what is missing.

        Rgds

        Eng Swee

        (0) 
        1. stewart till

          hi eng,

          i have a test2.wsdl which is ok for service provider wizard, as it is having both request and response for synchronous interface.

          i have a test3.wsdl which is not ok for service provider wizard, in which i have kept only request message for asynchrounous interface.

          what is missing in test3.wsdl, because of which it is giving – Exception occurred in library handler – Exception of class CX_PROXY_GEN_ERROR – in enterprise service create wizard in ecc system.

          how to attach these files so that u can see it?

          (0) 
  2. Andreea Mutascu

    hi Eng Swee Yeoh,

    I have created a wsdl as you suggested, imported it into an asynchronous Consumer Proxy in ERP and set up an integration flow to send data from ERP into HCI.

    But when I call the interface to send data message arrives in HCI with the following error: Inbound processing in endpoint at XXX failed with message “Fault: Inconsistent QualityOfService set in URL parameters”.

    HCI settings:Capture1.PNG
    ERP Logical port Messaging settings:Capture2.PNG
    Do you have any idea which settings should I add in order to ensure the Quality of Service?
    Thank you in advance!
    Best regards,Andreea
    (0) 

Leave a Reply