Basic 認証の Web Service 呼び出し
By msysh on 2011-04-28
// @WebServiceClient FooService service = new FooService(); // @WebService Foo port = service.getFooPort(); // javax.xml.ws.BindingProvider Map<String, Object> requestContext = ((BindingProvider)port).getRequestContext(); requestContext.put(BindingProvider.USERNAME_PROPERTY, "USER_NAME"); requestContext.put(BindingProvider.PASSWORD_PROPERTY, "PASSWORD");