serializing XML message in MSMQ ActiveX format
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 Orchestration > serializing XML message in MSMQ ActiveX format




Pages (2): [1] 2 »   Last Thread   Next Thread Next
  Show Printable Version Email this Page Subscribe to this Thread      Post New Thread    Post A Reply      

    serializing XML message in MSMQ ActiveX format  
fullflavedave


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


 
06-07-06 12:19 AM

In BizTalk 2006, I am sending an xml message to an existing MSMQ hub.  The
messages arrive at the hub fine, but I get a "Cannot deserialize the message
passed as an argument.  Cannot recognize the serialization format" error.  I
think the error is because the existing message queue is set up to receive
messages serialized using the ActiveX format (using ActiveXMessageFormatter.
We use the message hub with COM objects).

Is there any way to serialize my XML messages in BizTalk 2006 into the
ActiveX format (or utilize ActiveXMessageFormatter())?  If necessary, how ca
n
I do this in a send pipeline?

Many Thanks,
Dave







[ Post a follow-up to this message ]



    Re: serializing XML message in MSMQ ActiveX format  
Tomas Restrepo \(MVP\)


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


 
06-07-06 06:19 AM

Dave,

> In BizTalk 2006, I am sending an xml message to an existing MSMQ hub.  The
> messages arrive at the hub fine, but I get a "Cannot deserialize the
> message
> passed as an argument.  Cannot recognize the serialization format" error.
> I
> think the error is because the existing message queue is set up to receive
> messages serialized using the ActiveX format (using
> ActiveXMessageFormatter.
> We use the message hub with COM objects).
>
> Is there any way to serialize my XML messages in BizTalk 2006 into the
> ActiveX format (or utilize ActiveXMessageFormatter())?  If necessary, how
> can
> I do this in a send pipeline?

It is possible, depending on what the MSMQ receiver application reads
messages as. What are they receiving them as? Strings? If so, you'll want to
make sure that the messages are being generated by the pipeline in UTF-16
with no BOM, and then configure the send port correctly to generate the Body
Type property. See







[ Post a follow-up to this message ]



    Re: serializing XML message in MSMQ ActiveX format  
Tomas Restrepo \(MVP\)


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


 
06-07-06 06:19 AM


> In BizTalk 2006, I am sending an xml message to an existing MSMQ hub.  The
> messages arrive at the hub fine, but I get a "Cannot deserialize the
> message
> passed as an argument.  Cannot recognize the serialization format" error.
> I
> think the error is because the existing message queue is set up to receive
> messages serialized using the ActiveX format (using
> ActiveXMessageFormatter.
> We use the message hub with COM objects).
>
> Is there any way to serialize my XML messages in BizTalk 2006 into the
> ActiveX format (or utilize ActiveXMessageFormatter())?  If necessary, how
> can
> I do this in a send pipeline?

It is possible, depending on what the MSMQ receiver application reads
messages as. What are they receiving them as? Strings? If so, you'll want
to
make sure that the messages are being generated by the pipeline in UTF-16
with no BOM, and then configure the send port correctly to generate the
Body
Type property. See
http://www.winterdom.com/weblog/200...
06.aspx


--
Tomas Restrepo
tomasr@mvps.org
http://www.winterdom.com/







[ Post a follow-up to this message ]



    Re: serializing XML message in MSMQ ActiveX format  
fullflavedave


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


 
06-08-06 12:18 AM

That got me past it -- thanks a bunch!  I needed to use VT_LPSTR (30) for th
e
hub to recognize the message.  In configuring the XML Assembler in my
pipeline, I couldn't find UTF-16 as an option (only Big-Endian-UTF16 and
Little-Endian-UTF16), but it does seem to be recognizing the messages OK.

Now I get a different error from the MSMQ hub -- a completely unhelpful
"System.web.Services.Protocols.SoapException: Server was unable to process."
-- even though I see that the xml in the message looks exactly like the xml
in messages that process fine.  I'll check my data and SOAP stuff, but I'm
definitely grateful that you got me this far.  I wasn't excited about writin
g
a custom assembler.

Your blog post was great!

Thanks again,
Dave


"Tomas Restrepo (MVP)" wrote:

> 
>
>  It is possible, depending on what the MSMQ receiver application reads
>  messages as. What are they receiving them as? Strings? If so, you'll want
> to
>  make sure that the messages are being generated by the pipeline in UTF-16
>  with no BOM, and then configure the send port correctly to generate the
> Body
>  Type property. See
> http://www.winterdom.com/weblog/200...r />
2006.aspx
>
>
> --
> Tomas Restrepo
> tomasr@mvps.org
> http://www.winterdom.com/
>
>
>





[ Post a follow-up to this message ]



    Re: serializing XML message in MSMQ ActiveX format  
Jane


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


 
06-10-06 12:18 AM

I am trying to get message from MSMQ using MSMQ adapter in biztalk
2006. I keep getting errors like There was a failure executing the
receive pipeline: "Microsoft.BizTalk.DefaultPipelines.XMLReceive,
Microsoft.BizTalk.DefaultPipelines, Version=3.0.1.0, Culture=neutral,
PublicKeyToken=31bf3856ad364e35" Source: "XML disassembler" Receive
Port: "ReceivePort1" URI:
"FORMATNAME:DIRECT=OS:IT-WEB001\PRIVATE$\TEST" Reason: No Disassemble
stage components can recognize the data.

I use three formatter ActiveXMessageFormater, XMLMessageFormater and
sending message as a stream. None of them can success.

How can I send a message to the MSMQ so that the MSMQ adapter can
recognize the message?

Thank you so much, I have spending two days on this matter with no
luck.

Jane

fullflavedave wrote:
> In BizTalk 2006, I am sending an xml message to an existing MSMQ hub.  The
> messages arrive at the hub fine, but I get a "Cannot deserialize the messa
ge
> passed as an argument.  Cannot recognize the serialization format" error. 
 I
> think the error is because the existing message queue is set up to receive
> messages serialized using the ActiveX format (using ActiveXMessageFormatte
r.
> We use the message hub with COM objects).
>
> Is there any way to serialize my XML messages in BizTalk 2006 into the
> ActiveX format (or utilize ActiveXMessageFormatter())?  If necessary, how 
can
> I do this in a send pipeline?
>
> Many Thanks,
> Dave






[ Post a follow-up to this message ]



    Re: serializing XML message in MSMQ ActiveX format  
Tomas Restrepo \(MVP\)


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


 
06-10-06 06:19 AM

Jane,
>I am trying to get message from MSMQ using MSMQ adapter in biztalk
> 2006. I keep getting errors like There was a failure executing the
> receive pipeline: "Microsoft.BizTalk.DefaultPipelines.XMLReceive,
> Microsoft.BizTalk.DefaultPipelines, Version=3.0.1.0, Culture=neutral,
> PublicKeyToken=31bf3856ad364e35" Source: "XML disassembler" Receive
> Port: "ReceivePort1" URI:
> "FORMATNAME:DIRECT=OS:IT-WEB001\PRIVATE$\TEST" Reason: No Disassemble
> stage components can recognize the data.
>
> I use three formatter ActiveXMessageFormater, XMLMessageFormater and
> sending message as a stream. None of them can success.

If you're sending the message as a string using an ActiveXMessageFormatter,
then be aware that it will be received as an Unicode (UTF-16 Little Endian)
encoded document with no BOM. because of that, biztalk cannot figure the
content on it's own, so you need to help it a bit, which you can do using my
FixEncoding pipeline component [1]. If you choose to write it as a strea
m,
it's just a matter of choosing the correct encoding when doing so (UTF-8 is
the one that will likely give you less trouble).

[1] 2006:
http://www.winterdom.com/weblog/200...
ntSample.aspx
2004:
http://www.winterdom.com/weblog/200...br />
004.aspx


--
Tomas Restrepo
tomasr@mvps.org
http://www.winterdom.com/







[ Post a follow-up to this message ]



    Re: serializing XML message in MSMQ ActiveX format  
Jane


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


 
06-12-06 06:18 PM

Thank you so much. I was able to make it work in stream format. I was
concentrating on the ActiveX format since this is how our webService
sending out the message. Your pipline is very valuable. I will try to
make it work. Thanks you again. I am glad there are people like you
helping others.


Jane


Tomas Restrepo (MVP) wrote:
> Jane, 
>
> If you're sending the message as a string using an ActiveXMessageFormatter
,
> then be aware that it will be received as an Unicode (UTF-16 Little Endian
)
> encoded document with no BOM. because of that, biztalk cannot figure the
> content on it's own, so you need to help it a bit, which you can do using 
my
> FixEncoding pipeline component [1]. If you choose to write it as a str
eam,
> it's just a matter of choosing the correct encoding when doing so (UTF-8 i
s
> the one that will likely give you less trouble).
>
> [1] 2006:
> http://www.winterdom.com/weblog/200...nentSample.aspx
> 2004:
> http://www.winterdom.com/weblog/200... />
k2004.aspx
>
>
> --
> Tomas Restrepo
> tomasr@mvps.org
> http://www.winterdom.com/






[ Post a follow-up to this message ]



    Re: serializing XML message in MSMQ ActiveX format  
Jane


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


 
06-23-06 12:19 AM

Hi, Tomas,

I installed your FixMessageEncoding component. And pick utf8 and utf16
(unicode). Both give the same error message as No disassemble stage
component can recognize the data.

Did I miss anything.

Here is the code that I try to send the message:
System.Messaging.MessageQueue mq =
new
System.Messaging.MessageQueue(@".\private$\test");

mq.Formatter = new ActiveXMessageFormatter();
System.Messaging.Message msg = new
System.Messaging.Message();
string str1;
str1="<ns0:LOAN_COMMENTS
xmlns:ns0=\"http://Litton.Datatransfer.Bankruptcy.Schema.LOAN_COMMENT\">";
str1 = str1 +
"<ns0:BATCH_SEQUENCE_NUMBER>BATCH_SEQUENCE_NUMBE</ns0:BATCH_SEQUENCE_NUMBER>
";
str1 = str1 + "<ns0:LOAN_COMMENT>";
str1 = str1 + "<ns0:LOAN_NUM>100</ns0:LOAN_NUM>";
str1 = str1 + "<ns0:SEQUENCE>100</ns0:SEQUENCE>";
str1 = str1 +
"<ns0:COMMENT_TYPE>COMME</ns0:COMMENT_TYPE>";
str1 = str1 +
"<ns0:NOTE>TOOTENOTENOTENOTENOTENOTENOTE</ns0:NOTE>";
str1 = str1 +
"<ns0:NOTE_DATE>1999-05-31T13:20:00.000-05:00</ns0:NOTE_DATE>";
str1 = str1 +
"<ns0:USER_NAME>USER_NAMEU</ns0:USER_NAME>";
str1 = str1 +
"</ns0:LOAN_COMMENT></ns0:LOAN_COMMENTS>";


msg.Formatter = new ActiveXMessageFormatter() ;
msg.Body = str1;

mq.Send(msg);


Tomas Restrepo (MVP) wrote:
> Jane, 
>
> If you're sending the message as a string using an ActiveXMessageFormatter
,
> then be aware that it will be received as an Unicode (UTF-16 Little Endian
)
> encoded document with no BOM. because of that, biztalk cannot figure the
> content on it's own, so you need to help it a bit, which you can do using 
my
> FixEncoding pipeline component [1]. If you choose to write it as a str
eam,
> it's just a matter of choosing the correct encoding when doing so (UTF-8 i
s
> the one that will likely give you less trouble).
>
> [1] 2006:
> http://www.winterdom.com/weblog/200...nentSample.aspx
> 2004:
> http://www.winterdom.com/weblog/200... />
k2004.aspx
>
>
> --
> Tomas Restrepo
> tomasr@mvps.org
> http://www.winterdom.com/






[ Post a follow-up to this message ]



    Re: serializing XML message in MSMQ ActiveX format  
Tomas Restrepo \(MVP\)


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


 
06-23-06 12:19 AM

Jane,
>
> I installed your FixMessageEncoding component. And pick utf8 and utf16
> (unicode).

I'm assuming you created your own pipeline and put the component in the
Decode stage, right? Make sure you pick the little endian variation of
UTF-16, and it *should* work.


--
Tomas Restrepo
tomasr@mvps.org
http://www.winterdom.com/







[ Post a follow-up to this message ]



    Re: serializing XML message in MSMQ ActiveX format  
Jane


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


 
06-23-06 06:17 PM

Hi, Tomas,

I know what happened. I have a schema collection in my pipline. I end
up add two XML assemblers, one with no schema, one with my schema
collection. And it works! Thank you so much. I love it.

I have another questions. What if I use xmlFormater. I know the message
send in the <String></String> wraper. And I could not get it into
orchestration. We want to use XMLFormatter in the long run if we could
because it is more standardized.

Thanks.

Jane
Tomas Restrepo (MVP) wrote:
> Jane, 
>
> I'm assuming you created your own pipeline and put the component in the
> Decode stage, right? Make sure you pick the little endian variation of
> UTF-16, and it *should* work.
>
>
> --
> Tomas Restrepo
> tomasr@mvps.org
> http://www.winterdom.com/






[ Post a follow-up to this message ]



    Sponsored Links  




 





   All times are GMT. The time now is 11:38 AM.      Post New Thread    Post A Reply      
Pages (2): [1] 2 »   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