Jaa


Using the Namespace Transport Property

All four of the BizTalk adapters provided with Commerce Server 2009, also known informally as the Commerce Server 2009 adapters, include a transport property called Namespace that can be configured for both their receive and send endpoints. How this property is used varies somewhat from adapter to adapter. This topic provides a closer look at these usages.

First, consider that the different systems that are sending messages through BizTalk Server are likely to have name clashes with respect to common types of business documents such as, for example, purchase orders. Indeed, the concept of namespaces was invented to solve such potential name clashes. Second, consider that the XSD schema files produced by the tools associated with the different Commerce Server 2009 systems have the ability to include a namespace specification in the XSD files that they produce. As an adapter developer, the reason that you would use one or more of the XSD generation tools, with or without a namespace being included, is so that you can deploy those XSD schemas to BizTalk Server and then develop some BizTalk Server processing that makes use of those schemas, either for message validation or for looking at the data within the messages. For more information about the tools that you can use to generate up-to-date schemas for the various Commerce Server 2009 systems associated with the Commerce Server 2009 adapters, see Generating and Using the XSD Files Required by Different Commerce Server Systems.

It is also important to understand which schemas are associated with which adapter messages, and specifically, with the bodies of those messages. Some adapter message bodies are produced directly by the corresponding Commerce Server 2009 Web services and therefore conform directly to the schemas produced by the tools associated with each of the corresponding Commerce Server 2009 systems. For example, the message body of a CommerceServerProfilesExport message conforms to the schema you can generate using the command line tool ExportProfileXsd.exe. On the other hand, some adapter message bodies conform to the adapter-specific schemas that are included in the adapter SDK. For more information about the schemas associated with the different adapter messages, see the section Adapter Message Types and the topic Adapter Message Schemas.

Whether or not you use the transport property Namespace, which can be configured for both the receive and send endpoints of each of the four types of Commerce Server 2009 adapters, depends on your answers to the following questions:

  1. Are you going to generate XSD schemas using the provided tools and deploy those schemas to BizTalk Server, or potentially to some other system beyond BizTalk Server, so that the messages can either be validated or otherwise examined?

  2. If so, are you going to use the namespace options for the schema(s) that you generate and deploy? Your decision in this regard may depend on whether you anticipate encountering name clashes such as might happen if there are multiple types of purchase order messages flowing through your BizTalk Server installation.

If you answered "yes" to both questions, then you should configure the Namespace transport property of the relevant Commerce Server 2009 adapter endpoints to the same value you used for the namespace option to the XSD generation tools. When the Namespace transport property is configured, the Commerce Server 2009 adapters will perform extra namespace processing, as follows:

  • For messages being submitted to BizTalk Server, if the message has a body governed by a Commerce Server 2009 system schema (as opposed to an adapter schema), the Commerce Server 2009 adapters will make sure that the namespace attribute (xmlns) of the root element of the message body is set to the specified namespace value, adding it if necessary.

  • For messages being received from BizTalk Server, if the message has a body governed by a Commerce Server 2009 system schema (as opposed to an adapter schema), the Commerce Server 2009 adapters, or in some cases, the corresponding Web service, will make sure that the namespace attribute (xmlns) of the root element of the message body matches the specified namespace value.

See Also

Other Resources

Generating and Using the XSD Files Required by Different Commerce Server Systems

Adapter Message Types

Adapter Message Schemas

BizTalk Adapter Concepts