There are several ways to send an input to webmethods:
- Using Get method. Giving the input service's name like the variable name. To note that the character is in case sensitive.
- Using Post method. This is pretty much same like the above. The different must be the hidden data posted in this method.
The URL address to invoke webmethod's service is in the following formats:
I created a code to post a variable using HttpClient (developed by Apache). The following is a piece of code that I created:
client.getState().setCredentials(new AuthScope("localhost", 5555), new
PostMethod postMethod = new PostMethod(url);
postMethod.addParameter("name", "nama saya arie murdianto ganteng banged");
byte responseBody = postMethod.getResponseBody();
My flow step is only performing the length of the input String. For your information that the latest HttpClient is having 2 dependencies. They are commons codec and commons logging