开发者

Help in defining conditional params in WSDL

I am working on defining WSDL and it has i/p param in the operation. WSDL will be tested by SOATest.

Query: I have a param which is conditional and need help in defining.

I want something like this.. if Name is selected then it should force user to select LastName, else both will be null

Dummy Ex:

 <xs:simpleType name="FullName">
    <xs:restriction base="xs:string">
      <xs:enumeration value="Name" />
      <xs:enumeration value="LastName" />
    </xs:restriction>
  </xs:simpleType开发者_高级运维>


There is no way to do this using WSDL or XSD (which WSDL depends on).

There are sometimes hacks you can use, but they're worse than the alternative. The alternative is to simply verify in code that if Name is selected then Lastname must be supplied.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜