BizTalk schema in helper class

Is it possible to return BizTalk schema data type in a helper class method?

A BizTalk orchestration exposed as a web service receives an XmlDocument and we need to deserialize it to typed message. I was thinking of adding the deserialize in a Helper class that accepts the incoming XMlDocument  and return a typed message back to the orchestration in a message assignment shape.

May 27th, 2015 3:55pm

So, why would you want to do this?

A Schema based message is already 'Typed'.

Or are you talking about serialized classes or Entities?

Free Windows Admin Tool Kit Click here and download it now
May 27th, 2015 4:10pm

Because the Orchestration is exposed as a web service and accepts an XmlDocument. Without having to go through xpaths, I am trying to see if the XmlDocument can be deserialized into a typed message perhaps by adding required namespaces as well to the incoming request in the orchestration.
May 27th, 2015 4:20pm

I think I found how to, by generateing a class using xsd.exe for the schema, I can then use it in the helper class.
Free Windows Admin Tool Kit Click here and download it now
May 27th, 2015 4:48pm

But you shouldn't have to do any of that, especially using xsd.exe.

In BizTalk, the Schema is the Type.

Do you mean you don't have a Schema for the XmlDocument?  Visual Studio has a Schema Wizard.

May 27th, 2015 4:56pm

If the orchestration receives an XmlDocument, you can still instantiate the message by using the statement MyMessage = xmlDocument OR MyMessage.BodyPart = xmlDocument.

You can use the XSD and XmlSerializer if you want to construct new messages in helper. Refer https://msdn.microsoft.com/en-us/library/aa547985.aspx for various methods through which messages can be constructed for use within the orchestration.

Regards.

Free Windows Admin Tool Kit Click here and download it now
May 28th, 2015 12:32am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics