Tags

links:
http://numberformat.wordpress.com/2013/01/31/generating-and-using-web-service-clients-using-wsimport-and-jax-ws/
http://stackoverflow.com/questions/22407994/jax-ws-client-cannot-authenticate/22414394#22414394

summary:
– wsimport generates ws client stub code directly from a deployed service from server
– in case server has a selfsigned cert, need to export cert from browser and add to local java trust store
– java trust store is per jre/jdk
– in the case of basic authentication, need to add this code (see soapUI tab Aut)

	static {
		java.net.Authenticator.setDefault(new Authenticator(){
			
			@Override
			protected PasswordAuthentication getPasswordAuthentication() {
				return new PasswordAuthentication("user", "password".toCharArray());
			}
		});
	}
Advertisements