Web service decimal attribute value can't be set

六眼飞鱼酱① 提交于 2019-12-13 04:38:02

问题


I'm new to web service : I have an attribute of type decimal and of use optional:

Here's my WSDL:

<xsd:attribute name="taxes" use="optional">
        <xsd:simpleType>
          <xsd:restriction base="xsd:decimal">
            <xsd:totalDigits value="9" />
            <xsd:fractionDigits value="2" />
            <xsd:maxInclusive value="9999999.99" />
          </xsd:restriction>
        </xsd:simpleType>
      </xsd:attribute>

I want to set this attribute, the problem that its value is not modified, when I change use attribute to required the value is changed.

Here' the code :

public partial class CreationFacturationWS : System.Web.UI.Page
{
public string clientID;
protected void Page_Load(object sender, EventArgs e)
{
    string clientID = GetClientID("http://*******/axis2/services/****/");


}

public static string GetClientID(string url)
{
    //Srd.reponseDisponibiliteReponse[] response = null;
    Srd.wsboif service = new Srd.wsboif();

    //l'url du service
    service.Url = url;

    //temps d'attente maximal de la réponse (ms)
    service.Timeout = 10000;

    demandeCommande depotDeCommande = new demandeCommande();





    //Avec Frais de port inclus
    //2 produits dans la commande
    depotDeCommande.montantPaiementGlobal = 32.48M;// decimal and required ---> works
    depotDeCommande.taxes = 7.5M;//

  ....

}

}

来源:https://stackoverflow.com/questions/17729502/web-service-decimal-attribute-value-cant-be-set

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!