Kostas, I believe you would set the username and password fields by using the JAX-RPC Stub APIs: mystub._setProperty(Stub.USERNAME_PROPERTY, "user"); mystub._setProperty(Stub.PASSWORD_PROPERTY, "password");
The Axis Stub class has getUsername() and getPassword() APIs as convenience methods too (cast the stub to org.apache.axis.client.Stub instead of javax.xml.rpc.Stub). The server side would get them as properties of the MessageContext. MessageContect ctx = MEssageContext.getCurrentContext(); String user = ctx.getUsername(); String pass = ctx.getPassword(); Probably Axis-user would be a good place to get help on this. Hope that helps. -- Tom Jordahl Macromedia Server Development > -----Original Message----- > From: Kostas Kalogirou [mailto:[EMAIL PROTECTED] > Sent: Tuesday, March 22, 2005 2:45 AM > To: [email protected] > Subject: Differences between JWSDP and AXIS generated Java classes-Problem > imlpementing Java client using AXIS API > > Hello everybody. > > I had an .wsdl file and I want to get Java classes. > I used the jwsdp 1.5 toolkit at first and I got the Java classes. > I implemented also a Java client using the JAX-RPC API. > > After that, I try to do the same things with Axis. > I used the Axis org.apache.axis.wsdl.WSDL2Java toolkit in order to get > Java classes as following: > % java org.apache.axis.wsdl.WSDL2Java --server-side --user imag > --password kos file.wsdl > or > % java org.apache.axis.wsdl.WSDL2Java --all --user imag --password kos > file.wsdl > > I got all the Java files and deploy.wsdd and undeploy.wsdd.However, If > I compared them with the Java files generated by jwsdp 1.5, I can see > some differences. For example, there is a method version() that > actually get some details from the remote Web server(name of server, > date, username,password of user). > > With jwsdp, it was generated such as: > public void getVersion(javax.xml.rpc.holders.StringHolder name, > javax.xml.rpc.holders.StringHolder version, > javax.xml.rpc.holders.StringHolder date, mizgis.AccessCredentialsType > accessCredentials) throws > java.rmi.RemoteException; > > WIth axis it was generated such as: > public void getVersion(javax.xml.rpc.holders.StringHolder name, > javax.xml.rpc.holders.StringHolder version, > javax.xml.rpc.holders.StringHolder date) throws > java.rmi.RemoteException; > > The AccessCredentialsType() is the method that authenticates the user > like: > public AccessCredentialsType(java.lang.String name, java.lang.String > password) { > this.name = name; > this.password = password; > } > > > If I used the axis WSDL2Java with --all argument I got the > AccessCredentialsType. > But --all "generates code for all elements, even unreferenced ones" > If I used the axis WSDL2Java with --server-side argument I do not get > the AccessCredentialsType. > That 's why I used in both of them the arguments --username and -- > password. > > As I mentioned above I cannot find where(in which Java file) the > AccessCredentialsType() can be accessed. > > If anyone wants to try this is the wsdl file: > http://api.map-and-go.com/3.2.5/mms_MizGIS.wsdl > > > I developed a simple Java Client using tha Axis API, using the basic > stub objects of the Axis generated Java classes. > It returns only null values. > I tried also to run the previous Java Client implemented by jax-rpc > API(javax.xml.*).Exceptions are returned. > > I really appreciate any help.I lost more than 5 days and I cannot find > what is the problem. > > If anyone wanst the Java Client code I implemented using the AXIS API, > I can send it.
