XML SOAP枚举数组请求WCF服务?

时间:2019-06-22 07:07:29

标签: xml wcf soap wcf-data-services

目前,我创建的Web应用程序要求通过API提取一些数据,并且提供商使用WCF服务

我使用soap xml请求,当前的xml请求看起来像这样

<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
<s:Body>
    <GetListOfReservations xmlns="http://tempuri.org/">
        <sToken>some token</sToken>
        <oResRequest xmlns:d4p1="http://schemas.datacontract.org/2004/07/RMS.FunctionLibrary.RMSPublic.SerialisedClasses" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">          
            <d4p1:DepartFrom>2019-06-16</d4p1:DepartFrom>
            <d4p1:DepartTo>2019-06-21</d4p1:DepartTo>
            <d4p1:ListOfStatus xmlns:b="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
                <b:enumerations>Cancelled</b:enumerations>
            </d4p1:ListOfStatus>
        </oResRequest>
    </GetListOfReservations>
</s:Body>

我需要的在这里

<d4p1:ListOfStatus xmlns:b="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
    <b:enumeration value="Arrived"/>
</d4p1:ListOfStatus>

基于文档,这需要作为枚举的列表/数组发送 所以问题是:

如何将这种枚举列表应用于xml请求?

其他信息:可以看到here

的api参考

使用其他数据类型(例如整数和字符串)列表的其他工作请求是这样的

<d4p1:ListOfAreaNames xmlns:b="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
    <b:string>Code-Room</b:string>
</d4p1:ListOfAreaNames>

但是对于枚举,我没有任何尝试的线索,我已经尝试过使用限制,简单类型和其他任何东西,但是没有用

随时询问您是否需要更多信息

*编辑1 它确实读取了ListOfStatus实例,但没有读取枚举状态(已到达,已取消等)

0 个答案:

没有答案