|
Home > Archive > BizTalk Server General > June 2005 > Using a receive pipeline to split
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 |
Using a receive pipeline to split
|
|
| N Thorell 2005-06-29, 7:52 am |
| I have followed several step-by-step instructions regarding using a 'receive
pipeline' to split a dataset into individual messages. But they all end up
with the same problem. The compiler complains that the 2 schemas cannot use
the same 'target namespace'. That is very confusing. Can somebody give me
another sample on how to do it? I am using an SQL SELECT statement as input
and a 'FILE' as output, and I use 'Add generated items'. I need to see how
the two schemas look in xml-format. (The envelope and the other one)
| |
| Stephen W. Thomas 2005-06-29, 7:52 am |
| Hello.
I have a sample
(http://www.biztalkgurus.com/Samples...h-Pipeline.html) that
uses envelopes to Debatch an Xml messages. I wrote this pre-sp1. Sp1
changes namespace requirements a little.
I find working with envelopes very confusing and much harder then it looks.
If you continue to have problems, I’d be happy to take a look at your
schema. Just email them to swthomas@NOSPAMbiztalkgurus.com – just remove the
NOSPAM part.
Hope this helps.
Stephen W. Thomas
http://www.biztalkgurus.com
"N Thorell" wrote:
> I have followed several step-by-step instructions regarding using a 'receive
> pipeline' to split a dataset into individual messages. But they all end up
> with the same problem. The compiler complains that the 2 schemas cannot use
> the same 'target namespace'. That is very confusing. Can somebody give me
> another sample on how to do it? I am using an SQL SELECT statement as input
> and a 'FILE' as output, and I use 'Add generated items'. I need to see how
> the two schemas look in xml-format. (The envelope and the other one)
| |
| N Thorell 2005-06-29, 7:52 am |
| Now I made some progress. Now it is quering the database and drops a file
every 30 seconds. But I expected one file per 'record' instead of all
records in ONE file. Exactly what is triggering the 'split'?
Here comes the file:
<?xml version="1.0" encoding="utf-8" ?>
- <EmpRot xmlns="http://NorthPipeEmpSplit">
<employees EmployeeID="1" LastName="Davolio" FirstName="Nancy"
Title="Sales Representative" TitleOfCourtesy="Ms."
BirthDate="1948-12-08T00:00:00" HireDate="1992-05-01T00:00:00" Address="507 -
20th Ave. E. Apt. 2A" City="Seattle" Region="WA" PostalCode="98122"
Country="USA" HomePhone="(206) 555-9857" Extension="5467"
Photo="dbobject/employees[@EmployeeID='1']/@Photo" Notes="Education includes
a BA in psychology from Colorado State university in 1970. She also completed
"The Art of the Cold Call." Nancy is a member of Toastmasters International."
ReportsTo="2" PhotoPath="http://accweb/emmployees/davolio.bmp" />
<employees EmployeeID="2" LastName="Fuller" FirstName="Andrew" Title="Vice
President, Sales" TitleOfCourtesy="Dr." BirthDate="1952-02-19T00:00:00"
HireDate="1992-08-14T00:00:00" Address="908 W. Capital Way" City="Tacoma"
Region="WA" PostalCode="98401" Country="USA" HomePhone="(206) 555-9482"
Extension="3457" Photo="dbobject/employees[@EmployeeID='2']/@Photo"
Notes="Andrew received his BTS commercial in 1974 and a Ph.D. in
international marketing from the university of Dallas in 1981. He is fluent
in French and Italian and reads German. He joined the company as a sales
representative, was promoted to sales manager in January 1992 and to vice
president of sales in March 1993. Andrew is a member of the Sales Management
Roundtable, the Seattle Chamber of Commerce, and the Pacific Rim Importers
Association." PhotoPath="http://accweb/emmployees/fuller.bmp" />
<employees EmployeeID="3" LastName="Leverling" FirstName="Janet"
Title="Sales Representative" TitleOfCourtesy="Ms."
BirthDate="1963-08-30T00:00:00" HireDate="1992-04-01T00:00:00" Address="722
Moss Bay Blvd." City="Kirkland" Region="WA" PostalCode="98033" Country="USA"
HomePhone="(206) 555-3412" Extension="3355"
Photo="dbobject/employees[@EmployeeID='3']/@Photo" Notes="Janet has a BS
degree in chemistry from Boston college (1984). She has also completed a
certificate program in food retailing management. Janet was hired as a sales
associate in 1991 and promoted to sales representative in February 1992."
ReportsTo="2" PhotoPath="http://accweb/emmployees/leverling.bmp" />
<employees EmployeeID="4" LastName="Peacock" FirstName="Margaret"
Title="Sales Representative" TitleOfCourtesy="Mrs."
BirthDate="1937-09-19T00:00:00" HireDate="1993-05-03T00:00:00" Address="4110
Old Redmond Rd." City="Redmond" Region="WA" PostalCode="98052" Country="USA"
HomePhone="(206) 555-8122" Extension="5176"
Photo="dbobject/employees[@EmployeeID='4']/@Photo" Notes="Margaret holds a BA
in English literature from Concordia college (1958) and an MA from the
American Institute of Culinary Arts (1966). She was assigned to the London
office temporarily from July through November 1992." ReportsTo="2"
PhotoPath="http://accweb/emmployees/peacock.bmp" />
<employees EmployeeID="5" LastName="Buchanan" FirstName="Steven"
Title="Sales Manager" TitleOfCourtesy="Mr." BirthDate="1955-03-04T00:00:00"
HireDate="1993-10-17T00:00:00" Address="14 Garrett Hill" City="London"
PostalCode="SW1 8JR" Country="UK" HomePhone="(71) 555-4848" Extension="3453"
Photo="dbobject/employees[@EmployeeID='5']/@Photo" Notes="Steven Buchanan
graduated from St. Andrews University, Scotland, with a BSC degree in 1976.
Upon joining the company as a sales representative in 1992, he spent 6 months
in an orientation program at the Seattle office and then returned to his
permanent post in London. He was promoted to sales manager in March 1993. Mr.
Buchanan has completed the courses "Successful Telemarketing" and
"International Sales Management." He is fluent in French." ReportsTo="2"
PhotoPath="http://accweb/emmployees/buchanan.bmp" />
<employees EmployeeID="6" LastName="Suyama" FirstName="Michael"
Title="Sales Representative" TitleOfCourtesy="Mr."
BirthDate="1963-07-02T00:00:00" HireDate="1993-10-17T00:00:00"
Address="Coventry House Miner Rd." City="London" PostalCode="EC2 7JR"
Country="UK" HomePhone="(71) 555-7773" Extension="428"
Photo="dbobject/employees[@EmployeeID='6']/@Photo" Notes="Michael is a
graduate of Sussex university (MA, economics, 1983) and the university of
California at Los Angeles (MBA, marketing, 1986). He has also taken the
courses "Multi-Cultural Selling" and "Time Management for the Sales
Professional." He is fluent in Japanese and can read and write French,
Portuguese, and Spanish." ReportsTo="5"
PhotoPath="http://accweb/emmployees/davolio.bmp" />
<employees EmployeeID="7" LastName="King" FirstName="Robert" Title="Sales
Representative" TitleOfCourtesy="Mr." BirthDate="1960-05-29T00:00:00"
HireDate="1994-01-02T00:00:00" Address="Edgeham Hollow Winchester Way"
City="London" PostalCode="RG1 9SP" Country="UK" HomePhone="(71) 555-5598"
Extension="465" Photo="dbobject/employees[@EmployeeID='7']/@Photo"
Notes="Robert King served in the Peace Corps and traveled extensively before
completing his degree in English at the university of Michigan in 1992, the
year he joined the company. After completing a course entitled "Selling in
Europe," he was transferred to the London office in March 1993."
ReportsTo="5" PhotoPath="http://accweb/emmployees/davolio.bmp" />
<employees EmployeeID="8" LastName="Callahan" FirstName="Laura"
Title="Inside Sales Coordinator" TitleOfCourtesy="Ms."
BirthDate="1958-01-09T00:00:00" HireDate="1994-03-05T00:00:00" Address="4726
- 11th Ave. N.E." City="Seattle" Region="WA" PostalCode="98105" Country="USA"
HomePhone="(206) 555-1189" Extension="2344"
Photo="dbobject/employees[@EmployeeID='8']/@Photo" Notes="Laura received a BA
in psychology from the university of Washington. She has also completed a
course in business French. She reads and writes French." ReportsTo="2"
PhotoPath="http://accweb/emmployees/davolio.bmp" />
<employees EmployeeID="9" LastName="Dodsworth" FirstName="Anne"
Title="Sales Representative" TitleOfCourtesy="Ms."
BirthDate="1966-01-27T00:00:00" HireDate="1994-11-15T00:00:00" Address="7
Houndstooth Rd." City="London" PostalCode="WG2 7LT" Country="UK"
HomePhone="(71) 555-4444" Extension="452"
Photo="dbobject/employees[@EmployeeID='9']/@Photo" Notes="Anne has a BA
degree in English from St. Lawrence College. She is fluent in French and
German." ReportsTo="5" PhotoPath="http://accweb/emmployees/davolio.bmp" />
</EmpRot>
"Stephen W. Thomas" wrote:
[vbcol=seagreen]
> Hello.
>
> I have a sample
> (http://www.biztalkgurus.com/Samples...h-Pipeline.html) that
> uses envelopes to Debatch an Xml messages. I wrote this pre-sp1. Sp1
> changes namespace requirements a little.
>
> I find working with envelopes very confusing and much harder then it looks.
>
> If you continue to have problems, I’d be happy to take a look at your
> schema. Just email them to swthomas@NOSPAMbiztalkgurus.com – just remove the
> NOSPAM part.
>
> Hope this helps.
>
> Stephen W. Thomas
> http://www.biztalkgurus.com
>
>
> "N Thorell" wrote:
>
| |
| Stephen W. Thomas 2005-06-29, 5:51 pm |
| Hello.
You can use the Receive Pipeline to break up the message. So, into the
pipeline you have your message below. Out of the pipeline you would have
single employees records.
To do this, you can define an envelope schema that looks something like this:
<EmpRot>
<any>
Then, set the Body XPath to <EmpRot> (it is one level higher then what you
want to debatch). Then, you should get your single records.
By using the <Any> node you do not have import your 2nd schema into the
envelope – useless you wanted to.
Hope this helps.
Stephen W. Thomas
http://www.biztalkgurus.com
"N Thorell" wrote:
[vbcol=seagreen]
> Now I made some progress. Now it is quering the database and drops a file
> every 30 seconds. But I expected one file per 'record' instead of all
> records in ONE file. Exactly what is triggering the 'split'?
>
> Here comes the file:
>
> <?xml version="1.0" encoding="utf-8" ?>
> - <EmpRot xmlns="http://NorthPipeEmpSplit">
> <employees EmployeeID="1" LastName="Davolio" FirstName="Nancy"
> Title="Sales Representative" TitleOfCourtesy="Ms."
> BirthDate="1948-12-08T00:00:00" HireDate="1992-05-01T00:00:00" Address="507 -
> 20th Ave. E. Apt. 2A" City="Seattle" Region="WA" PostalCode="98122"
> Country="USA" HomePhone="(206) 555-9857" Extension="5467"
> Photo="dbobject/employees[@EmployeeID='1']/@Photo" Notes="Education includes
> a BA in psychology from Colorado State university in 1970. She also completed
> "The Art of the Cold Call." Nancy is a member of Toastmasters International."
> ReportsTo="2" PhotoPath="http://accweb/emmployees/davolio.bmp" />
> <employees EmployeeID="2" LastName="Fuller" FirstName="Andrew" Title="Vice
> President, Sales" TitleOfCourtesy="Dr." BirthDate="1952-02-19T00:00:00"
> HireDate="1992-08-14T00:00:00" Address="908 W. Capital Way" City="Tacoma"
> Region="WA" PostalCode="98401" Country="USA" HomePhone="(206) 555-9482"
> Extension="3457" Photo="dbobject/employees[@EmployeeID='2']/@Photo"
> Notes="Andrew received his BTS commercial in 1974 and a Ph.D. in
> international marketing from the university of Dallas in 1981. He is fluent
> in French and Italian and reads German. He joined the company as a sales
> representative, was promoted to sales manager in January 1992 and to vice
> president of sales in March 1993. Andrew is a member of the Sales Management
> Roundtable, the Seattle Chamber of Commerce, and the Pacific Rim Importers
> Association." PhotoPath="http://accweb/emmployees/fuller.bmp" />
> <employees EmployeeID="3" LastName="Leverling" FirstName="Janet"
> Title="Sales Representative" TitleOfCourtesy="Ms."
> BirthDate="1963-08-30T00:00:00" HireDate="1992-04-01T00:00:00" Address="722
> Moss Bay Blvd." City="Kirkland" Region="WA" PostalCode="98033" Country="USA"
> HomePhone="(206) 555-3412" Extension="3355"
> Photo="dbobject/employees[@EmployeeID='3']/@Photo" Notes="Janet has a BS
> degree in chemistry from Boston college (1984). She has also completed a
> certificate program in food retailing management. Janet was hired as a sales
> associate in 1991 and promoted to sales representative in February 1992."
> ReportsTo="2" PhotoPath="http://accweb/emmployees/leverling.bmp" />
> <employees EmployeeID="4" LastName="Peacock" FirstName="Margaret"
> Title="Sales Representative" TitleOfCourtesy="Mrs."
> BirthDate="1937-09-19T00:00:00" HireDate="1993-05-03T00:00:00" Address="4110
> Old Redmond Rd." City="Redmond" Region="WA" PostalCode="98052" Country="USA"
> HomePhone="(206) 555-8122" Extension="5176"
> Photo="dbobject/employees[@EmployeeID='4']/@Photo" Notes="Margaret holds a BA
> in English literature from Concordia college (1958) and an MA from the
> American Institute of Culinary Arts (1966). She was assigned to the London
> office temporarily from July through November 1992." ReportsTo="2"
> PhotoPath="http://accweb/emmployees/peacock.bmp" />
> <employees EmployeeID="5" LastName="Buchanan" FirstName="Steven"
> Title="Sales Manager" TitleOfCourtesy="Mr." BirthDate="1955-03-04T00:00:00"
> HireDate="1993-10-17T00:00:00" Address="14 Garrett Hill" City="London"
> PostalCode="SW1 8JR" Country="UK" HomePhone="(71) 555-4848" Extension="3453"
> Photo="dbobject/employees[@EmployeeID='5']/@Photo" Notes="Steven Buchanan
> graduated from St. Andrews University, Scotland, with a BSC degree in 1976.
> Upon joining the company as a sales representative in 1992, he spent 6 months
> in an orientation program at the Seattle office and then returned to his
> permanent post in London. He was promoted to sales manager in March 1993. Mr.
> Buchanan has completed the courses "Successful Telemarketing" and
> "International Sales Management." He is fluent in French." ReportsTo="2"
> PhotoPath="http://accweb/emmployees/buchanan.bmp" />
> <employees EmployeeID="6" LastName="Suyama" FirstName="Michael"
> Title="Sales Representative" TitleOfCourtesy="Mr."
> BirthDate="1963-07-02T00:00:00" HireDate="1993-10-17T00:00:00"
> Address="Coventry House Miner Rd." City="London" PostalCode="EC2 7JR"
> Country="UK" HomePhone="(71) 555-7773" Extension="428"
> Photo="dbobject/employees[@EmployeeID='6']/@Photo" Notes="Michael is a
> graduate of Sussex university (MA, economics, 1983) and the university of
> California at Los Angeles (MBA, marketing, 1986). He has also taken the
> courses "Multi-Cultural Selling" and "Time Management for the Sales
> Professional." He is fluent in Japanese and can read and write French,
> Portuguese, and Spanish." ReportsTo="5"
> PhotoPath="http://accweb/emmployees/davolio.bmp" />
> <employees EmployeeID="7" LastName="King" FirstName="Robert" Title="Sales
> Representative" TitleOfCourtesy="Mr." BirthDate="1960-05-29T00:00:00"
> HireDate="1994-01-02T00:00:00" Address="Edgeham Hollow Winchester Way"
> City="London" PostalCode="RG1 9SP" Country="UK" HomePhone="(71) 555-5598"
> Extension="465" Photo="dbobject/employees[@EmployeeID='7']/@Photo"
> Notes="Robert King served in the Peace Corps and traveled extensively before
> completing his degree in English at the university of Michigan in 1992, the
> year he joined the company. After completing a course entitled "Selling in
> Europe," he was transferred to the London office in March 1993."
> ReportsTo="5" PhotoPath="http://accweb/emmployees/davolio.bmp" />
> <employees EmployeeID="8" LastName="Callahan" FirstName="Laura"
> Title="Inside Sales Coordinator" TitleOfCourtesy="Ms."
> BirthDate="1958-01-09T00:00:00" HireDate="1994-03-05T00:00:00" Address="4726
> - 11th Ave. N.E." City="Seattle" Region="WA" PostalCode="98105" Country="USA"
> HomePhone="(206) 555-1189" Extension="2344"
> Photo="dbobject/employees[@EmployeeID='8']/@Photo" Notes="Laura received a BA
> in psychology from the university of Washington. She has also completed a
> course in business French. She reads and writes French." ReportsTo="2"
> PhotoPath="http://accweb/emmployees/davolio.bmp" />
> <employees EmployeeID="9" LastName="Dodsworth" FirstName="Anne"
> Title="Sales Representative" TitleOfCourtesy="Ms."
> BirthDate="1966-01-27T00:00:00" HireDate="1994-11-15T00:00:00" Address="7
> Houndstooth Rd." City="London" PostalCode="WG2 7LT" Country="UK"
> HomePhone="(71) 555-4444" Extension="452"
> Photo="dbobject/employees[@EmployeeID='9']/@Photo" Notes="Anne has a BA
> degree in English from St. Lawrence College. She is fluent in French and
> German." ReportsTo="5" PhotoPath="http://accweb/emmployees/davolio.bmp" />
> </EmpRot>
>
> "Stephen W. Thomas" wrote:
>
|
|
|
|
|