I have deployed a web service using the @webservice annotation on Websphere 9. To access the web service clients must use a username and password since its hidden behind forms login. This is set up thru the web.xml file. Websphere uses an external LDAP to store the users and passwords. This works when accessing servlets and jsp.
I haven't been able to call my web service thru SoapUI or directly from java client code since all I get back is the login page (which I guess is due to a redirect).
In SoapUI I have selected basic authentication and in java code I have tried both with this (https://stackoverflow.com/a/496707/1329339) and http://user:password@url without success.
This code should be called from a third party once its deployed to production.
EDIT: How do I call the webservice I have created and deployed on websphere 1) from java code and 2) from SoapUI?
EDIT2:
Code:
import javax.jws.WebMethod;
import javax.jws.WebService;
@WebService
public class MyWebService {
@WebMethod
public String sayHello(String name) {
return "Hello , " + name;
}
}