BizTalk Server General - Header Question - round 2... nobody responded

This is Interesting: Free IT Magazines  
Home > Archive > BizTalk Server General > August 2005 > Header Question - round 2... nobody responded





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 Header Question - round 2... nobody responded
Brian Cesafsky

2005-08-02, 6:02 pm

No one responded the 1st time I posted, so I'm trying again, thanks!


Here is my scenario.

1) I run a stored procedure to get a list of disconnected phone numbers

2) in the SPROC I also get the number or records that are returned from the
select (I need this information for the header record in my flat file output
file)

3) I have 3 schemas, 1 for the SPROC, 1 for the output document, 1 for the
header on the output document

4) I have a send pipeline that sets the document schema and the header
schema (for the output document).

5) I have a map that has the SPROC schema for the 'Source' and I have the
the output document AND the header for the output document as the
destination schema. (I created the map using the transform shape in an
orchestration because that is the only way I know how to get multiple
schemas in the destination schema part of a map).

6) I am NOT using an orchestration. I just use the map and the pipeline on
the send port, and then add a filter to the send port to 'listen' to the
receive port that runs the SPROC.

Here is my issue. My header in my output flat file does NOT contain the
total number of records that is coming from the stored proc. I know the
SPROC is returning the results correctly, I tested that.

This is what I tried... I tried to do this using an orchestration, but I get
the same results, I use the transform to create the Header and document
messages, then I have 2 send shapes/port types... 1 for the header, 1 for
the main document. In the orchestration, I tried to bind them to the same
send port (the one that uses the send pipeline), but I still don't get the
correct information on the header.

Any and all suggestions welcome!

Brian


Yossi Dahan

2005-08-03, 2:54 am

Brian Cesafsky wrote:
> No one responded the 1st time I posted, so I'm trying again, thanks!
>
>
> Here is my scenario.
>
> 1) I run a stored procedure to get a list of disconnected phone numbers
>
> 2) in the SPROC I also get the number or records that are returned from the
> select (I need this information for the header record in my flat file output
> file)
>
> 3) I have 3 schemas, 1 for the SPROC, 1 for the output document, 1 for the
> header on the output document
>
> 4) I have a send pipeline that sets the document schema and the header
> schema (for the output document).
>
> 5) I have a map that has the SPROC schema for the 'Source' and I have the
> the output document AND the header for the output document as the
> destination schema. (I created the map using the transform shape in an
> orchestration because that is the only way I know how to get multiple
> schemas in the destination schema part of a map).
>
> 6) I am NOT using an orchestration. I just use the map and the pipeline on
> the send port, and then add a filter to the send port to 'listen' to the
> receive port that runs the SPROC.
>
> Here is my issue. My header in my output flat file does NOT contain the
> total number of records that is coming from the stored proc. I know the
> SPROC is returning the results correctly, I tested that.
>
> This is what I tried... I tried to do this using an orchestration, but I get
> the same results, I use the transform to create the Header and document
> messages, then I have 2 send shapes/port types... 1 for the header, 1 for
> the main document. In the orchestration, I tried to bind them to the same
> send port (the one that uses the send pipeline), but I still don't get the
> correct information on the header.
>
> Any and all suggestions welcome!
>
> Brian
>
>

Brian

From my understanding the flat file assembler's support for headers is
only relevant when you actually receive a flat file with a header first
that is being removed in the receive port and then re-added on the send
port.

obviously - you scenario is different.

I would try to things -

1. Do not split your message to header/detail. have a single output
schema with both record types and create them both using the mapper.
(btw - if all you have in the header is the record count you could
probably avoid returning it from sql and counting it on the xslt)

2. I believe there's a context property where the flat file disassembler
puts the header in the receive pipeline and the flat file assembler uses
to pick it up and pre-pend it to the message. you might be able to
update that with the *flat* header you wish to have in your message.

Yossi Dahan
Scott Colestock

2005-08-03, 5:51 pm

I thought the flat file assembler would deal with headers as well (but I
haven't played with this, at least not recently) -

Is it possible that you want to have a multipart message (with both header
and body parts, the latter marked as body in the type definition) and that
if you configure the flat file assembler with both your header schema and
body schema that the right thing will hapen?



"Yossi Dahan" <yossi.dahan@sabratech.co.uk> wrote in message
news:eInRB7%23lFHA.2404@TK2MSFTNGP10.phx.gbl...
> Brian Cesafsky wrote:
> Brian
>
> From my understanding the flat file assembler's support for headers is
> only relevant when you actually receive a flat file with a header first
> that is being removed in the receive port and then re-added on the send
> port.
>
> obviously - you scenario is different.
>
> I would try to things -
>
> 1. Do not split your message to header/detail. have a single output schema
> with both record types and create them both using the mapper.
> (btw - if all you have in the header is the record count you could
> probably avoid returning it from sql and counting it on the xslt)
>
> 2. I believe there's a context property where the flat file disassembler
> puts the header in the receive pipeline and the flat file assembler uses
> to pick it up and pre-pend it to the message. you might be able to update
> that with the *flat* header you wish to have in your message.
>
> Yossi Dahan



Brian Cesafsky

2005-08-03, 5:51 pm

Scott, thanks for the ideas...

it worked to have a multipart message (with both header and body parts, the
latter marked as body in the type definition) and then to configure the flat
file assembler with both the header schema and body schema.

Thanks again!

Brian

"Scott Colestock" <scolestock@community.nospam> wrote in message
news:u9G9scDmFHA.3900@TK2MSFTNGP09.phx.gbl...
>I thought the flat file assembler would deal with headers as well (but I
>haven't played with this, at least not recently) -
>
> Is it possible that you want to have a multipart message (with both header
> and body parts, the latter marked as body in the type definition) and that
> if you configure the flat file assembler with both your header schema and
> body schema that the right thing will hapen?
>
>
>
> "Yossi Dahan" <yossi.dahan@sabratech.co.uk> wrote in message
> news:eInRB7%23lFHA.2404@TK2MSFTNGP10.phx.gbl...
>
>



Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com