xsd:import not working in WSDLs if EJB web service is deployed in EAR
Issue
- An EAR contains an EJB-JAR and a JAR. The JAR contains WSDL in
META-INFbut it is referenced fromwsdlLocationin EJB-JAR to avoid JBoss generating its own WSDL without external schema. -
On deployment the error we get is:
Caused by: java.io.IOException: JBAS015526: Child 'META-INF/wsdl/My_schema1.xsd' not found for VirtualFile: "/content/myEAR.ear/my-ejb.jar" at org.jboss.as.webservices.util.VirtualFileAdaptor.findChild(VirtualFileAdaptor.java:61) at org.jboss.as.webservices.util.VirtualFileAdaptor.findChild(VirtualFileAdaptor.java:71) at org.jboss.ws.common.deployment.ResourceResolverImpl.resolve(ResourceResolverImpl.java:76) at org.jboss.ws.common.utils.AbstractWSDLFilePublisher.publishSchemaImports(AbstractWSDLFilePublisher.java:228) at org.jboss.ws.common.utils.AbstractWSDLFilePublisher.publishSchemaImports(AbstractWSDLFilePublisher.java:253) at org.jboss.ws.common.utils.AbstractWSDLFilePublisher.publishSchemaImports(AbstractWSDLFilePublisher.java:257) at org.jboss.wsf.stack.cxf.deployment.WSDLFilePublisher.publishWsdlFiles(WSDLFilePublisher.java:92) ... 14 more -
Removing the
wsdlLocationfrom the EJB-JAR fixes this error, but the use case is that JBoss should be able to load the schema from the classpath since the WSDL was loaded from the classpath.
Environment
- Red Hat JBoss Enterprise Application Platform (EAP)
- 6.0.x
- 6.1.x
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.
Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.
