Плагин jax-ws maven wsimport при обработке ошибок внешний файл привязки
Среда:
JAX-WS Metro 2.2.8
Tomcat 6
JAX-WS maven плагин 2.3
Затмение Юнона
Выпуск:
Я не смог сгенерировать артефакты на стороне клиента, используя плагин jax-ws maven с внешним файлом привязки.
Ниже приведен мой файл binding.xml:
<?xml version="1.0" encoding="UTF-8"?>
<bindings
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
wsdlLocation="http://localhost:8080/jaxws/userOperationsService?wsdl"
xmlns="http://java.sun.com/xml/ns/jaxws"
schemaLocation="http://localhost:8080/jaxws/userOperationsService?xsd=1">
<!-- applies to wsdl:definitions node, that would mean the entire wsdl -->
<enableAsyncMapping>false</enableAsyncMapping>
<!-- wsdl:portType operation customization -->
<bindings node="wsdl:definitions/wsdl:portType [@name='userOperations']/wsdl:operation[@name='getUserDevices']">
<enableAsyncMapping>true</enableAsyncMapping>
</bindings>
</bindings>
Я получаю ошибку:
[ERROR] XPath evaluation of "wsdl:definitions/wsdl:portType [@name='userOperations']/wsdl:operation[@name='getUserDevices']" results in an empty target node
line 13 of file:/F:/study/jaxws-async/src/main/resources/jaxws/binding/binding.xml
[WARNING] unknown extensibility element or attribute "ns1" (in namespace "http://www.w3.org/2000/xmlns/")
line 21 of http://localhost:8080/jaxws/userOperationsService?wsdl=1
[WARNING] unknown extensibility element or attribute "ns2" (in namespace "http://www.w3.org/2000/xmlns/")
line 22 of http://localhost:8080/jaxws/userOperationsService?wsdl=1
[WARNING] unknown extensibility element or attribute "ns3" (in namespace "http://www.w3.org/2000/xmlns/")
line 25 of http://localhost:8080/jaxws/userOperationsService?wsdl=1
[WARNING] unknown extensibility element or attribute "ns4" (in namespace "http://www.w3.org/2000/xmlns/")
line 26 of http://localhost:8080/jaxws/userOperationsService?wsdl=1
Failed to parse the WSDL.
Глядя на сгенерированный WSDL ниже, возникает элемент, вызывающий проблему
<portType name="userOperations">
<operation name="getUserDetails">
<input xmlns:ns1="http://www.w3.org/2007/05/addressing/metadata" ns1:Action="http://com.atul.userOps/userOperations/getUserDetails" message="tns:getUserDetails"/>
<output xmlns:ns2="http://www.w3.org/2007/05/addressing/metadata" ns2:Action="http://com.atul.userOps/userOperations/userOperations/getUserDetailsResponse" message="tns:getUserDetailsResponse"/>
</operation>
<operation name="getUserDevices">
<input xmlns:ns3="http://www.w3.org/2007/05/addressing/metadata" ns3:Action="http://com.atul.userOps/userOperations/getUserDevices" message="tns:getUserDevices"/>
<output xmlns:ns4="http://www.w3.org/2007/05/addressing/metadata" ns4:Action="http://com.atul.userOps/userOperations/userOperations/getUserDevicesResponse" message="tns:getUserDevicesResponse"/>
</operation>
</portType>
Почему wsimport не может распознать пространства имен xmlns:ns1?
Есть ли способ, которым я могу избавиться от этого?
Файл war для веб-службы развернут на tomcat. Пожалуйста помоги.