RE: Possible value for type parameter in DimeAttach constructor



Thanks, Steven. You're always very helpful!

Mike

"Steven Cheng[MSFT]" wrote:

Hello Mike,

From your description, you're using WSE 2.0 DimeAttachment to upload some
binary document in webservice. And you're wondering what's the proper value
should be pased to the constructor of DimeAttachment class, correct?

As for the DimeAttachment constructor, it mainly take some paramters to
determine the content type(mime type) and content (binary stream) of the
attachment. e.g.

=============
Dim dimeDocument As DimeAttachment = New DimeAttachment("text/xml",
TypeFormat.MediaType, New MemoryStream(Encoding.UTF8.GetBytes(docXml)))
=============

Therefore, for the first string based "type" parameter, you can just pass
the http mime type according to the document's type you want to upload. For
example, for jpeg image, it is "image/jpeg", for pdf file ,it is
"application/pdf", for rtf file ,it is "application/rtf". Also, if you
really not sure the exact content type of hte binary stream, you can simply
pass "application/octet-stream" for any unknown binary content. For second
TypeFormat enum parameter, you can simply use TypeFormat.MediaType.

BTW, DIME is a legacy binary transfering mechanism in WSE2.0 and in WSE
3.0, it has involved the new MTOM approach which is more recommended. If
possible, we would suggest you consider upgrade to use WSE 3.0 and MTOM.

Please feel free to post here if there is anything unclear.

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead



==================================================

Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
ications.



Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscriptions/support/default.aspx.

==================================================



This posting is provided "AS IS" with no warranties, and confers no rights
.



Relevant Pages

  • Problem solved
    ... am not using a beta of WSE 3; the file does already exist in my web service. ... I have no problems when I do this on a new simple web service project. ... Microsoft Online Community Support ... where an initial response from the community or a Microsoft Support ...
    (microsoft.public.dotnet.framework.aspnet.security)
  • RE: How to resolve "WSE Settings Error" - unable to save policycache f
    ... you opened the WSE Settings dialog and enabled policy ... Does the wsepolicyCache.config already exist in your web service? ... Microsoft Online Community Support ... where an initial response from the community or a Microsoft Support ...
    (microsoft.public.dotnet.framework.aspnet.security)
  • Re: is WSE wise?
    ... WSE is an add-on component for .net framework ... based webservice, it add the support of the WS_* specifications. ... Microsoft MSDN Online Support Lead ... where an initial response from the community or a Microsoft Support ...
    (microsoft.public.dotnet.framework.aspnet.webservices)
  • RE: How to resolve "WSE Settings Error" - unable to save policycac
    ... am not using a beta of WSE 3; the file does already exist in my web service. ... I have no problems when I do this on a new simple web service project. ... Microsoft Online Community Support ... where an initial response from the community or a Microsoft Support ...
    (microsoft.public.dotnet.framework.aspnet.security)
  • Re: DIME WSE 2.0 in .NET 2.0
    ... \par Thanks - Rich F. ... it is pity that WSE 3.0 no longer support DIME. ... \par> DIME is removed is because WSE is an .NET based implementation of the WS-* ... If we need only to maintain the custom security dlls in .NET ...
    (microsoft.public.dotnet.framework.webservices.enhancements)