Thank you. Unfortunately, I do this already as you can see here:
assetApiService = new AssetAPIService( );
assetService = assetApiService.getAssetAPIServiceHttpPort();
((BindingProvider)assetService).getRequestContext().put(BindingProvider.USERNAME_PROPERTY, "******");
((BindingProvider)assetService).getRequestContext().put(BindingProvider.PASSWORD_PROPERTY, "******");
The problem arises because assetApiService = new AssetAPIService( ); fails. It fails because the entire service url is protected. I need to provide the username/password at the time the WSDL is dynamically sought as the ws stub is instantiated.
So I somehow need to get the credentials into a the context somewhere around here:
public AssetAPIService(URL wsdlLocation, QName serviceName) {
super(wsdlLocation, serviceName);
}
where 'wsdlLocation' is password protected. Thanks!