Skip to Content

Consuming a restful service with HTTP adapter

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="

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Best Answer
    Jan 17, 2014 at 02:56 PM

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

    Att,

    Matheus Goulart

    Add comment
    10|10000 characters needed characters exceeded