You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 6 Next »

Troubleshooting Web Services issues

WSDL generation problems during deployment

When deploying JAX-WS Web Services without associated WSDL, the application server will automatically generate the WSDL for the service. With Axis2 as the JAX-WS provider, the application server uses Sun's wsgen tool to generate the WSDL. Sometimes wsgen can fail to generate the WSDL (for example, because of invalid annotations). In most of such cases, the output of the wsgen tool will be logged to the geronimo.log file. However, in some cases the output might not get logged and it might be necessary to enable extra logging to see the full output of the wsgen tool. To enable full logging of the wsgen tool add the following line to server-log4j.properties file:

log4j.logger.org.apache.geronimo.jaxws.builder=DEBUG 

The output of wsgen will appear in the geronimo.log file.

AccessControlException when deploying Web Services using CXF

When deploying JAX-WS Web Services using CXF you might see the following exception:

Caused by: java.security.AccessControlException: access denied (javax.xml.ws.WebServicePermission publishEndpoint)
    at java.security.AccessControlContext.checkPermission(AccessControlContext.java:264)
    at java.security.AccessController.checkPermission(AccessController.java:427)
    at org.apache.cxf.jaxws.EndpointImpl.checkPublishPermission(EndpointImpl.java:389)
    at org.apache.cxf.jaxws.EndpointImpl.doPublish(EndpointImpl.java:248)
    at org.apache.cxf.jaxws.EndpointImpl.publish(EndpointImpl.java:201)
    at org.apache.cxf.jaxws.EndpointImpl.publish(EndpointImpl.java:394)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:585)
    ...

As per JSR-109 specification application servers are supposed to block publishing new Web Service endpoints via the Endpoint API. However, this can be disabled by setting the org.apache.cxf.jaxws.checkPublishEndpointPermission system property to false. For example, start the server after setting the following property:

export JAVA_OPTS=-Dorg.apache.cxf.jaxws.checkPublishEndpointPermission=false
  • No labels