请帮助解决以下问题?
当生成WS客户端代码(使用wsimport ant任务)时,所有类都在与Web服务相同的包(例如helloservice.endpoint)中自动生成,例如,如果我的Web服务具有方法
public Node 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>
并将其作为绑定参数传递给wsimport任务,但得到错误:
[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.xmlRun Code Online (Sandbox Code Playgroud)
请问有人可以推荐这里有什么问题吗?我可以用这种方式在生成的Web服务类中使用我自己的类,还是我需要更复杂的smth?
提前致谢.