0
我有服務,有如下格式的請求的方法:在提供XML Schema屬性名稱相同但屬性值不同?
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:com="http://com.org.srv">
<soapenv:Header/>
<soapenv:Body>
<com:methodName>
<com:someParam>value</com:someParam>
<com:param name="firstPoint">
<com:param name="code">value</com:param>
</com:param>
<com:param name="firstPointDesc">
<com:param name="pName">value</com:param>
<com:param name="pLo">value</com:param>
</com:param>
<com:param name="endPoint">
<com:param name="code">value</com:param>
</com:param>
<com:param name="endPointDesc">
<com:param name="pName">value</com:param>
<com:param name="pLo">value</com:param>
</com:param>
<com:param name="bunch">
<com:param name="temperature">val</com:param>
<com:param name="humidity">val</com:param>
<com:param name="pressure">val</com:param>
</com:param>
</com:methodName>
</soapenv:Body>
</soapenv:Envelope>
此信息,是,我需要來形容它在XSD文件中蝕。 我曾嘗試:
<element name="methodNameRequest">
<complexType>
<sequence maxOccurs="1" minOccurs="1">
<element name="someParam" type="string" maxOccurs="1"
minOccurs="1">
</element>
<element name="deviceId" type="string"></element>
<element name="param" maxOccurs="1" minOccurs="1">
<complexType>
<sequence>
<element name="param" maxOccurs="1"
minOccurs="1">
<complexType>
<simpleContent>
<extension base="string">
<attribute name="name"
type="string" default="code" />
</extension>
</simpleContent>
</complexType>
</element>
</sequence>
<attribute name="name" type="string"
default="firstPoint" />
</complexType>
</element>
<element name="params" maxOccurs="1" minOccurs="1">
<complexType>
<sequence>
<element name="param" maxOccurs="1"
minOccurs="1">
<complexType>
<simpleContent>
<extension base="string">
<attribute name="name"
type="string" default="pName" />
</extension>
</simpleContent>
</complexType>
</element>
<element name="param" maxOccurs="1"
minOccurs="1">
<complexType>
<simpleContent>
<extension base="string">
<attribute name="name"
type="string" default="pLo" />
</extension>
</simpleContent>
</complexType>
</element>
</sequence>
<attribute name="name" type="string"
default="firstPointDesc" />
</complexType>
</element>
<element name="params" maxOccurs="1" minOccurs="1">
<complexType>
<sequence>
<element name="param" maxOccurs="1"
minOccurs="1">
<complexType>
<simpleContent>
<extension base="string">
<attribute name="name"
type="string" default="code" />
</extension>
</simpleContent>
</complexType>
</element>
</sequence>
<attribute name="name" type="string"
default="endPoint" />
</complexType>
</element>
<element name="params" maxOccurs="1" minOccurs="1">
<complexType>
<sequence>
<element name="param" maxOccurs="1"
minOccurs="1">
<complexType>
<simpleContent>
<extension base="string">
<attribute name="name"
type="string" default="pName" />
</extension>
</simpleContent>
</complexType>
</element>
<element name="param" maxOccurs="1"
minOccurs="1">
<complexType>
<simpleContent>
<extension base="string">
<attribute name="name"
type="string" default="pLo" />
</extension>
</simpleContent>
</complexType>
</element>
</sequence>
<attribute name="name" type="string"
default="endPointDesc" />
</complexType>
</element>
<element name="param" maxOccurs="1" minOccurs="1">
<complexType>
<sequence>
<element name="param" maxOccurs="1"
minOccurs="1">
<complexType>
<simpleContent>
<extension base="string">
<attribute name="name"
type="string" default="temperature" />
</extension>
</simpleContent>
</complexType>
</element>
<element name="param" maxOccurs="1"
minOccurs="1">
<complexType>
<simpleContent>
<extension base="string">
<attribute name="name"
type="string" default="humidity" />
</extension>
</simpleContent>
</complexType>
</element>
<element name="param" maxOccurs="1"
minOccurs="1">
<complexType>
<simpleContent>
<extension base="string">
<attribute name="name"
type="string" default="pressure" />
</extension>
</simpleContent>
</complexType>
</element>
</sequence>
<attribute name="name" type="string"
default="bunch" />
</complexType>
</element>
....
,但沒有成功:Multiple elements with name 'param', with different types, appear in the model group.
報道蝕。
任何人都可以提供這個或類似結構的描述的有效例子xsd
? 我與wsdl模式和服務完全不同。
非常感謝。