我是网络服务的新手:我有decimal
类型的属性,并且使用可选:
这是我的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>
我想设置此属性,其值未被修改的问题,当我将use属性更改为required时,该值已更改。
这里是代码:
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;//
....
}
}