0

如何将命名空间添加到 SearchSchemes ?以下是soap请求,
当前输出如下。

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:com="CompareYourTravelInsurance.Services">
   <soapenv:Header/>
   <soapenv:Body>
      <com:SearchSchemes>
       </com:SearchSchemes>
   </soapenv:Body>
</soapenv:Envelope>

我想要如下的输出

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" >
       <soapenv:Header/>
       <soapenv:Body>
          <com:SearchSchemes xmlns="CompareYourTravelInsurance.Services">
           </com:SearchSchemes>
       </soapenv:Body>
    </soapenv:Envelope>

以下是我的 WCF 接口,我在 sSeerviceContract 中添加了命名空间,但我无法将命名空间添加到 OperationContract。

[ServiceContract(Namespace = "CompareYourTravelInsurance.Services")]
public interface IMSMWcf
{
    [OperationContract(
        Action = "CompareYourTravelInsurance.Services/SearchSchemes",
        Name = "SearchSchemes",
        ReplyAction = "CompareYourTravelInsurance.Services/SearchSchemes",
        Namespace="dddd"
    ), XmlSerializerFormat]
    List<QuoteResult> SearchSchemes();

    [OperationContract(
    Action = "CompareYourTravelInsurance.Services/SaveTravellerInformation",
    Name = "SaveTravellerInformation"

    ), XmlSerializerFormat]
    void SaveTravellerInformation();


    [OperationContract(
    Action = "CompareYourTravelInsurance.Services/SendData",
    Name = "SendData",
    ReplyAction = "CompareYourTravelInsurance.Services/SendData"
    )]
    MsmData SendData(string QuoteDetailsRef);
}
4

0 回答 0