Frage

Ich habe einige gebrochene Fäden über die Bahn gefunden, wo die Menschen behaupten zu können, Formen mit XLANGMessage Typen in einer Orchestrierung verwenden empfangen zu Flat-File-Schema-Dateien zu erhalten, die nicht in einem bestimmten XSD montiert werden konnte.

Ich habe versucht, die Message einzustellen, in der Form wie Microsoft.XLANGS.BaseTypes.XLANGMessage erhalten, aber dies ist nicht Basetype serializable. Dies führt dann einen Buildfehler.

Gibt es einen Objekttyp, den beide XmlDocuments von gut gebildeten XML-Nachrichten sowie fehlerhaften XML und nicht zusammengesetzte flache Dateien erfassen kann?

War es hilfreich?

Lösung

In answer to your direct question in bold - yes, the type you are after is System.Xml.XmlDocument.

What you need to do is create a new message and when selecting its type, select the above type from the .NET Classes section.

This message when assigned to a receive shape can then receive any payload, for example, I've often used this to pass formats such as .pdf files through BizTalk where I had no need to parse them. Do be aware, however, that despite the name, what you have here is not Xml and will cause you all sorts of issues if you try and treat is as such.


To dig a little further into your question - are you trying to make some sort of error handling orchestration?

If you are then in your error handling code you can just have a recieve shape that receives a message of type XmlDocument with its filter expression set to ErrorReport.ErrorType == "FailedMessage" that is bound to a direct bound port attached to the Message Box.

I've often found it handy to have two receive shapes, one to catch routing failures, when we have any possible payload, and another to subscribe to a strongly types fault wrapper envelope that you define and pass out of your other orchestrations from their CatchException shapes.

This means that you can then build one centralised place to handle all exceptions.


If you haven't seen it, there is a nice post by Charles Young that may describe something similar to what you are trying to do.

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top