Java – does anyone locally parse Jax WS catalog. XML of schemalocation on metro xml?
I'm in my A jax-ws-catalog.xml file has been added to the war file XML to parse schemalocation. XML locally rather than remotely I follow this example
Metro User Guide: 2.10. Developing client application with locally packaged WSDL
When I deploy War and use soapUI to validate the web service, it will try to access schemalocation http: / / somehost: 8080 / CMDB / schemas / common / 1.0 / cmdbcommontypes xsd
The schema and WSDL are validated in eclipse (using eclipse's XML catalog tool) If it helps, I can publish my Jax - WS - catalog. XML and related XSD and WSDL content
Google search found many other problems, Jax WS catalog XML cannot run in Metro stack
Does anyone use Jax WS catalog in metro xml?
Solution
Where do you put Jax WS catalog XML and WSDL files?
You mentioned that you are using war, but in war, Jax WS catalog The location of the XML depends on whether you are trying to access it as a WS client or as a WS endpoint publisher (server)
If you access an external web service from the war, your Jax WS catalog XML needs to enter app War / WEB-INF / classes / meta-inf directory, or, if you have deployed the first web service in the application and have the @ WSDL location annotation, Jax WS is in app Find jax-ws-catalog.jar / meta-inf xml
So for the client WSDL location app war / WEB-INF / classes / Meta-INF / jax-ws-catalog. XML annotates the first WS endpoint app of the contract with @ wsdllocation war / Meta-INF
If you want to perform these two operations at the same time, that is, publishing (contract first) and using web services, you need to place jax-ws-catalog.xml in two places XML WSDL, i.e. app Jar / WEB-INF / classes / meta - inf and app jar / Meta-INF
I have successfully used the above method in many of my projects. These projects publish and use web services at the same time, and I can ensure that it works as expected