注册 | 登录 忘记密码? 51cto首页 | 博客 | 论坛 | 招聘
热点文章 负载均衡技术沙龙问答汇集
 帮助

使用XFire调用WebService需注意的事项


2008-02-27 14:25:10
版权声明:原创作品,如需转载,请与作者联系。否则将追究法律责任。

 


(一):注意过滤输入和输出参数空白字符
如果出现空白字符解析不了导致调用失败,导致下面的异常:
org.codehaus.xfire.fault.XFireFault: Error writing document.. Nested exception is com.ctc.wstx.exc.WstxIOException: Invalid null character in text to output
at org.codehaus.xfire.fault.XFireFault.createFault(XFireFault.java:89)
at org.codehaus.xfire.client.Invocation.invoke(Invocation.java:83)
at org.codehaus.xfire.client.Invocation.invoke(Invocation.java:114)
at org.codehaus.xfire.client.Client.invoke(Client.java:336)
at org.codehaus.xfire.client.Client.invoke(Client.java:368)

String.trim()一下即可。

本文出自 “程序人生” 博客,转载请与作者联系!





    文章评论
 
 

发表评论

昵   称:
验证码:  点击图片可刷新验证码  博客过2级,无需填写验证码
内   容: