none
How to get <sequence> in the request response schema

    Question

  • Hi, I am adding my WCF service in my BizTalk application. I want <sequence> elemenet to come in the generated schemas. But I do not see this. How can I make sure that <sequence> comes in the request response schema. Any pointers ?/
    Friday, October 22, 2010 11:51 AM

Answers

  • If you code a c# data contract, then .Net infers these elements for you from c#. for example if you put an array in c# then .Net will know to generate maxOccurs attribute in the xml.

    Data contract is somehow limited with the amount of customizations it allows, for full customization you can use the xml serializer.

    Finally if you want to first write the schema and have the code generated from it take a look at WSCF.blue:

    http://wscfblue.codeplex.com/


    http://webservices20.blogspot.com/
    WCF Security, Interoperability And Performance Blog
    • Marked as answer by Mog Liang Friday, October 29, 2010 9:45 AM
    Friday, October 22, 2010 2:08 PM

All replies

  • Generally you cannot tell WCF how exactly the schema will look like.

    However probably there is already <sequence>, the ?wsdl file has references to other files (search for "import") and some of them are schemas which probably have what you look for.


    http://webservices20.blogspot.com/
    WCF Security, Interoperability And Performance Blog
    Friday, October 22, 2010 12:57 PM
  • This could be the reason. But I am very new to xml and I want to learn this. How these <Choice>, <sequence> are getting to added to request or response. If I want to create my own file where I need to enforce these tags, how should I proceed.
    Friday, October 22, 2010 1:29 PM
  • If you code a c# data contract, then .Net infers these elements for you from c#. for example if you put an array in c# then .Net will know to generate maxOccurs attribute in the xml.

    Data contract is somehow limited with the amount of customizations it allows, for full customization you can use the xml serializer.

    Finally if you want to first write the schema and have the code generated from it take a look at WSCF.blue:

    http://wscfblue.codeplex.com/


    http://webservices20.blogspot.com/
    WCF Security, Interoperability And Performance Blog
    • Marked as answer by Mog Liang Friday, October 29, 2010 9:45 AM
    Friday, October 22, 2010 2:08 PM