WCF странное поведение

Я получил это, когда я использую веб-сервис:

Operation 'Login' of contract 'IServices' specifies multiple request body parameters to be serialized without any wrapper elements. At most one body parameter can be serialized without wrapper elements. Either remove the extra body parameters or set the BodyStyle property on the WebGetAttribute/WebInvokeAttribute to Wrapped.

Я использую интерфейс выглядит так:

namespace DreamServices
{
    // NOTE: You can use the "Rename" command on the "Refactor" menu to change the interface name "IService1" in both code and config file together.
    [ServiceContract]
    public interface IServices
    {
        [OperationContract]
        [WebInvoke(Method = "GET",
        ResponseFormat = WebMessageFormat.Json,

        BodyStyle = WebMessageBodyStyle.Wrapped,

        UriTemplate = "LogIn/{username}/{password}")]
        string Login(string username, string password);

        [OperationContract]
        [WebInvoke(
            Method = "GET",
            ResponseFormat = WebMessageFormat.Json,
            BodyStyle = WebMessageBodyStyle.Wrapped,
            UriTemplate = "WaletTotalAmount/{userid}")]
        double? WaletTotalAmount(string userid);

        [OperationContract]
        [WebInvoke(
            Method = "GET",
            ResponseFormat = WebMessageFormat.Json,
            BodyStyle = WebMessageBodyStyle.Wrapped,
            UriTemplate = "UserService/{userid}")]
        IList<UserServiceses> UserService(string userid);

        [OperationContract]
        [WebInvoke(Method = "POST",
            ResponseFormat = WebMessageFormat.Json,
            RequestFormat = WebMessageFormat.Json,
            BodyStyle = WebMessageBodyStyle.Wrapped,
            UriTemplate = "InsertUpdateWallet/{userid}/{Amount}/{ComissionAmount}")]
        void InsertUpdateWallet(string userid, string Amount, string ComissionAmount);

    }
}

и я размещаю его, затем добавляю веб-ссылку на свой сайт и изменяю файл web.config таким образом, чтобы

<system.serviceModel>

    <behaviors>
      <endpointBehaviors>
        <behavior name="web">
          <webHttp />
          <dataContractSerializer maxItemsInObjectGraph="2147483647"/>
        </behavior>
      </endpointBehaviors>
      <serviceBehaviors>
        <behavior>
          <dataContractSerializer maxItemsInObjectGraph="2147483647" />
          <serviceMetadata httpGetEnabled="true" />
          <serviceDebug includeExceptionDetailInFaults="true" />
        </behavior>
      </serviceBehaviors>
    </behaviors>
    <bindings>
      <webHttpBinding>
        <binding name="defaultRest">
          <readerQuotas maxStringContentLength="2147483647" maxArrayLength="2147483647" maxBytesPerRead="2147483647" maxDepth="64" maxNameTableCharCount="2147483647" />
          <security mode="None" />
        </binding>
      </webHttpBinding>
    </bindings>

    <client>
      <endpoint address="http://localhost:1381/PMAHost/Service.svc" binding="webHttpBinding" contract="ServiceReference.IServices" behaviorConfiguration="web"/>
    </client>

    <serviceHostingEnvironment multipleSiteBindingsEnabled="true" />
  </system.serviceModel>

Есть идеи, как исправить эту ошибку?

Ответы на вопрос(1)

Ваш ответ на вопрос