none
Need to Host WCF Recieve location that serves WSDL with inline XSD (imports not supported by consuming system) RRS feed

  • Question

  • I am exposing an orchestration as a WCF Service via the WCF Publishing Wizard.  The default service creation serves a WSDL that contains XSD references (e.g. xsd:import schemaLocation="whatever").  Unfortunately the system I am integrating with cannot handle imported XSD's in WSDL.  I need a way for BizTalk to host a WCF Service that serves a WSDL with the XSD's defined inline (not via import statements).  I found a solution explaining how to solve this with "pure WCF" - http://www.winterdom.com/weblog/2006/10/03/InlineXSDInWSDLWithWCF.aspx.  Can anyone provide any guidance on how to solve/configure this behavior for an orchestration being exposed via the WCF Publishing Wizard?

    Monday, July 14, 2008 8:14 AM

Answers

  • The easiest way to do this is to write an endpoint behavior that flattens the WSDL. Do a Google on Inline XSD WCF and there are plenty of articles.

     

    Once you've got your behavior you'll need to register it in the machine.config otherwise BizTalk will not pick it up, and of course as this is BizTalk the assembly containing the behavior needs to go in the GAC.

     

    When you create a new receive location for your service, choose WCF-CustomIsolated at the port type, and then choose whichever binding you want on the Binding tab (i.e., basic, etc.), then on the Behavior Tab right click the EndPoint Behavior node, choose Add Extension and select your behavior.

     

    This should then add that endpoint behavior to your BizTalk endpoint and so flatten your WSDL.

     

    HTH,


    CD

    Friday, July 18, 2008 9:12 AM

All replies

  • Just to make sure I understand what you are asking, is the following true:

     

    The system you are integrating with will be calling a WCF service which is hosting your BizTalk orchestration. So you want to expose the inline XSD as part of the WSDL.

     

    If so, it sounds like you are going to need to go through the WCF publishing wizard to deploy your service. Then you just need to get the WSDL for the service at the service address with ?wsdl on the end of it. You can modify the wsdl to include the schema inline and then in your integrating application, have it reference the WSDL file that has the inline schema. Here is an article that mentions how to use the WCF publishing wizard that mentions the ?wsdl way of getting a WCF service's WSDL: http://msdn.microsoft.com/en-us/library/bb226564.aspx.

     

    Thanks,

    Tuesday, July 15, 2008 5:35 PM
    Moderator
  • Thanks for the response.  I have used the WCF Publishing Wizard to deploy my Ochestrations as a WCF Service (no problem).  The WSDL generated from the deployed service contains XSD Imports.  I understand that I can manually remove all of the XSD Import statements and substitute the inline XSD definitions.  When I do this manual step, the system that I am integrating with understands the modified WSDL and can successfully invoke the WCF Service.  Unfortunately the project I am working on will have 90+ interfaces (very large integration).  Add to that, many of these interfaces will be changing of the course of the project from requirements or testing efforts.  The task of manually updated these WSDL's is extremely labor intensive.  I was hoping there was a behavior, feature component, where I could simply specify inline versus imported XSD definitions that can be generated from the WCF Publishing Wizard or through the WCF Service Configuration editor.

     

    I am looking at writing a scripting solution to complete this XSD Import substitution task for me, but I hoped that BizTalk/WCF as an integration platform, would provide a better option. 

    Thursday, July 17, 2008 5:02 PM
  • The easiest way to do this is to write an endpoint behavior that flattens the WSDL. Do a Google on Inline XSD WCF and there are plenty of articles.

     

    Once you've got your behavior you'll need to register it in the machine.config otherwise BizTalk will not pick it up, and of course as this is BizTalk the assembly containing the behavior needs to go in the GAC.

     

    When you create a new receive location for your service, choose WCF-CustomIsolated at the port type, and then choose whichever binding you want on the Binding tab (i.e., basic, etc.), then on the Behavior Tab right click the EndPoint Behavior node, choose Add Extension and select your behavior.

     

    This should then add that endpoint behavior to your BizTalk endpoint and so flatten your WSDL.

     

    HTH,


    CD

    Friday, July 18, 2008 9:12 AM