I hope someone can help me. I have been asked to create a client to call a web service, but the developers of the web service are less than helpful and have provided scant information.
I have created the service client in NetBeans and I have added a handler (from examples I have seen) in order to set username and password for Basic Authentication. However, when I run the project I am told that authentication failed, so either I am sending the wrong information or I need to do some more. What I really don't understand is this: the developers of the web service say that the header should look like the following, so could anyone tell me how I achieve that, or is it all done for me?
POST https:// …
Accept-Encoding: gzip,deflate
Content-Type: text/xml;charset=UTF-8
SOAPAction: ””
Authorization: Basic MjAwKKAwNjAwMTpQcjBlZSRza!:uYWw=
Content-Length: 848
Host: …
Connection: Keep-Alive
User-Agent: Apache-HttpClient/4.1.1
thanks in advance,