Introduction

This blog highlights how to create a new iFlow using SAP HCI for integrating product material through asynchronous web service.

Scenario

Product Replication from SAP ERP to SAP Cloud for Customer using pass through asynchronous web service via HCI.

Pre-requisites

·         SOAP UI
·         Eclipse with HCI plug-ins
·         C4C Tenant ID and access to HCI

Procedure:

Step 1: Download WSDL from SAP Cloud for Customer

Procedure
  1. Go to Administrator work center -> Communication Arrangements.
  2. Select the Communication Arrangement you want to use. In this example we are going to use Communication Arrangement “Product Replication with Sales Data from External System”.
  3. Click Download WSDL to  save the .wsdl file on the local drive.
/wp-content/uploads/2014/07/image002_508256.png

Step 2: Create an SAP HCI Integration project and iFlow in Eclipse

Procedure
  1. Open Eclipse
  2. Click on Window->Open Perspective->Other->Integration Designer.
  3. In the Integration Designer perspective click on “File->New->Project”.
  4. In the New Project popup choose “Integration Project”. Click Next.
  5. In the New Integration Project screen type a Project Name. e.g. com.custom.scenarios.erp2cod.product.load
  6. Choose  Project Type as “Integration Flow”. Click Next.
/wp-content/uploads/2014/07/image004_508258.png
  1. Specify the integration flow name. e.g. erp2cod_product_load.
  2. Choose “Point to Point Channel” pattern to create an integration flow.
  3. Click Finish.
/wp-content/uploads/2014/07/image005_508262.png

Step 3: Import the WSDL into the Eclipse Project

Procedure
  1. In the Integration Designer perspective, Go to the “Project Explorer” tab and import the WSDL saved previously on your local desktop by selecting the folder src.main.resources.wsdl. Right click and select Import.
  1. Select File System and click on Next.
/wp-content/uploads/2014/07/image007_508266.png
  1. Enter the path from where the WSDL needs to be imported and click Finish.

Step 4: Configure the Basic Authentication

Procedure
  1. Configure Basic authentication as authentication method by doing the following:
a.  Select the tab “Deployed Artifacts”.
/wp-content/uploads/2014/07/image009_508269.png
c.     Click Deploy and Choose “Basic Authentication“ from Deploy Artifacts pop up.
d.    Click Next.
/wp-content/uploads/2014/07/image010_508270.png
e.     For C4C User you will need the C4C login details. The C4C login can be found in the Product inbound communication arrangement. Select View All and Technical data. Copy the user ID from the communication arrangement and update the password.
f.     Click Finish.
/wp-content/uploads/2014/07/image011_508277.png
g.    Ensure you see your credentials in Deployed Artifacts. You will need to refresh before you can see your credentials. 

Step 5: Configure the Sender and Receiver Channels

Procedure
  1. In the Integration Designer perspective open erp2cod_product_load.iflw iFlow by clicking on the .iflw file in the *.integrationflow package of the project. /wp-content/uploads/2014/07/image013_508279.png          
  2. Select the sender system i.e. ERP in the graphical editor and switch the radio      button to “Basic Authentication”. /wp-content/uploads/2014/07/image014_508289.png
  3. Double click the Sender Channel SOAP for ERP and go to Adapter Specific tab. /wp-content/uploads/2014/07/image015_508291.png
  4. Specify an Externalized      Parameter in the Address for the relative endpoint address on which HCI listens      to the incoming request from. Type a parameter name within double curly      braces e.g. {{ERP_Address}}.
  5. Optional: Specify an Externalized Parameter in the      URL to WSDL for the WS provider endpoint. Type a parameter name within double curly braces e.g. {{ERP_soapWsdlURL}}.                                                                                                      
     image016.png
   6.  Double click the Receiver Channel SOAP for COD and go to Adapter Specific tab.
/wp-content/uploads/2014/07/image017_508316.png
   7.  Specify an Externalized  Parameter in the Address for the target URL of COD web service i.e. type a parameter name within double curly braces e.g. {{COD_Address}}.
   8.  Switch to check box “Connect  using Basic Authorization” and enter the Credential name based on the  Basic Authorization Artifact deployed  earlier e.g.
     /wp-content/uploads/2014/07/image018_508317.png

Step 6: Maintain Runtime/Externalized Parameters

Procedure
  1. Double      click on the iFlow.
  2. Go      to “Externalized Parameters”.
  3. For      COD_Address, Copy the soap address location from downloaed WSDL.
  4. For ERP_address, Provide a relative endpoint address e.g. /erp/sap/ProductReplicationOut.
  5. For ERP_soapWsdlURL, Provide the URL in the format wsdl/<interfacename>.wsdl
  6. Once you have update the externalized paratmers you need to save in the externalized parameters view.
/wp-content/uploads/2014/07/image019_508318.png

Step 7: Adjust the Outbound WSDL

Procedure
  1. Double click on ReplicationOfProductsRequestOut.wsdl  under  src.main.resources.wsdl.
  2. Go  to Design.
/wp-content/uploads/2014/07/image020_508319.png
  1. Delete extra port/binding from the WSDL service.
  2. Rename the service, Port and the Binding by selecting each.
/wp-content/uploads/2014/07/image021_508320.png
5.     Click Save.

Step 8: Deploy the iFlow in to HCI

Procedure
  1. Double click on the iFlow and in the right side choose Model      Configuration.
  2. Right click and Select Deploy Integration Content.
/wp-content/uploads/2014/07/image022_508321.png
  1. Pop  up screen shows Integration project deployment is triggered.
  1. Click  on the Console tab and check that the project deployment is successful with 0 failures.
/wp-content/uploads/2014/07/image024_508324.png
  1. Check the deployed Integration Flow under “Component Status View”      shows Runtime Status as started.
/wp-content/uploads/2014/07/image025_508328.png
6.     Double click the VM Node Go to Properties, Choose Services and copy the service URL of the deployed Integration Flow for later use.
/wp-content/uploads/2014/07/image026_508329.png


Testing

Step 9: Testing the service using SOAP UI

Procedure
  1. Use the Service URL from HCI for generating a project in the SOAP UI. Append  the URL with “?wsdl” to fetch the Initial WSDL. Select checkbox Create Requests.
/wp-content/uploads/2014/07/image027_508330.png
       2.     Provide your HCI Username and Password.
       3.     Project is generated in the SOAP UI and sample SOAP request “Request1” is created.
     4.     Check the properties of sample SOAP request “Request1”. Choose the Authentication type as Preemptive and Maintain the Username and      Password for HCI.
5.     Replace the values in the sample XML of the SOAP Request “Request1” with the proper data and execute the SOAP request “Request1”.
6.     Message is sent successfully to HCI. Check the Raw message shows HTTP/1.1. 202 Accepted.
7.     Go to Message Monitoring in Eclipse to check that message is received successfully.
8.     Login into C4C and choose work space Administration. Click on Web Service Message Monitoring and check that an Incoming message is received successfully.
/wp-content/uploads/2014/07/image034_508336.png
9.     Go to C4C, work center Products to view the replicated product.
Note: In actual scenario Web Service consumer can be created in ERP in SE80 to consume the HCI webservice. Refer the link on how to consume a web service in ABAP: Consuming a Web Service
To report this post you need to login first.

20 Comments

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

  1. Suman Saha

    Thanks a lot for this blog.

    It will be great if you can elaborate the difference between Iflow in SAP PI 7.31 onwards and HCI. Its bit similar I guess with lots of new features available for HCI like customized pipeline etc.

    Regards,

    Suman

    (0) 
    1. Ginger Gatling

      Hi Suman

      We don’t do a function/feature between NW 7.3 and HCI  – the choice of what to use is normally not feature based. If you have NW OP and have the people to work on it, then use it. HCI is intended as a cloud middleware for customers that either don’t have PI expertise or don’t want to maintain middleware on-premise.  Our overview presentation does have a slide on when to use each one – but bascially if you have PI use it.  

      Meghna Shishodiya might have more to add.

      Regards

      ginger

      (0) 
  2. Vinay Avva

    Hi Hemant,

    Thanks for the Documentation . I’m having an issue . I did as mentioned above, but after deploying the iFlow, is failing during the Runtime . I’m getting the below errors

    [CAMEL][IFLOW][ERROR]:Integration flow failed.

      [CAMEL][IFLOW][EXCEPTION]:java.util.concurrent.TimeoutException

      [CAMEL][IFLOW][UNRESOLVED]:Unresolved dependency: (objectClass=com.sap.esb.security.KeyManagerFactory)

      [CAMEL][IFLOW][UNRESOLVED]:Unresolved dependency: (&(keystore=default)(objectClass=com.sap.esb.security.KeyCertificateAccessor))

      [CAMEL][IFLOW][UNRESOLVED]:Unresolved dependency: (objectClass=com.sap.esb.security.TrustManagerFactory)

    Kindly can you help out with this.

    (0) 
      1. Vinay Avva

        Hi Ginger,

        No I haven’t deployed the KeyStore. Kindly can  you point to an article which provides the details of the Keystore deployment . Thanks for your help…

        (0) 
        1. Ginger Gatling

          Hi Vinay

          Do you have the provisioning email you received?   The keystore would be attached. Actually, it should be deployed e unless it’s an internal HCI.   Please open a ticket  – the component is something like LOD-HCI – it’s under ondemand.

          -Ginger

          Meghna Shishodiya – shouldn’t the keystore be deployed?

          (0) 
            1. Vinay Avva

              Hi Meghna,

              After deploying the Key Store we soled the issue with the Keystore.

              Now when we are trying to access(download from Brower) the WSDL we are getting <faultcode>soap:Server</faultcode><faultstring>Unsupported Request Method GET</faultstring> , When I have certificate authentication in the iFlow.

              When I changed it to Basic I get <faultcode>soap:Server</faultcode><faultstring>Unauthorized</faultstring>

              Is this some thing to do with our Roles on the tenant. 

              When I try to access the WSDL through SOAP UI  I get

              WSDLException (at /soap:Envelope): faultCode=INVALID_WSDL: Expected element ‘{http://schemas.xmlsoap.org/wsdl/}definitions’.

              Please Help me out with this.

              (0) 
          1. Vinay Avva

            After deploying the Key Store we soled the issue with the Keystore.

            Now when we are trying to access(download from Brower) the WSDL we are getting <faultcode>soap:Server</faultcode><faultstring>Unsupported Request Method GET</faultstring> , When I have certificate authentication in the iFlow.

            When I changed it to Basic I get <faultcode>soap:Server</faultcode><faultstring>Unauthorized</faultstring>

            Is this some thing to do with our Roles on the tenant. 

            When I try to access the WSDL through SOAP UI  I get

            WSDLException (at /soap:Envelope): faultCode=INVALID_WSDL: Expected element ‘{http://schemas.xmlsoap.org/wsdl/}definitions’.

            Please Help me out with this.

            (0) 
  3. Rachel Andrew

    Hi everyone,

    has anybody actually implemented this according to the blog’s details. I think there are quite a number of gaps in this blog which make it impossible to follow.

    Dieter

    (0) 
  4. Qiang Zhu

    Hi everyone,

    Anybody solved the issue which Vinay raised? I am also getting the same error:
    WSDLException (at /soap:Envelope): faultCode=INVALID_WSDL: Expected element ‘{http://schemas.xmlsoap.org/wsdl/}definitions’.

    Thanks & Regards,
    Qiang

    (0) 
    1. Hemant Chahal Post author

      Hi Qiang,

      The role required to view the WSDL is ESBMessaging.send also iFlow should supports basic authentication as mentioned in the Step 5.2.

      Regards

      Hemant

       

      (0) 

Leave a Reply