I am trying to invoke a WS that requires HTTP authentication. Is this the correct way to do it? When I invoke the WS I don't get any error on my client side, but for some reason, my call is not reaching the destination.
HTTP BASIC-AUTH is most commonly used with https (Secured Sockets Layer/Transport Layer Security; SSL/TLS). With http anybody with access to a router could sniff out the username/password being transmitted in plain text. Could a protocol mismatch be the problem?
Originally posted by Dario Rehman: but for some reason, my call is not reaching the destination.
Is there a firewall/proxy between you and your destination - you may require a separate username/password for those (though that would usually generate an HTTP error)?
There is a proxy between my application and the destination but I don't think that is the problem since I can use the web service with the WS Test application SOAPUI.
Originally posted by Peer Reynders: HTTP BASIC-AUTH is most commonly used with https (Secured Sockets Layer/Transport Layer Security; SSL/TLS). With http anybody with access to a router could sniff out the username/password being transmitted in plain text. Could a protocol mismatch be the problem?
Is there a firewall/proxy between you and your destination - you may require a separate username/password for those (though that would usually generate an HTTP error)?
Originally posted by Dario Rehman: I can use the web service with the WS Test application SOAPUI.
If that is the case AND you are NOT using https then capture the HTTP/SOAP request from SOAPUI and then from your Java client with TCPMon (Tutorial). The differences between the two HTTP/SOAP requests may provide you with a clue of what is going wrong.
This will not work in general, because neither BASIC AUTH nor WS-Security Authentication work this way. Only a WS that is especially developed to take its parameters from the URL might allow this, and from the code posted above it seems clear that that is not the case here.
If that is the case AND you are NOT using https then capture the HTTP/SOAP request from SOAPUI and then from your Java client with TCPMon (Tutorial). The differences between the two HTTP/SOAP requests may provide you with a clue of what is going wrong.
I couldn't get tcpmon to work so I am using WireShark instead. I noticed that my client is using HTTP 1.0 while SOAPUI uses HTTP 1.1. Could this be the reason why it is failing? How can I change the HTTP to 1.1 in Axis? (I am using JBoss and Eclipse 3.2)