Geeks With Blogs
Molnar Tibor blog

Think about the situation when the web service referenced by a Biztalk Server Project was created with the contract first approach: first the messages were defined using different complex schemas referencing one another, then the wsdl file was generated, then the implementation classes were created based on the wsdl file. What could happen is that the schemas created by Visual Studio (and used as message types in the web port type definition) during adding the web reference are slighlty different then the original schemas. For example 'xs:restriction' and 'xs:all' will be replaced with the base type of the restriction (xs:string for example) respectivelly with 'xs:sequence', the 'maxoccures' attribute value other then 'unbounded' will be replaced with 'unbounded'.

Sometimes this can be annoying, the messages built up by Biztalk might be not valid after calling a web service because of the rules defined during the messages schemas definition and ignored by Biztalk because of loosing some of those rules during adding the web reference.

Another problem can be that the types defined in the xml schemas can be duplicated between two or more web references.

Solution: create a schema repository in a Biztalk project with the exact schemas created at the beginning of the consumed  web services development and generate our web port types using as message types directly the types defined in those schemas. This way the problems presented above will be solved.

How: use the Visual Studio addon developed by me, BiztalkWscfClient. The detailed descripton of the tool can be found here. The tutorial can be found here.

If you have any feedback, don't hesitate to give it. If you will use this tool, I would be happy to do enhancement requests and bugfixes.

Posted on Sunday, February 19, 2006 10:46 AM Biztalk 2004/2006 | Back to top

Comments on this post: The BiztalkWscfClient tool

No comments posted yet.
Your comment:
 (will show your gravatar)

Copyright © Molnar Tibor | Powered by: