I am developing a receive adapter that has to publish message to BizTalk. The message is of the following form: <ns0:AttributeSets xmlns:ns0="http://xyz.MemberProcessing"> <Member Ipcode=""> <VirtualCard LoyaltyIdNumber=""> <TransactionSummary TransactionID="" TransactionType="" Company="" TransactionNumber="" > <TransactionDetail TransactionID="" LineNumber="" Quantity=""></TransactionDetail> </TransactionSummary> </VirtualCard> </Member> </ns0:AttributeSets> In this message under "AttributeSets" node, there may be repeated instances of "Member" node. What is the best way to construct the BizTalk message that can then be published to the message box. Thanks in advance. Waqar Sadiq
I have used code similar to this in the past (which i got from the adapter wizard): private IBaseMessage CreateMessage(Stream stream) { stream.Seek(0, SeekOrigin.Begin); IBaseMessagePart part = _messageFactory.CreateMessagePart(); part.Data = stream; IBaseMessage message = _messageFactory.CreateMessage(); message.AddPart("body", part, true); // We must add these context properties SystemMessageContext context = new SystemMessageContext(message.Context); context.InboundTransportLocation = _uri; context.InboundTransportType = _transportType; return message; } "Waqar Sadiq" wrote: > I am developing a receive adapter that has to publish message to BizTalk. > The message is of the following form: > > <ns0:AttributeSets xmlns:ns0="http://xyz.MemberProcessing"> > <Member Ipcode=""> > <VirtualCard LoyaltyIdNumber=""> > <TransactionSummary TransactionID="" TransactionType="" Company="" > TransactionNumber="" > > <TransactionDetail TransactionID="" LineNumber="" > Quantity=""></TransactionDetail> > </TransactionSummary> > </VirtualCard> > </Member> > </ns0:AttributeSets> > > In this message under "AttributeSets" node, there may be repeated instances > of "Member" node. What is the best way to construct the BizTalk message > that can then be published to the message box. > > Thanks in advance. > > Waqar Sadiq > > >