Question

I have a send port in my BizTalk Application that has an XML Transmit pipeline on it. When I send a .xml file through it that is well-formed, it works just fine and the .xml file arrives at the destination folder untouched. However, if that file is NOT well-formed, the file will still go through to the destination folder, however anything after the namespace declaration is gone.

My question is two part, I suppose:

  1. Shouldn't the XML Transmit pipeline let ONLY well-formed XML through?
  2. What about the XML Transmit pipeline is stripping the rest of the XML from the file?

Many thanks in advance. One of my first posts, so let me know what I'm doing wrong or if I can be more clear in my questions/descriptions.

____UPDATE__________________________________________

To dig a little further into my problem here . . . The gist of my BizTalk Application is this: Take in one .zip file full of .xml files in a receive location, spit out the individual .xml files in the send location, but ONLY those that are well-formed to the given schema.

In a well-formed world, the unzipping works like a charm based on a custom disassemble pipeline component. If all the .xml files are well-formed in the .zip file that I put in my receive location, the output is each individual .xml file like one would hope. However, if even just ONE of these files malformed, then the service instance is suspended and I'm dead in the water.

My receive pipeline consists of 3 components:

  1. A custom disassemble component that decompresses the .zip
  2. An XML Disassembler that has the given schema selected in the Document schemas collection, Recoverable Interchange set to True (This was my last hope :[ ), and Validate Documents set to true
  3. An XML Validator that has the given schema selected in the Document schemas collection and Recoverable Interchange set to True

I get an error when I put a .zip file with at least 1 malformed .xml document in it that says simply "The Messaging Engine encountered an error during the processing of one or more inbound messages."

So the real questions behind the questions, I suppose:

  1. If Recoverable Interchange is on, why would those messages that are well-formed not end up in the send location, while the others get suspended as expected?
  2. What can I do to get this outcome: where those messages that are well-formed get to the messagebox and those that aren't simply don't?

All help is appreciated for the BizTalk beginner. Thanks so much y'all.

Was it helpful?

Solution 2

The missing piece was configuring the Receive Port to "Enable routing for failed messages". Whereas I was getting an 'all or nothing' on the batch beforehand, after this configuration I get the expected result of only having those that are well-formed end up in my message box.

I also learned from these responses that even if you have two disassembler pieces in your pipeline, it's only the first that takes (assuming I understand that right).

If you are curious to the unzipping component I've created, it's almost exactly the same as this link, minus the promotion of the file extension seeing as I am expecting only .xml files.

OTHER TIPS

If I understand your question correct you have a custom debatching unzip disassembler at the disassbler stage of the receive pipeline? But you also have a XML disassbler in the disassbler stage to promote the message type etc?

This won't work, you can't have two disassbler after each other, only the first one will be used.

Implement the simple validation you need as part of your custom component and just stop those messages directly there in the disassemble component.

Create a custom Pipeline with a XML Assembler and XML Validator on it and specify the schema in both and use that Pipeline in your send port.

To answer your question Shouldn't the XML Transmit pipeline let ONLY well-formed XML through? You would think so but it seems to assume that any message in the message box are already well formed XML and valid according to it's schema and will try and send it as is unless you tell it to validate.

Receiveing only the Xml Declaration is not the expected behavior.

  1. Yes. You should get an Error or Warning about the malfomed Xml.
  2. It shouldn't so...I suspect there's something else going on. Perhaps a Map is emitting the expected content.
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top