Saminda, thanks a lot for your help. However, you are not exactly referring to what I mean. Proxy support is well documented, I had come accross your example before. But how can the credentials for the destination server - not the proxy - be supplied? I need the request to contain an authorisation header like
Authorization: Basic SOME_HEX_CODE Thank you again. Lothar > --- Ursprüngliche Nachricht --- > Von: Saminda Abeyruwan <[EMAIL PROTECTED]> > An: axis-user@ws.apache.org > Betreff: Re: [Axis2] Http Basic Authentication > Datum: Mon, 08 May 2006 17:06:00 +0600 > > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > Lothar Nieswandt wrote: > > Hello all, > > > > I am trying to write a *simple* web service client with axis2. The > server > > side requires http basic authentication. I can't find out how this is > done > > *easily* with axis2. Somebody on the list advised to do > > > > call.setProperty(Call.USERNAME_PROPERTY, "user"); > > call.setProperty(Call.PASSWORD_PROPERTY, "pass"); > > > > but this seems to be deprecated. What is the proper way of doing this? > > > > I took a look at the security example and read something about password > > callbacks but that seemed too complicated. > > > > Any hints? > > > > Thanks in advance, > > Lothar > > > > Hi Lothar, > > Axis2 does transport level basic authentication as follows. > ///// code snipet > > OMElement payload = TestingUtils.createDummyOMElement(); > /** > * Proxy setting in runtime > */ > HttpTransportProperties.ProxyProperties proxyproperties = new > HttpTransportProperties().new ProxyProperties(); > proxyproperties.setProxyName("localhost"); > proxyproperties.setProxyPort(5555); > proxyproperties.setDomain("domain"); > proxyproperties.setPassWord("password"); > proxyproperties.setUserName("userName"); > > Options options = new Options(); > options.setProperty(HTTPConstants.PROXY, proxyproperties); > options.setTo(targetEPR); > options.setTransportInProtocol(Constants.TRANSPORT_HTTP); > ConfigurationContext configContext = > > ConfigurationContextFactory.createConfigurationContextFromFileSystem( > null, null); > ServiceClient sender = new ServiceClient(configContext, null); > sender.setOptions(options); > > OMElement result = sender.sendReceive(payload); > > TestingUtils.campareWithCreatedOMElement(result); > > For more information please see the test case, > http://svn.apache.org/viewcvs.cgi/webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/engine/EchoRawRuntimeProxyTest.java?view=markup > > documentation, > http://ws.apache.org/axis2/1_0/http-transport.html > > Thank you > > Saminda > > > -----BEGIN PGP SIGNATURE----- > Version: GnuPG v1.4.1 (GNU/Linux) > Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org > > iD8DBQFEXyYYYmklbLuW6wYRAiZPAJ9ufhjx/tv7GH4SkWjpS8cYm7UVBQCfVLTQ > b93pEsP8BryC1/sE5ZZZHVE= > =UNFg > -----END PGP SIGNATURE----- > -- Echte DSL-Flatrate dauerhaft für 0,- Euro*! "Feel free" mit GMX DSL! http://www.gmx.net/de/go/dsl