About Question enthuware.ocejws.v6.2.230 :

Moderators: Site Manager, fjwalraven

Post Reply
Posts: 358
Joined: Fri Nov 29, 2013 8:26 pm

About Question enthuware.ocejws.v6.2.230 :

Post by himaiMinh »

Another alternative and simpler way to implement application authentication in JAX-WS is:

Code: Select all

Map<String, Object> context = ((BindingProvider)port).getRequestContext();
context.put(BindingProvider.USERNAME_PROPERTY, "un");

Posts: 429
Joined: Tue Jul 24, 2012 2:43 am

Re: About Question enthuware.ocejws.v6.2.230 :

Post by fjwalraven »

It is indeed a correct example and simpler, but the example just makes you aware that an HTTP-header contains in principal a collection of Strings.

If you did the Web Components exam, you will remember the HttpServletRequest interface and its getHeaders method:

Code: Select all

Enumeration<String>  getHeaders(String name)
Returns all the values of the specified request header as an Enumeration of String objects.


Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest