I just edited our system test to just send the username and it seems to encode it on the wire. Actually, it's encoding it on the wire twice. There are two Authorization headers. :-(
I'm going to go ahead and fix that. I have no idea why your stuff isn't appearing on the wire at all. That's very strange. :-( Dan On Thursday 26 July 2007 04:31, Daniel Kulp wrote: > Are you just setting a username and no password? > > I'm wondering if that's the issue. I'm not sure if we deal with > that. Just for kicks, could you add a password in and see if the > tcpmon dump has the auth stuff? If so, then I at least know where to > start looking. > > Dan > > On Thursday 26 July 2007 04:14, Axel Becker wrote: > > Hi Dan, > > > > this doenst work too :-( > > > > following the trace from tcpmon: > > > > POST /GDHSService/services/INFOService HTTP/1.1 > > Content-Type: text/xml; charset=UTF-8 > > SOAPAction: "" > > Cache-Control: no-cache > > Pragma: no-cache > > User-Agent: Java/1.5.0_11 > > Host: localhost:9090 > > Accept: text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2 > > Connection: keep-alive > > Transfer-Encoding: chunked > > > > 18c > > <soap:Envelope > > mlns:soap="http://schemas.xmlsoap.org/soap/envelope/"> <soap:Body> > > <ns2:getCompanies > > xmlns="http://xml.apache.org/xml-soap" > > xmlns:ns2="http://webservices.impl.service.prj.beckercoding.de" > > xmlns:ns3="http://bean.transfer.services.beckercoding.de" > > > > xmlns:ns4="http://127.0.0.1:9090/GDHSService/services/INFOService"> > > <ns2:gmId>1</ns2:gmId> > > </ns2:getCompanies> > > </soap:Body> > > </soap:Envelope> > > 0 > > > > > > Thanks for your help > > Axel > > > > dkulp wrote: > > > Alex, > > > > > > Could you try the JAX-WS standard way of setting the > > > username/password? > > > > > > INFOServiceService ss = new INFOServiceService(SERVICE_URL, > > > SERVICE_NAME); > > > INFOService port = ss.getINFOService(); > > > BindingProvider bp = (BindingProvider)port; > > > bp.getRequestContext().put(BindingProvider.USERNAME_PROPERTY, > > > "BJ"); > > > bp.getRequestContext().put(BindingProvider.PASSWORD_PROPERTY, > > > "pswd"); > > > > > > > > > Dan > > > > > > On Wednesday 25 July 2007 17:27, Axel Becker wrote: > > >> Hi, > > >> > > >> i generated the client code with the wsdl2java from an existing > > >> wsdl. > > >> > > >> now i want to connect to this service (it is an axis 1 > > >> webservice). the service ist protected with a http basic > > >> authentication. i use the following code, but it doesnt work :-( > > >> > > >> INFOServiceService ss = new INFOServiceService(SERVICE_URL, > > >> SERVICE_NAME); > > >> > > >> Client client = ClientProxy.getClient(ss.getINFOService()); > > >> HTTPConduit httpConduit = (HTTPConduit) client.getConduit(); > > >> > > >> httpConduit.getAuthorization().setUserName("username1"); > > >> httpConduit.getProxyAuthorization().setUserName("username1"); > > >> > > >> INFOService service = ss.getINFOService(); > > >> //do somthing with service > > >> > > >> Where is the mistake? > > >> > > >> Thanks for your help! > > >> Axel > > >> > > >> > > >> PS: the serverside (axis1) code to get the auth parameter is: > > >> String username = > > >> MessageContext.getCurrentContext().getUsername(); > > > > > > -- > > > J. Daniel Kulp > > > Principal Engineer > > > IONA > > > P: 781-902-8727 C: 508-380-7194 > > > [EMAIL PROTECTED] > > > http://www.dankulp.com/blog -- J. Daniel Kulp Principal Engineer IONA P: 781-902-8727 C: 508-380-7194 [EMAIL PROTECTED] http://www.dankulp.com/blog
