Groups | Blog | Home
all groups > dotnet web services enhancements > july 2006 >

dotnet web services enhancements : Dime with WSE 3.0


Kevin Burton
7/25/2006 1:12:01 PM
I have an application that uses DIME to send and receive attachments. Now I
want to migrate to WSE 3.0 and as I understand it DIME is not supported. I
got lost with the web pages on how to send/receive large amounts of data.
Maybe someone can help me translate WSE 2.0 code to WSE compatible code or
explain the differences and what needs to be done. Currently I have overrides
like:

Public Class SoapEnvelopeWithAttachment
Inherits SoapEnvelope
.. . .
Public Overrides Sub WriteToStream(ByVal StreamToWriteTo As
System.IO.Stream, ByVal closeStream As Boolean)

.. . .
Public Shared Function ReadFromStream(ByVal InStream As
System.IO.Stream) As SoapEnvelopeWithAttachment

These functions are called like:


If RequestType = MessageFormat.Application_Dime Then
DirectCast(se,
SoapEnvelopeWithAttachment).WriteToStream(objRequest.GetRequestStream(), True)
Else
se.WriteToStream(objRequest.GetRequestStream(), True)
End If


and

If ResponseType = MessageFormat.Text_Xml Then
. . .
Return seResponse
Else
If objResponse.ContentType.IndexOf("application/dime") = -1
Then
Throw New Exception("Expected response of contenttype
'application/dime'")
End If
seResponseWA =
SoapEnvelopeWithAttachment.ReadFromStream(objResponse.GetResponseStream)
objResponse.Close()
Return seResponseWA
End If

What needs to happen to convert this application to use MTOM (or Mime)? I am
not sure what the reason to move away from Dime or what the advantages of
MTOM are.

Thank you for your patience.

Kevin
Kevin Burton
7/26/2006 3:51:02 PM
Do you have the full article that you could forward to me? It seems to reject
my account creation.

[quoted text, click to view]
Martin Kulov [MVP]
7/26/2006 10:34:34 PM
[quoted text, click to view]

Kevin,

MTOM is pretty straightforward to use. Just delete your DIME code and look
here [1], where I have described how to use MTOM :).

[1] http://www.ftponline.com/vsm/2006_05/magazine/columns/gettingstarted/

Regards,

--
Martin Kulov
http://www.codeattest.com/blogs/martin

MVP, MCT, MCSD, MCPD
Kevin Burton
7/27/2006 4:40:02 PM

I can view the first page but then am prompted to create an account or
login. The account that I created seems to be inaccessible.

[quoted text, click to view]
Martin Kulov [MVP]
7/28/2006 1:16:33 AM
[quoted text, click to view]

The article itself is publicly accessible. Are you experiencing problems
getting the code? What is the error that you get? I can notify the editorial
to fix the problem, and if it does not work again I can provide you link to
the code.


Regards,

--
Martin Kulov
http://www.codeattest.com/blogs/martin

MVP, MCT, MCSD, MCPD
Martin Kulov [MVP]
7/30/2006 12:36:17 AM
[quoted text, click to view]

Kevin,

here are the two zips that contain the code before and after adding support
for MTOM.

[1] http://www.codeattest.com/blogs/martin/RemoteDiskWSE30Before.zip
[2] http://www.codeattest.com/blogs/martin/RemoteDiskWSE30After.zip

Regards,

--
Martin Kulov
http://www.codeattest.com/blogs/martin

MVP, MCT, MCSD, MCPD
AddThis Social Bookmark Button