Publishing Service Metadata for the WCF Receive Adapters

You can use the BizTalk WCF Service Publishing Wizard to create WCF services for publishing service metadata for existing WCF receive locations. To generate client service model code from the published metadata documents you can use the Service Model Metadata Utility tool (SvcUtil.exe) included in the Windows Software Development Kit (SDK) and .NET Framework Runtime Components.

Note

Before you publish service metadata for the WCF adapters, you must create the WCF receive locations by using the BizTalk Administration console or the BTSTask command-line tool included with BizTalk Server. For more information about how to create a WCF receive location, see the appropriate topic for each WCF adapter in WCF Adapters.

IIS versions

The WCF service that publishes service metadata can be running on the IIS version included with the operating system.

  • IIS provides the advanced process model. The published BizTalk WCF services must run in ASP.NET Compatibility Mode. The service metadata published by Web applications in IIS for the WCF receive adapters can be accessed over the HTTP transport.

Publish service metadata for the WCF receive locations

To publish service metadata for the WCF receive locations, you must use the BizTalk WCF Service Publishing Wizard to create a Web application to host WCF services that provide the service metadata. This allows a receive location to be called as if it were a WCF service. The BizTalk WCF Service Publishing Wizard generates the following files in the root folder of the created Web application:

File Folder Description
WCF services (.svc files) |WCF services that publish service metadata for the WCF receive locations. The WCF services publish service metadata for retrieval using an HTTP/GET request.
Web.config |ASP.NET configuration file that contains information for the ASP.NET Web application behaviors, the published WCF service behaviors, the metadata endpoint, and the BizTalk-specific settings. The wizard generates Web.config when the httpGetEnabled attribute of the <serviceMetadata> element is set to true. You can use a metadata import tool (such as SvcUtil.exe) to generate the client code required to call this service in the development environment. The address at which the metadata is published is the endpoint address of the WCF service plus a ?wsdl query string. Note: The default metadata binding generated by the BizTalk WCF Publishing Wizard is not secure and it allows anonymous access to the metadata. The service metadata contains a detailed description about the service and may intentionally or unintentionally contain sensitive information. To protect service metadata from unauthorized access, you can modify Web.config to use a secure binding for your metadata endpoint.
ServiceDescription.xml |XML file that describes the published WCF service contracts including the message types.
BizTalk schemas (.xsd files) \App_Data XML schemas defining the structure of XML instance messages, which are used in the WCF receive location.
SchemaIndex.xml \App_Data XML file that indicates the XML schema files used in the WCF receive location.
Serialization.xsd \App_Data XML schema exported by DataContractSerializer for the types, elements, and attributes from the namespace, http://schemas.microsoft.com/2003/10/Serialization/.
BindingInfo.xml \App_Data\Temp BizTalk binding file that can be imported by the development command-line tool or wizard to configure the receive locations. The published WCF services do not use this file and the Temp folder at run time.
WcfServiceDescription.xml \App_Data\Temp XML file that summarizes the settings that you used with the BizTalk WCF Service Publishing Wizard to create this Web application. The published WCF services do not use this file and the Temp folder at run time.

Next steps

See Also

Walkthrough: Publishing WCF Services with the WCF-NetMsmq Adapter