cancel
Showing results for 
Search instead for 
Did you mean: 

How to transfer XML-Data into a WebDynPro-Application?

steffen_spahr2
Participant
0 Kudos

An external partner has a calling interface that sends a HTTP-Redirect to a specific application-url and transfers all the data in one POST-Parameter.

The value of this POST-Paramater (CALLINTERFACE) consists the XML-Data.

<form id='InterfaceData3' method='post' action='/ProduktFrontController/Start'>

<textarea cols="80" rows="30" name='CALLINTERFACE'><?xml version="1.0" encoding="UTF-8"?>

<authentifizierung version="1.0">

XML-Data.....

</authentifizierung>

<br>

<p><input id='button1' type='submit' name='Button' value='Absenden'></p>

</form>

Standard-Java:

In our Java-Application we can read the POST-Value (XML-Data) via the HTTPServletRequest-Object/Instance.

WebDynPro-Java:

IWDProtocolAdapter protocolAdapter = WDProtocolAdapter.getProtocolAdapter();

IWDRequest request = protocolAdapter.getRequestObject();

String xmlData = request.getParameter("CALLINTERFACE");

In WebDynPro for ABAP I couldnt find a equivalent solution /technic to read the POST-Parameter-Value.

So I have to write a lot of annoying 'glue-code':-( (HTTP-Request-Handler for reading, Shared Memory / Objects for transfer to WebDynPro ABAP),

(Remark: It's no solution to transfer XML-Data via a URL-Parameter because it is too big (> 1 KByte) and the external partner doesn't support this option!).

My questions:

1) What technics for transfering Data (not only 2 or 3 Parameter) form external web-applications into WebDynPro ABAP applications does SAP support?

2) Is it possible to reach the calling HTTP-Request from WebDynPro-ABAP? (MayBe via ABAP-Callback-Functions)

Sincerely

Steffen

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Steffen,

In order to receive the XMl data you need to do below ABAP work:

1) Create a Transformation for the XML using the STRANS tcode.

2) You can have an FM which receives the XML as string and calls the above transformation to convert the XML to an internal table.

In this way you can have all the XML data coming in an internal table which you can bind to a node.

I hope it helps.

Regards,

Sumit

Answers (2)

Answers (2)

steffen_spahr2
Participant
0 Kudos

Hi,

thank you for your answers:-)

In conclusion the result is:

1) There is no "direct" way to read POST-Parameter in WebDynPro ABAP

=> You have to write a wrapper in BSP or an ICF - HTTP_REQUEST_HANDLER

(A ABAP-Class that implements the Interface "IF_HTTP_EXTENSION"

that reads the POST-Parameter-Value and transfers the value into a reachable localtion for WebDynPro-Abap.

2) For parsing the XML-Data I can use for example STRANS tcode or Simple Transformations

3) For transfering the Data between the BSP / the Request-Handler and WebDynPro for ABAP, I can use for example SharedMemory, Shared Objects.

Regards

Steffen

Edited by: Steffen Spahr on Jul 19, 2011 8:35 AM

Edited by: Steffen Spahr on Jul 19, 2011 8:55 AM

saravanan_narayanan
Active Contributor
0 Kudos

Hello Steffen

have a look at the following thread.

[;

this is possible in WDA but this is not encouraged.

suggestion would be to create a wrapper BSP application and read the xml data from the HTTP request and then invoke the webdynpro application by passing te xml data as URL parameter/ or by storing it locally

BR, Saravanan