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 羅明 閱讀(184) 評論(0)  編輯  收藏

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


          網站導航:
           
           
          主站蜘蛛池模板: 海门市| 贵阳市| 永川市| 正镶白旗| 禹城市| 铜山县| 乌什县| 平邑县| 和平区| 秭归县| 紫云| 桓台县| 玉屏| 会宁县| 东台市| 昭通市| 织金县| 枣强县| 青浦区| 宁蒗| 绥德县| 临漳县| 浦东新区| 南城县| 获嘉县| 宿州市| 洪湖市| 东阿县| 马公市| 凤冈县| 乌拉特后旗| 安达市| 宁国市| 武强县| 始兴县| 东辽县| 盐源县| 平度市| 桃江县| 鹿泉市| 麦盖提县|