Dot Net Dunk

Wandering in the land of .NET
posts - 42, comments - 44, trackbacks - 155

My Links

News

Archives

Post Categories

Blog Roll

Mapping to an Envelope Schema

A few days ago, I blogged about splitting documents.

It seems that there's a bug in BizTalk that means this approach won't work. The typical pattern when defining an envelope schema is to define your repeating node as one schema, and xs:import it to your envelope schema (for details, see Jan Tielen's excellent blog entry).

Unfortunately, if you create a map that maps to your envelope schema (for example in my case because the envelope schema is also the canonical batched data format), then that map is unable to execute in a receive port (and presumably a send port, although I haven't checked). When a document is received, you will get the following error logged in the Application log:

Document type "uri:my-uri#Customer" does not match any of the given schemas.
(where uri:my-uri#Customer is the root node of the xs:imported schema).

Hugo Rodger-Brown also ran into this at the same time as me so we're both left scratching our heads.

I can't help feeling that this is somehow related to Scott Colestock's old post where he notes that, unless you have a fully qualified assembly name, a pipeline will fail to load your schema because BTS simply doesn't know which assembly to search for the type.

Obviously, receive port maps are run after the pipeline, but I still feel it's all relating to the same kind of issue. If you open up the source of a .btm file, you'll see that the node only references the type of the destination schema - it doesn't use a fully qualified name. Unfortunately, editing the map source to use a FQN won't work (the mapper shows an error in the designer).

So, in summary it looks like you simply can't map to a schema that references other schema from within a receive (& send?) port. Note that it works fine from within an Orchestration - probably because the Orchestration has a reference to the correct assembly, and so it can resolve the type name successfully.

  • Share This Post:
  • Share on Twitter
  • Share on Facebook
  • Share on Technorati

Print | posted on Friday, December 10, 2004 3:20 PM | Filed Under [ BizTalk Server ]

Feedback

Gravatar

# re: Mapping to an Envelope Schema

Any progress on this issue?

I've got the same issue and it’s left me scratching my head too!



Regards,
Jan Andersen
3/23/2005 3:53 PM | Jan Andersen
Gravatar

# re: Mapping to an Envelope Schema

Me too, I'm courious on this one :(

Mvgr,

Sander Stuurwold
7/13/2005 11:33 AM | Sander Stuurwold
Gravatar

# re: Mapping to an Envelope Schema

Ensure that the node which contains the <any> node must have a valid instance xpath which can be selected through the properties on selecting the root node.That means the root node has the BodyXpath property populated and editable or else this would result in an warning during the build of the schemas.
Otherwise this error keeps happening
7/20/2006 2:26 PM | S Pan
Post A Comment
Title:
Name:
Email:
Website:
Comment:
Verification:
 
 

Powered by: