Hci Using Eclipse WSDL Editor For Soap Based Integration

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 13

Process Integration (PI) & SOA Middleware:

HCI: Using Eclipse WSDL Editor for SOAP-


based integration

Posted by Eng Swee Yeoh 5 Jan, 2016


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

Generated by Jive on 2016-06-02+02:00


1
Process Integration (PI) & SOA Middleware: HCI: Using Eclipse WSDL Editor for SOAP-based integration

> 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...

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

Generated by Jive on 2016-06-02+02:00


2
Process Integration (PI) & SOA Middleware: HCI: Using Eclipse WSDL Editor for SOAP-based integration

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

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

Generated by Jive on 2016-06-02+02:00


3
Process Integration (PI) & SOA Middleware: HCI: Using Eclipse WSDL Editor for SOAP-based integration

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.

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.

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).

Generated by Jive on 2016-06-02+02:00


4
Process Integration (PI) & SOA Middleware: HCI: Using Eclipse WSDL Editor for SOAP-based integration

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.

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.

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

Generated by Jive on 2016-06-02+02:00


5
Process Integration (PI) & SOA Middleware: HCI: Using Eclipse WSDL Editor for SOAP-based integration

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

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

Generated by Jive on 2016-06-02+02:00


6
Process Integration (PI) & SOA Middleware: HCI: Using Eclipse WSDL Editor for SOAP-based integration

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

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.

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

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

Generated by Jive on 2016-06-02+02:00


7
Process Integration (PI) & SOA Middleware: HCI: Using Eclipse WSDL Editor for SOAP-based integration

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.

Using WSDL in iFlow


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

Generated by Jive on 2016-06-02+02:00


8
Process Integration (PI) & SOA Middleware: HCI: Using Eclipse WSDL Editor for SOAP-based integration

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.

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.

Generated by Jive on 2016-06-02+02:00


9
Process Integration (PI) & SOA Middleware: HCI: Using Eclipse WSDL Editor for SOAP-based integration

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
962 Views Tags: eclipse, soap, wsdl, sap_hana_cloud_integration, sap_hci, hci, hana_cloud_integration

Andreea Mutascu
23 Feb, 2016 2:31 PM
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:
ERP Logical port Messaging

Generated by Jive on 2016-06-02+02:00


10
Process Integration (PI) & SOA Middleware: HCI: Using Eclipse WSDL Editor for SOAP-based integration

settings: 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

Eng Swee Yeoh in response to stewart till on page 11


29 Jan, 2016 7:24 AM
Since you have opened a thread on this, you can attach the files there.

stewart till in response to Eng Swee Yeoh on page 12


29 Jan, 2016 7:07 AM
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.

Generated by Jive on 2016-06-02+02:00


11
Process Integration (PI) & SOA Middleware: HCI: Using Eclipse WSDL Editor for SOAP-based integration

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

Eng Swee Yeoh in response to stewart till on page 12


29 Jan, 2016 6:38 AM
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

stewart till in response to Eng Swee Yeoh on page 12


29 Jan, 2016 6:30 AM
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.

stewart till in response to stewart till on page 12


29 Jan, 2016 6:28 AM
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.

Eng Swee Yeoh in response to stewart till on page 12


29 Jan, 2016 6:20 AM
Hi Stewart

I've already mentioned this in the Additional Info section.

Rgds
Eng Swee

Naveen S
29 Jan, 2016 6:05 AM
hi Eng Swee Yeoh,
thanks for useful detail blog.

Regards
Naveen S

Generated by Jive on 2016-06-02+02:00


12
Process Integration (PI) & SOA Middleware: HCI: Using Eclipse WSDL Editor for SOAP-based integration

stewart till
29 Jan, 2016 6:01 AM
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.

Tahir Öz
5 Jan, 2016 9:47 PM
Useful document and simple explanation, thanks Eng Swee Yeoh

Regards,
Tahir

Generated by Jive on 2016-06-02+02:00


13

You might also like