Skip to main content
FAQLinks: Table of Contents | Single HTML | Single PDF

FAQ

1. Does Jakarta XML Web Services 2.0 support JAX-RPC 1.X?

No. Although, Jakarta XML Web Services's roots come from JAX-RPC, Jakarta XML Web Services is a completely different component than JAX-RPC.

2. What is the difference between JAX-RPC and Jakarta XML Web Services ?

One of the main difference between JAX-RPC and Jakarta XML Web Services is the programming model. A Jakarta XML Web Services based service uses annotations (such @WebService) to declare webservice endpoints. Use of these annotations obviates the need for deployment descriptors. With Jakarta XML Web Services, you can have a webservice deployed on a Java EE compliant application server without a single deployment descriptor. Apart from these, other additional features (such asynchronous callbacks etc) are also present.

3.  Can a Jakarta XML Web Services and a JAX-RPC based service co-exist?

Yes.

4.  Is it downloadable from maven repository ?

Yes from https://maven.java.net/content/repositories/releases/com/sun/xml/ws.

5. How do I find out which version of the Eclipse Implementation of XML Web Services I'm using?

Run the following command

$ wsgen or wsimport -version

Alternatively, each Jakarta XML Web Services jar has version information in its META-INF/MANIFEST.MF.

6. How can I change the Web Service address dynamically for a request ?

((BindingProvider)proxy).getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, "..."); 
            

7. How do I do basic authentication in Jakarta XML Web Services ?

You can do the following:

HelloService service = new HelloService();
Hello proxy = (service.getHelloPort());
((BindingProvider)proxy).getRequestContext().put(BindingProvider.USERNAME_PROPERTY, "userfoo");
((BindingProvider)proxy).getRequestContext().put(BindingProvider.PASSWORD_PROPERTY, "passbar"); 
            

USERNAME_PROPERTY, PASSWORD_PROPERTY are used primarily for service requests. I think when you instantiate Service, it fetches WSDL and the server is returning 401. You could try any one of the following solutions.

  • Use java.net.Authenticator class in your client application.
  • Provide a local access to the WSDL using catalog. There is a catalog sample in the jax-ws distribution.
  • Configure web.xml to allow GET requests without authentication

8. Which standards are supported by Eclipse Implementation of XML Web Services?

  • Web Services Addressing 1.0 - Core

  • Web Services Addressing 1.0 - SOAP Binding

  • Web Services Addressing 1.0 - Metadata

  • Web Services Addressing 1.0 - WSDL Binding (RI specific support)

  • WS-Addressing  - Member Submission

  • SOAP 1.1 and 1.2

  • REST and XML/HTTP

  • WS-I Basic Profile 1.2 and 2.0

  • WS-I Simple SOAP Binding Profile 1.0

  • WS-I Attachment Profile 1.0

  • MTOM

Back to the top