大家好, 我正在用Fedex Web服务开发一个Asp.Net应用程序.当我为联邦快递的重量信息赋值时,我遇到了一些问题.
Hi everybody, I am developing an Asp.Net application with Fedex web services. When i assign value to the Fedex weight information i get some problem.
decimal packweight = 10.5M; request.RequestedShipment.RequestedPackageLineItems[0].Weight.Value = packweight;在上面的代码中,我将packweight小数变量值设置为fedex权重.但是它出现了一些错误.架构验证请求失败.
In the above code i set packweight decimal variable value to the fedex Weight. But its getting some error. Schema validation failed to request.
request.RequestedShipment.RequestedPackageLineItems[0].Weight.Value = 10.5M;在上面的代码中,我直接分配权重值.它的工作正常,我得到了联邦快递费率服务的响应.在我的应用程序中,我想动态获取重量值并将其设置为Fedex.请帮助我解决该错误.
In the above code i directly assign the Weight value. Its working fine and i get the rerponse from the Fedex Rate services. In my application i want to dynamically get the weight value and set to the Fedex. Kindly assist me to fix the error.
推荐答案您尝试使用float代替了吗? Have you tried to use float instead??
更多推荐
分配十进制值
发布评论