You may see the Exception "Could not load resource" and then the name of your XSD with the reason that "network downloads disabled" when trying to deploy an apparently valid BPEL JAR inside a composite service assembly for JBI.
If you are using NetBeans 6, this is easy to solve; it is also quickly solvable manually.
In NetBeans, right click on the project and choose "Populate Catalog", which creates a file at the root of your project called catalog.xml. This can also be created by hand if you're using Eclipse. The purpose of an XML catalog, which is an OASIS-OPEN standard, is to resolve remote files to local copies in order to reduce chatty network traffic and to keep your XML documents appropriately organized despite your location.
So your catalog will resolve the remote or absolute names in your XML documents to the local copies within your CASA Service Endpoint (SE), like this:
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<catalog xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog" prefer="system">
<system systemId="http://localhost:7070/CustomerManagementService/CustomerManagement?wsdl" uri="src/localhost_7070/CustomerManagementService/CustomerManagement.wsdl"/>
<!-- etc.. -->
</catalog>
Replace the "src" prefix in the URI with the location of your local copy relative to the JARred composite app you're deploying.
Modify your build file to copy the catalog.xml file into your deployable JAR's META-INF folder.
This should not only make your app actually deploy, but using the catalog.xml file should help separate the physical location from the abstract location and make things like validation faster.
You can read more about XML Catalogs here: https://jax-ws.dev.java.net/nonav/2.1.2m1/docs/catalog-support.html
Note too that if you're using XMLBeans, you can flip the flag on the xmlbean Ant task download=true. If you're using XJC like I am then you don't have such a flag available.
Comments