我们在JBoss EAP 6.4.0(JBoss AS 7.5.0)的WAR中部署了一个JAX-WS webservice,它提供了预定义的WSDL和XSD:如何防止JBoss将JAX-WS XSD导入URL重写为HTTP
@WebService(endpointInterface = "package.MyPortType",
targetNamespace = "http://target.name.space",
wsdlLocation = "/WEB-INF/classes/myService.wsdl",
serviceName = "myService",
portName = "myServicePort")
public class MyService implements MyPortType {
...
}
JBoss的正确部署Web服务并发布给定的WSDL为 http://localhost:8080/myApp/myService 和 http://localhost:8080/myApp/myService?wsdl
我们遇到在于WSDL中的XSD进口的问题。在最初的WSDL,它看起来像:
<definitions xmlns="http://schemas.xmlsoap.org/wsdl/" ...>
<types>
<xsd:schema targetNamespace="http://target.name.space">
<xsd:import namespace="http://target.name.space"
schemaLocation="mySchema.xsd" />
但JBoss的重写这
<definitions xmlns="http://schemas.xmlsoap.org/wsdl/" ...>
<types>
<xsd:schema targetNamespace="http://target.name.space">
<xsd:import namespace="http://target.name.space"
schemaLocation="https://localhost:8443/myApp/myService?xsd=mySchema.xsd" />
这不起作用,因为我们既没有HTTPS的连接器也HTTPS入standalone.xml
插座绑定定义。所以JBoss运行时没有任何HTTPs连接。 我们没有任何关于Web服务部署的其他配置文件。
为什么进口改写成这样一种错误的方式,我们如何防止这种情况发生?