cancel
Showing results for 
Search instead for 
Did you mean: 

Set values through http POST

Former Member
0 Kudos

Hi All,

Is this possible to pass values from one WD application to another by using http POST.

Cheers !!!

Umang

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

I think it's not possible.When u pass the vlaues from one app to another app the values will be appended on the browser as query string.

Regards,

Srikanth Reddy.T

Answers (3)

Answers (3)

vmadhuvarshi_
Contributor
0 Kudos

Umang,

This is possible - though not directly with Exit Plug of Interface View Controller.

You need to use Suspend plug to pass parameters with http POST. See [this thread|https://www.sdn.sap.com/irj/sdn/thread?messageID=4670994#4670994] and [this document|http://help.sap.com/saphelp_nw70/helpdata/en/68/3aee42c4257176e10000000a1550b0/frameset.htm] for further directions.

From thread above, Replace


Map postParams = new HashMap();
postParams.put("Key1", "Value 1");
postParams.put("Key2", "Value2");
postParams.put("Key3", "Value 3");
wdThis.wdGetWDSuspendResumeWindowController().wdFirePlugTestSupend("http://www.sap.com", postParams);

with


 WDDeployableObjectPart deployableObjectPart = WDDeployableObject.getDeployableObjectPart(deployableObjectName, "TargetApp", DDeployableObjectPartType.APPLICATION);
String urlToTargetApp = WDURLGenerator.getApplicationURL(deployableObjectPart);
Map postParams = new HashMap();
postParams.put("Key1", "Value1");
postParams.put("Key2", "Value2");
postParams.put("Key3", "Value 3");
wdThis.wdGetStartWindowController().wdFirePlugStartAppSuspend(urlToTargetApp, postParams);

In target application, onPlugDefault, use this code to get the values for parameters.


 String val1 = WDProtocolAdapter.getProtocolAdapter().getRequestParameter("Key1");
 String val2 = WDProtocolAdapter.getProtocolAdapter().getRequestParameter("Key2");
 String val3 = WDProtocolAdapter.getProtocolAdapter().getRequestParameter("Key3");

 wdComponentAPI.getMessageManager().reportSuccess(val1 + "   -   " + val2+ "   -   " + val3);

I've used this and it works.

Hope it helps.

Vishwas.

Former Member
0 Kudos

Hi,

I think it is not possible.

Regards,

Sunaina Reddy T

former_member185029
Active Contributor
0 Kudos

Check this

-Ashutosh