Failed to read XSD file when deploying SwitchYard application with WSDL and XSD files
Issue
- I have a sample SwitchYard project I created using the following
stockquote.wsdl. I used the same WSDL for the service and the reference, with a bean in the middle.
<?xml version="1.0"?>
<definitions name="StockQuote"
targetNamespace="http://example.com/stockquote/definitions"
xmlns:tns="http://example.com/stockquote/definitions"
xmlns="http://schemas.xmlsoap.org/wsdl/" ...>
<import namespace="http://example.com/stockquote/schemas"
location="http://example.com/stockquote/stockquote.xsd"/>
...
</definitions>
- When I try to deploy the project, I get the following error. The WSDL loads fine in SoapUI.
04:23:24,746 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-3) MSC000001: Failed to start service jboss.deployment.unit."sample.jar".SwitchYardService: org.jboss.msc.service.StartException in service jboss.deployment.unit."sample.jar".SwitchYardService: org.switchyard.component.soap.WebServicePublishException: javax.xml.ws.WebServiceException: JBWS022087: Failed to read vfs:/content/sample.jar/META-INF/wsdl/stockquote.xsd: JBWS022088: Unexpected element parsing vfs:/content/sample.jar/META-INF/wsdl/stockquote.xsd: schema
at org.switchyard.as7.extension.services.SwitchYardService.start(SwitchYardService.java:80)
at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811) [jboss-msc-1.0.4.GA-redhat-1.jar:1.0.4.GA-redhat-1]
at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746) [jboss-msc-1.0.4.GA-redhat-1.jar:1.0.4.GA-redhat-1]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [rt.jar:1.7.0_65]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [rt.jar:1.7.0_65]
at java.lang.Thread.run(Thread.java:745) [rt.jar:1.7.0_65]
Caused by: org.switchyard.component.soap.WebServicePublishException: javax.xml.ws.WebServiceException: JBWS022087: Failed to read vfs:/content/sample.jar/META-INF/wsdl/stockquote.xsd: JBWS022088: Unexpected element parsing vfs:/content/sample.jar/META-INF/wsdl/stockquote.xsd: schema
at org.switchyard.as7.extension.ws.JBossWSEndpointPublisher.publish(JBossWSEndpointPublisher.java:103)
at org.switchyard.component.soap.InboundHandler.doStart(InboundHandler.java:171)
at org.switchyard.deploy.BaseServiceHandler.start(BaseServiceHandler.java:60)
at org.switchyard.deploy.internal.Deployment.deployServiceBindings(Deployment.java:623)
at org.switchyard.deploy.internal.Deployment.start(Deployment.java:145)
at org.switchyard.as7.extension.deployment.SwitchYardDeployment.start(SwitchYardDeployment.java:101)
at org.switchyard.as7.extension.services.SwitchYardService.start(SwitchYardService.java:73)
... 5 more
Caused by: javax.xml.ws.WebServiceException: JBWS022087: Failed to read vfs:/content/sample.jar/META-INF/wsdl/stockquote.xsd: JBWS022088: Unexpected element parsing vfs:/content/sample.jar/META-INF/wsdl/stockquote.xsd: schema
at org.jboss.ws.common.deployment.SOAPAddressWSDLParser.parse(SOAPAddressWSDLParser.java:140)
at org.jboss.ws.common.deployment.SOAPAddressWSDLParser.parse(SOAPAddressWSDLParser.java:121)
at org.jboss.ws.common.deployment.SOAPAddressWSDLParser.<init>(SOAPAddressWSDLParser.java:81)
at org.jboss.wsf.stack.cxf.metadata.MetadataBuilder.getCurrentSOAPAddressWSDLParser(MetadataBuilder.java:310)
at org.jboss.wsf.stack.cxf.metadata.MetadataBuilder.processAddressRewrite(MetadataBuilder.java:282)
at org.jboss.wsf.stack.cxf.metadata.MetadataBuilder.build(MetadataBuilder.java:89)
at org.jboss.wsf.stack.cxf.deployment.aspect.DescriptorDeploymentAspect.generateMetadataFromDeployment(DescriptorDeploymentAspect.java:141)
at org.jboss.wsf.stack.cxf.deployment.aspect.DescriptorDeploymentAspect.start(DescriptorDeploymentAspect.java:75)
at org.jboss.ws.common.deployment.DeploymentAspectManagerImpl.deploy(DeploymentAspectManagerImpl.java:131)
at org.jboss.as.webservices.publish.EndpointPublisherImpl.publish(EndpointPublisherImpl.java:130)
at org.jboss.as.webservices.publish.EndpointPublisherImpl.publish(EndpointPublisherImpl.java:109)
at org.jboss.as.webservices.publish.EndpointPublisherImpl.publish(EndpointPublisherImpl.java:102)
at org.switchyard.as7.extension.ws.JBossWSEndpoint.publish(JBossWSEndpoint.java:91)
at org.switchyard.as7.extension.ws.JBossWSEndpointPublisher.publish(JBossWSEndpointPublisher.java:98)
... 11 more
Caused by: java.lang.IllegalStateException: JBWS022088: Unexpected element parsing vfs:/content/sample.jar/META-INF/wsdl/stockquote.xsd: schema
at org.jboss.ws.common.deployment.SOAPAddressWSDLParser.parse(SOAPAddressWSDLParser.java:179)
at org.jboss.ws.common.deployment.SOAPAddressWSDLParser.parse(SOAPAddressWSDLParser.java:136)
... 24 more
Environment
- Red Hat JBoss Fuse Service Works (FSW)
- 6.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.
