Hi,
We are deploying EJB and WAR based JAX-WS services to the JavaEE Engine.
The WSDLs of the services refer to Schemas using absolute URLs that can
only be resolved on our company network. However, I was under the
impression that since JAX-WS inherently supports XML catalogs so would
the JavaEE Engine when loading a service's WSDL. Having tested it on a
machine that is not on our company network, I have found out that this
is not the case :-(
While the HTTP BC already has support for XML catalogs using the Apache
Resolver library, the JavaEE Engine has not. However, having gone
through the corresponding source code in the HTTP BC and the JavaEE
Engine, I have seen that the HTTP BC has implemented ist own WSDLFactory
and WSDLReader in order to support XML catalog.
In my opinion this should be accomplished using the standard JWSDL API
employing the javax.wsdl.xml.WSDLReader.readWSDL() methods passing in a
WSDLLocator instance that supports XML Catalog. The Apache CXF project
also does this by providing a CatalogWSDLLocator class which employs
Apache Resolver under the hood to do the trick.
Since both the HTTP BC as well as the JavaEE Engine (and probably other
BCs and Ses as well) need to support XML Catalogs, I suggest to move the
required code to the JBI shared library SUN-WSDL-LIBRARY which would
need to include the Apache Resolver lib as well as the
CatalogWSDLLocator class. The JavaEE Engine's
com.sun.enterprise.jbi.serviceengine.core.ServiceEngineEndpoint class
could then simply read the WSDL using a standard WSDLReader providing a
CatalogWSDLLocator considering the EJB's META-INF/jax-ws-catalog.xml or
the WAR's WEB-INF/jax-ws-catalog.xml file (which currently is not
generated by the NetBeans tooling though) to do the trick.
Does this make any sense?
BTW I have already created issue #5472 for this problem.
Regards,
Kai