Date of First Response: 2010-05-20 08:47:40 Help Desk Ticket Reference: https://enterprise.redhat.com/issue-tracker/871863 project_key: SOA Deployment of the following EBWS fails if the referenced xsd file contains a <xs:import ../> element: <actions inXsd="/META-INF/request.xsd" outXsd="/META-INF/response.xsd" faultXsd="/META-INF/fault.xsd" validate="true"> <action name="action" class="org.jboss.soa.esb.samples.quickstart.publishAsWebservice.ESBWSListenerAction" process="displayMessage"/> </actions> The same action works if - the xsd files are in the root of the *.esb archive OR - the xsd files do not contain further import statements Deployment failure: Caused by: java.lang.IllegalArgumentException: Cannot resolve imported resource: vfsmemory://publish_as_webservice_WSDL/META-INF/types/custom-request-type.xsd
Attaching a modified version of the publish_as_webservice quickstart of SOA-P 5 to reproduce this issue. The *.xsd files have been moved into the META-INF folder, and the inXsd/outXsd/faultXsd have been modified accordingly, eg. inXsd="/META-INF/request.xsd".
Attachment: Added: publish_as_webservice_soa50.zip
Link: Added: This issue depends JBESB-3322
Updated in the ESB codebase, will be in the next merge.
Verified in SOA-P 5.0.2 CR1, production profile. Deployment of the ESB service is successful, all imported XSD files (including nested imports) can be resolved without any problems.
Added to the SOA 5.0.2 release notes as resolved: JBESB-3322 ESB archives would fail to deploy if they referenced xsd files that contained <xs:import ../> element:s. When the deployment was attempted an exception IllegalArgumentException.would be thrown. This has been fixed and all all imported XSD files (including nested imports) can be resolved without any problems.
The import will only fail if the original schema was not in the top level of the deployment, for example included in the META-INF directory, as the referenced imports/includes would be made from the top level rather than where the schema was located.
udpated release note content: ESB archives could fail to deploy if they contained XSD files that were not in the root directory of the archive. If the XSD file was in a sub-directory of the archive and contained <xs:import ../> statements, deployment would fail and thrown an exception (IllegalArgumentException). This was because the paths for import elements where resolved from the root of the archive and not from the location of the XSD file. This has been fixed and the paths for imported XSD files (including nested imports) are resolved correctly.