users@jax-rpc.java.net

Re: Authentication

From: Brian McKeough <bnjmckeough_at_netscape.net>
Date: Tue, 26 Feb 2002 10:45:26 -0600

This didn't compile:

>
> You can set the properties on your stub as:
>
> stub._setProperty(Stub.USERNAME_PROPERTY, "your-user-name");
> stub._setProperty(Stub.PASSWORD_PROPERTY, "your-password");
>

Here are the compile error messages:

com/mot/corp/fx/chart/client/XMLMessageDispatcher.java [28] cannot
resolve symbol
symbol : variable USERNAME_PROPERTY
location: interface javax.xml.rpc.Stub
             stub._setProperty(Stub.USERNAME_PROPERTY, "test_username");
                                   ^
com/mot/corp/fx/chart/client/XMLMessageDispatcher.java [29] cannot
resolve symbol
symbol : variable PASSWORD_PROPERTY
location: interface javax.xml.rpc.Stub
             stub._setProperty(Stub.PASSWORD_PROPERTY, "test_password");
                                   ^
2 errors
build_chart_xml_rpc.xml [111] Compile failed, messages should have been
provided.

It isn't a classpath issue. In the same file
(XMLMessageDispatcher.java) where I use Stub.USERNAME_PROPERTY and
Stub.PASSWORD_PROPERTY I have a class which implements the Stub
interface and it compiles.

I'm using java_xml_pack-winter-01-dev release of jax-rpc, could that be
the issue? The release notes say it "includes" support for basic
authentication, but perhaps it doesn't, or doesn't support these properties.

If I use the following

stub._setProperty("javax.xml.rpc.security.auth.username", "test_username");
stub._setProperty("javax.xml.rpc.security.auth.password", "test_password");

XMLMessageDispatcher.java compiles, but running the client I get the
following exception:

java.lang.IllegalArgumentException: Call object does not recognize
property: javax.xml.rpc.security.auth.username
         at com.sun.xml.rpc.client.StubBase._setProperty(StubBase.java:42)
         at
com.mot.corp.fx.chart.client.XMLMessageDispatcher.main(XMLMessageDispatcher.java:28)

There is no Tomcat log file to send because there is never a request to
the server. The exception is thrown before the request can be made.

Thanks