For those of you who were following our roadmap sessions at teched and other events, you were probably eagerly awaiting this announcement. I am more than happy to tell you that we have finally shipped our own so called REST (Representational State Transfer) adapter with the latest SP of SAP Process Integration / SAP Process Orchestration. The REST adapter has been supported as of 7.31 SP14 / 7.4 SP09.

In a nutshell, the following is supported:

  • Consumption and provisioning of REST based services
  • Default and custom url pattern of http end point for provisioning
  • Basic and client certification based authentication
  • Mapping of REST operations to service interface operations
  • Support for XML and JSON message format
  • JSON to XML conversion
  • Determine channel based on JSON element
  • Limit channel to particular operation
  • Extracting information from url and http operations

For more details about the adapter concept, its capabilities, and how it is configured, refer to the release notes of 7.31 SP14.

Furthermore, we have published a couple of blogs where we describe the concept and configuration along sample use cases, see PI REST Adapter – Blog Overview.

Further features have been shipped with 7.31 SP15 / 7.4 SP10, see also release notes of 7.31 SP15:

  • Logging of raw JSON content before and after conversion
  • Authentication with OAuth 2.0 and SAML Bearer Token profile
  • JSON to XML conversion enhancements to escape invalid XML name and XML name start characters
  • Setting of custom HTTP header elements in REST receiver adapter
  • Custom error handling

The following feature has been shipped with 7.31 SP16 / 7.4 SP11, see release notes of 7.31 SP16:

  • Sender side polling

The following features have been shipped with 7.31 SP17 / 7.4 SP13, see release notes of 7.31 SP17:

  • Namespace support and XML/JSON conversion
  • Further XML/JSON conversion options
  • Support for cross origin resource sharing (CORS)
  • Access Control List (ACL)
  • OAuth 2.0 Native Flow for Concur
  • Support for custom actions for a missing or empty incremental token
  • Custom error handling has been enhanced
  • Custom http header of response
To report this post you need to login first.

50 Comments

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

  1. Jose Nunes

    Great news.

    All I can think of right now is: why it took so long?

    The same happened with B2B add-on and Security add-on, that IMHO, should come out-of-the-box with a middleware like PI/PO.

    (0) 
  2. Adam Smith

    HI Alexander,

    I’ve just upgraded our demo system to SP13  a few weeks ago, but I can’t choose the WS_AAE adapter in a communication channel.

    The WS_AAE adapter is part sp13 and is not delivered part of a add-on right?Can you tell me which software component it is in? 

    Regards

    Adam

    (0) 
    1. Alexander Bundschuh Post author

      Hi Adam,

      have you uploaded the latest adapter metadata after the update?

      The adapter metadata is shipped with the SAP Basis SWCV, and needs to be imported into ESR.

      Alex

      (0) 
      1. Adam Smith

        HI Alex, The embarrassing answer is no, I must have forgotten to do to that. After having done so the adapter can be selected. 😳

        Thanks

        Adam

        (0) 
  3. Alex Truscott

    Thanks for the info Alexander.  We were just about to go out an buy a Rest adapter.  One thing I cant see is available in the options for this REST is “OAuth”,  is this available for use in this adapter please?

    (0) 
      1. Challa Challa

        Hi Alex,

        We have installed 7.31 sps 14 recently. We configured a scenario with rest. What would be the URL construction to test for rest sender?

        Tried the help.sap, But <host>:<port>/RestAdapter/<endpoint name>/. is giving message resource not found.


        Would like to see blogs with use cases of rest.

        (0) 
        1. Alexander Bundschuh Post author

          Hi Challa,

          the endpoint starts with http(s)://<host>:<port>/RESTAdapter, the rest of the url path is constructed from what you specify on the Channel Selection tab and the REST Resources tab. Let me explain this by example.

          Assuming you have chosen the Specify Endpoint check box on the channel selection tab, i.e., a custom end point, and have maintained /demo as Endpoint.

          On the REST Resources tab you can maintain an url pattern using placeholder variables. The values of the variables are then stored in dynamic attributes during runtime. For instance, we have chosen the pattern /{service}/{resource}/{id}.

          Then your endpoint may look like

          http(s)://<host>:<port>/RESTAdapter/demo/HR/employee/123

          with service=HR, resource=employee, and id=123

          or

          http(s)://<host>:<port>/RESTAdapter/demo/banking/acount/456

          with service=banking, resource=account, and id=456

          If you don’t need the pattern part simply choose /, then you would end up with the url:

          http(s)://<host>:<port>/RESTAdapter/demo

          hope this helps, blogs are still in progress but we try our best to get them published soon

          Alex

          (0) 
            1. Alexander Bundschuh Post author

              Hi Challa,

              service, resource, and id are variables or placeholders that you set during runtime by specifying the url correspondingly. You can then store those values in adaper specific attributes. We support by default adapter specific attributes to store service, resource, and id because from our experience those are very commonly used for RESTful services. You can also define your own adapter specific attributes. And you can use any other pattern with any arbitrary variables name. Above is just an example.

              Alex

              (0) 
              1. Challa Challa

                Hi Alexander,

                Thanks. I figured out the issue with url.

                URL should be

                http(s)://<host>:<port>/RESTAdapter  

                Instead of

                http(s)://<host>:<port>/RestAdapter

                (0) 
              2. Sandhya Tai

                Hi Alexander,

                We have a difficulty in sending a payload using using GET method to

                PI, from REST client .

                REST Request URL is:

                http://<host&gt;:<port>/RESTAdapter/MT_Source/Name=4444

                Issue is , we were able to form/Generate URL with dynamic Parameters

                in it . But we are not able to send any data as Payload and it appears

                that the Payload XML is not being generated during testing.

                Below is channel configurations :

                URLParameter.PNG

                In a short description: WE could send URL from REST client, But not

                Payload data and ending up with the mapping error due to request payload is not being sent to PI.

                Could you please help us. Do we need to do any other required configurations to make it work?

                Regards,

                Sandhya.

                (0) 
                  1. Sandhya Tai

                    Hi Kiran,

                    Yes. It got worked out for me.

                    To form request payload/To extract data from the URL, needs write a small udf in mapping.

                    For Example:

                    REST URL:

                    http://Hostname:port/RESTAdapter/MT_Source?OneNetID=AAAA

                    UDF:

                    DynamicConfiguration conf = (DynamicConfiguration) container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);

                    DynamicConfigurationKey key = DynamicConfigurationKey.create(“http://sap.com/xi/XI/System/REST“,”OneNetID”);

                     

                    String OneNetId = conf.get(key);

                    return OneNetId;

                    Regards,

                    Sandhya.

                    (0) 
                    1. Kiran Sakhardande

                      Thanks Sandhya !!

                      We wanted to know that can we use GET and send a JSON request payload with it without using URL parameters ? Similar to the way we do it for POST. Does PI support it ?

                      Thanks,

                      Kiran

                      (0) 
  4. Tahir Öz

    Hi Alexander,

    Thanks for the info about the REST.

    We have deployed the adapter succesfully.

    I specified endpoint but when i try to send request. I get “404 not found”.

    Is there anything missed ? or Do i need to configure some where else too ?

    Tahir

    (0) 
  5. Leela Morampudi

    Hi Alexander,

    we have recently upgraded to SP14 and now we can use REST adapter. To work on this,I have started doing one test scenario. I have configured all the parameters and when I try to test this interface,I am getting the below error. Please let me know is this related to deployment issue or some channel configuration issue?

    Error Log Details:

    “Exception caught by adapter framework: HIERARCHY_REQUEST_ERR: An attempt was made to insert a node where it is not permitted. “

    “Returning to application. Exception: com.sap.engine.interfaces.messaging.api.exception.MessagingException: org.w3c.dom.DOMException: HIERARCHY_REQUEST_ERR: An attempt was made to insert a node where it is not permitted. “

    Thanks,

    Leela

    (0) 
      1. Rajiv Kurra

        HI Agnieszka/Leela,

        I am testing IDOC to REST scenario, I am also getting same HIERARCHY_REQUEST_ERR , please let me know if you already got any solution:

        Error Log Details:

        “Exception caught by adapter framework: HIERARCHY_REQUEST_ERR: An attempt was made to insert a node where it is not permitted. “

         

        “Returning to application. Exception: com.sap.engine.interfaces.messaging.api.exception.MessagingException: org.w3c.dom.DOMException: HIERARCHY_REQUEST_ERR: An attempt was made to insert a node where it is not permitted. “

        (0) 
    1. Alexander Bundschuh Post author

      Hello TA,

      it is not supported in lower releases, and we don’t have any plans to downport it.

      The solution would be to add a non-central adapter engine of latest release to your existing PI system, and run the REST scenarios there.

      We have just recently changed the SAP note 1916146 (Version interoperability of distributed PI/PO landscapes) which supports this scenario.

      Alex

      (0) 
  6. FAZIL KURUCU

    Hi Alex,

    I updated my nw system, nw7.4 sp5 to nw 7.4 sp9. But i can’t see rest adapder in Integration Builder.  What is the issue i don’t now please help.

    (0) 
  7. Sandeep Sharma

    Hi Alex

    Currently we have both Odata and REST adapter.

    Instead of Odata adapter i can also use REST Adapter to get data from ODATA exposed using netweaver Gateway on ECC.

    PLease correct me if my understanding is wrong .

    Regards

    Sandeep

    (0) 
  8. Emil Jessen

    Hi Alex,

    Great news. How does the authentication setting work for the REST sender channels? I assume that client certificate authentication works for the REST sender if the Authentication Policy Configuration in NWA is set for ClientCertLoginModule – but it is not possible to increase the minimum authentication level for a specific REST sender channel, for example in order to block for Basic Authentication (like in the SOAP sender channels).

    Are these assumptions correct?

    Also, will the access to PO provided REST services using the REST adapter support the ‘Assigned User’ check in the Integrated Configurations?

    /wp-content/uploads/2015/01/2015_01_06_100540_619314.jpg

    I have not had a chance to test yet, since our upgrade to 7.4 SP9 is planned end of month.

    Thanks,

    Emil

    (0) 
  9. IDC PI Team PI team

    HI Alex,

    I am not able to find the Software component in Service Market Place to deploy the REST adapter. We have already already upgraded our PI 7.31 system to SP 14. Can you please help with the path?

    (0) 
    1. Alexander Bundschuh Post author

      The REST adapter automatically comes with the update to SP14 of 7.31, no further deployment required. If you cannot see it in the list of adapters when maintaining a channel, most likely you have missed to import the latest SWCV SAP BASIS to ESR to update the adapter metadata.

      Alex

      (0) 
      1. Praveen Varriam

        Hi Alex,

        We have recently added support pack SP10 to our PI 7.4 box.

        Currently we have SalesForce application integration in the landscape and looking to explore the PI REST Adapter with OAuth features. It would be great if you share some tips to handle the same.

        Right now I am trying ECC –>PI–>Salesforce[REST Api].

        How to build the OAuth feature in PI REST Adapter?

        Thanks!

        Praveen

        (0) 
          1. Praveen Varriam

            Hi Alex,

            Thanks for your reply and suggestions.

            I was looking for option to leverage SAP own developed REST adapter for cloud based applications integration and thus to lower TCO and 3rd party dependency.

            If we have the OAuth and SAML Bearer authentication features in PI REST adapter, I think most of the cloud based apps could be connected.

            Some of the other leading middleware tool in the market is using CastIron or Mule or Apigee to connect cloud based apps which actually brings additional layer of monitoring & maintenance.

            I am trying to place PI as single tool which can do every type of integration features in single box.

            I would like to hear from you on the latest features which SAP promised to release in SP10 for REST adapter. We have the PI 7.4 SP10 in our landscape and looking for the latest features.

            Please let me know.

            Thanks!

            Praveen

            (0) 
  10. Peter Chezowitch

    How can we secure REST sender channels? We are on a PO 7.4 SP10 but I cannot find any setting in order to require authentication from the client.

    In fact I can just call PUT/POST/DELETE services from Postman plugin and it does not require any form of authentication with the standard settings.

    (0) 
    1. Alexander Bundschuh Post author

      Hi Peter,

      it definitely requires authentication, either basic or client certification, you cannot send a message to a REST endpoint without having authenticated. If you use a plugin in your browser to test RESTful services, I guess that in your very first call you were asked to provide authentication, and now your credentials may be cached.

      Alex

      (0) 
  11. Mustafa Yildirim

    Hi,

    Firstly, thank you for your very nice pi rest adapter concept blog series.

    I’ve read your series, some discussions like that

    Thereupon, i also started a discussion on this issue. Plz have a look at that

    Not still sure/aware to make it feasible and how to.

    We have PI 7.4 SP9. Which strategy should i follow about oauth2 authentication implementation?

    Regards

    (0) 

Leave a Reply