users@wadl.java.net

Re: Basic Authentication??

From: Jorge L Williams <Jorge.Williams_at_inl.gov>
Date: Thu, 31 Jul 2008 12:58:26 -0600

That did the trick. Thank you very much.

-jOrGe W.




Marc Hadley <Marc.Hadley_at_Sun.COM>
Sent by: Marc.Hadley_at_Sun.COM
07/31/2008 12:29 PM
Please respond to
users_at_wadl.dev.java.net


To
users_at_wadl.dev.java.net
cc

Subject
Re: Basic Authentication??






Try adding the following somewhere in your code before you use the
generated Java classes:

final String username ="...";
final String password ="...";
Authenticator.setDefault(new Authenticator() {
   protected PasswordAuthentication getPasswordAuthentication() {
     return new PasswordAuthentication (username,
password.toCharArray());
   }
});

HTH,
Marc.

On Jul 31, 2008, at 2:10 PM, Jorge L Williams wrote:

>
> I'm trying to setup a WADL for a site that uses Basic
> Authentication. With authentication turned off things work great,
> but with it on I get a weird exception...
>
> javax.xml.bind.UnmarshalException:
>
> with linked exception:
>
> org.xml.sax.SAXParseException: White spaces are required between
> publicId and systemId
>
> Has anyone else tried to use Basic Authentication? Are there any
> work arounds???
>
> Thanks
>
> jOrGe W.

---
Marc Hadley <marc.hadley at sun.com>
CTO Office, Sun Microsystems.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe_at_wadl.dev.java.net
For additional commands, e-mail: users-help_at_wadl.dev.java.net