I sort of understand that I'm using Apache Axis 1.4 for querying a web service.
I was given a WSDL file, and that generated a XXXXImplServiceLocator
class that extends org.apache.axis.client.Service
and implements a generated interface that extends javax.xml.rpc.Service
.
My "bussiness code" calls the getXXXXImplPort(URL)
method on a new XXXXImplServiceLocator
instance, and then calls:
((Stub) port).setTimeout(timeout);
((Stub) port).setUsername(username);
((Stub) port).setPassword(password);
Stub
is org.apache.axis.client.Stub
.
After setting those parameters, I simply call some getYYY()
method, that represents the query to one of the services exposed by the remote service and gives me back a "domain" object with the results.
The problem is that I have to use preemptive authentication with this service. I've tried querying via soapUI, and I won't have any result unless I set the preemptive authentication mode.
I've tried googling how to set that mode, but found nothing. All they say about is Preemptive authentication with Apache HttpClient, that can be very well "embedded" or used by Axis, but I really didn't see how to mix this.
The only code I have that interacts with this ServiceLocator
is the initial setup, and then just queries.
How can I set that preemptive authentication mode? Am I missing something? What am I not understanding so that I can't solve this issue?
Smells like a pretty trivial problem, but maybe the fact I don't understand this very well prevents me from solving the issue.
Thanks in advance, yeah :)