Professional Documents
Culture Documents
You can consume (call) a Web service from your orchestration by using Web ports. To consume a Web service from an orchestration, you create a Web port and construct Web messages. You can use SOAP headers with the consumed Web service, change the URI of a consumed Web service, and dynamically set the URI for a consumed Web service. Important An orchestration is required to consume a Web service. You cannot use the SOAP send port in scenarios that only use messaging. SOAP send ports must be used with an orchestration. See Also SOAP Headers with Consumed Web Services Consuming Web Services To download updated BizTalk Server 2004 Help from www.microsoft.com, go to http://go.microsoft.com/fwlink/?linkid=20616. Copyright 2004 Microsoft Corporation. All rights reserved.
When you add a Web reference, all the Web methods for that Web service must be compatible with BizTalk Server. You cannot specify conditional attributes for specific Web methods in a Web service. Important Web method parameters of type array are not supported. You add a Web reference to your project by using the Add Web Reference dialog box. For more information about adding Web references, see Using the Project Menu.
If you are planning to export your orchestration using the Business Process Execution Language (BPEL) export process, you cannot reference a Web reference from an existing BizTalk project. When you reference a Web reference from an existing BizTalk project, the BPEL export process will auto-generate a second WSDL file and you will lose your binding information.
The following figure shows the Select a Port Type dialog box.
1.
In the Port Binding page, in the Port binding drop down box, select Specify now. BizTalk automatically places the values from the referenced Web service in the URI, transport, and receive and send pipelines. BizTalk uses these values to create the send port when you deploy your BizTalk project. Important The default authentication method for the send port is anonymous access. If the Web service requires a different authentication or encryption method, you must change the configuration to supply the appropriate user credentials or Single Sockets Layer (SSL) to run Web services.
2.
y y y
Dragging a Port shape from the Toolbox onto a Port Surface on the design surface. Double-clicking the Port shape in the Toolbox. Selecting the New Configured Port command from the shortcut menu of the Ports folder in the Orchestration View window.
Additionally, you can start the wizard explicitly by: y y y Right-clicking a port (on the design surface or in the Orchestration View window) and clicking Configure Port. Running Smart Tag items whose associated actions cause a port to be created. Selecting the New Configured Port Parameter command from the shortcut menu of the Orchestration Parameters folder in the Orchestration View window.
Port direction
Send Receive Send-Receive Receive-Send
Communication pattern
One-way One-way Request-response Request-response
Direction of communication to ch
I will always be receiving messages on this I will be sending a request and receiving a I will be receiving a request and sending a
You have a choice of four different binding types: Specify later, Specify now, Dynamic, and Direct. Each choice displays a different set of configuration options, as summarized here: Specify later. After selecting this option, you make no further configuration choices in the wizard because binding information is not determined at design time. Typically it is added by an Administrator at deployment time. Specify now. You can specify at design time a URI that defines the entity to which the port is to be bound. You also need to select from a list of transport types that includes options such as BizTalk Message Queuing, FILE, and HTTP. Finally, you select a receive pipeline and a send pipeline from a list of available pipelines. The list for each includes all pipelines in the current project plus the option of selecting a pipeline from a referenced assembly, which displays the Select Artifact Type dialog box. Dynamic. This option has similar choices to Specify now, but it is available only for a send port. You can specify a send pipeline to use. You can specify the port separately in an Expression shape so that it is assigned at run time, Direct. For direct binding, you can either select a port to connect to, to do routing based on filter expressions on incoming messages in the Message Box database, or to make it a self-correlating port. You can select a port from a drop-down list box. For more information, see Port Bindings. 3. Complete the wizard. The final page of the Port Configuration Wizard, entitled Completing the Port Wizard, displays the choices you made on the preceding pages so that you can verify them before committing the changes. If the changes are correct, click Finish. Otherwise, click Back to re-enter any information you want to change. Then move through the wizard again and click Finish when the information displayed on the final page matches the changes you want to make. Note If you are creating a new port and you click Cancel in the wizard at any time before finishing port configuration, the port is not created. If you were using the wizard to modify an existing port, canceling the wizard undoes any changes you have made. Otherwise, if you click Cancel in the wizard, the adapter is still created, but its properties are not set. You can set port properties manually in the Properties window for the port, or you can run the wizard again.
Note There is a distinction between a port and a port type. A port is an instance of a port type; several different ports may have the same port type. Depending on these factors, a port may have associated with it a URI (a physical location), a transport (either file, HTTP, or BizTalk Message Queuing), a send pipeline to prepare a message for sending (for example, by assembling, encrypting, compressing, or performing some other action on it), and a receive pipeline to prepare a received message for processing (for example, by disassembling, decrypting, or decompressing it). You add ports to an orchestration in much the same way that you add controls to a Web Form or Windows Form. You can also add ports by using the Orchestration View window. To add a new port y Right-click a Port Surface or a Role Link, and then click New Port. Or In the Orchestration View window, right-click Ports and then click New Port. A DesignTip appears on ports that are not yet fully configured. Tip You can also drag ports into a Role Link. To add and configure a new port 1. From the BizTalk Orchestrations tab of the Toolbox, drag the Port shape onto a Port Surface or a Role Link. Or Right-click a Port Surface or a Role Link, and then click New Configured Port. Or In the Orchestration View window, right-click Ports and then click New Configured Port. The Port Configuration Wizard appears. 2. Follow the steps in the wizard to configure the port. For more information, see Port Configuration Wizard.
To remove a port y Right-click the port to remove, and then click Delete.
Note If you delete a port after it has been connected to a Send or Receive shape in an orchestration that has been compiled, the port operations on the shape will not be deleted, and you will receive errors when you try to compile. Connect the shape to another port and reconfigure the port operations . To configure a port by using the Port Configuration Wizard 1. 2. Right-click the port to configure, and then click Configure Port. Follow the steps in the Port Configuration Wizard to configure the port. For more information, see Port Configuration Wizard.
To configure a port manually by using the Properties window 1. 2. Select the port to configure. In the Properties window, specify the following properties:
Property
Port Type Communication Direction Communication Pattern Binding
Description
Determines whether this orchestration is the sender or the receiver for this comm
Determines if this port is used for request-response or one-way communication. ( Type property and is read-only.)
Determines how a message gets to its destination: DirectCommunication is with another orchestration. DynamicCommunication is with an endpoint that is determined at run time. Specify laterCommunication is with an endpoint that is determined by an admi Specify nowCommunication is with an endpoint that is known at design time. The name used for this port in the orchestration.
For send ports, determines whether want to receive an acknowledgment when a m information, see "Delivery Notification" under Using the Send Shape.
3.
The remaining properties to specify are determined by the Binding property: o Direct bindingUsed when communicating directly with another orchestration.
Property
Partner Orchestration Port
Description
Dynamic bindingUsed when communicating with an endpoint that is determined at run time.
Property
Receive Pipeline Send Pipeline
o o
Description
Determines which pipeline to use for incoming messages. Determines which pipeline to use for outgoing messages.
Specify laterUsed when communicating with an endpoint that is configured by an administrator. Specify nowUsed when communicating with an endpoint that is known at design time.
Property
Receive Pipeline Send Pipeline Transport URI
To add a port operation y
Description
Determines which pipeline to use for incoming messages. Determines which pipeline to use for outgoing messages. Determines which transport to use for sending messages. Determines where to send messages.
Right-click the port to which you want to add an operation, and then click New Operation.
To remove a port operation y Right-click the port operation to remove, and then click Delete.
This section contains: y y y y Working with Port Types Communication Pattern Communication Direction Port Bindings
The scope of a port type is defined by the Type Modifier property. A port type can be public, private, or internal. If it is public, it is visible to anyone interacting with the orchestration. If it is private, it is visible to other orchestrations within the same project and namespace. If it is internal, the port type is visible only within the project. Since a port type definition includes message types, the scope of the message type must encompass that of any port type that uses it. Note A port type can be applied to any number of ports. You can think of a port as an instance of a port type. Note A port type does not inherently have a communication direction; you set direction on individual ports. To add a request-response port type 1. In the Orchestration View window, right-click Port Types and then click New Request-response Port Type. The Port Types node expands, if collapsed, and a new request-response port type is added with one default operation. 2. 3. Specify a name for the port type. Define one or more port operations. You can name your port operations, but when you are selecting them from another project, you will see them only as "Request" and "Response." If you select a port operation from another project, verify that it has the correct message type. To add a one-way port type 1. In the Orchestration View window, right-click Port Types and then click New One-way Port Type. The Port Types node expands, if collapsed, and a new one-way port type is added with one default operation. 2. 3. Specify a name for the port type. Define one or more port operations.
To add a Web port type y Add a project reference to an assembly containing a proxy class for a Web service. For more information, see Creating Web Ports.
To remove a port type y In the Orchestration View window, right-click the port type to delete, and then click Delete.
Note If the port type is in use, deleting it will impact the configuration of any ports that are configured to use it. Note Items that appear as read-only are defined in another orchestration. To set the type modifier for a port type y In the Properties window, set the following property:
Property
Type Modifier
Description
Determines the scope of the port type: PrivateAccess to this port type is limited to the containing module. PublicAccess to this port type is not limited. InternalAccess to this port type is limited to modules within the same project.
Communication Pattern
Each port type has a communication pattern. The communication pattern determines whether one-way or two-way (request-response) transmissions can take place on ports of the given type. For more information, see Port Configuration Wizard. Note Different ports of the same type will always have the same communication pattern, but not necessarily the same communication direction.
Communication Direction
Each port has its own communication direction. The communication direction is used in combination with the communication pattern of the port's type to complete the definition of how a port can be used. The communication direction, or polarity, determines in which direction messages will be transmitted over that port. If the port's type has a one-way communication pattern, its communication direction can be either Send or Receive. If the port's type has a two-way (request-response) communication pattern, its communication direction can be Send-Receive, in which a request is sent and a response is received, or Receive-Send, in which a request is received and a response is sent.
Port Bindings
A port binding is the configuration information that determines where and how a message will be sent or received. Depending on type, bindings might refer to physical locations, pipelines, or other orchestrations.
Direct Binding
Your orchestration can communicate directly with another orchestration by using direct binding. In this case, the message is processed internally by the engine, and no external transport of the message takes place. There are three flavors of direct binding. You can use direct binding to bind a send or receive action to one of the following: y y A known port on a partner orchestration. A port with routing information defined by a message subscription on incoming messages, based on a filter expression in a Receive shape.
Caution You must use a filter expression if you have an activate Receive shape receiving a message of type XmlDocument on a direct-bound port with subscription-defined routing. y A self-correlating port, in which the orchestration engine will generate a correlation token on a message that is particular to the orchestration instance, and you do not have to specify any correlation sets yourself.
Caution Direct binding is not compliant with the standards of the Business Process Engineering Language for Web Services (BPEL4WS). If you require BPEL4WS compliance, use another kind of binding. Caution When you use direct binding, you cannot exchange messages between one request-response port and two one-way ports.
Dynamic Binding
If you will not know the location of a communication until run time, you can use dynamic binding for a send port. The location might, for example, be determined from a property on an incoming message. For information about how to dynamically assign values to ports, see Assigning to Dynamic Ports.
Web Ports
If your project contains a reference to a Web service, Orchestration Designer will detect it and will make available a corresponding Web port type. You simply add a port to your orchestration and assign it an existing Web port type, and you will have a complete Web port. For more information, see Creating Web Ports. See Also
Web messages
Web messages are the messages you use when you consume (call) a Web service. You add a Web message to an orchestration the same way that you add a regular message, except that you set the message type to one of the Web message types that BizTalk created when you added a Web reference.
Message parts
After you create the Web message, you construct the individual message parts. If your message part uses a primitive .NET type, you use a Message Assignment shape. If your message part uses a schema type, you use a Transform shape.