BizTalk Server General - Multipart message confusion

This is Interesting: Free IT Magazines  
Home > Archive > BizTalk Server General > April 2006 > Multipart message confusion





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author Multipart message confusion
SteveM

2006-04-10, 7:33 pm

I have a schema which up until now has not actually been used by my
orchestration as no rows were being delivered from the SQL stored procedure.

Now that I am correctly passing paramters to the stored procedure, I get
approxiamately 5 rows returned.

Then I pass the XML with 5 records into a map where I expect the output
message to be handed off to a different SQL Server stored procedure.

However, the original schema now causes a WrongBodyPartException message,
saying it found BodyPart5 where it expected BodyPart1

Everything I have looked at so far says that this needs to be a multi-part
message and to look at the message enrichment tutorial.

All fine and good. Where would I find this mysterious Message Enrichment
Tutorial? Can't find reference to it in the Help (BTS 2006) or any trace of
it magically on my hard drive.

Secondly, when I extract the message from its suspended state, I get 6 files
- 5 message parts and one other. I guess that this just emphasises the
multi-part nature of the message.

Is there any way I can get the message back from SQL without it being
multi-part (or can you not tell me if I haven't actually supplied any schema
information?)

TIA
Steve
Matt Milner

2006-04-10, 7:34 pm

Are you returning multiple result sets from the stored procedure? Most sql
adapters return a single xml result set that becomes the body of the
message.

If you have 5 parts, then you need a multipart message, that is true.
If you have five elements, you just need to make sure they are coming back
as a single message and that your schema is created correctly to expect all
five.

Matt


"SteveM" <SteveM@discussions.microsoft.com> wrote in message
news:E0C0D98B-539D-46EE-B4D3-582982FFC998@microsoft.com...
>I have a schema which up until now has not actually been used by my
> orchestration as no rows were being delivered from the SQL stored
> procedure.
>
> Now that I am correctly passing paramters to the stored procedure, I get
> approxiamately 5 rows returned.
>
> Then I pass the XML with 5 records into a map where I expect the output
> message to be handed off to a different SQL Server stored procedure.
>
> However, the original schema now causes a WrongBodyPartException message,
> saying it found BodyPart5 where it expected BodyPart1
>
> Everything I have looked at so far says that this needs to be a multi-part
> message and to look at the message enrichment tutorial.
>
> All fine and good. Where would I find this mysterious Message Enrichment
> Tutorial? Can't find reference to it in the Help (BTS 2006) or any trace
> of
> it magically on my hard drive.
>
> Secondly, when I extract the message from its suspended state, I get 6
> files
> - 5 message parts and one other. I guess that this just emphasises the
> multi-part nature of the message.
>
> Is there any way I can get the message back from SQL without it being
> multi-part (or can you not tell me if I haven't actually supplied any
> schema
> information?)
>
> TIA
> Steve



SteveM

2006-04-10, 7:34 pm

Ok Matt, based on what you are saying, I had a closer look at the suspended
message data so I could better understand the issue.

My first explanation may well be a little short of the mark.

When I pass a message to the send receive port, it has multiple sets of
parameters. This obviously means I get multiple resultsets (rather than
records) coming back.

The structure of the returned results sets is something like


<Resp xmlns="http://Map/JobHistoryParts">
<ServiceCallHistoryParts SerialNumber="1">
<schp CallNumber="1" PartNumber="1" PartDescription="Part1"
Quantity="1"/>
<schp CallNumber="2" PartNumber="2" PartDescription="Part2"
Quantity="1"/>
</ServiceCallHistoryParts>
</Resp>

So that equates to one message part.

Now, originally my message was not a multipart message so I thought this was
the problem. I have modified the orchestration to use a multipart message at
this point but still get the same error.

When running the orchestration, I get an error message containing this text

Exception thrown from: segment -1, progress -1
Inner exception: Multi-part message 'CallJobHistoryPart' has body part
'BodyPart5', expected body part 'BodyPart1'.

Exception type: WrongBodyPartException
Source: Microsoft.XLANGs.BizTalk.Engine
Target Site: Void ReadMessageState(Microsoft.XLANGs.Core.Envelope,
Microsoft.XLANGs.BaseTypes.XLANGMessage)
The following is a stack trace that identifies the location where the
exception occured

at
Microsoft.BizTalk.XLANGs.BTXEngine.BTXXlangStore.ReadMessageState(Envelope
env, XLANGMessage msg)
at Microsof

Any other ideas that might be useful?

Cheers
Steve
"Matt Milner" wrote:

> Are you returning multiple result sets from the stored procedure? Most sql
> adapters return a single xml result set that becomes the body of the
> message.
>
> If you have 5 parts, then you need a multipart message, that is true.
> If you have five elements, you just need to make sure they are coming back
> as a single message and that your schema is created correctly to expect all
> five.
>
> Matt


Matt Milner

2006-04-10, 7:34 pm

You are basically getting a schema validation error. It looks like this
might be related to the message you are sending rather than the message you
are receiving. What schema has the CallJobHistory record in it? It appears
that either your schema or your message is not correct.

Matt


"SteveM" <SteveM@discussions.microsoft.com> wrote in message
news:CCDFF9EA-FA2B-45BC-ACC2-05B56879CAE9@microsoft.com...
> Ok Matt, based on what you are saying, I had a closer look at the
> suspended
> message data so I could better understand the issue.
>
> My first explanation may well be a little short of the mark.
>
> When I pass a message to the send receive port, it has multiple sets of
> parameters. This obviously means I get multiple resultsets (rather than
> records) coming back.
>
> The structure of the returned results sets is something like
>
>
> <Resp xmlns="http://Map/JobHistoryParts">
> <ServiceCallHistoryParts SerialNumber="1">
> <schp CallNumber="1" PartNumber="1" PartDescription="Part1"
> Quantity="1"/>
> <schp CallNumber="2" PartNumber="2" PartDescription="Part2"
> Quantity="1"/>
> </ServiceCallHistoryParts>
> </Resp>
>
> So that equates to one message part.
>
> Now, originally my message was not a multipart message so I thought this
> was
> the problem. I have modified the orchestration to use a multipart message
> at
> this point but still get the same error.
>
> When running the orchestration, I get an error message containing this
> text
>
> Exception thrown from: segment -1, progress -1
> Inner exception: Multi-part message 'CallJobHistoryPart' has body part
> 'BodyPart5', expected body part 'BodyPart1'.
>
> Exception type: WrongBodyPartException
> Source: Microsoft.XLANGs.BizTalk.Engine
> Target Site: Void ReadMessageState(Microsoft.XLANGs.Core.Envelope,
> Microsoft.XLANGs.BaseTypes.XLANGMessage)
> The following is a stack trace that identifies the location where the
> exception occured
>
> at
> Microsoft.BizTalk.XLANGs.BTXEngine.BTXXlangStore.ReadMessageState(Envelope
> env, XLANGMessage msg)
> at Microsof
>
> Any other ideas that might be useful?
>
> Cheers
> Steve
> "Matt Milner" wrote:
>
>



Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com