2

I'm writing a webservice client running on Linux JBoss 5.0.1 / JBossWS Native 3.1.1 which is calling a service running on a Windows Tomcat 6.0.29 / Metro Stack.

The WSDLs and the referenced XSD files are accessible via browser and also the JUnit tests I wrote work just fine. But when the client is running inside JBoss, I get the following stacktrace:

Caused by: org.jboss.ws.metadata.wsdl.WSDLException: javax.wsdl.WSDLException: WSDLException (at /definitions/types/xsd:schema): faultCode=PARSER_ERROR: Problem parsing 'http://server:8280/ValueListService/?xsd=1'.: org.xml.sax.SAXParseException: Premature end of file.
at org.jboss.ws.tools.wsdl.WSDLDefinitionsFactory.parse(WSDLDefinitionsFactory.java:152)
at org.jboss.ws.metadata.umdm.ServiceMetaData.getWsdlDefinitions(ServiceMetaData.java:293)
at org.jboss.ws.metadata.builder.jaxws.JAXWSClientMetaDataBuilder.buildMetaData(JAXWSClientMetaDataBuilder.java:84)
at org.jboss.ws.core.jaxws.spi.ServiceDelegateImpl.<init>(ServiceDelegateImpl.java:138)
at org.jboss.ws.core.jaxws.spi.ProviderImpl.createServiceDelegate(ProviderImpl.java:63)
at javax.xml.ws.Service.<init>(Service.java:79)
at javax.xml.ws.Service.create(Service.java:96)
at ...

By debugging the JBossWS WSDL implementation I found, that the InputStream which is created from the referenced XSD is null. This normally points me to the assumption, that there is some kind of networking issue (or firewall) between the client and the server. This is all very confusing, as I have the Unit tests running on the same machine, so it can't be because of that.

4

1 回答 1

0

我花了很长时间才理解 WS 实现的内部工作原理,但现在我得到了解决方案。

问题在于 JBoss 本机,它无法处理 Metro 生成的 URL。我现在的解决方法是从我的本地资源加载 WSDL 和 XSD,并手动将端点地址更改为真实服务器地址。

@artbristol,感谢您的帮助。

于 2011-05-13T10:52:26.560 回答