私は外部Webサービスからこの単純なタイプを持っています:
<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を使用することはできません。
助けてくれてありがとう。