以文本方式查看主题

-  中文XML论坛 - 专业的XML技术讨论区  (http://bbs.xml.org.cn/index.asp)
--  『 Web Services & Semantic Web Services 』  (http://bbs.xml.org.cn/list.asp?boardid=10)
----  关于wsdl消息绑定多个part的问题。  (http://bbs.xml.org.cn/dispbbs.asp?boardid=10&rootid=&id=69451)


--  作者:vcshcn
--  发布时间:11/13/2008 10:11:00 PM

--  关于wsdl消息绑定多个part的问题。
我写了一个wsdl,部分内容如下
<wsdl:message name="loginRequest">
 <wsdl:part name="name" element="xsd:string" />
 <wsdl:part name="password" element="xsd:string"/>
</wsdl:message>

<wsdl:portType name="UserService">
    <wsdl:operation name="login" parameterOrder="name password">
     <wsdl:input message="user:loginRequest"></wsdl:input>
     <wsdl:output message="user:loginResponse"></wsdl:output>
     </wsdl:operation>
</wsdl:portType>

<wsdl:binding name="UserServiceBind" type="user:UserService">
  <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http" />
    <wsdl:operation name="login">
    <soap:operation soapAction="http://localhost/book/UserService/login" />
        <wsdl:input>
     <soap:body use="literal" />
       </wsdl:input>
      <wsdl:output>
         <soap:body use="literal" />
      </wsdl:output>
  </wsdl:operation>
</wsdl:binding>

但是wsdl 校验器报告:WS-I: (BP2119) A document-literal binding which does not specify the parts attribute, has more than one wsdl:part in the associated wsdl:message element.

google上搜索:當您在定義 document/literal 服務時,只能為輸入與輸出訊息各自設計一個本文 part。因此,您的 Web services傳遞給方法的參數不能超過一個。如果您想要使用具有超過一個參數的方法,則必須改用 Document Wrapped 編碼以符合標準。

?是不是违反了ws-i 规定,除了把类型添加到type外,有什么方法实现一个message有多个part,ws-i 的资料哪里有



W 3 C h i n a ( since 2003 ) 旗 下 站 点
苏ICP备05006046号《全国人大常委会关于维护互联网安全的决定》《计算机信息网络国际联网安全保护管理办法》
31.250ms