C# WSE3.0 client to MTOM-based Java web service

Tech-Archive recommends: Fix windows errors by optimizing your registry



I'm having an issue calling a java-based web service from a C#/.NET
2.0 client that uses WSE 3.0. (No WCF)

There is an operation on the web service that takes a single base64
encoded parameter that is transported as a MTOM mime part in a
multipart request.

The web service provider has sent me a trace of a successful SOAP
request and I have traced my SOAP request and I do not see any
differences other than differences in how the namespaces of the SOAP
request are specified in the envelope. The error I am getting is as
follows:

"theFile parameter is required. Send as base64 encoded attachment.
MTOM preferred"

Has anyone ever experienced this with MTOM attachments going from .NET
to java? Below are the examples of the "good" and "bad" requests

---
Here is the trace of the so-called "good" SOAP request:

----

Content-Length: 218899
Host: testtransactionrouter.ext.caldoj.net
User-Agent: Jakarta Commons-HttpClient/3.0.1
SOAPAction: ""
Content-Type: multipart/related; type="application/xop+xml";
start="<rootpart@xxxxxxxxxx>"; start-info="text/xml"; boundary="----
=_Part_62_23371712.1222379528822"
MIME-Version: 1.0

------=_Part_62_23371712.1222379528822
Content-Type: application/xop+xml; charset=UTF-8; type="text/xml"
Content-Transfer-Encoding: 8bit
Content-ID: <rootpart@xxxxxxxxxx>

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/
envelope/" xmlns:tran="http://test.someorg.org/";>
<soapenv:Header/>
<soapenv:Body>
<tran:submit>
<!--Optional:-->
<theFile><inc:Include href="cid:1181673839581";
xmlns:inc="http://www.w3.org/2004/08/xop/include"/></theFile>
</tran:submit>
</soapenv:Body>
</soapenv:Envelope>

------=_Part_62_23371712.1222379528822
Content-Type: application/octet-stream
Content-Transfer-Encoding: binary
Content-ID: <1181673839581>

< snip... binary data here ..>

------------------


Here is the so-called "bad" request from the c# client

-----

User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; MS Web Services Client
Protocol 2.0.50727.1433)
VsDebuggerCausalityData: uIDPo4vwo6348U5GsIQDl228IN4AAAAA6YvZm+bHt0KKt
+s6fTuk2JhzQ+XyTZ5Kp2jkPtAAzxQACAAA
SOAPAction: "http://test.someorg.org/submit";
Host: 10.100.60.101
Content-Type: multipart/related; type="application/xop+xml";
boundary=--MIMEBoundary633580251872485615;
start="<0.633580251872485615@xxxxxxxxxxx>"; start-info="text/xml;
charset=utf-8"
Content-Length: 429024
Expect: 100-continue
Proxy-Connection: Keep-Alive

----MIMEBoundary633580251872485615
content-id: <0.633580251872485615@xxxxxxxxxxx>
content-type: application/xop+xml; charset=utf-8; type="text/xml;
charset=utf-8"
content-transfer-encoding: binary

<soap:Envelope xmlns:xop="http://www.w3.org/2004/08/xop/include";
xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/";
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
xmlns:xsd="http://www.w3.org/2001/XMLSchema"; xmlns:wsa="http://
schemas.xmlsoap.org/ws/2004/08/addressing">
<soap:Header></soap:Header>
<soap:Body>
<submit xmlns="http://test.someorg.org/abc";>
<theFile>
<xop:Include href="cid:
1.633580251872485615@xxxxxxxxxxx" />
</theFile>
</submit>
</soap:Body>
</soap:Envelope>

----MIMEBoundary633580251872485615
content-id: <1.633580251872485615@xxxxxxxxxxx>
content-type: application/octet-stream
content-transfer-encoding: binary

<snip ... binary here>

.



Relevant Pages

  • Re: C# WSE3.0 client to MTOM-based Java web service
    ... The web service provider has sent me a trace of a successful SOAP ... request and I have traced my SOAP request and I do not see any ... MTOM preferred" ...
    (microsoft.public.dotnet.framework.webservices)
  • Re: [Javascript] problem with ResponseXml.
    ... To the web service was a SOAP 1.2 request with the namespace ... can i do to change the XML MIME type directly in the webservice source ... If your class implementing the web service inherits from the WebService ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: Possible serious WSE Adapter limitation!
    ... > From the WSE Adapter Documentation: ... > Request message - Contains the WS-Addressing headers received from the SOAP ... > you create the SOAP response to the Web service call. ...
    (microsoft.public.biztalk.general)
  • Re: Web Services and COBOL (Fairly long post, but I dont have time to write a proper article on it)
    ... Web Service is a great prerequisite for automated client-side code ... generation in the mainstream Java and .NET SOAP frameworks. ... $set Repository Update ... 000464 12 objSOAPClient OBJECT REFERENCE. ...
    (comp.lang.cobol)
  • RE: Web service issue
    ... We use XML serialization (from the .net ... If you need to populate fields with a default value and you're using SOAP, ... | Thread-Topic: Web service issue ... |> I've basically got an orchestration that is exposes a port as a web ...
    (microsoft.public.biztalk.general)