+ -
当前位置:首页 → 问答吧 → 远程调用webservice接口报错

远程调用webservice接口报错

时间:2011-07-24

来源:互联网

我是用myeclipse根据人家给我wsdl地址自动生成的客户端,调用接口的时候报错
错误:org.codehaus.xfire.XFireRuntimeException: Could not invoke service.. Nested exception is org.codehaus.xfire.fault.XFireFault: Error parsing document.. Nested exception is com.ctc.wstx.exc.WstxUnexpectedCharException: Unexpected character '/' (code 47) (expected a name start character)
 at [row,col {unknown-source}]: [1,322]



PS:接口方法参数是别人自定义的类。


这是什么错误,怎么解决啊。请各位大侠们支招。搞了好几天了。

作者: dingxude1986   发布时间: 2011-07-24

错误解决:原来是接口参数要构造JAXBElement<String>,错误原因是自己new的出错,生成的客户端代码中有个类ObjectFactory,里面有构造JAXBElement<String>的方法,不用自己new。

作者: dingxude1986   发布时间: 2011-08-08

热门下载

更多