从旧版SOAP客户端到.net服务器收到的值不正确

时间:2016-06-17 13:49:48

标签: c# .net wcf soap legacy

我遇到从旧版客户端获取正确值到我的新wcf soap web服务的问题。

我不允许更改客户端。客户端将此代码发送给我:

<?xml version="1.0" encoding="UTF-8"?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <soapenv:Body>
        <setScannerLiveViewBounds xmlns="http://ejb.enrollment.snabbfoto.se">
            <in0 xmlns="">
                <y>414</y>
                <width>320</width>
                <height>340</height>
                <x>125</x>
            </in0>
            <in1 xmlns="">20130403</in1>
        </setScannerLiveViewBounds>
    </soapenv:Body>
</soapenv:Envelope>

新服务器具有以下接口:

[OperationContract(Action = ""), DataContractFormat(Style = OperationFormatStyle.Rpc)]
void setScannerLiveViewBounds([MessageParameter(Name = "in0")]RectangleMV inBounds, [MessageParameter(Name = "in1")]String inLock);

[DataContract(Name = "Rectangle")]
public class RectangleMV
{
        [DataMember]
        public int x { get; set; }
        [DataMember]
        public int y { get; set; }
        [DataMember]
        public int width { get; set; }
        [DataMember]
        public int height { get; set; }
}

问题是当我到达我的代码时,我只收到x,y,width和height的0。我得到“in1”的正确值。

0 个答案:

没有答案
相关问题