我有两个wsdls: ServiceA.wsdl(with targetNamespace='targetA'), and ServiceB.wsdl(with targetNamespace='targetB')
。它们都位于相同的位置,但它们各自属于不同的目标命名空间。
我想分离通过jaxb
.
我使用 jaxb 绑定文件:
<?xml version="1.0" encoding="UTF-8"?>
<jaxws:bindings xmlns:jaxws="http://java.sun.com/xml/ns/jaxws">
<jaxws:bindings node="wsdl:definitions[@targetNamespace='targetA']" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" wsdlLocation="../my_wsdl_location/ServiceA.wsdl">
<jaxws:package name="package.serviceA"/>
</jaxws:bindings>
<jaxws:bindings node="wsdl:definitions[@targetNamespace='targetB']" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" wsdlLocation="../my_wsdl_location/ServiceB.wsdl">
<jaxws:package name="package.serviceB"/>
</jaxws:bindings>
</jaxws:bindings>
但它不起作用。我得到错误:
"XPath evaluation of `"wsdl:definitions[@targetNamespace='targetA']"` results in an empty target node".
我猜,JAXB 试图评估XPATH >>wsdl:definitions[@targetNamespace='targetA']<<
文件 ServiceB.wsdl,但是属性>>wsdlLocation<<
呢?
我认为,它应该表明正确的 wsdl。
我的错在哪里?
感谢帮助。
此致
马里奥