请问您能帮忙解决以下问题吗?
当生成 WS 客户端代码(使用 wsimport ant 任务)时,所有类都会自动生成在与 Web 服务相同的包(例如 helloservice.endpoint)中,例如,如果我的 Web 服务有方法
公共节点 getNode();
因此生成了类 helloservice.endpoint.Node。不过,我有自己的 helloservice.Node 类,我想在 Web 服务中使用它。
我定义了 bind.xml 文件:
<bindings version="2.0" xmlns="http://java.sun.com/xml/ns/jaxb" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" >
<bindings node="wsdl:definitions/wsdl:portType[@name='Node']">
<class name="helloservice.Node"/>
</bindings>
</bindings>
and pass it to wsimport task as binding parameter, but get the error :
[wsimport] [ERROR] XPath evaluation of "wsdl:definitions/wsdl:portType[@name='Node']" results in empty target node
[wsimport] line 2 of file:/C:/work/projects/svn.ct/trunk/jwstutorial20/examples/jaxws/simpleclient/bind.xml
请问有人可以推荐这里有什么问题吗?我可以以这种方式在生成的 Web 服务类中使用我自己的类,还是我需要更复杂的东西?
提前致谢。