users@jax-rpc.java.net

Re: Authentication

From: Arun Gupta <arun.gupta_at_Sun.COM>
Date: Tue, 26 Feb 2002 15:10:03 -0800

Hi Brian,

java_xml_pack-winter-01-dev is compatible with JAX-RPC 0.5 version of
the spec. With this release, you need to use the properties as mentioned
in Table 8-1 on page 69 of 0.5 version of the spec.

The corresponding properties are: "http.auth.username" and
"http.auth.password".

Hope that helps.

Thanks for your interest in JAX-RPC.

Regards,
-Arun

Brian McKeough wrote:
>
> 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

--
=============================================
There is only one me, I must live myself!
There is only one today, I must live itself!
=============================================
http://members.tripod.com/~apgupta/index.html
=============================================