5

したがって、この新しい Axis2 MTOM Web サービスは、Java ベースの Web サービス クライアントに正しく提供されます。

サービス (ま​​たは Web) 参照を vs2008 に追加し、生成されたコードでそれを使用しようとすると、問題が発生します。これまでのところ、すべて問題ありませんか...これが起こることです:

  1. 必要なオブジェクト (クライアント、リクエスト、パラメータ オブジェクト) を作成します。
  2. サービスを呼び出します
  3. 応答を受信すると、次のメッセージで例外がスローされます。

  Client found response content type of 'multipart/related; 
  boundary=MIMEBoundaryurn_uuid_6C47CADDECCCB90D951282776406454; 
  type="application/xop+xml"; start="
  <0.urn:uuid:6C47CADDECCCB90D951282776406455@apache.org>"; start-info="text/xml"', 
  but expected 'text/xml'.

  The request failed with the error message:


MIMEBoundaryurn_uuid_6C47CADDECCCB90D951282776406454
Content-Type: application/xop+xml; charset=utf-8; type="text/xml"
Content-Transfer-Encoding: binary
Content-ID: <0.urn:uuid:6C47CADDECCCB90D951282776406455@apache.org>

<?xml version='1.0' encoding='utf-8'?><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"><soapenv:Body><ns:sendImageResponse xmlns:ns="http://org/company/ws/services/filetransfer/"><ns:return xmlns:ax213="http://filetransfer.objects.ws.company.com/xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ax215="http://filetransfer.responses.objects.ws.company.com/xsd" xsi:type="ax215:SendImageResponse"><ax215:errorCode>1060</ax215:errorCode><ax215:errorMessage>Error ejecutando el servicio</ax215:errorMessage><ax215:output>1060</ax215:output></ns:return></ns:sendImageResponse></soapenv:Body></soapenv:Envelope>
MIMEBoundaryurn_uuid_6C47CADDECCCB90D951282776406454

または質問は

axis2 Web サービスの応答を非 MIME タイプに設定する方法は?

4

1 に答える 1

4

構成で MTOM エンコーディングを使用する必要があります。wsHttpBinding で使用するには、MSDN の簡単なを参照してください (basicHttpBinding でも使用できるはずです)。カスタム バインディングを使用した Oracle Web サービスの使用について説明しているこの記事を確認してください。例に示されているカスタム バインディングを試したい場合は、おそらく messageVersion を Soap12 ではなく Soap11 に設定する必要があります。

于 2010-08-26T05:43:06.700 に答える