none
problem with MTOM in WPF C# RRS feed

  • Question

  • Hy,

    I have to transfer some Data to a webservice but it seems like my data are not sent via MTOM. At least that's the feedback I got from the webservice provider.

    Below you can see the main part of the app.config:

      <system.serviceModel>
        <bindings >
          <basicHttpBinding >
            
            <binding name="UsedServiceBinding" closeTimeout="00:01:00" openTimeout="00:01:00"
                receiveTimeout="00:10:00" sendTimeout="00:01:00" allowCookies="false"
                bypassProxyOnLocal="false" hostNameComparisonMode="StrongWildcard"
                maxBufferSize="200000000" maxBufferPoolSize="200000000" maxReceivedMessageSize="200000000"
                messageEncoding="Mtom" textEncoding="utf-8" transferMode="Buffered"
                useDefaultWebProxy="false" >
              <readerQuotas maxDepth="200000000" maxStringContentLength="200000000" maxArrayLength="200000000"
                  maxBytesPerRead="4096" maxNameTableCharCount="16384" />
              <security mode="Transport">
                <transport clientCredentialType="None" proxyCredentialType="None"
                    realm="" />
                <message clientCredentialType="UserName" algorithmSuite="Default" />
              </security>
            </binding>
          </basicHttpBinding>
        </bindings>
        <client>
          <endpoint address="https://ws.xxx.de/services/UsedService"
              binding="basicHttpBinding" bindingConfiguration="UsedServiceBinding"
              contract="UsedServicePortType" name="UsedServiceSoap12https"/>
        </client>
      </system.serviceModel>

    The class I generated out of the webservice starts like the following:

    [GeneratedCode("System.ServiceModel", "4.0.0.0")] [ServiceContract(Namespace = "http://ws.xxx.de/BlaService", ConfigurationName = "UsedServicePortType")] public interface UsedServicePortType { ...

    }

    [DebuggerStepThrough()]
    [GeneratedCode("System.ServiceModel", "4.0.0.0")]
    public partial class UsedServicePortTypeClient : ClientBase<UsedServicePortType>,
                                                     UsedServicePortType {

        public UsedServicePortTypeClient() { }

        public UsedServicePortTypeClient(string endpointConfigurationName) :
            base(endpointConfigurationName) { }

        public UsedServicePortTypeClient(string endpointConfigurationName, string remoteAddress) :
            base(endpointConfigurationName, remoteAddress) { }

        public UsedServicePortTypeClient(string endpointConfigurationName, EndpointAddress remoteAddress)
            :
                base(endpointConfigurationName, remoteAddress) { }

        public UsedServicePortTypeClient(Binding binding,
                                         EndpointAddress remoteAddress) :
                                             base(binding, remoteAddress) { }

    In my code than I create an instance by using the following:

    var c = new WebServiceClass.UsedServicePortTypeClient();
    c.Endpoint.Behaviors.Add(new InspectorBehavior());

    Can anybody help me?

    For me it seems like I'm telling the programm to send the request via MTOM but the webservice provider says that he doesn't get the MTOM data.

    Is there a way to check if the data is realy sent via MTOM?

    Thanks in advance.

    • Moved by Bob Shen Friday, January 25, 2013 2:36 AM
    Wednesday, January 23, 2013 9:25 AM

Answers

All replies