
It relies on basic HTTP authentication, so there is a number of ways to do this. One way is to manipulate the _setProperty method of the javax.xml.rpc.Stub interface.
MyServiceLocator locator = new MyServiceLocator();
MyService service = locator.getMyService();
Stub stub = (Stub) service;
stub._setProperty( Stub.USERNAME_PROPERTY , "user" );
stub._setProperty( Stub.PASSWORD_PROPERTY , "password" );