zoukankan      html  css  js  c++  java
  • Xfire实现webservice各种报错详解

    一、No write method for property {http://vo.aa.com}new in class com.aa.vo.TA

    使用xfire的ws调用时,会将对象与xml进行捆绑。整体的大概流程是:

    1、 通过传递对象的get、is方法获取需要传递的属性(属性私有)

    2、 与xml捆绑并网络传输

    3、 解绑参数,并调用set方法将参数设置进去。

    所以在TA和TA的父类中应该有一个isNew或者getNew的方法,但是没有setNew,所以报错

     二、xfire发布接口报错

    log4j:WARN No appenders could be found for logger (org.codehaus.xfire.transport.DefaultTransportManager).
    log4j:WARN Please initialize the log4j system properly.
    org.codehaus.xfire.XFireRuntimeException: Could not invoke service.. Nested exception is org.codehaus.xfire.fault.XFireFault: Could not read XML stream.. Nested exception is com.ctc.wstx.exc.WstxParsingException: Expected a text token, got START_ELEMENT.
    at [row,col {unknown-source}]: [1,730]
    org.codehaus.xfire.fault.XFireFault: Could not read XML stream.. Nested exception is com.ctc.wstx.exc.WstxParsingException: Expected a text token, got START_ELEMENT.
    at [row,col {unknown-source}]: [1,730]
    at org.codehaus.xfire.fault.XFireFault.createFault(XFireFault.java:89)
    at org.codehaus.xfire.client.Client.onReceive(Client.java:410)
    at org.codehaus.xfire.transport.http.HttpChannel.sendViaClient(HttpChannel.java:139)
    at org.codehaus.xfire.transport.http.HttpChannel.send(HttpChannel.java:48)
    at org.codehaus.xfire.handler.OutMessageSender.invoke(OutMessageSender.java:26)
    at org.codehaus.xfire.handler.HandlerPipeline.invoke(HandlerPipeline.java:131)
    at org.codehaus.xfire.client.Invocation.invoke(Invocation.java:79)
    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.XFireProxy.handleRequest(XFireProxy.java:77)
    at org.codehaus.xfire.client.XFireProxy.invoke(XFireProxy.java:57)
    at $Proxy0.getInternalEmails(Unknown Source)
    at com.wetalk.wbs.test.Test.xfire(Test.java:23)
    at com.wetalk.wbs.test.Test.main(Test.java:16)
    为什么呢?    经过漫长的调试发现,发现我的webservice服务端自定义对象有问题,在自定义对象中有字段的类型为char,就是因为对char类型无法传递导致这个错,但不一定报这个错的就一定和我这次的原因一样

  • 相关阅读:
    Can't connect to X11 window server using 的问题,求解
    自动化运维,让你远离背锅侠
    python netmiko实现cisco网络设备配置备份
    如何备份思科、锐捷、Juniper的配置文件
    网络配置备份。
    使用SecureCRT脚本备份网络设备配置的一点感悟
    網管利器!開源管理系統-LibreNMS
    邮件协议与port
    视频播放技术汇总(列表播放,小窗播放,跨界面播放,播放中网络切换提示)
    android插件式开发资料整理
  • 原文地址:https://www.cnblogs.com/yingsong/p/4497592.html
Copyright © 2011-2022 走看看