Skip to main content

Developing Webservices using Glassfish AS 9.1 and JDK 6

Posted by bhaktimehta on January 2, 2007 at 11:08 AM PST

This blog will show how to develop, run and deploy JAX-WS  based webservices with Glassfish v2 Milestone 3 build JDK 6.

It will demonstrate step by step instructions using the
hello-jaxws sample from the following https://glassfish-samples.dev.java.net

What is different when trying with JDK 6?

JAXB/JAX-WS 2.0 versions of the apis.
In the latest Glassfish v2 we are integrating the implementation classes compliant with JAXB/JAX-WS 2.1 versions of the apis which are present in  javaee.jar .

So when we run with Glassfish and JDK 6.0 (without
putting anything in the <AS HOME>/lib/endorsed directory),
the APIs/Annotation classes for JAX-WS 2.0 and JAXB 2.0 will be picked
up instead of JAX-WS 2.1 and JAXB 2.1.

To avoid this we need to use the endorsed standards to override the
2.0 apis by putting javaee.jar in $AS_HOME/lib/endorsed.

This is a temporary workaround for now
and this issue will be fixed soon.

Related Topics >>

Comments

Developing Webservices using

This seems related to what you're saying. I've put Xalan in the endorsed libs of both Glassfish and the JDK but still get this exception. Ideas?
Caused by: org.apache.xml.serializer.utils.WrappedRuntimeException: org.apache.xml.serializer.ToXMLSAXHandler cannot be cast to org.apache.xml.serializer.SerializationHandler
at org.apache.xml.serializer.SerializerFactory.getSerializer(SerializerFactory.java:179)
at org.apache.xalan.transformer.TransformerIdentityImpl.createResultContentHandler(TransformerIdentityImpl.java:260)
at org.apache.xalan.transformer.TransformerIdentityImpl.transform(TransformerIdentityImpl.java:330)
at org.apache.cxf.interceptor.LoggingInInterceptor.writePayload(LoggingInInterceptor.java:124)
at org.apache.cxf.interceptor.LoggingInInterceptor.logging(LoggingInInterceptor.java:197)