Re: .NET objects (C#)

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance

From: Craig Neuwirt (cneuwirt_at_emsinet.com)
Date: 01/11/05


Date: Tue, 11 Jan 2005 12:43:28 -0600

Are there any examples of .Net classes using the BizTalk formatter or custom
formatters?

thanks,
  craig

"Charles Young" <CharlesYoung@discussions.microsoft.com> wrote in message
news:D9501C25-5879-4F52-8E2C-AF0C0433B370@microsoft.com...
> Nathan - sorry to disagree with you, but this is quite wrong. The
BizTalk
> Message Box, and BizTalk Receive and Send handlers treat all message
content
> fundamentally as a stream of bytes, and don't care or know about the type.
> Adapters can pass any content in - it doesn't have to be XML. You can
prove
> this very easily. Just bind a Send port directly to a Receive port,
using,
> say, the File adapter, and select Pass-through pipelines (pipelines that
> contain no comoponents). You can now happily submit files containing any
> old content. Nothing is serialized into XML.
>
> Pipelines only convert content to XML if they include some component, such
> as Microsoft's Flat File disassembler component, that does this task.
> Microsoft's disassemblers also create a MessageType property on the
message
> to state what kind of XML content they return to the pipeline.
>
> You can't use maps on Receive or Send ports unless the message content is
> XML by the time it reaches the map, and the message has the MessageType
> property. This is why you have to use an XML pipeline, containing an XML
> Disassasembler, if you want to perform an inbound map, even if the message
> you submit via your adapter contains XML. The XML Disassembler works out
> what kind of XML you are using and sets the MessageType property
accordingly.
>
> When a message containing non-XML is routed to an orchestration, you may
> encounter problems. Generally, if you use a .NET class as the type of
the
> message received by the orchestration, BizTalk will at this stage attempt
XML
> de-serialization - i.e., it will by default expect the message content to
be
> an XML document representing a serialized instance of your .NET class.
> However, you can link a custom .NET class to a .NET formatter (e.g., the
> binary formatter) using the CustomFormatter attribute defined by BizTalk.
> If you then use your custom class as the message type BizTalk will attempt
to
> de-serialize the message content using the formatter. You can create
your
> own formatters to serialize and de-serialize whatever content you are
> submitting.
>
> If you don't need to access message content in your orchestration, you can
> use the undocumented Any schema defined in Microsoft.XLANG.BaseTypes as
the
> type for your orchestration message(s). This allows you to pass messages
> containing any content of any type into your orchestration. Rather
> confusingly, you can also use XmlDocument to do the same thing!! You
can't
> easily get at the message content when you do this, although it is
possible
> using undocumented (and dangerous) techniques. However, the message can
> happily be returned with its content unchanged back to the message Box to
be
> routed on to a Send port in the normal way.
>
> In summary, it is quite possible to pass non-XML content all the way
through
> BizTalk, including through orchestrations, without ever converting it to
XML
> or even de-seraialising it into .NET objects.
>
> Sorry to so sharply contradict your post, but that's how things are. It
is
> a pure myth that BizTalk is an XML-only server.
>
> Charles
>
> "Nathan Jeffery [MSFT]" wrote:
>
> > Ports and pipelines only natively understand xml. In fact, the first
thing that happens to a .NET message or message part is it gets XML
serialized. The
> > BizTalk programming model contains .NET message and message parts, but
that is simply a convenience because internally everything about
> > messaging is XML.
> >
> > Now what you could do is XSD.exe to your .NET type (denote it by T) and
produce an XSD schema (denote it by X) and then create a helper function
that
> > serializes an instance of T to XML of 'type' X and then just follow the
SubmitDirect sample.
> >
> > Hope that helps
> >
> >
> > --------------------
> > >Thread-Topic: .NET objects (C#)
> > >thread-index: AcTDceT57sqDFFFyQxClSytFs0W1pA==
> > >X-WBNR-Posting-Host: 63.166.226.90
> > >From: "=?Utf-8?B?RWQ=?=" <Ed@discussions.microsoft.com>
> > >Subject: .NET objects (C#)
> > >Date: Fri, 5 Nov 2004 11:59:01 -0800
> > >Lines: 5
> > >Message-ID: <A0BB533B-B0BA-47A1-9E25-8B5C700437CA@microsoft.com>
> > >MIME-Version: 1.0
> > >Content-Type: text/plain;
> > > charset="Utf-8"
> > >Content-Transfer-Encoding: 7bit
> > >X-Newsreader: Microsoft CDO for Windows 2000
> > >Content-Class: urn:content-classes:message
> > >Importance: normal
> > >Priority: normal
> > >X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
> > >Newsgroups: microsoft.public.biztalk.general
> > >NNTP-Posting-Host: TK2MSFTNGXA03.phx.gbl 10.40.1.29
> > >Path: cpmsftngxa10.phx.gbl!TK2MSFTNGXA03.phx.gbl
> > >Xref: cpmsftngxa10.phx.gbl microsoft.public.biztalk.general:21361
> > >X-Tomcat-NG: microsoft.public.biztalk.general
> > >
> > >Is there a sample where a .NET object is passed directly to a biztalk
receive
> > >port? Similar to the SubmitDirect sample expect rather than sending
XML us a
> > >.NET object.
> > >
> > >Thanks!
> > >
> >
> > Sorry I don't take feature request for WinRes: it belongs to the .NET
Framework SDK. I'm a consumer of WinRes, just like you...
> > --------------------
> > >From: Thomas Adams <thomas.o.adams@gmail.com>
> > >Newsgroups: microsoft.public.dotnet.internationalization
> > >Subject: RE: How to launch WinRes in full screen mode by another
program?
> > >Date: 29 Sep 2004 19:31:46 GMT
> > >Organization: DFN.CIS Senior Customer
> > >Lines: 17
> > >Message-ID: <Xns9573DB02E2782thomasoadamsgmailcom@127.0.0.1>
> > >References: <2qh8rpFvi6jiU1@uni-berlin.de>
<r3R$vnkpEHA.3636@cpmsftngxa06.phx.gbl>
> > >X-Trace: news.uni-berlin.de
cGk7xWd2iWxkO9HVbF7isQODBzMeOPRUidb0ZHc/H3nGY=
> > >User-Agent: Xnews/06.08.25
> > >X-Converter: MorVer Version 1.0.305
> > >Path:
cpmsftngxa06.phx.gbl!TK2MSFTNGXA03.phx.gbl!TK2MSFTNGP08.phx.gbl!newsfeed00.s
ul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!fu-
> > berlin.de!uni-berlin.de!not-for-mail
> > >Xref: cpmsftngxa06.phx.gbl
microsoft.public.dotnet.internationalization:947
> > >X-Tomcat-NG: microsoft.public.dotnet.internationalization
> > >
> > >Hi
> > >
> > >Your assumption is correct. I did not want to call out its long name
> > >since I didn't know if that could be regarded as breach of NDA. :)
> > >
> > >Thanks for the explanation. Do you take feature requests for WinRes?
> > >I'd like to see a "remember last size and location" some day...
> > >
> > >~T.
> > >
> > >xuy@online.microsoft.com (Xu Yang[MSFT]) wrote:
> > >
> > >
> > >--
> > >
> > > [Formerly appended fullquote was nuked by morver,
> > > the versatile morphing server.]
> > >
> >
> > I'm afraid that LocStudio (when you say LS, I assume you are using
LocStudio) does not have the option, and WinRes does not remember its size
and
> > location when it was shut down.
> > If you are trying to call it in your own application, you can always use
ProcessWindowStyle.Maximized when you start the process.
> >
> > --------------------
> > >From: Thomas Adams <me4@privacy.net>
> > >Newsgroups: microsoft.public.dotnet.internationalization
> > >Subject: How to launch WinRes in full screen mode by another program?
> > >Date: 11 Sep 2004 21:26:17 GMT
> > >Organization: DFN.CIS Senior Customer
> > >Lines: 9
> > >Message-ID: <2qh8rpFvi6jiU1@uni-berlin.de>
> > >X-Trace: news.uni-berlin.de
9sj2ViefNkwlw4tmA89WfA6mie8fmrCfbXqlIJqRehUb0=
> > >User-Agent: Xnews/06.08.25
> > >X-Face:
#Rk@TOQ|^!ZG|&z6lA@-CY>/xB[Ei1mG*&S.+A5z;Ng?3OxX[#DVZw!"o!c`S|p:(zsX-EkdZZ(I
VnFRTX%!:Sv^L&Gk~s]vJ@Z~%Rm@G]fr*r2P}u5
> >
*&k/-_2+&Qowj6hiJ1b$^JQf:uy9456HIdKq*B`NC##kyO,>7"Ztnav+=71b*"E+DIme;{i&)ii{
#6e?i8P,1Xpc[q0}i:Tm];B1
> > >X-Converter: MorVer Version 1.0.305
> > >Path:
cpmsftngxa10.phx.gbl!TK2MSFTFEED01.phx.gbl!TK2MSFTNGP08.phx.gbl!newsfeed00.s
ul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!fu-
> > berlin.de!uni-berlin.de!not-for-mail
> > >Xref: cpmsftngxa10.phx.gbl
microsoft.public.dotnet.internationalization:902
> > >X-Tomcat-NG: microsoft.public.dotnet.internationalization
> > >
> > >Hi
> > >
> > >Let's imagine you're using a translation environment (LS) that's
> > >launching WinRes every now and then. Is it possible to open WinRes in
> > >full screen mode in this case? It's quite annoying that it doesn't
> > >remember if I switch it to full screen mode the next time it is
invoked.
> > >
> > >thanks,
> > >Thomas
> > >
> >
> >
> >
> >



Relevant Pages

  • RE: How does Biztalk store received XML messages?
    ... the content (XML data in your case) is stored in stream as ... body part of the biztalk message alone with Context property. ... The question I have for you is typically an Orchestration depicts a ... > instantiates an assembly that looks up their manager and a variety of ...
    (microsoft.public.biztalk.general)
  • RE: BizTalk Xlangs EmptyPartException
    ... The problem was because a XML sintax error on XML ... It is interesting the error happens only if I used BizTalk mapping, ... BizTalk, from Solution Explorer, just right click over schema file and ... copy and use it as orchestration input. ...
    (microsoft.public.biztalk.general)
  • Re: Using .Net objects as messages
    ... Yes Craig that will work. ... The orchestration compiler will generate code ... the XML into your .NET type. ... Is it possible to have BizTalk pass a message ...
    (microsoft.public.biztalk.general)
  • RE: .NET objects (C#)
    ... and BizTalk Receive and Send handlers treat all message content ... Adapters can pass any content in - it doesn't have to be XML. ... say, the File adapter, and select Pass-through pipelines (pipelines that ... message received by the orchestration, BizTalk will at this stage attempt XML ...
    (microsoft.public.biztalk.general)
  • RE: BizTalk with Web Services
    ... If you want to receive an XML message back, ... passing back the XML as a string, then yes you would have to create a Schema ... on the BizTalk side and then construct the BizTalk Message in the ... > send to the web service. ...
    (microsoft.public.biztalk.general)