cancel
Showing results for 
Search instead for 
Did you mean: 

Consuming a restful service with HTTP adapter

matheusog
Participant
0 Kudos

Hi experts!

My PI it’s the 7.1.

I had developed an interface like the following synchronous scenario:

Outbound
SAP (Proxy) --> SEND CUSTOMER DATA --> SAP PI <-- REST WEB SERVICE

Inbound
SAP (Proxy) <-- RECEIVE XML with PDF  <-- SAP PI <-- REST WEB SERVICE
                         on a string in BASE64
                        inside a node of the XML

I don’t have too much knowledgement about restful services.

I see that Axis it’s not enabled on my PI, so I just used de http adapter in Communication Channel receiver.

I passed an XML with the customer data in a HTTP Request, using the http method POST, and I got a HTTP Response from the restful service with a PDF inside a XML in the response, and it’s working fine.

 

My question is: Can i use an HTTP adapter to consume a rest service (all methods: PUT, POST, GET and DELETE ), instead of using the SOAP Axis? If not, why in this case can the service be consumed using the HTTP adapter? Was because the rest service have only one URL parameter?

Thks!!

Matheus Goulart
SAP PI GRC ABAP

São Paulo - Brasil

Message was edited by: Matheus Oliveira Goulart I just passed the parameter with the XML on the body of HTTP Request using the prolog option on the HTTP adapter: request=<vendaRequest>    <ordem-cliente-id>12345678</ordem-cliente-id>    <aparelhos>       <aparelho>          <msisdn>11999995555</msisdn>          <iccid>8992101200003204510</iccid>          <imei>352279018335277</imei>          <tipo>TV</tipo>       </aparelho>    </aparelhos>    <meta-informacao>       <codigo-aplicacao-origem>SAP</codigo-aplicacao-origem>       <codigo-operacao-origem>SAP-codigo</codigo-operacao-origem>       <correlacao-id-origem>SAP-transacao</correlacao-id-origem>       <endereco-aplicacao-origem>sap1</endereco-aplicacao-origem>       <usuario-id-origem>sap-user</usuario-id-origem>       <data-hora-origem>2011-01-12T12:10:30-03:00</data-hora-origem>       <canal-id-origem>INTERNO</canal-id-origem>    </meta-informacao> </vendaRequest> Prolog= "request="

Accepted Solutions (1)

Accepted Solutions (1)

matheusog
Participant
0 Kudos

I just solved using the prolog option of the HTTP adapter in the Communication Channel.

Att,

Matheus Goulart

Answers (1)

Answers (1)

julio_sg_01
Discoverer
0 Kudos

Hi Matheus

I'm trying to develope a similiar scenario. Our customer has SAP PI 7.1 and the requirement is to consume a REST WS but the PI systems has not SOAP Axis enabled. So at first sight the only posibility is using the HTTP Adapter. Could you provide information about this scenario?

Thanks

Julio