Vishal Sharma
Vishal Sharma

Reputation: 1

Catching invalid xml error-message

I want to know if there is a way of catching xml that is not valid in the Biztalk orchestration.

My orchestration brings xml in, transforms it to another format , stores it in the db and Sends an acknowledgement to the sender...

Plz Help!

Upvotes: 0

Views: 528

Answers (3)

Filburt
Filburt

Reputation: 18082

All (Xml) messages entering your BizTalk system should be validated in the receive location resulting in a NACK response to the sender if validation fails.

To validate the structure, you need to define a schema for your incoming Xml message and add it to the DocumentSpecNames property of the Xml Receive Pipeline configuration in your receive location.

However if you need to validate the content of your incoming messages you should use Business Rules (BRE) just after the message enter your orchestration.

Upvotes: 1

John Norcott
John Norcott

Reputation: 124

Do you have any more details for your specific problem? Are the messages you're looking to validate the original message that starts the orchestration, or are the messages created within the orchestration?

Are you doing anything other than transforation, sending the data to the db, and sending an ack? If not, I would suggest not using an orchestration at all. All of those can be handled with maps and send port subscriptions. Also, by adding a pipeline to your receive location, you will get the XML schema validation you are looking for.

If an orchestration is necesary, then you can still either use a receive port inside the orchestration (kind of overkill just for schema validation, but still a possibility), or you can edit the BTSNTSvc.exe.config file as described here. Editing the config file, however, may introduce some overhead, as it is a server side setting.

One other option could be to have a receive port that validates the XML, then have your orchestration subscribe just to that receive port.

Hope that helps.

Upvotes: 0

I am not an expert at Biztalk, but you want to take a look at XSD. It is a mean by which you can put building constraints on XML documents. If you have access to some biztalk XLD's, you can convert them into XSDs. I don't know whether Biztalk XSD's or XLD's are available. If not, you could may be create them yourself...

Upvotes: 0

Related Questions