Now that we've covered a lot of the concepts with
WCF, let's apply them to how BizTalk WCF adapters are configured. The
BizTalk Administration tool provides a specific user interface to
customize the WCF-BasicHttp, WCF-WSHttp, and WCF-NetTcp adapter
properties.
1. Binding Configuration Options
The Binding configuration tab in Figure 1 shows the default configuration.
The open, close, and
send timeouts default to one minute each. One minute may not be enough
under certain circumstances. For example, you might have a synchronous
service call that executes an orchestration that lasts longer than one
minute.
The timeouts in Figure 1
are not just for the orchestration time. The time starts once WCF has
submitted a call to the Messagebox, which means you'll need to take into
consideration your "warm-up" time as well. Depending on your hardware,
that warm-up time alone may be longer than a minute.
|
|
2. Security Configuration
The Security configuration tab shown in Figure 2 allows you to modify how the endpoint will be secured for authentication.
The default security mode is
Message with a credential type of Windows, meaning WCF will require the
consumer of the service to attach their Windows credential token as part
of the message.
You can change the
Security Mode drop-down to either None, Transport, Message, or
TransportWithMessageCredential. Depending on the option you choose,
either the Transport section or the Message section will be enabled.
When choosing Message authentication, two additional check boxes are
available that affect authentication: Negotiate Service Credential and
Establish Security Context. The Negotiate Service Credential option
tells BizTalk whether the service credential is negotiated automatically
between the client and the service. The Establish Security Context
option specifies whether a security context token is established through
a WS-SecureConversation exchange between this send port and the
service. If this check box is selected, then the destination service
must support WS-SecureConversation.
3. Message Options
The Messages tab of the
WCF adapter provides the ability to customize which components of a SOAP
message get stored in the message box for processing. By default, the
entire <soap:body> will be stored, but you can customize your adapter to extract only certain sections of a request.
Figure 3 shows the default properties for the Messages tab.
Table 1 describes the options available in the Messages tab shown in the figure.
Table 1. Message Tab Options
Grouping | Option | Description |
---|
Inbound | Envelope | The entire SOAP envelope from the message is imported. The body is ignored. |
| Body | This
is the default option. The entire body of the message will be used as
the message. If the body contains more than one element, then the first
element is imported. |
| Path | An XPath query will be used to identify the element to be imported. |
| Body Path Expression | The XPath query to the element to be imported. This expression is evaluated from the immediate child of the <soap:body>.
If the result contains more than one element, then the first element is
imported. If you plan on doing content-based routing, then this element
must match an entire schema deployed to BizTalk |
| Node Encoding | Specifies the type of encoding the adapter will use to decode the text. Options include Base64, Hex, String, or XML (default). |
Outbound | Body | Specifies
the output message will be used as the SOAP body. This option is
available only on a request-response receive location. |
| Template | Provides
a template for the contents of the SOAP body message. This option is
available only on a request-response receive location. |
Error Handling | Suspend message on failure | When chosen, the message will be suspended if the request fails because of a pipeline or routing failure. |
| Include exception in faults | When
chosen and an exception occurs, the error details will be included as
part of the SOAP fault message. This option is useful for debugging but
should be turned off in production environments. |