Ureader.com  
Microsoft software help and Community
   home   |   control panel login   |   archive   |  
 
Biztalk
acce.forsuppliers
acce.hipaa
acce.hl7
acce.rosettanet
accelerator.finserv
admin
appintegration
framework
general
library
nonxml
orchestration
sdk
server
setup
tools
xlangs
xsharp
  
 
date: Thu, 17 Apr 2008 11:59:26 -0500,    group: microsoft.public.biztalk.sdk        back       


Creating messages in a custom adapter   
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
date: Thu, 17 Apr 2008 11:59:26 -0500   author:   Waqar Sadiq

RE: Creating messages in a custom adapter   
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 
> 
> 
>
date: Tue, 20 May 2008 05:42:00 -0700   author:   Richard Case Richard

Google
 
Web ureader.com


    COPYRIGHT 2007, YARDI TECHNOLOGY LIMITED, ALL RIGHT RESERVE  |   contact us