I was exhausted, because of the Amazon on our WebService course.

          I expended nearly 2 days to solve some problems on the interoperation between Java Axis and .Net Client.

          The error is always:
          No serializer for cn.andy.amazon.AndyItem found in the org.apache.axis Registry.!!!

          I should have been spending more time look for Resources.

          I think it's due to the version confliction. I down the 1.2RC of Axis and it do nothing.

          My Classmate give me a hypelink of axis when asking me solutions.
          I look through the page, my god, exactly what I want.

          Solution:
          Axis know how to serialize javabean, but you should tell him which type is a javabean
          to serialize in the server-config.wsdd.

          put this in your server-config.wsdd according to your app:

          <service name="SmsService" provider="java:RPC">
          <parameter name="className" value="lius.axis.demo.SmsService"/>
          <parameter name="allowedMethods" value="send"/>
          <operation name="send" returnType="ns:Response">
          <parameter name="msg" type="ns:Message"/>
          </operation>

          <!-- 這里定義了方法的參數以及返回值 -->

          <typeMapping deserializer="org.apache.axis.encoding.ser.BeanDeserializerFactory"  
          encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
          qname="ns:Message"
          serializer="org.apache.axis.encoding.ser.BeanSerializerFactory"
          type="java:lius.axis.demo.Message" xmlns:ns="SmsService"/>

          <typeMapping
          deserializer="org.apache.axis.encoding.ser.BeanDeserializerFactory"    encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
          qname="ns:Response"   
          serializer="org.apache.axis.encoding.ser.BeanSerializerFactory"    type="java:lius.axis.demo.Response" xmlns:ns="SmsService"/>
          </service>

          Everything goes well now!

          Resource:
          http://www-900.ibm.com/developerWorks/cn/webservices/ws-deepaxis/index.shtml



          版權所有 羅明
          posted on 2005-04-07 12:54 羅明 閱讀(185) 評論(0)  編輯  收藏

          只有注冊用戶登錄后才能發表評論。


          網站導航:
           
           
          主站蜘蛛池模板: 丰都县| 邓州市| 宝鸡市| 阳山县| 玉屏| 广水市| 德清县| 乃东县| 通州市| 兴国县| 濮阳县| 扶风县| 德江县| 白城市| 治县。| 花莲市| 榆社县| 高阳县| 如东县| 休宁县| 黑河市| 海城市| 嘉义县| 广水市| 沅陵县| 湘潭县| 涿鹿县| 宜州市| 友谊县| 千阳县| 天长市| 南岸区| 镶黄旗| 治县。| 巴青县| 喀喇沁旗| 崇州市| 宁南县| 内丘县| 杭锦旗| 凤台县|