0
我想集成這個api,但不知道如何在這個XML中傳遞值作爲用戶名和密碼。如何在xml中傳遞值作爲SOAP請求
<xsd:element name="Login">
<xsd:annotation>
<xsd:documentation>
</xsd:documentation>
</xsd:annotation>
<xsd:complexType>
<xsd:attribute name="UserName" use="required">
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:length value="50"/>
<xsd:minLength value="6"/>
<xsd:maxLength value="50"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:attribute>
<xsd:attribute name="Password" use="required">
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:length value="255"/>
<xsd:minLength value="1"/>
<xsd:maxLength value="255"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:attribute>
</xsd:complexType>
</xsd:element>
文檔主頁是http://www.e-courier.com/ecourier/software/schema/xmloverview.html#Login。在此先感謝您的時間。
感謝您的回覆我有我想知道XSD的格式問題,例如中顯示和您的答案不匹配。那麼,爲什麼公司提供這樣的例子,xsd的含義是什麼,所以沒有人能夠理解他們將如何通過該值:) –
XSD描述接口的合同。您的Visual Studio(和其他IDE)可以使用XSD並顯示您的xml是否有效。 XSD在表達驗證規則方面更加豐富,然後XMl片段可以表達一個示例。而且他們也提供了例子,所以我認爲從一個轉換到另一個並不難。無論如何,我已經添加了如何基於XSD來登錄XElement。 – rene
我有張貼xml和獲得響應'<信封的xmlns = 「http://schemas.xmlsoap.org/soap/envelope/」> \t
\t \t <登錄用戶名= 「測試」 密碼= 「測試」 的xmlns =「http://www.e-courier.com/software/schema/public/」/> \t –