cancel
Showing results for 
Search instead for 
Did you mean: 

calling a RESTful service in SAP-PI

Former Member
0 Kudos

Hi,

We have a scenario which is proxy to SOAP synchronous. Data has to go out of ECC and will call an external system and receive an acknowledgement which will contain an indicator in the response. The external service is a RESTful service. Unfortunately, they said they will provide us the schema/ xsd but not the WSDL file. Now the question I have is Can I use SOAP-Axis adapter in this case at all. Our goal is to do a HTTP-PUT on their service.

Can anyone suggest what adapters I have to use ?

Thanks,

M

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi Ravi,

You can go with two approach, AXIS adapter and JAVA Proxy approach. I did using AXIS and also Java Proxy and it is working fine without any issues.

REST is native HTTP mechanism which has been there since the 90's. You don't need a wsdl for this, you just need a xsd because it is native xml over HTTP. You just need to make sure what HTTP methods you have to support.

I would say the Java Proxy approach is better as you can support all HTTP methods of PUT, POST, DELETE, TRACE, PATCH etc

You can create your Java proxy in NWDS and expose it as a web service and call it using a receiver SOAP adapter.

Adios

Ravijeet

baskar_gopalakrishnan2
Active Contributor
0 Kudos

If you are not using third party adapters, then you might have to use only SOAP (Axis) Receiver adapter to handle this.  The most important part is generating WSDL from XSD. Creating WSDL from XSD is pretty standard. You can easily do it. There are good tools to do this too.

Example:  Oracle Jdeveloper is one tool

http://fusionstack.blogspot.com/2009/09/creating-wsdl-file-from-xsd-file.html

Still you can request your client to generate WSDL using the XSD, if you can't. This should be possible using eclipse too.

Plus one more thing to be shared. Import XSD as external definition in the ESR. You can see WSDL format of XSD there itself. Open the XSD, you will see the tab version of WSDL. VIew the wsdl and save it and use it as external target structure for soap axis adapter.

Hope that helps.

former_member184681
Active Contributor
0 Kudos

Hi,

RESTful web services can be handled with SOAP adapter with Axis transport protocol. Have a look at this blog by for more details: .

Hope this helps,

Greg

Former Member
0 Kudos

Hi,

Thanks for the reply. But my question is can I call the service using the SOAP axis adapter while I dont have the WSDL file ? Third party are providing me an XSD as opposed to WSDL file. I do have the end point or the URL though. Will I be able to use SOAP-Axis adapter in this case ?

Thanks,

M

former_member184681
Active Contributor
0 Kudos

Hi,

Frankly speaking, no matter if you create a SOAP scenario, REST one, or any other - the .wsdl is only a little bit of help for you to define the message structure, types and namespaces. But you could equally well perform each scenario without the .wsdl file. And your current scenario is no exception - you could use the .xsd file for data types definition, just like you normally use the .wsdl, and set the endpoint URL in the communication channel manually, and you're done with it.

Hope this helps,

Greg

anupam_ghosh2
Active Contributor
0 Kudos

Hi Venkata,

                   you do not need a wsdl for REST web service integration. Each of the REST web service comes with an API set of calls. You need to study these and incorporate those in your scenario. REST web service will only respond to the request sent by PI. You need to understand how it is responding. Different web services support different formats, accordingly you need to accept and modify the response. Coming to REST web service integration there is this nice blog by Former Member

http://scn.sap.com/community/pi-and-soa-middleware/blog/2012/08/11/calling-synchronous-restful-web-s...

Please kindly rate the blog if you find it useful.

Regards

Anupam