Fehler beim Aufrufen des Webservices, Inhaltstyp "application / xop + xml" stimmt nicht mit dem erwarteten Typ "text / xml" überein
Ich habe ein seltsames Problem, wenn ich einen Webservice für ein Produkt in Anspruch nehme, das meine Firma gekauft hat. Das Produkt heißt Campaign Commander und wird von einer Firma namens Email Vision hergestellt. Wir versuchen, die "Data Mass Update SOAP API" zu verwenden.
Immer wenn ich versuche, eine der Methoden im Webservice aufzurufen, ist der Aufruf tatsächlich erfolgreich, aber der Client schlägt bei der Verarbeitung der Antwort fehl und es tritt eine Ausnahme auf.
Die Details der Fehler sind unten aufgeführt. Vielen Dank für jede Hilfe, die ihr anbieten könnt.
Fehler beim Verwenden der Webreferenz (Webservice-Client im alten Stil)Wenn ich den Dienst als Webverweis verwende, erhalte ich eineInvalidOperationException
Für jeden Anruf, den ich tätige, mit der folgenden Meldung:
<code>Client found response content type of 'multipart/related; type="application/xop+xml"; boundary="uuid:170e63fa-183c-4b18-9364-c62ca545a6e0"; start="<[email protected]>"; 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: <[email protected]> <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-- --. </code>
Wie Sie sehen, sieht der Umschlag der Antwortseife gültig aus (dies ist eine gültige Antwort, und der Aufruf war erfolgreich), aber der Client scheint ein Problem mit dem Inhaltstyp zu haben und generiert eine Ausnahme.
Fehler beim Verwenden der Dienstreferenz (WCF-Client)Wenn ich den Service als Servicereferenz verwende, erhalte ich eineProtocolException
Für jeden Anruf, den ich tätige, mit der folgenden Meldung:
<code>The content type multipart/related; type="application/xop+xml"; boundary="uuid:af66440a-012e-4444-8814-895c843de5ec"; start="<[email protected]>"; 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: <[email protected]> <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--'. </code>
Genau wie beim vorherigen Beispiel; Wir haben eine gültige Seifenantwort erhalten und der Aufruf war erfolgreich, aber der Client scheint ein Problem mit dem Inhaltstyp zu haben und hat eine Ausnahme generiert.
Gibt es Optionen, die ich festlegen kann, damit der Client kein Problem mit dem Antworttyp hat? Ich habe einige Google-Suchen durchgeführt, aber nichts, was ich gefunden habe, hat mir bisher geholfen.