none
Read multipart/related response in wcf talking to java web service RRS feed

  • Question

  • We are trying to consume a java webservice using wcf (add service reference), however on calling the service an exception is being thrown as shown below

    ===============================================================================

    The content type multipart/related; type="text/xml"; boundary="----=_Part_113_846920666.1380536491947" of the response message does not match the content type of the binding (text/xml; charset=utf-8). If using a custom encoder, be sure that the IsContentTypeSupported method is implemented properly. The first 1024 bytes of the response were: '------=_Part_113_846920666.1380536491947 Content-Type: text/xml; charset=utf-8

    ABCEDFHECIDGJ-1234567890Letter created.0 ------=_Part_113_846920666.1380536491947 Content-Type: application/dlf Content-ID: ALPHABETA-17FASF-2013-09-30-122130269-68-GF Content-Transfer-Encoding: binary

    PK \0 \0\b\0?b>C7?qw? \0\0?\b\0\0 \0\0\0DLF/O/29/1.bin?Vg? E ??! b@ p9N ?<;`???; ? 3? A9@? P??,,????dVT° sV?YQQQ1???{?y?DX?'.

    ===============================================================================

    We are using basicHttpBinding with bindingConfiguration like this

        <binding name="CommonClientBinding"
                     closeTimeout="00:01:00"
                     openTimeout="00:01:00"
                     receiveTimeout="00:10:00"
                     sendTimeout="00:01:00"
                     allowCookies="false"
                     bypassProxyOnLocal="false"
                     hostNameComparisonMode="StrongWildcard"
                     maxBufferSize="65536"
                     maxBufferPoolSize="524288"
                     maxReceivedMessageSize="65536"
                     messageEncoding="Text"
                     textEncoding="utf-8"
                     transferMode="Buffered"
                     useDefaultWebProxy="true">
              <readerQuotas maxDepth="32"
                            maxStringContentLength="8192"
                            maxArrayLength="16384"
                            maxBytesPerRead="4096"
                            maxNameTableCharCount="16384" />
              <security mode="TransportCredentialOnly">
                <transport clientCredentialType="Windows"
                           proxyCredentialType="None"
                           realm="" />
              </security>
            </binding>

    How should we solve this problem?. Any help will be greatly appreciated. Thanks

    Friday, November 22, 2013 12:35 PM

Answers