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 –