cancel
Showing results for 
Search instead for 
Did you mean: 

HTTP Post

Former Member
0 Kudos

Hi

How to use http post to pass parameters to url.

Accepted Solutions (0)

Answers (8)

Answers (8)

0 Kudos

Hi,

I have the same error as Raffaele. After adding the postParams parameter of type java.util.Map to the Suspend-plug the WebDynpro gives the following error during build:

Outbound plug (of type 'Suspend') 'suspend_plug' may have at most two parameters: 'url' of type 'string' and 'postParams' of type 'Map'.

I use SAP NetWeaver Developer Studio version 7.0.16. (If this does not work in this version in which version does it work?)

Does someone know a solution? I would highly appreciate it.

Thanks in advance.

Eric

Former Member
0 Kudos

Hi Ayyapparaj KV,

I just did what you said, but I have always the error which I wrote before.

When I create the suspend plug Developer Studio add automatically the Url (type String) parameter.

But when I add the postParams parameter (type java.util.Map), developer Studio shows me the error.

Former Member
0 Kudos

Sorry Bertram,

but I added a postParams parameter of java.utils.Map and I have still the error.

If I write only Map in the type of parameter, I can't create the parameter to plug.

Maybe have I add any library to UsedDC Component?

BeGanz
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hallo Raffaele,

which NW 7.0 Developer Studio version do you use?

Regards, Bertram

Former Member
0 Kudos

SAP NetWeaver Developer Studio

Version: 7.0.09

The error is :

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

Former Member
0 Kudos

Hi,

I think suspend plugs are not available in this version.

Regards

Ayyapparaj

Former Member
0 Kudos

But I created my Suspend Plug. And I added a Suspend Property to my Application. So I think they're supported.

Former Member
0 Kudos

Hi,

Then select java native type

Click on the browse button

type Map and select the one which is from the java.util package.

Regards

Ayyapparaj

Former Member
0 Kudos

Does the parameter type must be java.util.Map?

Former Member
0 Kudos

Hi Bertram,

I tried to add a PostParams parameter to a Suspend Plug, as you said, but Developer Studio give me an error when I add new parameter to plug. Do you know why?

Thanks,

Raffaele

BeGanz
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hallo Rafaele,

the parameter MUST be named postParams and it MUST be of type Map. Please try this.

Regards, Bertram

Former Member
0 Kudos

As other people have said before, I get the same error as they do; ei

"Controller PersonMasterInterfaceView : Outbound plug (of type 'Suspend') 'redirectToJSP' may have at most two parameters: 'Url' of type 'string' and 'postParams' of type 'Map'."

They do rigth now have Url of type string (love the non-capital letter s of String btw), and postParams of type java.util.Map . I have tried to change the Url to url, postParams to PostParams but still get the same error.

I'm running 7.0 SP17.

Any help would be appreciated.

/Björn Bergenheim

Former Member
0 Kudos

Hi,

maybe you can use Suspend & Resume Plugs? Have a look here: [Suspend and Resume Plug|http://help.sap.com/saphelp_nw70/helpdata/en/68/3aee42c4257176e10000000a1550b0/frameset.htm]

kind regards

Stefanie

Former Member
0 Kudos

Any suggestions on this.....

Former Member
0 Kudos

Hi,

Do you want to pass POST parameters FROM a Webdynpro to another webdynpro/servlet or pass parameters TO a webdynpro?

Rajit

Former Member
0 Kudos

no actually my req is that i have to navigate to a url from my webdynpro app and i need to pass som parameters also. How to go for that using HTTP Post

BeGanz
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hallo Swetha,

this is possible, allthough it is some kind of "not-so-obvious" Web Dynpro features, I admit.

Sending POST parameters with Web Dynpro Suspend Plugs

1) Define a an additional Suspend Plug parameter (besides 'Url' of type String) with name 'postParams' and of type Map.

2) In your controller code create a HashMap instance and put some key/value-pairs in it:

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);

3) RESULT: The Web Dynpro Java Runtime will then pass these parameters via a POST request to the Suspen/Resume target application like the following HTTPWatch-Log demonstrates:

00:00:02.817 0.253 1812 POST 405 text/html http://www.sap.com/?sap-wd-resumeurl=http%3A%2F%2Fwdfd00181849a%3A57000%2Fwebdynpro%2Fdispatcher%2Fl...

and the following three POST-Parameters Key3=Value3&Key1=Value1&Key2=Value2

Regards, Bertram

former_member185879
Active Contributor
0 Kudos

Hi Bertram,

I am also trying this concept.

But getting the same error. I tried to add a postParams plug of type java.util.Map. but it is giving me a error as

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

What will be the reason?

I am in NWDS7.0.14.

Regards

SM Nizamudeen

Former Member
0 Kudos

Hi,

Have a look at this thread,

Kind Regards

Saravanan K