nillable与minOccurs

本文深入探讨了XML元素中nillable和minOccurs属性的区别与用法,解释了如何灵活地使用这些属性来控制元素的空值和出现次数,帮助开发者更好地理解和实现XML数据的有效性和完整性。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

nillable=“true”,该元素可以为空,但是该元素不能省略,

也就是说<minzero xsi:nil="true"><minzero>,而不能直接将minzero元素去掉



minOccurs="0"; 该元素可以直接被省略掉,但是不能让该元素的值为空,

也就是说,不能:minzero xsi:nil="true"><minzero>


摘自:http://www.360doc.com/content/10/1028/10/2795334_64662131.shtml

<wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:ns="urn:rmyy:service" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:ns1="http://org.apache.axis2/xsd" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl" targetNamespace="urn:rmyy:service"> <wsdl:documentation>rmyy</wsdl:documentation> <wsdl:types> <xs:schema attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="urn:rmyy:service"> <xs:element name="rmyyService"> <xs:complexType> <xs:sequence> <xs:element minOccurs="0" name="userName" nillable="true" type="xs:string"/> <xs:element minOccurs="0" name="password" nillable="true" type="xs:string"/> <xs:element minOccurs="0" name="svcCode" nillable="true" type="xs:string"/> <xs:element minOccurs="0" name="inputXml" nillable="true" type="xs:string"/> </xs:sequence> </xs:complexType> </xs:element> <xs:element name="rmyyServiceResponse"> <xs:complexType> <xs:sequence> <xs:element minOccurs="0" name="return" nillable="true" type="xs:string"/> </xs:sequence> </xs:complexType> </xs:element> </xs:schema> </wsdl:types> <wsdl:message name="rmyyServiceRequest"> <wsdl:part name="parameters" element="ns:rmyyService"/> </wsdl:message> <wsdl:message name="rmyyServiceResponse"> <wsdl:part name="parameters" element="ns:rmyyServiceResponse"/> </wsdl:message> <wsdl:portType name="rmyyPortType"> <wsdl:operation name="rmyyService"> <wsdl:input message="ns:rmyyServiceRequest" wsaw:Action="urn:rmyyService"/> <wsdl:output message="ns:rmyyServiceResponse" wsaw:Action="urn:rmyyServiceResponse"/> </wsdl:operation> </wsdl:portType> <wsdl:binding name="rmyySoap11Binding" type="ns:rmyyPortType"> <soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document"/> <wsdl:operation name="rmyyService"> <soap:operation soapAction="urn:rmyyService" style="document"/> <wsdl:input> <soap:body use="literal"/> </wsdl:input> <wsdl:output> <soap:body use="literal"/> </wsdl:output> </wsdl:operation> </wsdl:binding> <wsdl:binding name="rmyySoap12Binding" type="ns:rmyyPortType"> <soap12:binding transport="http://schemas.xmlsoap.org/soap/http" style="document"/> <wsdl:operation name="rmyyService"> <soap12:operation soapAction="urn:rmyyService" style="document"/> <wsdl:input> <soap12:body use="literal"/> </wsdl:input> <wsdl:output> <soap12:body use="literal"/> </wsdl:output> </wsdl:operation> </wsdl:binding> <wsdl:binding name="rmyyHttpBinding" type="ns:rmyyPortType"> <http:binding verb="POST"/> <wsdl:operation name="rmyyService"> <http:operation location="rmyyService"/> <wsdl:input> <mime:content type="application/xml" part="parameters"/> </wsdl:input> <wsdl:output> <mime:content type="application/xml" part="parameters"/> </wsdl:output> </wsdl:operation> </wsdl:binding> <wsdl:service name="rmyy"> <wsdl:port name="rmyyHttpSoap11Endpoint" binding="ns:rmyySoap11Binding"> <soap:address location="http://172.17.0.87:8090/ws/services/rmyy.rmyyHttpSoap11Endpoint/"/> </wsdl:port> <wsdl:port name="rmyyHttpSoap12Endpoint" binding="ns:rmyySoap12Binding"> <soap12:address location="http://172.17.0.87:8090/ws/services/rmyy.rmyyHttpSoap12Endpoint/"/> </wsdl:port> <wsdl:port name="rmyyHttpEndpoint" binding="ns:rmyyHttpBinding"> <http:address location="http://172.17.0.87:8090/ws/services/rmyy.rmyyHttpEndpoint/"/> </wsdl:port> </wsdl:service> </wsdl:definitions>怎么在postman请求这个接口
最新发布
06-25
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值