ws-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Marek 'MMx' Ludha" <>
Subject HTTP Authentication again
Date Thu, 02 Mar 2006 19:41:44 GMT

I am trying to authenticate to HTTP server using basic authentication
with xmlrpc3.0. When I use this code:

XmlRpcClientConfigImpl config = new XmlRpcClientConfigImpl();
config.setServerURL(new URL(""));

I got an exception with this stacktrace:
Exception in thread "main" java.lang.IllegalArgumentException: Illegal
character(s) in message header value: Basic YWRtaW46YWRtaW4x

        at org.apache.xmlrpc.client.XmlRpcSunHttpTransport.setRequestHeader(
        at org.apache.xmlrpc.client.XmlRpcHttpTransport.setCredentials(
        at org.apache.xmlrpc.client.XmlRpcHttpTransport.initConnection(
        at org.apache.xmlrpc.client.XmlRpcStreamTransport.sendRequest(
        at org.apache.xmlrpc.client.XmlRpcClientWorker.execute(
        at org.apache.xmlrpc.client.XmlRpcClient.execute(
        at org.apache.xmlrpc.client.XmlRpcClient.execute(
        at org.apache.xmlrpc.client.XmlRpcClient.execute(
        at rpccall.Main.main(

This seems to me as if xmlrpc formed a header with illegal character
which then gets rejected.
I also tried to put username and password into URL, like
config.setServerURL(new URL("http://admin:admin1@"));
but this sent request with no authentication information at all.
Therefore I want to ask if I am doing something wrong or what is the
recomended way to authenticate.

Thank in advance,
Marek Ludha

View raw message