Skip to Content
avatar image
Former Member

Consuming body of the REST Webservice xml message

Hello Experts,

I am new to REST web services and trying to understand the concepts of it by reading blogs here.

I have a requirement in Warehouse Management module where I have to create a REST web service to consume unsolicited xml messages from a dot net system and post that data in SAP (Basically doing a put away of a pallet and relocation of pallet from one bin to another).

The interface is a real time and whenever a pallet is put away by the automatic guided vehicle into a bin in ware house, dot net system(automatic guide vehicle) sends an unsolicited xml message to sap via my web service body and provide pallet number and destination bin information.

I created a SICF service for a handler class with interface IF_HTTP_EXTENSION and written code as below in HANDLE_REQUEST method to read body of xml message.

 server->request->set_method( 'PUT' ).
* Get the response in binary format
  bin = server->request->get_data( ).
* Convert into xml format.
  conv = cl_abap_conv_in_ce=>create( input = bin ).
  conv->read( IMPORTING data = response ).

Do I get xml data in xstring variable Response? Please reply with any existing blogs explaining it or any code that helps.

Thanks in advance,


Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

0 Answers