This action might not be possible to undo. Are you sure you want to continue?
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.
Adding Web References
Before you can add a Web port, you need to add a Web reference to your BizTalk project. A Web reference is a description of a Web service that is available to your project. When you add a Web reference to your project, BizTalk creates an orchestration Web port type, Web message types, Reference.map (map file), Reference.odx (orchestration file), <WebService>.disco (discovery file), and <WebService>.wsdl (Web Service Description Language file) to your project. If your Web Service Description Language (WSDL) file contains schema Web message types, BizTalk adds Reference.xsd to your project. A Web reference includes: y y y A Universal Resource Locator (URL) for the Web service. A WSDL file that offers information about the service such as available methods, ports, and message types. A reference map (Reference.map).
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.
2. You must add a Web reference before you can create a Web port. If the Web method contains input and output parameters. Web ports support a mixture of request (one-way) and request/response (two-way) operations. you cannot reference a Web reference from an existing BizTalk project. 4. In the Select a Port Type page. and then click Next. and then select New Configured Port. type a name for the port. Each operation in the Web port represents a Web method. Note You cannot delete. right-click the port surface. expand the Web Port Types node and select the Web port type that corresponds to the added Web service. In the Available Port Types box. Creating Web Ports Web ports are specially configured ports that you use to consume (call) Web services. or modify the configuration for Web port types and Web message types. To add a Web port 1.If you are planning to export your orchestration using the Business Process Execution Language (BPEL) export process. the BPEL export process will auto-generate a second WSDL file and you will lose your binding information. . When you reference a Web reference from an existing BizTalk project. 3. In Orchestration Designer. BizTalk only creates a one-way operation. Adding a Web Port You add a Web port on the port surface in Orchestration Designer. and then click Next. Each operation in a Web port represents one method of a Web service. A Web port can contain multiple operations that represent a mix of one-way (request only) and two-way (requestresponse) Web methods. BizTalk creates a request/response operation. paste. cut. The following figure shows the Select a Port Type dialog box. In the Name text box. with an orchestration open. If the Web service contains only an input parameter. Unlike other configured ports. select Use an existing Port Type. copy.
you must change the configuration to supply the appropriate user credentials or Single Sockets Layer (SSL) to run Web services. transport. A port must have a port type associated with it. BizTalk uses these values to create the send port when you deploy your BizTalk project.1. and you use the wizard to select an existing port type or to create a new port type. select Specify now. For more information about ports and port types. in the Port binding drop down box. and receive and send pipelines. In the Port Binding page. Click Next. and then Finish to complete the wizard. Starting the wizard Orchestration Designer starts the Port Configuration Wizard automatically when you select to create a new port in any of the following ways: . Important The default authentication method for the send port is anonymous access. see Using Ports in Orchestrations. 2. If the Web service requires a different authentication or encryption method. BizTalk automatically places the values from the referenced Web service in the URI. Port Configuration Wizard You use the Port Configuration Wizard to create and configure a port in Orchestration Designer.
Running the wizard 1. Open the Port Configuration Wizard. and the binding type of the port. o Select a Port Type. If you select Existing Port Type. Specify port information. or accept the suggested default name. move to the following one by clicking Next. Selecting the New Configured Port Parameter command from the shortcut menu of the Orchestration Parameters folder in the Orchestration View window. Double-clicking the Port shape in the Toolbox. Running Smart Tag items whose associated actions cause a port to be created. After completing each page. o Port Binding. On this page you specify the direction of communication. or move to the preceding one by clicking Back. Type in a name for the port. o Port Properties. 2. On this page. You also select the port type's communication pattern (one-way or request-response) and any access restrictions to impose on the new port type. The polarity choice you make depends in part on the communication pattern of the port type that you selected on the preceding page of the wizard. Additionally. Your choices are summarized in the following table: 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 sending messages on this p 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 . the wizard displays several pages. If you select New Port Type. you first select whether you want a New Port Type or an Existing Port Type. Selecting the New Configured Port command from the shortcut menu of the Ports folder in the Orchestration View window. 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. you then use a tree control to choose which existing port type to assign. Select a Port Type. To help you. you then need to type the name of the port type in the Name text box.y y y Dragging a Port shape from the Toolbox onto a Port Surface on the design surface. also known as the polarity.
. entitled Completing the Port Wizard. you can either select a port to connect to. Typically it is added by an Administrator at deployment time. click Finish. 3. but it is available only for a send port. canceling the wizard undoes any changes you have made. 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. For more information. the location to or from which the message is sent or received. or to make it a self-correlating port. FILE. Each port has a type. You also need to select from a list of transport types that includes options such as BizTalk Message Queuing. see Port Bindings. and a binding. If the changes are correct. This option has similar choices to Specify now. as summarized here: Specify later. Complete the wizard. the adapter is still created. the pattern of communication. displays the choices you made on the preceding pages so that you can verify them before committing the changes. but its properties are not set.You have a choice of four different binding types: Specify later. After selecting this option. Specify now. which together determine the direction of communication. The final page of the Port Configuration Wizard. Then move through the wizard again and click Finish when the information displayed on the final page matches the changes you want to make. to do routing based on filter expressions on incoming messages in the Message Box database. and HTTP. or you can run the wizard again. Dynamic. and how the communication takes place. You can specify the port separately in an Expression shape so that it is assigned at run time. Otherwise. Each choice displays a different set of configuration options. click Back to re-enter any information you want to change. You can specify a send pipeline to use. For direct binding. Direct. and Direct. 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. if you click Cancel in the wizard. you make no further configuration choices in the wizard because binding information is not determined at design time. a direction. Finally. Using Ports in Orchestrations Ports specify how your orchestration will send messages to and receive messages from other business processes. If you were using the wizard to modify an existing port. Otherwise. You can select a port from a drop-down list box. You can specify at design time a URI that defines the entity to which the port is to be bound. You can set port properties manually in the Properties window for the port. you select a receive pipeline and a send pipeline from a list of available pipelines. Dynamic. Specify now.
You can also add ports by using the Orchestration View window. right-click Ports and then click New Port. and a receive pipeline to prepare a received message for processing (for example. ³Or³ In the Orchestration View window. HTTP. encrypting. by disassembling. several different ports may have the same port type. A DesignTip appears on ports that are not yet fully configured. right-click Ports and then click New Configured Port. For more information. To add a new port y Right-click a Port Surface or a Role Link. ³Or³ In the Orchestration View window. To add and configure a new port 1. You add ports to an orchestration in much the same way that you add controls to a Web Form or Windows Form. ³Or³ Right-click a Port Surface or a Role Link. decrypting. or BizTalk® Message Queuing). From the BizTalk Orchestrations tab of the Toolbox. a transport (either file. and then click New Configured Port. Follow the steps in the wizard to configure the port. 2. A port is an instance of a port type. To remove a port y Right-click the port to remove. or performing some other action on it). or decompressing it). a port may have associated with it a URI (a physical location). compressing. drag the Port shape onto a Port Surface or a Role Link. a send pipeline to prepare a message for sending (for example. Tip You can also drag ports into a Role Link. . by assembling. and then click New Port.Note There is a distinction between a port and a port type. Depending on these factors. see Port Configuration Wizard. The Port Configuration Wizard appears. and then click Delete.
3. The name used for this port in the orchestration. To configure a port by using the Port Configuration Wizard 1. determines whether want to receive an acknowledgment when a m information. Specify later²Communication is with an endpoint that is determined by an admi Specify now²Communication is with an endpoint that is known at design time.) Determines how a message gets to its destination: Direct²Communication is with another orchestration. In the Properties window. operations. and multi-part message types 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. Right-click the port to configure. Property Partner Orchestration Port Description Determines to which port the partner orchestrations will b . Identifier Delivery Notification For send ports. Dynamic²Communication is with an endpoint that is determined at run time. see Port Configuration Wizard. Follow the steps in the Port Configuration Wizard to configure the port. 2. the port operations on the shape will not be deleted. and then click Configure Port. The remaining properties to specify are determined by the Binding property: o Direct binding³Used when communicating directly with another orchestration. To configure a port manually by using the Properties window 1. ( Type property and is read-only. and you will receive errors when you try to compile. Connect the shape to another port and reconfigure the port operations . For more information. specify the following properties: Property Port Type Communication Direction Communication Pattern Binding Description Determines the communication pattern. Select the port to configure.Note If you delete a port after it has been connected to a Send or Receive shape in an orchestration that has been compiled. 2. see "Delivery Notification" under Using the Send Shape.
o Dynamic binding³Used when communicating with an endpoint that is determined at run time. a set of operations (requests or responses). To remove a port operation y Right-click the port operation to remove. Specify later³Used when communicating with an endpoint that is configured by an administrator. This section contains: y y y y Working with Port Types Communication Pattern Communication Direction Port Bindings Working with Port Types A port type consists of a communication pattern. Right-click the port to which you want to add an operation. The pattern can be either one-way or request-response (two-way). Determines which pipeline to use for outgoing messages. Determines which pipeline to use for outgoing messages. and the message types that those operations can work on. Specify now³Used when communicating with an endpoint that is known at design time. and then click New Operation. Determines which transport to use for sending messages. Property Receive Pipeline Send Pipeline o o Description Determines which pipeline to use for incoming messages. Note that port types are direction-agnostic: direction is specified on individual ports. Determines where to send messages. . and then click Delete. and all operations defined on that port type must use the same pattern. Property Receive Pipeline Send Pipeline Transport URI To add a port operation y Description Determines which pipeline to use for incoming messages.
or internal. verify that it has the correct message type. right-click Port Types and then click New Request-response Port Type. If it is internal. In the Orchestration View window. Since a port type definition includes message types. In the Orchestration View window." If you select a port operation from another project. and a new one-way port type is added with one default operation. Specify a name for the port type. Specify a name for the port type. You can think of a port as an instance of a port type. 3. see Creating Web Ports. it is visible to anyone interacting with the orchestration. 2. but when you are selecting them from another project. Note A port type does not inherently have a communication direction. The Port Types node expands. If it is private. Define one or more port operations. To remove a port type y In the Orchestration View window. you will see them only as "Request" and "Response. To add a request-response port type 1. Note A port type can be applied to any number of ports. If it is public. 3. right-click Port Types and then click New One-way Port Type. the port type is visible only within the project. private. it is visible to other orchestrations within the same project and namespace.The scope of a port type is defined by the Type Modifier property. if collapsed. you set direction on individual ports. For more information. . A port type can be public. and a new request-response port type is added with one default operation. the scope of the message type must encompass that of any port type that uses it. To add a Web port type y Add a project reference to an assembly containing a proxy class for a Web service. and then click Delete. Define one or more port operations. right-click the port type to delete. You can name your port operations. 2. if collapsed. The Port Types node expands. To add a one-way port type 1.
Communication Pattern Each port type has a communication pattern. Note Different ports of the same type will always have the same communication pattern. bindings might refer to physical locations. its communication direction can be either Send or Receive. Port Bindings A port binding is the configuration information that determines where and how a message will be sent or received. its communication direction can be Send-Receive. If the port's type has a two-way (request-response) communication pattern. pipelines. or other orchestrations. Public²Access to this port type is not limited. Note Items that appear as read-only are defined in another orchestration. If the port's type has a one-way communication pattern. Depending on type. 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. deleting it will impact the configuration of any ports that are configured to use it. . The communication pattern determines whether one-way or two-way (request-response) transmissions can take place on ports of the given type. in which a request is received and a response is sent. For more information. Communication Direction Each port has its own communication direction. see Port Configuration Wizard. or Receive-Send. set the following property: Property Type Modifier Description Determines the scope of the port type: Private²Access to this port type is limited to the containing module. or polarity. determines in which direction messages will be transmitted over that port. The communication direction. in which a request is sent and a response is received. Internal²Access to this port type is limited to modules within the same project.Note If the port type is in use. but not necessarily the same communication direction. To set the type modifier for a port type y In the Properties window.
A port with routing information defined by a message subscription on incoming messages. The information about the actual location will be specified separately after the application has been deployed. perhaps using script. Direct Binding Your orchestration can communicate directly with another orchestration by using direct binding. be determined from a property on an incoming message. in which the orchestration engine will generate a correlation token on a message that is particular to the orchestration instance. 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.Binding at Deployment Time You can bind your port to a receive location or to a send port. based on a filter expression in a Receive shape. y A self-correlating port. Caution Direct binding is not compliant with the standards of the Business Process Engineering Language for Web Services (BPEL4WS). Dynamic Binding If you will not know the location of a communication until run time. see Assigning to Dynamic Ports. you can use dynamic binding for a send port. and no external transport of the message takes place. you cannot exchange messages between one request-response port and two one-way ports. you can select the "Specify Later" port binding option in Orchestration Designer. If you require BPEL4WS compliance. the message is processed internally by the engine. If you do not have all of the information you need to specify a physical location. For information about how to dynamically assign values to ports. . 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. The location might. Caution When you use direct binding. use another kind of binding. for example. In this case. There are three flavors of direct binding. Binding at Design Time You can select the "Specify Now" port binding option in Orchestration Designer to specify at design time what pipeline you want to use and the location you want to communicate with. either by an administrator in BizTalk Explorer or programmatically. This is useful if you know in advance the source or destination of transmitted messages. and you do not have to specify any correlation sets yourself. and you only need to specify the port type that describes the port.
NET type. You can find Reference. The schema is the basis for the message part. A request Web message type contains one message part for each input parameter of the Web method. When you add a Web reference. Alternatively.NET class. See Also Constructing Web Messages You construct a Web message from a Web message type. rename or delete them. Orchestration Designer will detect it and will make available a corresponding Web port type. A response Web message type contains one message part for the return value and one message part for each output parameter of the Web method. you must remove the Web reference from your BizTalk project. You add a Web message to an orchestration the same way that you add a regular message. Web messages types Web message types are identical to a normal message type. except you cannot modify. For more information on creating message types by using a . seeConstructing Messages in User Code. and you will have a complete Web port. You create individual message parts based on primitive . . If the Web method parameter is a schema type.NET class. BizTalk only creates a request Web message type. which BizTalk creates based on the Web methods from the added Web service. Depending on the Web method parameter (input or output). Web messages Web messages are the messages you use when you consume (call) a Web service. You can construct a Web message that contains no message parts. If the Web method is a one-way operation. the message part uses a primitive . You simply add a port to your orchestration and assign it an existing Web port type. To delete a Web message type. BizTalk creates a Web message type from a primitive . If the Web method parameter is a primitive . except that you set the message type to one of the Web message types that BizTalk created when you added a Web reference. You add a Web message to your orchestration.NET types by calling a .xsd in the Web references folder. you can create both primitive and schema .NET type. setting the message type to one of the Web message types. BizTalk adds the schema type to the BizTalk project as a schema in Reference. BizTalk creates one request and one response Web message type for each Web method in the added Web service. For more information.xsd. see Creating Web Ports.Web Ports If your project contains a reference to a Web service.NET type or a schema type. BizTalk automatically creates Web message types.NET or schema types.
you use a Message Assignment shape. you use a Transform shape. and then click Orchestration View. and then click the Web messsage type to select it. . 5. 2.NET type. 4. Right-click the Message node and then click New Message. selecting a Web message type for Message_1. With an orchestration open. on the View menu. You must set the message type for the Web message to a Web message type. 3. from the Message Type drop-down box. The following figure shows the Orchestration View window with Message_1 selected and the Properties window. click Other Windows. To add a Web message 1. you construct the individual message parts. Scroll through the drop-down box to the Web message type you want to use. Adding Web Messages You create Web message variables in the Orchestration View window. In the Properties window. select a Web message type. Message_x appears under the Message node.Message parts After you create the Web message. If your message part uses a schema type. If your message part uses a primitive .
This action might not be possible to undo. Are you sure you want to continue?
We've moved you to where you read on your other device.
Get the full title to continue listening from where you left off, or restart the preview.