会社が購入した製品のWebサービスを利用するときに、奇妙な問題が発生します。この製品はキャンペーンコマンダーと呼ばれ、Eメールビジョンと呼ばれる会社によって作られています。「DataMassUpdateSOAPAPI」を使おうとしています。
Webサービスのいずれかのメソッドを呼び出そうとすると、呼び出しは実際には成功しますが、応答の処理時にクライアントが失敗し、例外が発生します。
エラーの詳細は以下のとおりです。皆さんが提供できる支援に感謝します。
Webリファレンス(古いスタイルのWebサービスクライアント)の使用中にエラーが発生しました
サービスをWeb参照として使用するInvalidOperationException
と、呼び出しを行うと、次のメッセージが表示されます。
Client found response content type of 'multipart/related; type="application/xop+xml"; boundary="uuid:170e63fa-183c-4b18-9364-c62ca545a6e0"; start="<root.message@cxf.apache.org>"; start-info="text/xml"', but expected 'text/xml'.
The request failed with the error message:
--
--uuid:170e63fa-183c-4b18-9364-c62ca545a6e0
Content-Type: application/xop+xml; charset=UTF-8; type="text/xml";
Content-Transfer-Encoding: binary
Content-ID: <root.message@cxf.apache.org>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<ns2:openApiConnectionResponse xmlns:ns2="http://api.service.apibatchmember.emailvision.com/" xmlns:ns3="http://exceptions.service.apibatchmember.emailvision.com/">
<return>DpKTe-9swUeOsxhHH9t-uLPeLyg-aa2xk3-aKe9oJ5S9Yymrnuf1FxYnzpaFojsQSkSCbJsZmrZ_d3v2-7Hj</return>
</ns2:openApiConnectionResponse>
</soap:Body>
</soap:Envelope>
--uuid:170e63fa-183c-4b18-9364-c62ca545a6e0--
--.
ご覧のとおり、応答soapエンベロープは有効に見えます(これは有効な応答であり、呼び出しは成功しました)が、クライアントはコンテンツタイプに問題があるようで、例外を生成します。
サービスリファレンス(WCFクライアント)の使用中にエラーが発生しました
サービスをサービス参照として使用するProtocolException
と、呼び出しを行うと、次のメッセージが表示されます。
The content type multipart/related; type="application/xop+xml"; boundary="uuid:af66440a-012e-4444-8814-895c843de5ec"; start="<root.message@cxf.apache.org>"; start-info="text/xml" 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 648 bytes of the response were: '
--uuid:af66440a-012e-4444-8814-895c843de5ec
Content-Type: application/xop+xml; charset=UTF-8; type="text/xml";
Content-Transfer-Encoding: binary
Content-ID: <root.message@cxf.apache.org>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<ns2:openApiConnectionResponse xmlns:ns2="http://api.service.apibatchmember.emailvision.com/" xmlns:ns3="http://exceptions.service.apibatchmember.emailvision.com/">
<return>Dqaqb-MJ9V_eplZ8fPh4tdHUbxM-ZtuZsDG6GalAGZSfSzyxgtuuIxZc3aSsnhI4b0SCbJsZmrZ_d3v2-7G8</return>
</ns2:openApiConnectionResponse>
</soap:Body>
</soap:Envelope>
--uuid:af66440a-012e-4444-8814-895c843de5ec--'.
前の例と同じように。有効なsoap応答があり、呼び出しは成功しましたが、クライアントはコンテンツタイプに問題があるようで、例外を生成しました。
クライアントが応答タイプに問題がないように設定できるオプションはありますか?私はいくつかのグーグル検索をしました、しかし私が見つけたものは今のところ私を助けませんでした。