How do you copy processing instructions between messages without a
Web Server forum
Back To The Forum Home!Search!Private Messaging System

Web Server Talk Web Server Talk > Web Servers reviews > BizTalk Server > BizTalk Server General > How do you copy processing instructions between messages without a




  Last Thread   Next Thread Next
  Show Printable Version Email this Page Subscribe to this Thread      Post New Thread    Post A Reply      

    How do you copy processing instructions between messages without a  
Ellen Deak


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
06-09-05 10:51 PM

Hello,

I have a scenario where I receive a message that contains processing
instructions, do some processing and then send a message back that needs to
also contain the processing instructions.

In my orchestration, I do the following.

1. Receive in the message
2. Map the message to format needed by adapter. On map, Copy Processing
Instructions is yes.
3. Invoke 3rd part request-response adapter. Send message generated in step
2 and receive back a response message.
4. Map the response message from step 3 to final message. On map, Copy
Processing Instructions is yes.
5. Send final message.

The problem I have is that the response message I get back from the adapter
no longer has the processing instructions with it. I'm trying to figure out
another way to copy the processing instructions from the inital message to
the final message before I send it.

Does anyone have any suggestions?

Thanks
--
Ellen Deak
using BizTalk 2004





[ Post a follow-up to this message ]



    RE: How do you copy processing instructions between messages without a  
Stephen W. Thomas


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
06-09-05 10:51 PM

Hello.

Another way to do it is to copy the processing instructions from your first
message to your final message using message context.  After you complete you
r
final map, inside the same message construct shape add a message assignment
shape.

Use this code:
// 1 = Add New 0 = Append
OutputMessage(XMLNORM.ProcessingInstructionOption) = 1;
OutputMessage(XMLNORM.ProcessingInstruction) =
FirstMessageReceived(XMLNORM.ProcessingInstruction) ;

Also, I think you will need to use the Xml pipeline on the Send side to
demote the processing instructions into the message.

FYI: Setting values like this inside the Orchestration will override any
properties you might set inside the pipeline.

Hope this helps.

Stephen W. Thomas
http://www.biztalkgurus.com


"Ellen Deak" wrote:

> Hello,
>
> I have a scenario where I receive a message that contains processing
> instructions, do some processing and then send a message back that needs t
o
> also contain the processing instructions.
>
> In my orchestration, I do the following.
>
> 1. Receive in the message
> 2. Map the message to format needed by adapter. On map, Copy Processing
> Instructions is yes.
> 3. Invoke 3rd part request-response adapter. Send message generated in ste
p
> 2 and receive back a response message.
> 4. Map the response message from step 3 to final message. On map, Copy
> Processing Instructions is yes.
> 5. Send final message.
>
> The problem I have is that the response message I get back from the adapte
r
> no longer has the processing instructions with it. I'm trying to figure ou
t
> another way to copy the processing instructions from the inital message to
> the final message before I send it.
>
> Does anyone have any suggestions?
>
> Thanks
> --
> Ellen Deak
> using BizTalk 2004





[ Post a follow-up to this message ]



    RE: How do you copy processing instructions between messages without a  
Ellen Deak


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
06-29-05 10:51 PM

I finally found a way to copy processing instructions from one message to
another and thought I would post the full solution.

First, we wrote the following function.

Public Function GetK2ProcessingInstructions(ByVal message As
System.Xml.XmlDocument) As System.String



Dim procInstruction As String



' Loop through the nodes in the message.

For Each node As Xml.XmlNode In message.ChildNodes



'Check to see if the current node is a processing instruction.

If node.NodeType = Xml.XmlNodeType.ProcessingInstruction Then



'Grab the processing instruction value and exit the loop

procInstruction = node.InnerText()

Exit For

End If

Next



'Add the K2 processing instruction tags and return the results.

Return "<?K2-Biztalk " + procInstruction + "?>"

End Function

Then, we added the following code to a message assignment in our
orchestration. K2MessageIn is the original message containing the processing
instructions and K2MessageOut is the message we are sending that needs the
processing instructions included.

K2MessageOut(XMLNORM.ProcessingInstructionOption) = 0;
K2MessageOut(XMLNORM.ProcessingInstruction) =
BizTalkClassLib. GetK2ProcessingInstructions(K2MessageIn)
;

--
Ellen Deak





[ Post a follow-up to this message ]



    Sponsored Links  




 





   All times are GMT. The time now is 01:23 PM.      Post New Thread    Post A Reply      
  Last Thread   Next Thread Next


Most Popular forums 

Forum Jump:
Rate This Thread:

Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is OFF
vB code is ON
Smilies are ON
[IMG] code is OFF
 
Medical and Health forum | Computer Games Reviews | Graphics design forum

Back To The Top
Home | Usercp | Faq | Register