必须要用document么?不能用RPC啊?

解决方案 »

  1.   

    我想在j2me里也调用这个服务
    手机的模拟器好象只接收 document/literal的
    我看别人很多的服务都是document/literal的 就是不知道怎么只有第一个变量能传值
    感觉挺奇怪
      

  2.   

    哎  搞了一天没搞出来
    我用命令 wsimport -keep -d ./stub http://localhost:8080/services/RecNoteWService?wsdl
    生成stub的时候抱错 error:operation "revertNote":more than one part bound to body
    如果把AXIS的service styles 改成rpc就可以
    我搜索这个错误也没找到结果
    下面是我的 wsdl内容<?xml version="1.0" encoding="UTF-8"?>
    <wsdl:definitions targetNamespace="http://localhost:8080/services/RecNoteWService" xmlns:apachesoap="http://xml.apache.org/xml-soap" xmlns:impl="http://localhost:8080/services/RecNoteWService" xmlns:intf="http://localhost:8080/services/RecNoteWService" xmlns:tns1="http://localservice.note.L1China.com" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
    <!--WSDL created by Apache Axis version: 1.4
    Built on Apr 22, 2006 (06:55:48 PDT)-->
     <wsdl:types>
      <schema elementFormDefault="qualified" targetNamespace="http://localservice.note.L1China.com" xmlns="http://www.w3.org/2001/XMLSchema">
       <element name="Receiver" type="xsd:string"/>
       <element name="Sender" type="xsd:string"/>
       <element name="MsgContent" type="xsd:string"/>
      </schema>
      <schema elementFormDefault="qualified" targetNamespace="http://localhost:8080/services/RecNoteWService" xmlns="http://www.w3.org/2001/XMLSchema">
       <element name="revertNoteReturn" type="xsd:int"/>
      </schema>
     </wsdl:types>   <wsdl:message name="revertNoteResponse">      <wsdl:part element="impl:revertNoteReturn" name="revertNoteReturn"/>   </wsdl:message>   <wsdl:message name="revertNoteRequest">      <wsdl:part element="tns1:Receiver" name="Receiver"/>      <wsdl:part element="tns1:Sender" name="Sender"/>      <wsdl:part element="tns1:MsgContent" name="MsgContent"/>   </wsdl:message>   <wsdl:portType name="RecNoteWService">      <wsdl:operation name="revertNote" parameterOrder="Receiver Sender MsgContent">         <wsdl:input message="impl:revertNoteRequest" name="revertNoteRequest"/>         <wsdl:output message="impl:revertNoteResponse" name="revertNoteResponse"/>      </wsdl:operation>   </wsdl:portType>   <wsdl:binding name="RecNoteWServiceSoapBinding" type="impl:RecNoteWService">      <wsdlsoap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>      <wsdl:operation name="revertNote">         <wsdlsoap:operation soapAction=""/>         <wsdl:input name="revertNoteRequest">            <wsdlsoap:body use="literal"/>         </wsdl:input>         <wsdl:output name="revertNoteResponse">            <wsdlsoap:body use="literal"/>         </wsdl:output>      </wsdl:operation>   </wsdl:binding>   <wsdl:service name="RecNoteWServiceService">      <wsdl:port binding="impl:RecNoteWServiceSoapBinding" name="RecNoteWService">         <wsdlsoap:address location="http://localhost:8080/services/RecNoteWService"/>      </wsdl:port>   </wsdl:service></wsdl:definitions>