簡體   English   中英

閱讀WCF中與Java Web Service的多部分/相關響應

[英]Read multipart/related response in wcf talking to java web service

我們正在嘗試使用wcf(添加服務引用)使用Java Web服務,但是在調用服務時會引發異常,如下所示

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

<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"><SOAP-ENV:Header/>
<SOAP-ENV:Body>
   <brv:GBResponse xmlns:brv="urn:gamma:famma:tamma:brv">
       <gtf:errors xmlns:gtf="urn:gamma:famma:femme">
          <gtf:error>
              <gtf:id>ABCEDFHECIDGJ-1234567890</gtf:id>
              <gtf:text>Letter created.</gtf:text>
              <gtf:num>0</gtf:num>
          </gtf:error>
        </gtf:errors></brv:GBResponse>
 </SOAP-ENV:Body>
</SOAP-ENV:Envelope>
------=_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?<yX[? ???~5???==3_??
\0? z   :?Oonil?? [Z&L ?R?\b [?? ?+?G?~??<?r}?   ? J ?D C ?$&2?$%?8?IF  ??QN ?TQMcjhBSj???f1???b  ??*?q ?8???q??? C
3?T e???1?I?5?x?1 ;???S??:??3?-?Y?(S??h>??{?y?DX?'.

我們正在將basicHttpBinding與bindingConfiguration一起使用

<binding name="OurBinding"
             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"
                   />
      </security>
    </binding>

我們應該如何解決這個問題? 任何幫助將不勝感激。 謝謝

WCF不支持即用即用的Soap With Attachment(SwA)/ MIME附件。 您可以嘗試使用此MIME編碼器 (WCF擴展名)或實現自己的自定義消息編碼器並閱讀附件。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM