cancel
Showing results for 
Search instead for 
Did you mean: 

Passing Parameters via Post Method from Webdynpro Java to a web application

Former Member
0 Kudos

Hello Experts,

I want to pass few parameters from a web dynpro application to an external web application.

In order to achieve this, I am referring to the below thread:

As mentioned in the thread, I am trying to create an additional Suspend Plug parameter (besides 'Url' of type String) with name 'postParams' and of type Map.

But when I build my DC, I am getting the same error which most of the people in the thread have mentioned:

Controller XXXCompInterfaceView [Suspend]: Outbound plug (of type 'Suspend') 'Suspend' may have at most two parameters: 'Url' of type 'string' and 'postParams' of type 'Map'.

I am using SAP NetWeaver Developer Studio Version: 7.01.00

Kindly suggest if this is the NWDS version issue or is it something else that I am missing out.

Also, if it is the NWDS version issue please let me know the NWDS version that I can use to avoid this error.

Any other suggestion/alternative approach to pass the parameters via POST method from webdynpro java to an external web application apart from the one which is mentioned in the above thread is most welcome.

Thanks & Regards,

Anurag

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi,

This is purely a java approach, even you can try this for your requirement.

There are two types of http calls synchronous call or Asynchronous call. So you have to choose the way to pass parameters in post method based on the http call.

if it is synchronous means, collect all the values from users/parameters using UI element eg: form and pass all the values via form to the next page is nothing but your web application url.

If it is Asynchronous means, write a http client in java and integrate the same with your custom code and you can find an option for sending parameters in post method.

here you go and find the way to implement Asynchronous scenario,

http://www.theserverside.com/news/1365153/HttpClient-and-FileUpload

http://download.oracle.com/javase/tutorial/networking/urls/readingWriting.html

http://digiassn.blogspot.com/2008/10/java-simple-httpurlconnection-example.html

Thanks & Regards

Rajesh A

Former Member
0 Kudos

Hi Rajesh,

Thanks for the reply.

Can you elaborate the synchronous method of sending the parameters to the url?

Also, do you have any idea why the Suspend plug is not supporting the Map type attribute?

Best Regards,

Anurag

Former Member
0 Kudos

Hi All,

Can anyone please reply on how to pass params via post method from a webdynpro java application to any external web application?

Any quick response will be highly appreciated.

Thanks & Regards,

Anurag

Former Member
0 Kudos

Hi,

So, basically we need to encode the parameters before sending them along with the URL to the web application.

Is it advisable to pass parameters this way?

Please suggest.

Regards,

Anurag

Former Member
0 Kudos

Hi All,

The issue seems like a NWDS version issue.

The error does not get reproduced in NWDS 7.2 but it comes in NWDS 7.01

Can anyone please suggest some other way to pass the Post parameters while going out of a webdynpro application to an external web application (Non SAP).

We want to send the parameters to an external web application from our web dynpro java application but only through post method.

Hope, this explains my requirement!!!

Best Regards,

Anurag

Former Member
0 Kudos

Hi All,

I've contacted SAP for this requirement and as per them Suspend plug does not support POST parameters.

Although I am not sure but the error does not appear if NWDS 7.2 version is used as I've not used NWDS 7.2 myself.

So, the possible workaround is to create 1 HTML file with all the post parameters and then access the url of the HTML file and finally fire the Suspend plug with this url.

Hope it clears!!!

Best Regards,

Anurag