One problem that I see is that your response messages all include two
elements of different type with the same QName. Number 1 -- that's a
really bad practice, and Number 2, I suspect .NET can't handle it.
For example, you have:
<element name="getLoginResponse">
<complexType>
<sequence>
<element name="getLoginResponse" type="tns:WSLoginValue" />
</sequence>
</complexType>
</element>
I suggest you change it to:
<element name="getLoginResponse">
<complexType>
<sequence>
<element name="getLoginReturn" type="tns:WSLoginValue" />
</sequence>
</complexType>
</element>
You should do that for all of your response messages.
Anne
On 7/19/05, Leslie Tighe <[EMAIL PROTECTED]> wrote:
>
> Thanks Anne.
>
> I made the change to use arrrays, but I am still having the same problem
> where on the .NET side, the object fields are not being set.
>
> On the java side, I am able to call the service deployed in axis through a
> browser, and do get back the expected results. The wsdl file generated was
> cluttered, so I cleaned it up, as suggested earlier, and verified that the
> services still worked. I also noted that wsdl2java tool created the
> interface correctly.
>
> Attached are my classes. The SOAP response are pasted below. Any help would
> be gratefully appreciated.
>
>
> The SOAP Response Envelope looks like this (testing on the java side):
>
>
> - <soapenv:Envelope
> xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
> xmlns:xsd="http://www.w3.org/2001/XMLSchema"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
>
>
> - <soapenv:Body>
>
>
> - <getAllLoginsResponse xmlns="urn:AuthLogin">
>
>
> - <getAllLoginsResponse xmlns:ns1="urn:AuthLogin"
> xsi:type="ns1:WSLoginValue">
>
>
> <ns1:authFailureCount>0</ns1:authFailureCount>
>
> <ns1:changePassword xsi:nil="true" />
>
> <ns1:createDate xsi:nil="true" />
>
> <ns1:createdBy xsi:nil="true" />
>
> <ns1:currentLoginHost xsi:nil="true" />
>
> <ns1:gracePeriodExp xsi:nil="true" />
>
> <ns1:guest>false</ns1:guest>
>
> <ns1:lastAuthAttempt xsi:nil="true" />
>
> <ns1:locked>false</ns1:locked>
>
> <ns1:login>sysadmin</ns1:login>
>
> <ns1:newUser>false</ns1:newUser>
>
> <ns1:password>passwd00</ns1:password>
>
> <ns1:passwordEquivalentToken xsi:nil="true" />
>
> <ns1:passwordExp xsi:nil="true" />
>
> <ns1:resetPassword>false</ns1:resetPassword>
>
> <ns1:service>ABC</ns1:service>
>
> <ns1:status xsi:nil="true" />
>
> <ns1:token xsi:nil="true" />
>
> <ns1:userId>3000</ns1:userId>
> </getAllLoginsResponse>
>
> - <getAllLoginsResponse xmlns:ns2="urn:AuthLogin"
> xsi:type="ns2:WSLoginValue">
>
>
> <ns2:authFailureCount>0</ns2:authFailureCount>
>
> <ns2:changePassword xsi:nil="true" />
>
> <ns2:createDate xsi:nil="true" />
>
> <ns2:createdBy xsi:nil="true" />
>
> <ns2:currentLoginHost xsi:nil="true" />
>
> <ns2:gracePeriodExp xsi:nil="true" />
>
> <ns2:guest>false</ns2:guest>
>
> <ns2:lastAuthAttempt xsi:nil="true" />
>
> <ns2:locked>false</ns2:locked>
>
> <ns2:login>sysadmin</ns2:login>
>
> <ns2:newUser>false</ns2:newUser>
>
> <ns2:password>passwd00</ns2:password>
>
> <ns2:passwordEquivalentToken xsi:nil="true" />
>
> <ns2:passwordExp xsi:nil="true" />
>
> <ns2:resetPassword>false</ns2:resetPassword>
>
> <ns2:service>IDM</ns2:service>
>
> <ns2:status xsi:nil="true" />
>
> <ns2:token xsi:nil="true" />
>
> <ns2:userId>3000</ns2:userId>
> </getAllLoginsResponse>
> </getAllLoginsResponse>
> </soapenv:Body>
> </soapenv:Envelope>
>
> The SOAP Request was:
>
>
> <?xml version="1.0" encoding="UTF-8" ?>
>
> - <SOAP-ENV:Envelope
> xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
> xmlns:q0="urn:AuthLogin"
> xmlns:xsd="http://www.w3.org/2001/XMLSchema"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
>
>
> - <SOAP-ENV:Body>
>
>
> - <q0:getAllLogins>
>
>
> <q0:userId>3000</q0:userId>
> </q0:getAllLogins>
> </SOAP-ENV:Body>
> </SOAP-ENV:Envelope>
>
>
> Regards,
>
> Leslie
>
>
> Anne Thomas Manes <[EMAIL PROTECTED]> wrote:
> Leslie,
>
> One recommendation: Don't try to expose a Vector (or any other
> collection type) through your interface. Convert your Vector into an
> array, and it will work a lot better. .NET will have a problem dealing
> with all the ArrayOf_xsd_anyType types you have.
>
> Axis automatically generates a bunch of namespaces to define the
> bizarre types it needs to map collections to xsd types. If you don't
> use collections, you won't get all these additional namespaces.
>
> Anne
>
> On 7/18/05, Leslie Tighe wrote:
> >
> > Thanks, but I do have a few questions on name spaces in the wsdl files
> >
> >
> > Attached in my AuthLogin.wsdd file. It has namespaces defined as:
> >
> >
> >
> > >
> >
> xmlns:java="http://xml.apache.org/axis/wsdd/providers/java">
> >
> > >
> > xmlns:ns="urn:AuthLogin"
> > xmlns:xsd="http://www.w3.org/2001/XMLSchema">
> >
> > I am running axis.war in WebSphere 6.
> > I used the above AuthLogin.wsdd with the AdminClient from a DOS window to
> > modifiy the server-config file in axis. Then from the axis.war
> application,
> > I created the wsdl file with:
> >
> > http://localhost:9082/axis/services/AuthLogin?wsdl
> >
> > The generated wsdl file, has namespaces which someone from the dot net
> group
> > pointed out is strange. But what I am unable to figure out is why some of
> > these namespaces such as:
> > http://xml.apache.org/xml-soap is in my wsdl file because they are not in
> my
> > wsdd file namespace.ac
> >
> > I also see that in the wsdl, some namespaces are backwards e.g.
> >
> >
> > xmlns:tns2=http://security.ws.diamelle
> >
> > instead of diamelle.ws.security
> >
> > I then tried to use the java2wsdl tool to create the wsdl file, but am
> > confused on how the bean mapping and type mapping which we specified in
> the
> > wsdd file above is to be specified using this approach?
> >
> > dateTime is nillable in the wsdl file. Is there a way to make them come
> out
> > as not nillable in the wsdl file, or we could just edit the wsdl file?
> >
> > Any help will be much appreciated
> >
> >
> > Simon Fell wrote:
> >
> >
> > almost certainly the problem is that the namespace of the elements in the
> > response message don't match the namespace identified by the WSDL.
> >
> > Cheers
> > Simon
> >
> > ________________________________
> > From: Leslie Tighe [mailto:[EMAIL PROTECTED]
> > Sent: Monday, July 18, 2005 10:50 AM
> > To: [email protected]; Anne Thomas Manes
> > Subject: Re: Axis 1.2.1 to .NET Interoperability Question
> >
> >
> >
> > Hi Anne,
> >
> > On the .NET side, when I try to consume a complex object, all the
> attributes
> > in that object are empty. For example, if try to call the getLogin()
> method
> > which returns WSLogin, I get an object with nothing in it. However, if I
> > call the methods from the browser, its pulling the correct data so I am
> > thinking that there is problem in they way that I have things set for
> .NET.
> >
> > Any suggestions on what the problem maybe?
> >
> > Thanks
> > Leslie
> >
> >
> > Anne Thomas Manes wrote:
> > What problems are you experiencing?
> >
> > On 7/18/05, Leslie Tighe wrote:
> > >
> > > Hello,
> > >
> > >
> > > I have webservice created with Axis 1.2.1 and that I am trying to
> > consuming
> > > in .NET (VB) using the Microsoft provided tools. While I am able to
> > consume
> > > methods on the service that return simple type, I cannot consume methods
> > > that return complex objects. I have tried experimenting, with this, but
> am
> > > at a bit of loss on where the problem lies. When I call the services
> from
> > a
> > > browser, I do get back the response that contains valid data. Any help
> on
> > > this would be greatly appreciated. I have attached supporting files. For
> > > the purpose of an example, I am using the getLogin method.
> > >
> > > Thanks in advance.
> > > Leslie
> > >
> > > ________________________________
> > > Start your day with Yahoo! - make it your home page
> > >
> > >
> > >
> >
> >
> > ________________________________
> > Start your day with Yahoo! - make it your home page
> >
> >
> >
> > ________________________________
> > Start your day with Yahoo! - make it your home page
> >
> >
> >
> > >
> xmlns:java="http://xml.apache.org/axis/wsdd/providers/java">
> > > use="literal"
> > xmlns:ns="urn:AuthLogin"
> > xmlns:xsd="http://www.w3.org/2001/XMLSchema">
> > > value="diamelle.ws.security.AuthLogin"/>
> >
> > > type="java:diamelle.security.auth.SSOSubject"/>
> > > type="java:diamelle.ws.security.WSLoginValue"/>
> > > type="java:diamelle.security.auth.LoginValue"/>
> > > type="java:diamelle.security.auth.SSOPrincipal"/>
> > > type="java:diamelle.security.auth.RoleValue"/>
> > > type="java:diamelle.security.auth.EntitlementValue"/>
> > > type="java:diamelle.ebc.navigator.MenuData"/>
> > > type="java:diamelle.ebc.navigator.MenuData[]"
> >
> serializer="org.apache.axis.encoding.ser.ArraySerializerFactory"
> >
> deserializer="org.apache.axis.encoding.ser.ArrayDeserializerFactory"/>
> > > type="java:diamelle.security.auth.SSOPrincipal[]"
> >
> serializer="org.apache.axis.encoding.ser.ArraySerializerFactory"
> >
> deserializer="org.apache.axis.encoding.ser.ArrayDeserializerFactory"/>
> > > type="java:java.lang.String[]"
> >
> serializer="org.apache.axis.encoding.ser.ArraySerializerFactory"
> >
> deserializer="org.apache.axis.encoding.ser.ArrayDeserializerFactory"/>
> > > type="java:diamelle.security.auth.RoleValue[]"
> >
> serializer="org.apache.axis.encoding.ser.ArraySerializerFactory"
> >
> deserializer="org.apache.axis.encoding.ser.ArrayDeserializerFactory"/>
> > > qname="ns:ArrayOfEntitlementValue"
> > type="java:diamelle.security.auth.EntitlementValue[]"
> >
> serializer="org.apache.axis.encoding.ser.ArraySerializerFactory"
> >
> deserializer="org.apache.axis.encoding.ser.ArrayDeserializerFactory"/>
> > > returnType="ns:SSOSubject"
> > returnQName="ns:authenticateResponse">
> >
> >
> >
> >
> > > returnType="xsd:string"
> returnQName="ns:getUserIdResponse">
> >
> >
> >
> >
> > > qname="ns:autoResetPassword" returnType="xsd:string"
> > returnQName="ns:autoResetPasswordResponse">
> >
> >
> >
> > > qname="ns:getLogin"
> > returnType="ns:WSLoginValue"
> > returnQName="ns:getLoginResponse">
> >
> >
> >
> > > returnQName="ns:removeLoginResponse">
> >
> >
> >
> > > returnType="ns:ArrayOfSSOPrincipal"
> > returnQName="ns:getAllLoginsResponse">
> > > xmlns:tns="http://www.w3.org/2001/XMLSchema"/>
> >
> > > returnType="ns:ArrayOfSSOPrincipal"
> > returnQName="ns:getPrincipalsReturn">
> > > xmlns:tns="http://www.w3.org/2001/XMLSchema"/>
> >
> >
> >
> >
> >
> >
> >
>
>
> ________________________________
> Start your day with Yahoo! - make it your home page
>
>
> package diamelle.ws.security;
>
> import diamelle.app.base.*;
> import diamelle.ebc.user.UserData;
> import diamelle.security.auth.*;
> import diamelle.security.crypt.PBECryptor;
> import diamelle.ws.util.TimeUtil;
>
> import java.rmi.RemoteException;
> import java.util.*;
>
> public class AuthLogin extends NavigationAccess{
>
> Authenticator auth = null;
> static private final String ENCRYPTION_KEY = "diamelle";
>
> public AuthLogin() {
> super();
> try {
> AuthenticatorHome aHome =
> (AuthenticatorHome)getHome("Authenticator");
> auth = aHome.create();
> } catch(Exception e) {
> e.printStackTrace();
> }
> }
>
> /**
> * Get the SSOSubject Object from authenticate() method
> * @param service, login, password,
> * @returns SSOSubject Object
> */
> public SSOSubject authenticate(String serviceId, String login,
> String password)
> throws RemoteException {
> //throws InvalidLoginIdException, InvalidPasswordException,
> Exception {
> LoginValue lv = new LoginValue();
> lv.setService(serviceId);
> lv.setLogin(login);
> lv.setPassword(password);
>
> try {
> SSOSubject sub = auth.authenticate(lv);
> return sub;
> } catch (Exception e) {
> throw new RemoteException();
> }
> }
>
> /**
> * Get the SSOSubject Object from authenticate() method
> * @param lv - LoginValue
> * @returns SSOSubject Object
> */
> /*
> public SSOSubject authenticate(WSLoginValue loginValue)
> throws InvalidLoginIdException, InvalidPasswordException,
> Exception {
> return auth.authenticate(getLoginValue(loginValue));
> }
> */
> /**
> * Get the SSOSubject Object from authenticate() method
> * @param String userId
> * @param String token
> * @returns SSOSubject
> */
> public SSOSubject authenticateToken(String userId, String token)
> throws java.rmi.RemoteException {
>
> // using clear text as token as encrypted tokens do not
> always match
> // decrypt(token) Sometimes BadPaddingException occurs
> // return auth.authenticate(userId, decrypt(token));
> return auth.authenticate(userId, token);
> }
>
> /**
> * Logs out the user
> */
> public void logout(String userId) throws java.rmi.RemoteException {
> auth.logout(userId);
> }
>
>
> // takes the login and service and authenticates the userid and returns
> the userId
> public String getUserId(String serviceId, String login, String password)
> throws RemoteException {
> //throws InvalidLoginIdException, InvalidPasswordException,
> Exception {
> LoginValue lv = new LoginValue();
> lv.setService(serviceId);
> lv.setLogin(login);
> lv.setPassword(password);
>
> try {
> SSOSubject sub = auth.authenticate(lv);
> if (sub != null)
> return sub.getUserId();
> return null;
> } catch (Exception e) {
> throw new RemoteException();
> }
> }
>
> //public Set getPrincipals(String userId) throws RemoteException {
> // public String[] getPrincipals(String userId) throws RemoteException {
> // return auth.getPrincipals(userId);
> // }
>
> public void addLogin(WSLoginValue loginValue) throws RemoteException {
> try {
> auth.addLogin(getLoginValue(loginValue));
> } catch (Exception e) {
> throw new RemoteException();
> }
> }
>
> public void removeLogin(String serviceId, String login) throws
> RemoteException {
> auth.removeLogin(serviceId, login);
> }
>
> public WSLoginValue getLogin(String serviceId, String login) throws
> RemoteException {
> LoginValue lv = (auth.getLogin(serviceId, login));
> return getWSLoginValue(lv);
> }
>
> public void updateLogin(WSLoginValue lv) throws RemoteException {
> auth.updateLogin(getLoginValue(lv));
> }
> public String autoResetPassword(String serviceId, String login) throws
> RemoteException {
> return auth.autoResetPassword(serviceId, login);
> }
> //public List getAllLogins(String userId) throws RemoteException {
>
> public WSLoginValue[] getAllLogins(String userId) throws RemoteException {
> List loginList = auth.getAllLogins(userId);
> if (loginList == null)
> return null;
> int size = loginList.size();
> WSLoginValue[] loginAry = new WSLoginValue[size];
> for (int i=0; i < size; i++) {
> LoginValue loginValue = (LoginValue)loginList.get(i);
> loginAry[i] = this.getWSLoginValue(loginValue);
> }
> return loginAry;
> }
> public String encrypt(String clearText) throws RemoteException {
>
> String token = null;
> PBECryptor cryptor = new PBECryptor(ENCRYPTION_KEY);
> token = cryptor.encode(clearText);
>
> return token;
> }
>
> public String decrypt(String token) throws RemoteException {
>
> String clearText = null;
> PBECryptor cryptor = new PBECryptor(ENCRYPTION_KEY);
> clearText = cryptor.decode(token);
> System.out.println("clearText: " + clearText);
>
> return clearText;
> }
>
> public LoginValue getLoginValue(WSLoginValue ws) throws
> RemoteException {
> if (ws == null)
> return null;
>
> TimeUtil util = new TimeUtil();
> LoginValue lv = new LoginValue();
> lv.setAuthFailureCount(ws.getAuthFailureCount());
>
> lv.setChangePassword(util.getTimestamp(ws.getChangePassword()));
> lv.setCreateDate(ws.getCreateDate());
> lv.setCreatedBy(ws.getCreatedBy());
> lv.setCurrentLoginHost(ws.getCurrentLoginHost());
> lv.setGracePeriodExp(ws.getGracePeriodExp());
>
> lv.setLastAuthAttempt(util.getTimestamp(ws.getLastAuthAttempt()));
> lv.setLocked(ws.isLocked());
> lv.setLogin(ws.getLogin());
> lv.setNewUser(ws.isNewUser());
> lv.setPassword(ws.getPassword());
>
> lv.setPasswordEquivalentToken(ws.getPasswordEquivalentToken());
> lv.setPasswordExp(util.getTimestamp(ws.getPasswordExp()));
> lv.setResetPassword(ws.isResetPassword());
> lv.setService(ws.getService());
> lv.setStatus(ws.getStatus());
> lv.setToken(ws.getToken());
> lv.setUserId(ws.getUserId());
>
> return lv;
> }
>
> public WSLoginValue getWSLoginValue(LoginValue loginValue) throws
> RemoteException {
> if (loginValue == null)
> return null;
>
> TimeUtil util = new TimeUtil();
> WSLoginValue wsLoginValue = new WSLoginValue();
>
> wsLoginValue.setAuthFailureCount(loginValue.getAuthFailureCount());
>
> wsLoginValue.setChangePassword(util.getCalendar(loginValue.getChangePassword()));
> wsLoginValue.setCreateDate(loginValue.getCreateDate());
> wsLoginValue.setCreatedBy(loginValue.getCreatedBy());
>
> wsLoginValue.setCurrentLoginHost(loginValue.getCurrentLoginHost());
>
> wsLoginValue.setGracePeriodExp(loginValue.getGracePeriodExp());
>
> wsLoginValue.setLastAuthAttempt(util.getCalendar(loginValue.getLastAuthAttempt()));
> wsLoginValue.setLocked(loginValue.isLocked());
> wsLoginValue.setLogin(loginValue.getLogin());
> wsLoginValue.setNewUser(loginValue.isNewUser());
> wsLoginValue.setPassword(loginValue.getPassword());
>
> wsLoginValue.setPasswordEquivalentToken(loginValue.getPasswordEquivalentToken());
>
> wsLoginValue.setPasswordExp(util.getCalendar(loginValue.getPasswordExp()));
> wsLoginValue.setResetPassword(loginValue.isResetPassword());
> wsLoginValue.setService(loginValue.getService());
> wsLoginValue.setStatus(loginValue.getStatus());
> wsLoginValue.setToken(loginValue.getToken());
> wsLoginValue.setUserId(loginValue.getUserId());
> return wsLoginValue;
> }
>
>
> }
>
> package diamelle.ws.security;
>
> import java.util.Calendar;
> import java.io.*;
> import diamelle.ws.util.*;
> import diamelle.security.auth.LoginValue;
>
> /**
> * <p>
> * <code>LoginValue</code> <font face="arial"> is the Bulk Accessor class to
> * get and set values for PasswordLogin. </font>
> * </p>
> */
>
> public class WSLoginValue implements Serializable {
>
> private String login;
>
> private String service;
>
> private String userId;
>
> private String password;
>
> private String status;
>
> private boolean isNewUser = false;
>
> private Calendar passwordExp;
>
> private Calendar changePassword;
>
> private boolean resetPassword;
>
> private boolean locked;
>
> private String passwordEquivalentToken;
>
> private String token;
>
> private java.util.Date gracePeriodExp;
>
> private int authFailureCount;
>
> private Calendar lastAuthAttempt;
>
> private java.util.Date createDate;
>
> private String createdBy;
>
> private String currentLoginHost;
>
> /**
> * Default constructor for the bulk accessor class. This objects
> holds
> * login, service id, user id, password, newUser, passwordExp,
> password
> * equivalent token.
> */
> public WSLoginValue() {
> }
>
> /**
> * @return Returns the createDate.
> */
> public java.util.Date getCreateDate() {
> return createDate;
> }
>
> /**
> * @param createDate
> * The createDate to set.
> */
> public void setCreateDate(java.util.Date createDate) {
> this.createDate = createDate;
> }
>
> /**
> * @return Returns the createdBy.
> */
> public String getCreatedBy() {
> return createdBy;
> }
>
> /**
> * @param createdBy
> * The createdBy to set.
> */
> public void setCreatedBy(String createdBy) {
> this.createdBy = createdBy;
> }
>
> /**
> * @return Returns the currentLoginHost.
> */
> public String getCurrentLoginHost() {
> return currentLoginHost;
> }
>
> /**
> * @param currentLoginHost
> * The currentLoginHost to set.
> */
> public void setCurrentLoginHost(String currentLoginHost) {
> this.currentLoginHost = currentLoginHost;
> }
>
> /**
> * @return Returns the changePassword.
> */
> public Calendar getChangePassword() {
> return changePassword;
> }
>
> /**
> * @param changePassword
> * The changePassword to set.
> */
> public void setChangePassword(Calendar changePassword) {
> this.changePassword = changePassword;
> }
>
> /**
> * @return Returns the gracePeriodExp.
> */
> public java.util.Date getGracePeriodExp() {
> return gracePeriodExp;
> }
>
> /**
> * @param gracePeriodExp
> * The gracePeriodExp to set.
> */
> public void setGracePeriodExp(java.util.Date gracePeriodExp) {
> this.gracePeriodExp = gracePeriodExp;
> }
>
> /**
> * @return Returns the locked.
> */
> public boolean isLocked() {
> return locked;
> }
>
> /**
> * @param locked
> * The locked to set.
> */
> public void setLocked(boolean locked) {
> this.locked = locked;
> }
>
> /**
> * @return Returns the resetPassword.
> */
> public boolean isResetPassword() {
> return resetPassword;
> }
>
> /**
> * @param resetPassword
> * The resetPassword to set.
> */
> public void setResetPassword(boolean resetPassword) {
> this.resetPassword = resetPassword;
> }
>
> /**
> * @return Returns the status.
> */
> public String getStatus() {
> return status;
> }
>
> /**
> * @param status
> * The status to set.
> */
> public void setStatus(String status) {
> this.status = status;
> }
>
> /**
> * Checks if the user is new.
> *
> * @return boolean Returns value after checking if the user is new.
> */
> public boolean isNewUser() {
> return isNewUser;
> }
>
> /**
> * Checks if the user is a guest user.
> *
> * @return boolean Returns value after checking if the user is
> guest.
> */
> public boolean isGuest() {
> return ((login == null) || (login.equals("")));
> }
>
> /**
> * Gets the login of the user .
> *
> * @return String Gets the login.
> */
> public String getLogin() {
> return login;
> }
>
> /**
> * Gets the Service Id of the user.
> *
> * @return String Gets the Service Id.
> */
> public String getService() {
> return service;
> }
>
> /**
> * Gets the User Id of the user.
> *
> * @return String Get the User Id.
> */
> public String getUserId() {
> return userId;
> }
>
> /**
> * Gets the password for the user.
> *
> * @return String Gets the password.
> */
> public String getPassword() {
> return password;
> }
>
> /**
> * Sets the login for the user.
> *
> * @param newLogin
> * Sets the login.
> */
> public void setLogin(String newLogin) {
> login = newLogin;
> }
>
> /**
> * Sets the Service Id for the user.
> *
> * @param newService
> * Sets the Service Id.
> */
> public void setService(String newService) {
> service = newService;
> }
>
> /**
> * Sets the User Id for the user.
> *
> * @param newUserId
> * Sets the User Id.
> */
> public void setUserId(String newUserId) {
> userId = newUserId;
> }
>
> /**
> * Sets the password for the user.
> *
> * @param newPassword
> * Sets the password.
> */
> public void setPassword(String newPassword) {
> password = newPassword;
> }
>
> /**
> * Sets the user as a new user.
> *
> * @param isNewUserParam
> * Sets the status of user as new user or existing.
> */
> public void setNewUser(boolean isNewUserParam) {
> isNewUser = isNewUserParam;
> }
>
> /**
> * Sets the password expiry date for the user.
> *
> * @param newPasswordExp
> * Sets the password expiry date.
> */
> public void setPasswordExp(Calendar newPasswordExp) {
> passwordExp = newPasswordExp;
> }
>
> /**
> * Gets the password expiry date of the user.
> *
> * @return Timestamp Gets the password expiry date.
> */
> public Calendar getPasswordExp() {
> return passwordExp;
> }
>
> /**
> * Sets the password equivalent token which is the encrypted key for
> the
> * user.
> *
> * @param newPasswordEquivalentToken
> * Sets the password equivalent token.
> */
> public void setPasswordEquivalentToken(String
> newPasswordEquivalentToken) {
> passwordEquivalentToken = newPasswordEquivalentToken;
> }
>
> /**
> * Gets the password equivalent token of the user which is in the
> encrypted
> * form.
> *
> * @return String Gets the password equivalent token.
> */
> public String getPasswordEquivalentToken() {
> return passwordEquivalentToken;
> }
>
> /**
> * Returns the String value of the LoginValue.
> *
> * @return String Displays the value of each field in the object.
> */
> public String toString() {
> String loginString = "Login :" + login + " Service :" +
> service
> + " User Id :" + userId + " Password :" +
> password
> + " Password Equivalent Token :" +
> passwordEquivalentToken
> + " Password Expiration :" + passwordExp + "
> Token :" + token
> + " AuthFailureCount :" + authFailureCount +
> "\n";
> return loginString;
> }
>
> /**
> * Returns the hashcode for the primary key.
> *
> * @returns int Gets the hash code for Service Id and login.
> */
> public int hashCode() {
> return (login + service).hashCode();
> }
>
> /**
> * This method compares objects of login and service.
> *
> * @param object
> * The object to be compared .
> *
> * @return boolean Returns value as per equality of objects.
> */
> public boolean equals(Object object) {
> if (object == null) {
> return false;
> }
> if (object instanceof WSLoginValue) {
> WSLoginValue loginData = (WSLoginValue) object;
> return ((loginData.login.equals(this.login)) &&
> (loginData.service
> .equals(this.service)));
> } else {
> return false;
> }
> }
>
> /**
> * Sets the token for the user.
> *
> * @param newToken
> * Sets the token.
> */
> public void setToken(String newToken) {
> this.token = newToken;
> }
>
> /**
> * Gets the token for the user.
> *
> * @return String Gets the token.
> */
> public String getToken() {
> return token;
> }
>
> /**
> * Returns the number of times that authentication has failed in a
> row.
> *
> * @return
> */
> public int getAuthFailureCount() {
> return authFailureCount;
> }
>
> public void setAuthFailureCount(int count) {
> authFailureCount = count;
> }
>
> /**
> * Time when the user last tried to authenticate.
> *
> * @return
> */
> public Calendar getLastAuthAttempt() {
> return lastAuthAttempt;
> }
>
> /**
> * Sets the time when the user last tried to authenticate.
> *
> * @param stamp
> */
> public void setLastAuthAttempt(Calendar stamp) {
> lastAuthAttempt = stamp;
> }
>
>
> }
>
>
>