尝试将SOAP客户端部署到JBOSS EAP 7.0.8时,我遇到了问题
在尝试解析WSDL中引用的XSD的架构位置时,似乎会出现此问题。
错误堆栈显示它尝试解析的地址存在字符解码问题。而不是URL的开头显示http://':'用'%3A'编码并且第一个斜线逃脱了第二个(我认为)
我没有使用部署部署任何特定的Web服务库,而是使用EAP作为包含和提供的Web服务实现。
10:04:30,890 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-4) MSC000001: Failed to start service jboss.deployment.unit."ProvideDocs-0.0.1-SNAPSHOT.war".INSTALL: org.jboss.msc.service.StartException in service jboss.deployment.unit."ProvideDocs-0.0.1-SNAPSHOT.war".INSTALL: WFLYSRV0153: Failed to process phase INSTALL of deployment "ProvideDocs-0.0.1-SNAPSHOT.war"
at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:172)
at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:2032)
at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1955)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
Caused by: java.lang.RuntimeException: JBWS024076: Service {http://company.uk/integration/claimsverification/PolicyInfoAPI}PolicyInfoAPI, cannot publish wsdl to: C:\jboss-eap-7.0.0\standalone\data\wsdl\ProvideDocs-0.0.1-SNAPSHOT.war\http%3A\qa3gwap01.bolt.company.uk%3A8080\pcsor\ws\com\company\uk\integration\claimsverification\PolicyInfoAPI%3Fwsdl
at org.jboss.wsf.stack.cxf.deployment.WSDLFilePublisher.publishWsdlFiles(WSDLFilePublisher.java:115)
at org.jboss.wsf.stack.cxf.deployment.EndpointImpl.publishContractToFilesystem(EndpointImpl.java:148)
at org.jboss.wsf.stack.cxf.deployment.EndpointImpl.doPublish(EndpointImpl.java:85)
at org.apache.cxf.jaxws.EndpointImpl.publish(EndpointImpl.java:255)
at org.apache.cxf.jaxws.EndpointImpl.publish(EndpointImpl.java:543)
at org.jboss.wsf.stack.cxf.configuration.BusHolder.configure(BusHolder.java:235)
at org.jboss.wsf.stack.cxf.deployment.aspect.BusDeploymentAspect.startDeploymentBus(BusDeploymentAspect.java:97)
at org.jboss.wsf.stack.cxf.deployment.aspect.BusDeploymentAspect.start(BusDeploymentAspect.java:59)
at org.jboss.as.webservices.deployers.AspectDeploymentProcessor.deploy(AspectDeploymentProcessor.java:73)
at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:165)
... 5 more
Caused by: java.io.IOException: JBWS022092: Could not resolve http%3A/qa3gwap01.bolt.company.uk%3A8080/pcsor/ws/com/company/uk/integration/claimsverification/../../../../../gw/xsd/backoffice/soapheaders.xsd in deployment ProvideDocs-0.0.1-SNAPSHOT.war
at org.jboss.ws.common.deployment.ResourceResolverImpl.resolve(ResourceResolverImpl.java:128)
at org.jboss.ws.common.utils.AbstractWSDLFilePublisher.publishSchemaImports(AbstractWSDLFilePublisher.java:240)
at org.jboss.ws.common.utils.AbstractWSDLFilePublisher.publishSchemaImports(AbstractWSDLFilePublisher.java:265)
at org.jboss.ws.common.utils.AbstractWSDLFilePublisher.publishSchemaImports(AbstractWSDLFilePublisher.java:269)
at org.jboss.wsf.stack.cxf.deployment.WSDLFilePublisher.publishWsdlFiles(WSDLFilePublisher.java:100)
... 14 more
答案 0 :(得分:1)
我可以先考虑一些事情:
而不是显示http://':'的网址的开头。用'%3A'编码并且第一个斜线逃脱了第二个(我认为)
因此,请尝试检查您可能拥有的所有架构位置定义。
(与第一个相关的种类) 要么:
../../../../../gw/xsd/backoffice/soapheaders.xsd
或(不确定,但是......)我记得JBoss中的EAR / WAR文件不直接爆炸到文件系统,而是爆炸到自己的vfs文件系统,所以模式位置的绝对路径不能用过的。尝试将模式位置保持为相对路径,并确保它可以从定义它的WSDL / XSD中获得。
答案 1 :(得分:1)
将WARDL中的WSDL和XSD捆绑在一起,并使用xml目录文件来解析WSDL导入到本地XSD。 如果您不确定如何执行此操作,我建议您尝试使用Netbeans。他们有一个伟大的巫师,为你做这一切。
请参阅:https://netbeans.org/kb/docs/websvc/client.html#exploringthefacilities