0 Replies Latest reply on Oct 30, 2012 3:52 AM by Tung Tran

    Authentication for client run on jdk 1.4

    Tung Tran
      Hello everyone,

      I'm developing web services using jax-ws. I want the client must provide the credentials when consumes the web service through SOAP request header.:

      Map<String, Object> req_ctx = ((BindingProvider)port).getRequestContext();
      req_ctx.put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, WS_URL);

      Map<String, List<String>> headers = new HashMap<String, List<String>>();
      headers.put("Username", Collections.singletonList("mkyong"));
      headers.put("Password", Collections.singletonList("password"));
      req_ctx.put(MessageContext.HTTP_REQUEST_HEADERS, headers);

      But jdk 1.4 doesn't support generic and the webservice library of jax-ws. Could you guys give me some advice for this? Or suggest me other way to make the web service secured and accessible for earlier jdk such as 1.4, 1.3