开发者

ZSI.generate.Wsdl2PythonError: unsupported local simpleType restriction

i have this simple type from an external webservice:

<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>

but whe i launch wsdl2py -b filename.wsdl i got this error:

ZSI.ge开发者_C百科nerate.Wsdl2PythonError: unsupported local simpleType restriction: <schema targetNamespace="https://xxxxx.yyyyy.zz/sss/"><complexType name="PaymentReq"><sequence><element name="card_number"><simpleType>

How can i fix this? I tried to change from simpleType to compleType and wsdl2py generate python code without problem. In this way i can't be able to use card_number in my python object.

Thanks for helping.


I'm not sure if this is still the case, but a quick google suggests that simpleTypes with user-defined restriction bases aren't supported by ZSI.

If this is still the case, then you could modify the restriction for "card_number" to remove the base and update the restriction-facets within the simpleType-restriction to reflect what the base would have provided.

If you post the content of restriction facets for PanType, we can tell you what that would be.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜