我有来自外部网络服务的这种简单类型:
<xsd:element name="card_number" maxOccurs="1"
minOccurs="1">
<xsd:simpleType>
<xsd:restriction base="tns:PanType">
<xsd:pattern value="\d{16}"></xsd:pattern>
<xsd:whiteSpace value="collapse"></xsd:whiteSpace>
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
但是当我启动 wsdl2py -b filename.wsdl 我得到这个错误:
ZSI.generate.Wsdl2PythonError: unsupported local simpleType restriction: <schema targetNamespace="https://xxxxx.yyyyy.zz/sss/"><complexType name="PaymentReq"><sequence><element name="card_number"><simpleType>
我怎样才能解决这个问题?我尝试从 simpleType 更改为 compleType 并且 wsdl2py 生成 python 代码没有问题。这样我就不能在我的 python 对象中使用 card_number 。
感谢您的帮助。