<rt id="bn8ez"></rt>
<label id="bn8ez"></label>

  • <span id="bn8ez"></span>

    <label id="bn8ez"><meter id="bn8ez"></meter></label>

    未知數(shù)據(jù)

    從頭看Java

       ::  :: 聯(lián)系 :: 聚合  :: 管理
      28 Posts :: 0 Stories :: 10 Comments :: 0 Trackbacks

    最近根據(jù)wsdl文件生成客戶(hù)端代碼,使用MyEclipse的xfire和axis插件都報(bào)錯(cuò),報(bào)錯(cuò)如截圖;

     

    后來(lái)在網(wǎng)上搜,原因應(yīng)該是服務(wù)端發(fā)布的時(shí)候使用的是axis1.2版本的,使用的版本過(guò)低.于是從網(wǎng)上下載了axis1.2的版本,再試,還是一樣報(bào)錯(cuò).


    報(bào)錯(cuò)信息如下:
    <Recharge xmlns="ocs/server">
      <in0 xmlns="">
        <requestId>20090728000022</requestId>
        <requestTime>20081102000000</requestTime>
        <destinationId>13340011829</destinationId>
        <destinationAttr>2</destinationAttr>
        <balanceType>2000</balanceType>
        <rechargeUnit>0</rechargeUnit>
        <objType>5BC</objType>
        <rechargeAmount>10</rechargeAmount>
        <requestAmount>1</requestAmount>
        <cardNumber/>
        <channelID/>
        <operSystem/>
      </in0>
    </Recharge>
    java.lang.NullPointerException
            at com.ctc.wstx.sw.BaseNsStreamWriter.doWriteDefaultNs(BaseNsStreamWriter.java:528)
            at com.ctc.wstx.sw.SimpleNsStreamWriter.writeDefaultNamespace(SimpleNsStreamWriter.java:111)
            at com.ctc.wstx.sw.SimpleNsStreamWriter.writeNamespace(SimpleNsStreamWriter.java:119)
            at org.apache.axiom.om.impl.MTOMXMLStreamWriter.writeNamespace(MTOMXMLStreamWriter.java:146)
            at org.apache.axiom.om.impl.serialize.StreamingOMSerializer.serializeElement(StreamingOMSerializer.java:243)
            at org.apache.axiom.om.impl.serialize.StreamingOMSerializer.serializeNode(StreamingOMSerializer.java:76)
            at org.apache.axiom.om.impl.serialize.StreamingOMSerializer.serialize(StreamingOMSerializer.java:59)
            at org.apache.axiom.om.impl.util.OMSerializerUtil.serializeByPullStream(OMSerializerUtil.java:473)
            at org.apache.axiom.om.impl.llom.OMElementImpl.internalSerialize(OMElementImpl.java:823)
            at org.apache.axiom.om.impl.llom.OMElementImpl.internalSerializeAndConsume(OMElementImpl.java:848)
            at org.apache.axiom.om.impl.llom.OMElementImpl.internalSerialize(OMElementImpl.java:819)
            at org.apache.axiom.soap.impl.llom.SOAPEnvelopeImpl.internalSerialize(SOAPEnvelopeImpl.java:180)
            at org.apache.axiom.om.impl.llom.OMElementImpl.internalSerializeAndConsume(OMElementImpl.java:848)
            at org.apache.axiom.om.impl.llom.OMNodeImpl.serializeAndConsume(OMNodeImpl.java:419)
            at org.apache.axis2.transport.http.SOAPOverHTTPSender$AxisSOAPRequestEntity.handleOMOutput(SOAPOverHTTPSender.java:190)
            at org.apache.axis2.transport.http.SOAPOverHTTPSender$AxisSOAPRequestEntity.writeRequest(SOAPOverHTTPSender.java:232)
            at org.apache.commons.httpclient.methods.EntityEnclosingMethod.writeRequestBody(EntityEnclosingMethod.java:495)
            at org.apache.commons.httpclient.HttpMethodBase.writeRequest(HttpMethodBase.java:1973)
            at org.apache.commons.httpclient.HttpMethodBase.execute(HttpMethodBase.java:993)
            at org.apache.commons.httpclient.HttpMethodDirector.executeWithRetry(HttpMethodDirector.java:397)
            at org.apache.commons.httpclient.HttpMethodDirector.executeMethod(HttpMethodDirector.java:170)
            at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:396)
            at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:346)
            at org.apache.axis2.transport.http.AbstractHTTPSender.executeMethod(AbstractHTTPSender.java:541)
            at org.apache.axis2.transport.http.SOAPOverHTTPSender.send(SOAPOverHTTPSender.java:119)
            at org.apache.axis2.transport.http.CommonsHTTPTransportSender.writeMessageWithCommons(CommonsHTTPTransportSender.java:335)
            at org.apache.axis2.transport.http.CommonsHTTPTransportSender.invoke(CommonsHTTPTransportSender.java:204)
            at org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:674)
            at org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:237)
            at org.apache.axis2.description.OutInAxisOperationClient.execute(OutInAxisOperation.java:202)
            at com.huawei.bus.ws.ct.skeleton.UvcSoapForOcsServiceStub.Recharge(UvcSoapForOcsServiceStub.java:266)
            at test.Test.main(Test.java:56)

      把報(bào)錯(cuò)的測(cè)試工程發(fā)到同事那里測(cè)試,一切正常.
      最后只好從同事那里
    發(fā)過(guò)來(lái)axis的jar包導(dǎo)入,最后正常.

      懷疑是axis版本不一樣,用比較工具比較兩個(gè)lib文件夾,果然axis的版本不一樣.

     

      用org.apache.axis2.Version.getVersionText() 返回版本號(hào),一個(gè)是1.1,一個(gè)是1.1.1(才發(fā)現(xiàn)axis2的2不是版本號(hào)...).

      之前一直都用xfire,好像沒(méi)有遇到過(guò)服務(wù)端和客戶(hù)端版本不一致還會(huì)有問(wèn)題.看來(lái)還是要慎用axis.

    posted on 2009-08-17 10:46 wangjc 閱讀(4010) 評(píng)論(3)  編輯  收藏 所屬分類(lèi): workspace

    Feedback

    # re: wsdl文件生成客戶(hù)端代碼問(wèn)題 2010-05-21 15:44 謝康林
    你好,我出現(xiàn)了和你相同的問(wèn)題,想咨詢(xún)下你具體的解決方法。我的QQ:285843912,看到了留言后加我,感激不盡啊!  回復(fù)  更多評(píng)論
      

    # re: wsdl文件生成客戶(hù)端代碼問(wèn)題 2010-05-21 18:24 wangjc0801
    @謝康林
    這個(gè)是很久以前弄的了,原因就是axis的版本不對(duì),最后保持服務(wù)端和客戶(hù)端的版本一致,應(yīng)該就沒(méi)問(wèn)題了.希望能幫到你  回復(fù)  更多評(píng)論
      

    # re: wsdl文件生成客戶(hù)端代碼問(wèn)題[未登錄](méi) 2012-04-17 22:07
    你好,我出現(xiàn)了和你相同的問(wèn)題,想咨詢(xún)下你具體的解決方法。我的郵箱471607572@qq.com,看到了把jar包發(fā)到郵箱,感激不盡啊!

      回復(fù)  更多評(píng)論
      

    主站蜘蛛池模板: 8x网站免费入口在线观看| 久久成人免费播放网站| 青青操视频在线免费观看| 国产精品色午夜免费视频| 亚洲狠狠ady亚洲精品大秀| 久久午夜无码免费| 国产AV无码专区亚洲精品| 九九99热免费最新版| 夜夜春亚洲嫩草影院| 中国性猛交xxxxx免费看| 亚洲精品无码久久久久去q| 热久久这里是精品6免费观看| 亚洲乱码日产精品a级毛片久久| 日日躁狠狠躁狠狠爱免费视频 | 国产成人yy免费视频| 精品亚洲aⅴ在线观看| 4虎永免费最新永久免费地址| 亚洲1区1区3区4区产品乱码芒果| 国产男女爽爽爽爽爽免费视频| 国产精品亚洲专区在线观看| 国产高清免费观看| 日日摸夜夜添夜夜免费视频 | 香蕉成人免费看片视频app下载| 日木av无码专区亚洲av毛片| 青草草色A免费观看在线| 亚洲国产成人AV在线播放 | 午夜无码A级毛片免费视频| 亚洲一区二区三区四区视频| 免费A级毛片无码A| 国产精品区免费视频| 亚洲va在线va天堂成人| 免费少妇a级毛片人成网| 中文字幕免费在线看线人动作大片| 亚洲精品线在线观看| 在线免费观看中文字幕| 五月天婷婷精品免费视频| 亚洲日韩区在线电影| 国产无遮挡色视频免费视频| a成人毛片免费观看| 亚洲五月综合网色九月色| 亚洲日韩国产精品乱|