Stephen W. Thomas BizTalk Blog

100% Pure BizTalk
posts - 132, comments - 146, trackbacks - 438

My Links

News

Subscribe to my blog via:


Add to Google

Visit my website at:
www.BizTalkGurus.com

Archives

BizTalk 2004 Samples

BizTalk 2006 Samples

BizTalk Videos

BizTalk White Papers

BizTalkBlogs.com

Great BizTalk Blogs

Other Links

Send and Receive Port XML Envelope Processing in BizTalk 2004

Have you looked at the SDK example working with Envelopes in BizTalk 2004 for Flat Files and tried to get it to work with XML Documents?  Well, I did and I found it a little trickier than I expected.

 

Key Take Home Points:

- De-Batching / Envelope Processing for XML Document must take place on the Receive Port.  I have not been able to get it to work on the Send Port, but I am still trying.

- Properties can be promoted from the Header and demoted to the single messages

- No custom pipelines are required for Receive Port Processing as long as the Root Node Name and Namespace are unique throughout your entire deployed solutions.

 

DOWNLOAD: Get the sample here!

 

Set-up is easy, just unzip the SampleEnvelopes folder and put it on your C: drive.  Then, build and deploy the SampleEnvelopes project. I use early binding so the send and receive ports will be created for you. 

 

To run the sample, drop the start messages named StartFileInbound.xml into c:\SampleEnvelopes\In_Inbound.  You will get 3 messages in the Out_Inbound folder for each start message.  Also, note that the Orchestration will run 3 times.  Plus, I promote and demote Header information to show how it can be passed into the single messages.  If all else fails, read the ReadMe.txt file.

 

Take Away: Once you get the hang of XML Envelopes in BizTalk 2004 they can be a powerful tool for easy document splitting.

Print | posted on Sunday, August 22, 2004 1:25 PM |

Feedback

Gravatar

# re: Send and Receive Port XML Envelope Processing in BizTalk 2004

Simple yet efficient example Stephen. Thank you for the work...
10/1/2004 12:19 PM | MikeH
Gravatar

# Demotion in envelopes

Thanks Stephen, found your sample a straightforward leg-up.
I am currently having a problem whereby properties promoted from an inbound envelope do not demote to an outbound one (same schema).
Have posted about this on forum microsoft.public.biztalk.general :
http://www.microsoft.com/communities/newsgroups/en-us/default.aspx?dg=microsoft.public.biztalk.general&mid=d78d9a92-7e58-4744-b089-53cfc6b8bea5
Any help would be much appreciated.
Nick
10/25/2004 10:49 AM | Nick Doyle
Gravatar

# re: Send and Receive Port XML Envelope Processing in BizTalk 2004

I appreciate your logic. But I could not create my own envelop, I can't find out how you arrive <any>. can you explain me step by step.

If you have any reference step by step.

Please reply to s_v_krishnan@rediffmail.com

Thanks
3/21/2005 5:01 PM | Vijay
Gravatar

# re: Send and Receive Port XML Envelope Processing in BizTalk 2004

Have you already managed to get the send port debatching working? I'm trying, but can't get it to work
9/22/2005 7:45 AM | Dick Dijkstra
Gravatar

# re: Send and Receive Port XML Envelope Processing in BizTalk 2004

I don’t think it is possible for Send Port debatching. Send ports are more for building the message rather then breaking them up. I tired to get it to work in the past, with no luck.

Stephen W. Thomas
9/22/2005 8:04 AM | Stephen W. Thomas
Gravatar

# re: Send and Receive Port XML Envelope Processing in BizTalk 2004

try out working with sql adapter rather thn file adapter at receive port.
I tried and was succesful with nodelist sample,but not with the envelope sample.
Im still searching a soln to it.Any help would be appreciated.mail at nishil@rediffmail.com
9/30/2005 1:08 AM | NISHIL
Gravatar

# re: Send and Receive Port XML Envelope Processing in BizTalk 2004

Hi ,
I have a problem with the output i get for the steps I have applied to my code. I get the whole of the XML o/p without split.
Below is the data i am using, can anyone tel l me where i am missing.

XML data:
-----------
<?xml version="1.0" encoding="utf-16" ?> <root xmlns="http://SWW.Shell.com/xsd/Shell/DS1/SMPL/Georgia/Invoice/1.0">
<INVOICEDATA SequenceNumber="1782" NoOfSamples="3" FileTransmissionDateTime="2005-11-24T10:18:29.950">
<SAMPLES InterfaceId="SBCI193" SalesOrganisation="MY05" DistributionChannel="0MK" Sold-To-CustomerLocationType="International">
<TESTS TestSuiteMaterialCode="">
<ADDITIONALTESTS TestMaterialCode="" Re-Test="N" />
</TESTS>
</SAMPLES>
---
Envelope schema:
root-INVOICEDATA-SAMPLES-Any
---
Data Schema :
INVOICEDATA-SAMPLES-InterfaceId
--

Thanks,
Vijay
2/9/2006 4:41 AM | Vijay
Gravatar

# re: Send and Receive Port XML Envelope Processing in BizTalk 2004

I did not see a readme.txt with the download. I'm fairly new to BTS (2006) and sure could use a little explanation behind the promopted properties and envelopes (if in fact in use. The app looks pretty simple but there are subtleties that I'm not completely getting - esp. in relationship to the 3 schemas and the Message.

I see Inbound.sxd used in the receive and send port and MessageItem.xsd (assume it's a property schema and not complete sure what that is.)

What is InboundItems.xsd used for?

Thanks,
Phil
5/24/2006 1:24 PM | Batman
Gravatar

# re: Send and Receive Port XML Envelope Processing in BizTalk 2004

The example is very good,

I would appreciate more if you could provide steps for this,

Thanks,
-Ranjit
rsamant@ptc.com
5/26/2006 2:50 AM | Ranjit
Gravatar

# re: Send and Receive Port XML Envelope Processing in BizTalk 2004

This sample has proved very helpful. Thanks!
9/8/2006 2:14 AM | Swapnil
Gravatar

# re: Send and Receive Port XML Envelope Processing in BizTalk 2004

Hi, I was wondering if anyone wanna see Envelope processing with SQL Adapter.
http://suneetnangia.spaces.live.com/blog/
10/16/2006 3:24 PM | Suneet Nangia

Post Comment

Title  
Name  
Email
Url
Comment   
Please add 1 and 5 and type the answer here:

Powered by: