简体   繁体   中英

Restrictions for xsd:decimal in WSDL

We are creating a SOAP Web Service using WCF, to be consumed by SAP.
From the SAP side they are asking that we specify restrictions for the decimal values in the XSD types declaration inside the WSDL. The problem is that WCF generates the Web Service without restrictions, and I don't know how to tell WCF to generate these restrictions (with attributes or something similar).
We want the xsd types to look like this:

    <xsd:simpleType name="LpgPorcType">
        <xsd:restriction base="xsd:decimal">
                  <xsd:totalDigits value="5" />
                  <xsd:fractionDigits value="2" />
        </xsd:restriction>
    </xsd:simpleType>

Instead of this, the values in the WSDL are mapped directly to xsd:decimal
Is there any way to indicate to WCF that I need these restrictions (without manually editting the WSDL file)?
Thanks

WCF does not support emitting this kind of restriction. You could put it yourself into the WSDL using IWSDLExportExtension .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM