Parameter got swapped



Hi

I am new to webservice. I developed a webservice project, which
accepts username and password, When I got the response, the username
and password values got swapped. I checked for mistakes, There is no
mistake. For example if i give User name : MIKE Password : MORGAN .
When I print the username and password . I am getting it as MORGAN MIKE
instead of MIKE MORGAN. Do we have to recieve the parameters in reverse
order inorder to have it stored correctly or is it because of some
other internal problem.
below is the code

-------------------------------
File Name : Blank.jws
-------------------------------
package web;



/*

* Copyright 2001-2004 The Apache Software Foundation.

*

* Licensed under the Apache License, Version 2.0 (the "License");

* you may not use this file except in compliance with the License.

* You may obtain a copy of the License at

*

* http://www.apache.org/licenses/LICENSE-2.0

*

* Unless required by applicable law or agreed to in writing, software

* distributed under the License is distributed on an "AS IS" BASIS,

* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied.

* See the License for the specific language governing permissions and

* limitations under the License.

*/



import javax.jws.WebMethod;

import javax.jws.WebService;

import javax.jws.WebParam;

@WebService

public class Blank {



@WebMethod

public String sayHelloWorld(String s) {

return "Hello world, " + s + "!";

}



@WebMethod

public String sayHelloWorldInParam( @WebParam String password )

{

if( password.equals("") )

{ password = "World"; }



return "Hello, " + password + "!";

}



@WebMethod

public String LoginUserInParam(@WebParam String username,@WebParam
String password )

{

if(((username.equals("Mike"))&&(password.equals("Meenakshi"))))

{

username="Mik";

password="Mur";

}



return "Access Granted for "+username+" "+password;





}



}


-------------------------------
File Name : index.html
-------------------------------
<html>

<head>
<meta http-equiv="Content-Type" content="text/html;
charset=iso-8859-1">
<title>Apache-Beehive</title>

<script language = "JavaScript">
function String generateURL()
{
String genurl="src/web/Blank.jws?method=sayHelloWorld";
return genurl;
}
</script>


</head>

<body bgcolor="#FFFFFF">
<h1 align="center">Beehive Java Web Services</h1>
<p><em>Welcome</em> to the Web Service template</p>

<ul>
<li>
<a href="happyaxis.jsp">Validate</a> the local installation
<br>
<i>see below if this does not work</i>
</li>
<li>
View Template Web Service's
<a href="web/Blank.jws?wsdl">WSDL</a>
</li>
<li>
Invoke the Template Web Service's method
<a
href="web/Blank.jws?method=sayHelloWorld">sayHelloWorld()</a>
</li>
</ul>


<form name="input" action="web/Blank.jws" method="get">
<table>
<tr>
<td>
<input type = "hidden" name="method" value="LoginUserInParam"/>
</td>
</tr>

<tr>
<td>
User Name :
<input type = "text" name="username" value="Mike"/>
</td>
</tr>

<tr>
<td>
Password :
<input type = "text" name="password" value="Murugan"/>
</td>
</tr>

<tr>
<td>
<input type = "submit" value="Submit"/>
</td>
</tr>
</table>
</form>

<h3>Validating the local configuration</h3>
If the validation page displays an exception instead of a
status page, the likely cause is that you have multiple XML parsers in
your classpath. Clean up your classpath by eliminating extraneous
parsers.
</body>
</html>


Thank you
Mike

.



Relevant Pages

  • Async calls to WebService in MFC
    ... I use a webservice over the net which is scripted in VB.Net. ... If the string is empty, ... username and/or password. ... GetSession (BSTR username, BSTR password, BSTR** Results); ...
    (microsoft.public.win32.programmer.networks)
  • Async calls to WebService in MFC
    ... I use a webservice over the net which is scripted in VB.Net. ... If the string is empty, ... username and/or password. ... GetSession (BSTR username, BSTR password, BSTR** Results); ...
    (microsoft.public.vc.mfc)
  • Re: WSE 3.0, usernameOverTransportSecurity, custom Token Manager w/ securityTokenManager,
    ... Microsoft.Web.Services3.Security.Security security) ... throw new Exception("The username token is not present in the ... I've added the web service call directly to my Data binding method ... protected override string AuthenticateToken(UsernameToken ...
    (microsoft.public.dotnet.framework.webservices.enhancements)
  • Re: WSE 3.0, usernameOverTransportSecurity, custom Token Manager w/ securityTokenManager,
    ... Microsoft.Web.Services3.Security.Security security) ... This assertion is only valid to see whether you are receiving the username ... I've added the web service call directly to my Data binding method ... protected override string AuthenticateToken(UsernameToken token) ...
    (microsoft.public.dotnet.framework.webservices.enhancements)
  • Re: WSE 3.0, usernameOverTransportSecurity, custom Token Manager w/ securityTokenManager,
    ... Microsoft.Web.Services3.Security.Security security) ... This assertion is only valid to see whether you are receiving the username ... I've added the web service call directly to my Data binding method ... protected override string AuthenticateToken(UsernameToken token) ...
    (microsoft.public.dotnet.framework.webservices.enhancements)