BizTalk Server - BTS 2004 Receive Pipeline & Xml Validator question

This is Interesting: Free IT Magazines  
Home > Archive > BizTalk Server > May 2004 > BTS 2004 Receive Pipeline & Xml Validator question





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 BTS 2004 Receive Pipeline & Xml Validator question
Mike Doerfler

2004-04-28, 3:35 pm

I've got a question I'm sure the BizTalk gurus can answer with ease

For the life of me I can't figure out why I can't get an invalid document to
not be validated. Here is what I have setup:

VisualStudio.NET

1 - BizTalkSchemaProject.dll: this is a dll with one schema.
2 - BizTalkServerProject.dll: this is a dll that contains a ReceivePipeline
that only has an Xml Validator that has the one schema from
BizTalkSchemaProject in the DocumentSchemas collection

I deploy the BizTalkSchemaProject.dll and BizTalkServerProject.dll - yeah, I
know the names are dumb but this is my learning project - to BizTalk.
They are both in the GAC and everything looks fine.

I setup a Receive Port and the Receive Location. The Receive Location uses
the Receive Pipeline from the BizTalkServerProject.dll The Send Port that
receives what comes out of the Receive Port is using the PassThruPipeline.

Now the fun part. The vendor we are exchanging information with sends just
plain Xml our way. By that I mean - they don't use namespaces in the
document. They have provided their schema in XDR and I used the wizard in
VS.NET to convert it to an XSD and cleaned it up a little bit.

Here are the four test Xml documents I have setup
1 - a valid document with no namespace on the root element
2 - a valid document with a namespace on the root element
3 - an invalid document with no namespace on the root element
4 - an invalid document with a namespace on the root element.

When I send those 4 documents to BizTalk here are the results I get:
1 - is sent to the Send Port
2 - is sent to the Send Port
3 - is sent to the Send Port
4 - is caught by the Recieve Pipeline as an invalid document.

Everything looks fine to me (as I understand BTS2004) except #3 - the
invalid document with no namespace. Does anyone have any guess why that is
getting past the Validator in the Recieve Pipeline?

Sorry for such a long winded question, but this has baffled me. Any help
would be much appreciated! Thanks in advance!

Mike


B. L.

2004-04-29, 1:37 pm

Mike,

The default PassThruPipeline shipped in the product does not have XML
Disassembler or Validator. This pipeline just passes a document through
without any processing. If you need to disassemble an xml file, you'll need
to use the XML receive pipeline. Further, if you need to validation, you'll
need to build a pipeline with the XML validator in it.

Hope that helps.

BL

"Mike Doerfler" <myspamaddress@nospam.com> wrote in message
news:u2rAfYVLEHA.3332@TK2MSFTNGP10.phx.gbl...
> I've got a question I'm sure the BizTalk gurus can answer with ease
>
> For the life of me I can't figure out why I can't get an invalid document

to
> not be validated. Here is what I have setup:
>
> VisualStudio.NET
>
> 1 - BizTalkSchemaProject.dll: this is a dll with one schema.
> 2 - BizTalkServerProject.dll: this is a dll that contains a

ReceivePipeline
> that only has an Xml Validator that has the one schema from
> BizTalkSchemaProject in the DocumentSchemas collection
>
> I deploy the BizTalkSchemaProject.dll and BizTalkServerProject.dll - yeah,

I
> know the names are dumb but this is my learning project - to BizTalk.
> They are both in the GAC and everything looks fine.
>
> I setup a Receive Port and the Receive Location. The Receive Location

uses
> the Receive Pipeline from the BizTalkServerProject.dll The Send Port that
> receives what comes out of the Receive Port is using the PassThruPipeline.
>
> Now the fun part. The vendor we are exchanging information with sends

just
> plain Xml our way. By that I mean - they don't use namespaces in the
> document. They have provided their schema in XDR and I used the wizard in
> VS.NET to convert it to an XSD and cleaned it up a little bit.
>
> Here are the four test Xml documents I have setup
> 1 - a valid document with no namespace on the root element
> 2 - a valid document with a namespace on the root element
> 3 - an invalid document with no namespace on the root element
> 4 - an invalid document with a namespace on the root element.
>
> When I send those 4 documents to BizTalk here are the results I get:
> 1 - is sent to the Send Port
> 2 - is sent to the Send Port
> 3 - is sent to the Send Port
> 4 - is caught by the Recieve Pipeline as an invalid document.
>
> Everything looks fine to me (as I understand BTS2004) except #3 - the
> invalid document with no namespace. Does anyone have any guess why that

is
> getting past the Validator in the Recieve Pipeline?
>
> Sorry for such a long winded question, but this has baffled me. Any help
> would be much appreciated! Thanks in advance!
>
> Mike
>
>



Mike Doerfler

2004-04-30, 12:37 pm

Hi BL, I think I already have it setup how you describe it... In my
Receive Port I have a custom receive pipeline that has an Xml Validator with
one schema in it. The Send Port uses the Default PassThruPipeline - do I
need a custom SendPipeline for the validation also?

So my problem - most likely some misunderstanding of BizTalk - is that I
have a custom receive pipeline that is not validating an xml document when
that document does not use namespaces.

Thanks in advance for any help!

Mike

"B. L." <32018@online.microsoft.com> wrote in message
news:#3#3iDhLEHA.1264@TK2MSFTNGP12.phx.gbl...
> Mike,
>
> The default PassThruPipeline shipped in the product does not have XML
> Disassembler or Validator. This pipeline just passes a document through
> without any processing. If you need to disassemble an xml file, you'll

need
> to use the XML receive pipeline. Further, if you need to validation,

you'll
> need to build a pipeline with the XML validator in it.
>
> Hope that helps.
>
> BL
>
> "Mike Doerfler" <myspamaddress@nospam.com> wrote in message
> news:u2rAfYVLEHA.3332@TK2MSFTNGP10.phx.gbl...
document[vbcol=seagreen]
> to
> ReceivePipeline
yeah,[vbcol=seagreen]
> I
> uses
that[vbcol=seagreen]
PassThruPipeline.[vbcol=seagreen]
> just
in[vbcol=seagreen]
> is
help[vbcol=seagreen]
>
>



Eric Z. Beard

2004-05-03, 11:38 am

Hi Mike,

Are you using an orchestration or just linking the receive and send locations using Biztalk Explorer? With an orchestration I think you would get an error saying Biztalk didn't know how to route the message, since it doesn't infer the schema. The valida
tor will only apply to messages with a namespace specified, so the invalid doc is probably bypassing the validator and just getting dropped into the send port.

EZB

----- Mike Doerfler wrote: -----

Hi BL, I think I already have it setup how you describe it... In my
Receive Port I have a custom receive pipeline that has an Xml Validator with
one schema in it. The Send Port uses the Default PassThruPipeline - do I
need a custom SendPipeline for the validation also?

So my problem - most likely some misunderstanding of BizTalk - is that I
have a custom receive pipeline that is not validating an xml document when
that document does not use namespaces.

Thanks in advance for any help!

Mike

"B. L." <32018@online.microsoft.com> wrote in message
news:#3#3iDhLEHA.1264@TK2MSFTNGP12.phx.gbl...
> Mike,
> Disassembler or Validator. This pipeline just passes a document through
> without any processing. If you need to disassemble an xml file, you'll

need
> to use the XML receive pipeline. Further, if you need to validation,

you'll[vbcol=seagreen]
> need to build a pipeline with the XML validator in it.
> news:u2rAfYVLEHA.3332@TK2MSFTNGP10.phx.gbl...
document[vbcol=seagreen]
> to
> ReceivePipeline
yeah,[vbcol=seagreen]
> I
> uses
that[vbcol=seagreen]
PassThruPipeline.[vbcol=seagreen]
> just
in[vbcol=seagreen]
> is
help[vbcol=seagreen]
Mike Doerfler

2004-05-05, 5:36 pm

Hi EZB, thanks for the input. I finally figured it out - it was a
combination of things:

I used the tool in BTS Projects to update an XDR to an XSD. I was getting
compiler errors about not having a target namespace - so I added one.
Unfortunately, that does not work so well when the incoming docs don't have
a target namespace. So removing it produces compiler warnings, but
validates the documents if the doc doesn't have any namespaces.

I had another problem. I had an element that could have a string with a
maxLength of 2. There was no problem validating what was being sent to me
with MSXML and an xdr. The moment I switched to .NET and XSD the instance
validation would fail. Turns out I was receiving a field with 2 tabs in it
and that was causing the instance to fail validation. I added
<xs:whiteSpace value="collapse" /> to that element and all docs I receive
are validated that should be

Also I noticed that after I made a change and redeployed that I would have
to restart the BizTalk Host (not the actual machine - the host in the BTS
Adminstartor) that was hosting the File Receives. I don't understand why
the changes did not always take effect just with an undeploy and redeploy of
the Schema.dll & custom ReceivePipeline.dll - probably a user error...

Thanks for everyones help!

Mike

"Eric Z. Beard" <ericzbeard@yahoo.com> wrote in message
news:FF9D973F-71BF-4F6E-83B5-9FEF3FB07E28@microsoft.com...
> Hi Mike,
>
> Are you using an orchestration or just linking the receive and send

locations using Biztalk Explorer? With an orchestration I think you would
get an error saying Biztalk didn't know how to route the message, since it
doesn't infer the schema. The validator will only apply to messages with a
namespace specified, so the invalid doc is probably bypassing the validator
and just getting dropped into the send port.
>
> EZB
>
> ----- Mike Doerfler wrote: -----
>
> Hi BL, I think I already have it setup how you describe it... In my
> Receive Port I have a custom receive pipeline that has an Xml

Validator with
> one schema in it. The Send Port uses the Default PassThruPipeline -

do I
> need a custom SendPipeline for the validation also?
>
> So my problem - most likely some misunderstanding of BizTalk - is

that I
> have a custom receive pipeline that is not validating an xml document

when[vbcol=seagreen]
> that document does not use namespaces.
>
> Thanks in advance for any help!
>
> Mike
>
> "B. L." <32018@online.microsoft.com> wrote in message
> news:#3#3iDhLEHA.1264@TK2MSFTNGP12.phx.gbl...
XML[vbcol=seagreen]
through[vbcol=seagreen]
you'll[vbcol=seagreen]
> need
validation,[vbcol=seagreen]
> you'll
ease [vbcol=seagreen]
> document
BizTalkServerProject.dll -[vbcol=seagreen]
> yeah,
BizTalk.[vbcol=seagreen]
Location[vbcol=seagreen]
Port[vbcol=seagreen]
> that
> PassThruPipeline.
sends[vbcol=seagreen]
the[vbcol=seagreen]
wizard[vbcol=seagreen]
> in
get:[vbcol=seagreen]
#3 - the[vbcol=seagreen]
why that[vbcol=seagreen]
Any[vbcol=seagreen]
> help


Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com