cancel
Showing results for 
Search instead for 
Did you mean: 

Consume Restful service - SAP PI

diego_a
Participant
0 Kudos

Hello,

I have to send data from a proxy to a restful service, what happens to the company for which I am making the scenario does not want to buy a restful adapter.

The idea that I have to solve the problem is:

1. Create a module that converts xml to json for the request.

2. Create a module that convert to xml json response.

Now that adapt standard can be filled to generate the restfull behavior, to use the GET and POST, and use the modules created.

With respect to the modules already done looking I found one that works with json

https://github.com/engswee/com.equalize.xpi.af.modules/releases/tag/v20150325

Thank You,

regards,

Accepted Solutions (0)

Answers (3)

Answers (3)

diego_a
Participant
0 Kudos

Another little question on deploy the module, put the module in PI but fails pressing start, I have to consider to deploy the module in SAP PI 7.11 successfully?

iaki_vila
Active Contributor
0 Kudos

Hi Diego,

If you update your PI system you won't need to purchase the rest adapter.

If you client doesn't want to update the PI, it is a delicated theme, you can try

Regards.

engswee
Active Contributor
0 Kudos

I thought Gateway only allows for provisioning of SAP functionality as RESTful services, but cannot consume external RESTful services?

engswee
Active Contributor
0 Kudos

Hi Diego

From your post, it looks like you have all the details - not really sure what your question is? Could you please elaborate? Also, would be good it you can provide your PI/PO version & SP level and whether dual stack or single.

Regarding the JSON part, I noticed that you found the modules I've developed. Do refer to the following links to get further details on the configuration parameters.

Rgds

Eng Swee

diego_a
Participant
0 Kudos

Hi Eng Swee


More information

Scenario SOAP TO Restful (not the rest adapter) to be developed.

Server application Server ABAP and JAVA application

ABAP: SAP_BASIS 711 SP 10

PI: NW711_10_REL SP 10

Regards

Diego

engswee
Active Contributor
0 Kudos

And what is your question to the members of this forum?

diego_a
Participant
0 Kudos

To use the JSON module on that adapter must be used - channel reciever?

engswee
Active Contributor
0 Kudos

If you are planning to consume a synchronous RESTful service, then yes, you would use the modules in the receiver channel.

diego_a
Participant
0 Kudos

What I have to do is send the JSON POST to the URL to be upgraded, this url is a RESTful service, but the problem that I have that I have not the adapter RESTFUL IP, you can send the informcain without having a RESTFUL adapter PI?

If no module to consume RESTful Adapter, which of the communication channel image is to be used for a channel reciever?

nabendu_sen
Active Contributor
0 Kudos

Hi Diego,

Check the below document to achieve the functionality with SOAP (Axis) as Rest Adapter is not available in your case.

Regards,

Nabendu.

engswee
Active Contributor
0 Kudos

Hi Diego

Since you are on PI 7.11, you can try using SOAP receiver adapter with "Do not use SOAP envelope" checked. This will enable you to do a HTTP POST with the payload content.

However, did you check if what type of Authentication is required to access the RESTful service? It is just basic/certificate authentication or does it require more complex authentication like OAuth?

Regarding the module deployment, do take note that the compiled EAR file is built as EJB 3.0 in NWDS 7.31 and thus not compatible with your PI 7.11 system. Please download the source codes for the main package and dependent library and recompile/rebuild it in NWDS 7.11 CE for your system. Please make the necessary adjustments for using EJB2.1:-

  • the class needs to implement javax.ejb.SessionBean
  • deployment descriptor files (ejb-jar.xml & ejb-j2ee-engine.xml) references EJB 2.1 instead of 3.0

Rgds

Eng Swee