Dear All,

I have defined a simple web service that takes in 3 String parameters
and processes these in a string return (CheckOrder.java). I compile
with the debug option (-g) so that the parameter names are known to
the wsdl. This works OK when called from a stand-alone SOAP client.

When I use the servlet call to the web service, with named parameters
in the FORM input fields, the order of the parameters is reversed (test.html).
Any idea why this is? If this is consistent behavior, I can work around it,
but I noticed that the parameter order is confused if used with a service
that takes in more than 10 parameters.


I am using Axis 1.1 under TOMCAT 5.0.18

Thanks,

Guido Lemoine

*** The web service ***

package test;

public class CheckOrder
{
public String doIt (String a, String b, String c)
{
String reply = "The correct order of the parameters is " + a + "; " + b + "; " + c;
return (reply);
}
}


*** HTML form calling the web service as a servlet ***

<html>

<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<meta http-equiv="Content-Language" content="en-us">
<title>test axis server</title>
</head>
<body>
<form method=GET action="/axis/services/checkOrder">

<input type="hidden" name = "method" value = "doIt">
<table>
<tr><td>A:</td><td><input type="text" name="a" size="2" value="A"></td></tr>
<tr><td>B:</td><td><input type="text" name="b" size="2" value="B"></td></tr>
<tr><td>C:</td><td><input type="text" name="c" size="2" value="C"></td></tr>
<tr><td colspan=2 align = center><input type=SUBMIT value="Submit"></td><tr>
</table>
</form>
</body>


</html>

(alternatively, call directly as a URL)

http://myserver/axis/services/checkOrder?method=doIt&a=A&b=B&c=C

*** SOAP response, notice the reversal of the parameter order ***

<soapenv:Envelope>
-
<soapenv:Body>
-
<doItResponse soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/";>
-
<doItReturn xsi:type="xsd:string">
The correct order of the parameters is C; B; A
</doItReturn>
</doItResponse>
</soapenv:Body>
</soapenv:Envelope>



begin:vcard
fn:Guido Lemoine
n:Lemoine;Guido
org:European Commission Joint Research Centre;Institute for the Protection and Security of the Citizen
adr:;;TP 267;Ispra;VA;21020;Italy
email;internet:[EMAIL PROTECTED]
title:Scientific Project Officer
tel;work:+39 0332 786239
tel;fax:+39 0332 789658
url:http://www.jrc.cec.eu.int/
version:2.1
end:vcard

Reply via email to