BizTalk Server Orchestration - Calling .NET component from Orchestration

This is Interesting: Free IT Magazines  
Home > Archive > BizTalk Server Orchestration > May 2006 > Calling .NET component from Orchestration





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author Calling .NET component from Orchestration
Mike

2006-05-03, 1:14 pm

I have an orchestration that transforms the XML message to the target format
that I desire. My objective is to then send that transformed message in XML
to a custom .NET component to be modified and then forwarded to the send
pipeline.



I have only very limited BizTalk experience and am confused on how to do
this. Any pointers, links, articles, sample code etc. would be greatly
appreciated. Thank you.


Yossi Dahan

2006-05-03, 1:14 pm

Mike wrote:
> I have an orchestration that transforms the XML message to the target format
> that I desire. My objective is to then send that transformed message in XML
> to a custom .NET component to be modified and then forwarded to the send
> pipeline.
>
>
>
> I have only very limited BizTalk experience and am confused on how to do
> this. Any pointers, links, articles, sample code etc. would be greatly
> appreciated. Thank you.
>
>


In order to call a .net class you need to add a reference to the
assembly containing that class
Then you can simply use it from within an expression shape pretty much
as you would in c#.

Please note that your assembly must be strongly named and GAC'ed.

Its also worth noting that in an expression shape you can also simply
write c# code (with limitations), so in some cases you may not even need
to call a .net component (although some developers, such as myself,
think that generally, if it is more then a couple of lines your writing
in that expression shape, it is probably worth moving it to an assembly)

Also note that if you plan to modify the message in your code it is best
practice to do it in a message construct shape and actually creating a
new message rather then modifying an existing one.
if you already have a construct shape for your map you may consider
re-using that.

After your expression shape you can use the send shape to send your
message out.
--
Yossi Dahan
www.sabratech.co.uk
Scott Colestock

2006-05-04, 7:13 pm

In the bt2004 docs, search for "Using Expressions to Create Objects and Call
Object Methods" for some info on parameterization for your component.
In addition to what it says there, you can also pass messages in as
XmlDocument.

Scott Colestock
www.traceofthought.net

"Yossi Dahan" <yossi.dahanNO@SPAMsabratech.co.uk> wrote in message
news:eag1lfrbGHA.1960@TK2MSFTNGP05.phx.gbl...
> Mike wrote:
>
> In order to call a .net class you need to add a reference to the assembly
> containing that class
> Then you can simply use it from within an expression shape pretty much as
> you would in c#.
>
> Please note that your assembly must be strongly named and GAC'ed.
>
> Its also worth noting that in an expression shape you can also simply
> write c# code (with limitations), so in some cases you may not even need
> to call a .net component (although some developers, such as myself, think
> that generally, if it is more then a couple of lines your writing in that
> expression shape, it is probably worth moving it to an assembly)
>
> Also note that if you plan to modify the message in your code it is best
> practice to do it in a message construct shape and actually creating a new
> message rather then modifying an existing one.
> if you already have a construct shape for your map you may consider
> re-using that.
>
> After your expression shape you can use the send shape to send your
> message out.
> --
> Yossi Dahan
> www.sabratech.co.uk



Paul Somers

2006-05-11, 7:13 pm

Hi Mike,

How do you wish to modify it?

If you simply want to programmatically change the value of a few elements or
attributes, you can promote them and set them within the message assignment
shape following the transform.

If you want to change the structure of the message into a new message that's
a little special? A pipeline component is what you can use here once you
send it.

Something else that you could not put in a map? You can pass the message to
a method, it is just an xml document at the end of the day.

Paul.

"Mike" <MikeJ@microsoft.com> wrote in message
news:etquSUrbGHA.1960@TK2MSFTNGP05.phx.gbl...
>I have an orchestration that transforms the XML message to the target
>format that I desire. My objective is to then send that transformed
>message in XML to a custom .NET component to be modified and then forwarded
>to the send pipeline.
>
>
>
> I have only very limited BizTalk experience and am confused on how to do
> this. Any pointers, links, articles, sample code etc. would be greatly
> appreciated. Thank you.
>
>



Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com