Skip navigation.

Using the AquaLogic Service Bus Console

  Previous Next vertical dots separating previous/next from contents/index/pdf Contents View as PDF   Get Adobe Reader

Proxy Services: XQuery Editors

This section includes the following topics:

 


Using the Inline XQuery Expression Editor

The XQuery Expression Editor page enables you to create variable structures, define user namespaces, use predefined message context variables to build Inline XQuery expressions, build Inline XQuery expressions manually, and select XQuery or XSLT resources for execution as Inline XQueries. You can access this page through the Message Flow of a proxy service. To learn more about Message Flow, see Overview of Message Flow.

This section includes the following topics:

Inline XQueries

AquaLogic Service Bus allows you to import XQueries that have been created with an external tool such as the BEA XQuery Mapper. You can use these XQueries anywhere in the proxy service message flow by binding the XQuery resource input to an Inline XQuery, and binding the XQuery resource output to an action that uses the result as the action input; for example, the Assign, Replace, or Insert actions. However, you can enter the XQuery inline as part of the action definition instead of entering the XQuery as a resource. You can also use Inline XQueries for the condition in an If...Then... action.

The Inline XQuery and XPath editors allow you to declare a variable's structure by mapping it to a type or element and then creating path expressions with a drag and drop action from the graphical representation of the structure. This is an ease-of-use feature. You can also enter the path expressions manually instead.

You can use this feature directly for all user-defined variables, as well as $inbound, $outbound, and $fault. However, you cannot use it directly to access XML attachments in $attachments, headers in $header, or documents and RPC parameters in $body, with one exception— you can use it directly to access documents and parameters in $body for request messages received by a WSDL proxy service.

To learn more about creating variable structures, see Creating a Variable Structure, and "Variable Structures" in "Modeling Message Flow in AquaLogic Service Bus" in the BEA AquaLogic Service Bus User Guide.

Uses of the Inline XQuery Expression Editor

You typically use the Inline XQuery Expression Editor to enter simple XQueries that consist of the following:

Note: For more complex XQueries, we recommend that you use the XQuery Mapper, especially if you are not familiar with XQuery.

Examples of good uses of Inline XQueries are:

Accessing the Inline XQuery Expression Editor

You can access the Inline XQuery Expression Editor from the Edit Stage Configuration page.

To Access the Inline XQuery Expression Editor

  1. If you have not already done so, from the left navigation pane, under Change Center, click Create to create a new session for making changes to the current configuration. To learn more, see Using the Change Center.
  2. On the Summary of Proxy Services page, click the Edit Message Flow icon for the appropriate proxy service. Alternatively, if you are in the Project Explorer module, click the Edit Message Flow icon for the appropriate proxy service in the list of resources for a selected project or folder.
  3. The Edit Message Flow page is displayed for the proxy service you selected.

  4. Expand an existing pipeline to view the pipeline pair.
  5. Click the Stage icon for the stage that you want to edit, click Edit, then click Stage. The Edit Stage Configuration page is displayed. If you have previously added actions, the page displays these actions.
  6. Locate an action that contains an XQuery expression.
  7. To open the Inline Expression Editor, click the link for the XQuery expression contained within the action.
  8. The XQuery Expression Editor page is displayed. The page includes the following functionality:

  9. Do one of the following:
  10. Table 17-1 XQuery Expression Editor Page

    To...

    Go To...

    Define a user namespace

    Defining a User Namespace

    Create a variable structure

    Creating a Variable Structure

    Use a predefined message context variable

    Using Predefined Variables in the Inline Editors

    Build an XQuery expression manually

    Building an XQuery Expression Manually

    Select an XQuery resource for execution

    Selecting an XQuery Resource for Execution

    Select an XSLT resource for execution

    Selecting an XSLT Resource for Execution


     

Related Topics

Using the XQuery Condition Editor

Using the XPath Expression Editor

Message Context

Viewing and Changing Message Flow

 


Using the XQuery Condition Editor

The XQuery Condition Editor page enables you to define variable structures, define user namespaces, generate XPath for message context variables, and build XQuery conditions. You can access this page through the Message Flow of a proxy service. To learn more about Message Flow, see Overview of Message Flow.

The Inline XQuery Condition Editor is similar to the Inline XQuery Expression Editor in that you use it to enter XQueries inline as part of action definitions. However, the Condition Editor enables you to enter Inline XQueries for conditions in an If...Then... action instead.

The Inline XQuery Condition editor also enables you to declare a variable's structure by mapping it to a type or element and then creating path expressions with a drag and drop action from the graphical representation of the structure. This is an ease-of-use feature. You can also enter the path expressions manually instead. To learn more about creating variable structures, see Creating a Variable Structure, and "Variable Structures" in "Modeling Message Flow in AquaLogic Service Bus" in the BEA AquaLogic Service Bus User Guide.

To Access the XQuery Condition Editor

  1. If you have not already done so, from the left navigation pane, under Change Center, click Create to create a new session for making changes to the current configuration. To learn more, see Using the Change Center.
  2. On the Summary of Proxy Services page, click the Edit Message Flow icon for the appropriate proxy service. Alternatively, if you are in the Project Explorer module, click the Edit Message Flow icon for the appropriate proxy service in the list of resources for a selected project or folder.
  3. The Edit Message Flow page is displayed for the proxy service you selected.

  4. Expand an existing pipeline to view the pipeline pair.
  5. Select the Stage icon for the stage that you want to edit, click Edit, then click Stage. The Edit Stage Configuration page is displayed. If you have previously added actions, the page displays these actions.
  6. Locate an action that contains a condition.
  7. To open the Condition editor, click the condition contained within the action.
  8. The XQuery Condition Editor page is displayed. The page includes the following functionality:

  9. Do one of the following:
  10. Table 17-2 XQuery Condition Editor Page

    To...

    Go To...

    Define a user namespace

    Defining a User Namespace

    Create a variable structure

    Creating a Variable Structure

    Use a predefined message context variable

    Using Predefined Variables in the Inline Editors

    Build an XQuery condition using the Text option

    Building an XQuery Condition Using the Text Option

    Enter a comparison expression using the Builder option

    Entering a Comparison Expression Using the Builder Option

    Enter a unary expression using the Builder option

    Entering a Unary Expression Using the Builder Option


     

Related Topics

Using the Inline XQuery Expression Editor

Using the XPath Expression Editor

Message Context

Viewing and Changing Message Flow

 


Using the XPath Expression Editor

The XPath Expression Editor page enables you to define user namespaces, define variable structure, generate XPath for message context variables, and build XPath expressions manually. You can access this page through the Message Flow of a proxy service. To learn more about Message Flow, see Overview of Message Flow.

The Inline XQuery XPath Editor is similar to the Inline XQuery Expression Editor in that you use it to enter XQueries inline as part of action definitions.

The XQuery and XPath editors allow you to declare a variable's structure by mapping it to a type or element and then creating path expressions with a drag and drop action from the graphical representation of the structure. This is an ease-of-use feature. You can also enter the path expressions manually instead.

You can use this feature directly for all user-defined variables, as well as $inbound, $outbound, and $fault. However, you cannot use it directly to access XML attachments in $attachments, headers in $header, or documents and RPC parameters in $body, with one exception— you can use it directly to access documents and parameters in $body for request messages received by a WSDL proxy service.

To learn more about creating variable structures, see Creating a Variable Structure, and "Variable Structures" in "Modeling Message Flow in AquaLogic Service Bus" in the BEA AquaLogic Service Bus User Guide.

To Access the XPath Expression Editor

  1. If you have not already done so, from the left navigation pane, under Change Center, click Create to create a new session for making changes to the current configuration. To learn more, see Using the Change Center.
  2. On the Summary of Proxy Services page, click the Edit Message Flow icon for the appropriate proxy service. Alternatively, if you are in the Project Explorer module, click the Edit Message Flow icon for the appropriate proxy service in the list of resources for a selected project or folder.
  3. The Edit Message Flow page is displayed for the proxy service you selected.

  4. Expand the an existing pipeline to view the pipeline pair.
  5. Click the Stage icon for the stage that you want to edit, click Edit, then click Stage. The Edit Stage Configuration page is displayed. If you have previously added actions, the page displays these actions.
  6. Locate an action that contains an XPath expression.
  7. To open the Expression editor, click the link for the XPath expression contained within the action.
  8. The XPath Expression Editor page is displayed. The page includes the following functionality:

  9. Do one of the following:
  10. Table 17-3 XPath Expression Editor Page

    To...

    Go To...

    Define a user namespace

    Defining a User Namespace

    Create a variable structure

    Creating a Variable Structure

    Use a predefined message context variable

    Using Predefined Variables in the Inline Editors

    Build the XPath expression manually

    Building an XQuery Expression Manually


     

Related Topics

Using the XQuery Condition Editor

Using the Inline XQuery Expression Editor

Message Context

Viewing and Changing Message Flow

 


Defining a User Namespace

The XQuery Expression Editor, XQuery Condition Editor, and XPath Expression Editor pages enable you to define user namespaces. To learn more about these editors, see Using the XQuery Condition Editor, Using the Inline XQuery Expression Editor, and Using the XPath Expression Editor.

To Define a User Namespace

  1. From the left navigation pane, select Namespace Definitions. The Namespace Definitions panel is displayed on the left side of the page. This panel includes a list of Default Namespaces, and a list of Variable Namespaces and User Defined Namespaces, if any exist.
  2. In the Namespace Definitions panel, click Add Namespace. The Prefix and URI fields are displayed.
  3. In the Prefix field, enter a prefix. The prefix is a unique identifier of the namespace. You cannot use the same prefix more than once.
  4. In the URI field, enter a URL for this namespace in the format http://url/.../ or enter a URN in the format uddi:server:.
  5. Click Add. The namespace is displayed in the list of User Defined Namespaces.
  6. Note: An XML namespace is a way of making the element and attribute names globally unique. You qualify the element and attribute names, which are local names, with the namespace prefix to achieve this uniqueness.

  7. Do one of the following:
  8. Table 17-4 Tasks You Can Do in the Expression and Condition Editors

    To...

    Complete These Steps...

    Delete a user namespace

    In the Namespace Definitions panel, click the Delete icon that corresponds to the user namespace you want to delete.

    Create a variable structure

    To learn more, see Creating a Variable Structure.

    Use a predefined message context variable

    To learn more, see Using Predefined Variables in the Inline Editors.

    Build an XQuery expression manually, if you are in the XQuery Expression Editor

    To learn more, see Building an XQuery Expression Manually.

    Build an XPath expression manually, if you are in the XPath Expression Editor

    To learn more, see Building an XPath Expression Manually.

    Select an XQuery resource for execution, if you are in the XQuery Expression Editor

    To learn more, see Selecting an XQuery Resource for Execution.

    Select an XSLT resource for execution, if you are in the XQuery Expression Editor

    To learn more, see Selecting an XSLT Resource for Execution.

    Build an XQuery condition using the Text option, if you are in the XQuery Condition Editor

    To learn more, see Building an XQuery Condition Using the Text Option.

    Enter a comparison expression using the Builder option, if you are in the XQuery Condition Editor

    To learn more, see Entering a Comparison Expression Using the Builder Option.

    Enter a unary expression using the Builder option, if you are in the XQuery Condition Editor

    To learn more, see Entering a Unary Expression Using the Builder Option.

    Save the expression

    Click Save. The Edit Stage Configuration page is displayed. The expression is populated with the transformation you selected. To learn more, continue in Viewing and Changing Stage Configuration Details or Adding a Route Node.

    Note: When you click Save, the Message Flow is updated in the current session. When you have finished making changes to this configuration, from the left navigation pane, click Activate under Change Center. The session ends and the core configuration is updated. Alternatively, click Discard at any time during the session to delete the changes you have made so far in the current session.

    Validate the expression

    Click Validate. A message is displayed if the expression is validated successfully.

    Test the expression

    Click Test. To learn more, see Performing Inline XQuery Testing.

    Discard your changes and return to the Edit Stage Configuration page

    Click Cancel.

    Discard your changes and remain on the XQuery Expression Editor page

    Click Clear.

    Discard your changes and exit the message flow

    Click Cancel All. When you confirm that you want to exit the Message Flow, the Summary of Proxy Services page is displayed if you initially clicked the Edit Message Flow icon for the proxy service on that page or the Project View or Folder View pages are displayed if you clicked the Edit Message Flow icon for the proxy service on those pages.


     

 


Creating a Variable Structure

The XQuery Expression Editor, XQuery Condition Editor, and XPath Expression Editor pages enable you to create variable structures. To learn more about these editors, see Using the XQuery Condition Editor, Using the Inline XQuery Expression Editor, and Using the XPath Expression Editor.

In a typical programming language, variables are statically scoped and their name and type is explicitly declared. The variable can be accessed anywhere within the static scope. In AquaLogic Service Bus, some predefined variables do exist, but you can also dynamically create variables by assigning a value to them; that is, when you create a variable structure mapping. When a value is assigned to a variable, the variable can be accessed anywhere in the proxy service message flow. The variable type is not declared but the type is essentially the underlying type of the value it contains at any point in time.

When you activate the session, the variables you dynamically create are deleted if you have saved them at the XQuery Expression Editor, Stage, and Pipeline levels. This means that at design time, AquaLogic Service Bus does not know which of the non-predefined variables exist and what their types are at any point in the message flow.

The variable structure mappings enable you to add predicates. Each variable structure mapping entry has a label and maps a variable or variable path to one or more structures. The scope of these mappings is the stage or route node. Because variables are not statically typed, a variable can have different structures at different points (or at the same point) in the stage or route node. Therefore, you can map a variable to multiple structures, each with a different label. To view the structure, you can select the corresponding label with a drop down.

Note: You can also create variable structure mappings in the Inline XPath Expression Editor. However, although the variable is mapped to a structure, the XPaths generated when you select from the structure are relative XPaths relative to the variable. An example of a relative XPath is ./ctx:attachment/ctx:body. However, the mapping used to generate this XPath would map $attachments.

To Create a Variable Structure

  1. In the Variable Structures panel on the XQuery Expression Editor, XPath Expression, or XQuery Condition Editor pages, click Add New Structure.
  2. The Variable Structures panel displays additional fields and options.

  3. Do one of the following:
  4. Table 17-5 Create a New Variable Structure

    To...

    Complete These Steps...

    Create a variable structure that maps a variable to an XML Schema type

      1. Make sure the XML Type option is selected.

      2. In the Structure Label field, enter a display name for the variable you want to create. This display name enables you to give a meaningful name to the structure so you can recognize it at design time but it has no impact at runtime.

      3. In the Structure Path field, enter the path of the variable structure at runtime.

      4. Under the Type field, select the appropriate radio button, then select Schema Type.

      5. Click Browse. The XML Schema Browser is displayed. Select an XML Schema from the list, select an XML Schema type from the Definitions pane, then click Submit.

      6. Click Add to create the variable structure or click Cancel to discard your changes.

    Create a variable structure that maps a variable to a WSDL type

      1. Make sure the XML Type option is selected.

      2. In the Structure Label field, enter a display name for the variable you want to create. This display name enables you to give a meaningful name to the structure so you can recognize it at design time but it has no impact at runtime.

      3. In the Structure Path field, enter the path of the variable structure at runtime.

      4. Under the Type field, select the appropriate radio button, then select WSDL Type.

      5. Click Browse. The WSDL Browser is displayed. Select a WSDL from the list of WSDLs, select a WSDL type from the Definitions pane, then click Submit.

      6. Click Add to create the variable structure or click Cancel to discard your changes.

    Create a variable structure that maps a variable to an XML Schema element

      1. Make sure the XML Type option is selected.

      2. In the Structure Label field, enter a display name for the variable you want to create. This display name enables you to give a meaningful name to the structure so you can recognize it at design time but it has no impact at runtime.

      3. In the Structure Path field, enter the path of the variable structure at runtime.

      4. Under the Type field, select the appropriate radio button, then select Schema Element.

      5. Click Browse. The XML Schema Browser is displayed. Select an XML Schema from the list, select an XML Schema type from the Definitions pane, then click Submit.

      6. Click Add to create the variable structure or click Cancel to discard your changes.

    Create a variable structure that maps a variable to a WSDL element

      1. Make sure the XML Type option is selected.

      2. In the Structure Label field, enter a display name for the variable you want to create. This display name enables you to give a meaningful name to the structure so you can recognize it at design time but it has no impact at runtime.

      3. In the Structure Path field, enter the path of the variable structure at runtime.

      4. Under the Type field, select the appropriate radio button, then select WSDL Element.

      5. Click Browse. The WSDL Browser is displayed. Select a WSDL from the list of WSDLs, select a WSDL element from the Definitions pane, then click Submit.

      6. Click Add to create the variable structure or click Cancel to discard your changes.

    Create a variable structure that maps a variable to a child element

      1. Make sure the XML Type option is selected.

      2. In the Structure Label field, enter a display name for the variable you want to create. This display name enables you to give a meaningful name to the structure so you can recognize it at design time but it has no impact at runtime.

      3. In the Structure Path field, enter the path of the variable structure at runtime.

      4. Under the Type field, select the type of variable you want to create:

    To create an XML Schema Element or WSDL Element variable, select the radio button associated with this option, then select Schema Element or WSDL Element.

    To create an MFL variable, select the radio button associated with this option, then select MFL.

      5. For the XML Schema, WSDL, or MFL, click Browse to select an object from the list that the Browser displays, then click Submit. For example, select an MFL from a list of MFLs, then click Submit.

      6. Select the Set as child checkbox to set the element as a child of the structure being created.

      7. Click Add to create the variable structure or click Cancel to discard your changes.

    Create a variable structure that uses an MFL resource

      1. Make sure the XML Type option is selected.

      2. In the Structure Label field, enter a display name for the variable you want to create. This display name enables you to give a meaningful name to the structure so you can recognize it at design time but it has no impact at runtime.

      3. In the Structure Path field, enter the path of the variable structure at runtime.

      4. Under the Type field, select the appropriate radio button, then click Browse. The MFL Browser is displayed.

      5. Select an MFLfrom the list of MFLs, then click Submit.

      6. Click Add to create the variable structure or click Cancel to discard your changes.

    Create a Service Interface variable structure

      1. Select the Service Interface option.

      2. In the Structure Label field, enter a display name for the variable you want to create. This display name enables you to give a meaningful name to the structure so you can recognize it at design time but it has no impact at runtime.

      3. In the Structure Path field, the default is alreadt set as $body. You cannot change this field.

      4. In the WSDL Based Service field, select the Service Browser icon, select a service from the list of services the Service Browser displays, then click Submit.

    The service you selected is displayed in the WSDL Based Service field.

      5. In the Operation field, select an operation or select None to not include an operation.

      6. Click Add to create the variable or click Cancel to discard your changes.

    Create a Simple variable structure

      1. Select the Simple Type option.

      2. In the Structure Label field, enter a display name for the variable you want to create. This display name enables you to give a meaningful name to the structure so you can recognize it at design time but it has no impact at runtime.

      3. In the Structure Name field, enter a name for the variable structure you want to create.

      4. Under the Type field, select String or Any XML.

      5. Click Add to create the variable or click Cancel to discard your changes.


     

    Note: When you click Save, the Message Flow is updated in the current session. When you have finished making changes to this configuration, from the left navigation pane, click Activate under Change Center. The session ends and the core configuration is updated. Alternatively, click Discard at any time during the session to delete the changes you have made so far in the current session.

  5. Do one of the following:
  6. Table 17-6 Tasks You Can Do in the Expression and Condition Editors

    To...

    Complete These Steps...

    Define a user namespace

    To learn more, see Defining a User Namespace.

    Use a predefined message context variable

    To learn more, see Using Predefined Variables in the Inline Editors.

    Build an XQuery expression manually, if you are in the XQuery Expression Editor

    To learn more, see Building an XQuery Expression Manually.

    Build an XPath expression manually, if you are in the XPath Expression Editor

    To learn more, see Building an XPath Expression Manually.

    Select an XQuery resource for execution, if you are in the XQuery Expression Editor

    To learn more, see Selecting an XQuery Resource for Execution.

    Select an XSLT resource for execution, if you are in the XQuery Expression Editor

    To learn more, see Selecting an XSLT Resource for Execution.

    Build an XQuery condition using the Text option, if you are in the XQuery Condition Editor

    To learn more, see Building an XQuery Condition Using the Text Option.

    Enter a comparison expression using the Builder option, if you are in the XQuery Condition Editor

    To learn more, see Entering a Comparison Expression Using the Builder Option.

    Enter a unary expression using the Builder option, if you are in the XQuery Condition Editor

    To learn more, see Entering a Unary Expression Using the Builder Option.

    Save the expression

    Click Save. The Edit Stage Configuration page is displayed. The expression is populated with the transformation you selected. To learn more, continue in Viewing and Changing Stage Configuration Details or Adding an Action.

    Note: When you click Save, the Message Flow is updated in the current session. When you have finished making changes to this configuration, from the left navigation pane, click Activate under Change Center. The session ends and the core configuration is updated. Alternatively, click Discard at any time during the session to delete the changes you have made so far in the current session.

    Validate the expression

    Click Validate. A message is displayed if the expression is validated successfully.

    Test the expression

    Click Test. To learn more, see Performing Inline XQuery Testing.

    Discard your changes and return to the Edit Stage Configuration page

    Click Cancel.

    Discard your changes and remain on the XQuery Expression Editor page

    Click Clear.

    Discard your changes and exit the message flow

    Click Cancel All. When you confirm that you want to exit the Message Flow, the Summary of Proxy Services page is displayed if you initially clicked the Edit Message Flow icon for the proxy service on that page or the Project View or Folder View pages are displayed if you clicked the Edit Message Flow icon for the proxy service on those pages.


     

 


Using Predefined Variables in the Inline Editors

The XQuery Expression Editor, XQuery Condition Editor, and XPath Expression Editor pages enables you to use predefined message context variables to build XQuery expressions, XQuery conditions and XPath expressions in the Inline Editors. To learn more about these editors, see Using the XQuery Condition Editor, Using the Inline XQuery Expression Editor, and Using the XPath Expression Editor.

To Use a Predefined Message Context Variable

  1. From the left navigation pane, select Variable Structures. The Variable Structures panel is displayed on the left side of the page.
  2. In the Variable Structures panel, select one of these predefined context variable types from the drop-down list: attachments, body, header, outbound, or inbound. To learn more about these predefined message context variables, see Message Context.
  3. Click the displayed name to make the contents of the variable appear in the Property Inspector table.
  4. Note: The displayed names are a tree view that may be expanded to reveal sub elements that may in turn be selected.

  5. To build the expression, highlight the text in either the Variable Structures panel or the Property Inspector table, then drag the context variable, and drop it in the XQuery Text pane.
  6. Do one of the following:
  7. Table 17-7 Tasks You Can Do in the Expression and Condition Editors

    To...

    Complete These Steps...

    Define a user namespace

    To learn more, see Defining a User Namespace.

    Create a variable structure

    To learn more, see Creating a Variable Structure.

    Build an XQuery expression manually, if you are in the XQuery Expression Editor

    To learn more, see Building an XQuery Expression Manually.

    Build an XPath expression manually, if you are in the XPath Expression Editor

    To learn more, see Building an XPath Expression Manually.

    Select an XQuery resource for execution, if you are in the XQuery Expression Editor

    To learn more, see Selecting an XQuery Resource for Execution.

    Select an XSLT resource for execution, if you are in the XQuery Expression Editor

    To learn more, see Selecting an XSLT Resource for Execution.

    Build an XQuery condition using the Text option, if you are in the XQuery Condition Editor

    To learn more, see Building an XQuery Condition Using the Text Option.

    Enter a comparison expression using the Builder option, if you are in the XQuery Condition Editor

    To learn more, see Entering a Comparison Expression Using the Builder Option.

    Enter a unary expression using the Builder option, if you are in the XQuery Condition Editor

    To learn more, see Entering a Unary Expression Using the Builder Option.

    Save the expression

    Click Save. The Edit Stage Configuration page is displayed. The expression is populated with the transformation you selected. To learn more, continue in Viewing and Changing Stage Configuration Details or Adding an Action.

    Note: When you click Save, the Message Flow is updated in the current session. When you have finished making changes to this configuration, from the left navigation pane, click Activate under Change Center. The session ends and the core configuration is updated. Alternatively, click Discard at any time during the session to delete the changes you have made so far in the current session.

    Validate the expression

    Click Validate. A message is displayed if the expression is validated successfully.

    Test the expression

    Click Test. To learn more, see Performing Inline XQuery Testing.

    Discard your changes and return to the Edit Stage Configuration page

    Click Cancel.

    Discard your changes and remain on the XQuery Expression Editor page

    Click Clear.

    Discard your changes and exit the message flow

    Click Cancel All. When you confirm that you want to exit the Message Flow, the Summary of Proxy Services page is displayed if you initially clicked the Edit Message Flow icon for the proxy service on that page or the Project View or Folder View pages are displayed if you clicked the Edit Message Flow icon for the proxy service on those pages.


     

 


Building an XQuery Expression Manually

The XQuery Expression Editor page enables you to build an Inline XQuery expression manually. To learn more about this editor, see Using the Inline XQuery Expression Editor.

To Build an XQuery Expression Manually

  1. Make sure the XQuery Text option is selected.
  2. Enter or paste text into the XQuery Text field.
  3. Note: To build the expression, you can drag XQuery functions from the XQuery Functions Palette on the left side of the page, and drop them in the XQuery Text field. You can also add predefined default namespaces, variable namespaces, and user-defined namespaces, which are listed in the Namespace Definitions panel on the left side of the page.

    The drag-and-drop feature is supported only for the Internet Explorer browser. Other browsers do not support the JavaScript required to set the dragged text. To use the XML schema tree, instead of doing a drag-and-drop, you must click the node you are interested in. The XPath for this node is displayed in the text area at the bottom of the palette. You must then copy and paste the content of this text area into the XQuery Text field.

  4. Do one of the following:
  5. Table 17-8 Tasks You Can Do in the XQuery Expression Editor

    To...

    Complete These Steps...

    Define a user namespace

    To learn more, see Defining a User Namespace.

    Create a variable structure

    To learn more, see Creating a Variable Structure.

    Use a predefined message context variable

    To learn more, see Using Predefined Variables in the Inline Editors.

    Select an XQuery resource for execution

    To learn more, see Selecting an XQuery Resource for Execution.

    Select an XSLT resource for execution

    To learn more, see Selecting an XSLT Resource for Execution.

    Save the expression

    Click Save. The Edit Stage Configuration page is displayed. The expression is populated with the transformation you selected. To learn more, continue in Viewing and Changing Stage Configuration Details or Adding an Action.

    Note: When you click Save, the Message Flow is updated in the current session. When you have finished making changes to this configuration, from the left navigation pane, click Activate under Change Center. The session ends and the core configuration is updated. Alternatively, click Discard at any time during the session to delete the changes you have made so far in the current session.

    Validate the expression

    Click Validate. A message is displayed if the expression is validated successfully.

    Test the expression

    Click Test. To learn more, see Performing Inline XQuery Testing.

    Discard your changes and return to the Edit Stage Configuration page

    Click Cancel.

    Discard your changes and remain on the XQuery Expression Editor page

    Click Clear.

    Discard your changes and exit the message flow

    Click Cancel All. When you confirm that you want to exit the Message Flow, the Summary of Proxy Services page is displayed if you initially clicked the Edit Message Flow icon for the proxy service on that page or the Project View or Folder View pages are displayed if you clicked the Edit Message Flow icon for the proxy service on those pages.


     

 


Building an XPath Expression Manually

The XPath Expression Editor page enables you to build an Inline XPath expression manually. To learn more about this editor, see Using the XPath Expression Editor.

To Build an XPath Expression Manually

  1. Enter or paste text into the Text field.
  2. Note: To build the expression, you can drag XQuery functions from the XQuery Functions Palette on the left side of the page, and drop them in the Text field. You can also add predefined default namespaces, variable namespaces, and user-defined namespaces, which are listed in the Namespace Definitions panel on the left side of the page.

    The drag-and-drop feature is supported only for the Internet Explorer browser. Other browsers do not support the JavaScript required to set the dragged text. To use the XML schema tree, instead of doing a drag-and-drop, you must click the node you are interested in. The XPath for this node is displayed in the text area at the bottom of the palette. You must then copy and paste the content of this text area into the Text field.

  3. Do one of the following:
  4. Table 17-9 Tasks You Can Do in the XPath Expression Editor

    To...

    Complete These Steps...

    Define a user namespace

    To learn more, see Defining a User Namespace.

    Create a variable structure

    To learn more, see Creating a Variable Structure.

    Use a predefined message context variable

    To learn more, see Using Predefined Variables in the Inline Editors.

    Save the expression

    Click Save. The Edit Stage Configuration page is displayed. The expression is populated with the transformation you selected. To learn more, continue in Viewing and Changing Stage Configuration Details or Adding an Action.

    Note: When you click Save, the Message Flow is updated in the current session. When you have finished making changes to this configuration, from the left navigation pane, click Activate under Change Center. The session ends and the core configuration is updated. Alternatively, click Discard at any time during the session to delete the changes you have made so far in the current session.

    Validate the expression

    Click Validate. A message is displayed if the expression is validated successfully.

    Test the expression

    Click Test. To learn more, see Performing Inline XQuery Testing.

    Discard your changes and return to the Edit Stage Configuration page

    Click Cancel.

    Discard your changes and remain on the XPath Expression Editor page

    Click Clear.

    Discard your changes and exit the message flow

    Click Cancel All. When you confirm that you want to exit the Message Flow, the Summary of Proxy Services page is displayed if you initially clicked the Edit Message Flow icon for the proxy service on that page or the Project View or Folder View pages are displayed if you clicked the Edit Message Flow icon for the proxy service on those pages.


     

 


Selecting an XQuery Resource for Execution

The XQuery Expression Editor page enables you to select an XQuery resource for execution. To learn more about this editor, see Using the Inline XQuery Expression Editor.

To Select an XQuery Resource for Execution

  1. Select the XQuery Resources option.
  2. Under the Select an XQuery resource to execute field, select the XQuery Browser icon.
  3. In the XQuery Browser, select the radio button associated with the XQuery you want to execute, then click Submit.
  4. Under the Bind Variables field, a label and a corresponding text box that you can scroll to see each input parameter of the transformation are displayed. Each label corresponds to the name of a parameter, and each text box is for defining an XQuery expression to be mapped to the parameter. You must define a mapping for each parameter. For example, if an XQuery transformation has two input parameters named one and two, the Variable Mapping field has two labels—one and two. A text box, into which the XQuery expression is entered, is associated with each label.
  5. The following XQuery expressions are examples of valid input to this field:

    $body/*[1]

    $body/po:PurchaseOrder

    Note: The following variable name is not a valid entry for this field and results in an exception:
    body

  6. Do one of the following:
  7. Table 17-10 Tasks You Can Do in the XQuery Expression Editor

    To...

    Complete These Steps...

    Define a user namespace

    To learn more, see Defining a User Namespace.

    Create a variable structure

    To learn more, see Creating a Variable Structure.

    Use a predefined message context variable

    To learn more, see Using Predefined Variables in the Inline Editors.

    Build an XQuery expression manually

    To learn more, see Building an XQuery Expression Manually.

    Select an XSLT resource for execution

    To learn more, see Selecting an XSLT Resource for Execution.

    Save the expression

    Click Save. The Edit Stage Configuration page is displayed. The expression is populated with the transformation you selected. To learn more, continue in Viewing and Changing Stage Configuration Details or Adding an Action.

    Note: When you click Save, the Message Flow is updated in the current session. When you have finished making changes to this configuration, from the left navigation pane, click Activate under Change Center. The session ends and the core configuration is updated. Alternatively, click Discard at any time during the session to delete the changes you have made so far in the current session.

    Validate the expression

    Click Validate. A message is displayed if the expression is validated successfully.

    Test the expression

    Click Test. To learn more, see Performing Inline XQuery Testing.

    Discard your changes and return to the Edit Stage Configuration page

    Click Cancel.

    Discard your changes and remain on the XQuery Expression Editor page

    Click Clear.

    Discard your changes and exit the message flow

    Click Cancel All. When you confirm that you want to exit the Message Flow, the Summary of Proxy Services page is displayed if you initially clicked the Edit Message Flow icon for the proxy service on that page or the Project View or Folder View pages are displayed if you clicked the Edit Message Flow icon for the proxy service on those pages.


     

 


Selecting an XSLT Resource for Execution

The XQuery Expression Editor page enables you to select an XSLT resource for execution. To learn more about this editor, see Using the Inline XQuery Expression Editor.

To Select an XSLT Resource for Execution

  1. Select the XSLT Resources option.
  2. Under the Select the XSLT resource to execute field, select the XSLT Browser icon.
  3. In the XSLT Browser, select the radio button associated with the XSLT you want to execute, then click Submit.
  4. Under the Bind Variables field, a label and a corresponding text box is displayed for each input parameter of the transformation. Each label corresponds to the name of a parameter, and each text box is for defining an XQuery expression to be mapped to the parameter. You must define a mapping for each parameter. For example, if an XSL transformation has two input parameters named one and two, the Variable Mapping field has two labels—one and two—with a text box associated with each into which the XQuery expression is entered. In addition to the mapping for any input variables, you must also specify an XQuery expression for the Input Document to the transformation. The mapping is specified in the text box with the label Input Document.
  5. The following XQuery expressions are examples of valid input to this field:

    $body/*[1]

    $body/po:PurchaseOrder

    Note: The following variable name is not a valid entry for this field and results in an exception:
    body

  6. Do one of the following:
  7. Table 17-11 Tasks You Can Do in the XQuery Expression Editor

    To...

    Complete These Steps...

    Define a user namespace

    To learn more, see Defining a User Namespace.

    Create a variable structure

    To learn more, see Creating a Variable Structure.

    Use a predefined message context variable

    To learn more, see Using Predefined Variables in the Inline Editors.

    Build an XQuery expression manually

    To learn more, see Building an XQuery Expression Manually.

    Select an XQuery resource for execution

    To learn more, see Selecting an XQuery Resource for Execution.

    Save the expression

    Click Save. The Edit Stage Configuration page is displayed. The expression is populated with the transformation you selected. To learn more, continue in Viewing and Changing Stage Configuration Details or Adding an Action.

    Note: When you click Save, the Message Flow is updated in the current session. When you have finished making changes to this configuration, from the left navigation pane, click Activate under Change Center. The session ends and the core configuration is updated. Alternatively, click Discard at any time during the session to delete the changes you have made so far in the current session.

    Validate the expression

    Click Validate. A message is displayed if the expression is validated successfully.

    Test the expression

    Click Test. To learn more, see Performing Inline XQuery Testing.

    Discard your changes and return to the Edit Stage Configuration page

    Click Cancel.

    Discard your changes and remain on the XQuery Expression Editor page

    Click Clear.

    Discard your changes and exit the message flow

    Click Cancel All. When you confirm that you want to exit the Message Flow, the Summary of Proxy Services page is displayed if you initially clicked the Edit Message Flow icon for the proxy service on that page or the Project View or Folder View pages are displayed if you clicked the Edit Message Flow icon for the proxy service on those pages.


     

 


Building an XQuery Condition Using the Text Option

The XQuery Condition Editor page enables you to build an XQuery condition using the Text option. To learn more about this editor, see Using the XQuery Condition Editor.

To Build an XQuery Condition Using the Text Option

  1. Make sure the Text option is selected.
  2. Enter or paste text into the Text field.
  3. Note: To build the condition, you can drag XQuery functions from the XQuery Functions Palette, or you can drag message context variables from the Message Context Variables Panel, and drop them in the Text View field. You can also add predefined default namespaces, variable namespaces, and user-defined namespaces, which are listed in the Namespace Definitions panel.

    The drag-and-drop feature is supported only on an Internet Explorer browser. Other browsers do not support the JavaScript to set the dragged text. To use the XML schema tree, instead of doing a drag-and-drop, you must click the node you are interested in. The XPath for this node is displayed in the text area at the bottom of the palette. You must then copy and paste the content of this text area into the Text View field.

  4. Do one of the following:
  5. Table 17-12 Tasks You Can Do in the XQuery Condition Editor

    To...

    Complete These Steps...

    Define a user namespace

    To learn more, see Defining a User Namespace.

    Create a variable structure

    To learn more, see Creating a Variable Structure.

    Use a predefined message context variable

    To learn more, see Using Predefined Variables in the Inline Editors.

    Enter a comparison expression using the Builder option

    To learn more, see Entering a Comparison Expression Using the Builder Option.

    Enter a unary expression using the Builder option

    To learn more, see Entering a Unary Expression Using the Builder Option.

    Save the expression

    Click Save. The Edit Stage Configuration page is displayed. The expression is populated with the transformation you selected. To learn more, continue in Viewing and Changing Stage Configuration Details or Adding an Action.

    Note: When you click Save, the Message Flow is updated in the current session. When you have finished making changes to this configuration, from the left navigation pane, click Activate under Change Center. The session ends and the core configuration is updated. Alternatively, click Discard at any time during the session to delete the changes you have made so far in the current session.

    Validate the expression

    Click Validate. A message is displayed if the expression is validated successfully.

    Test the expression

    Click Test. To learn more, see Performing Inline XQuery Testing.

    Discard your changes and return to the Edit Stage Configuration page

    Click Cancel.

    Discard your changes and remain on the XQuery Condition Editor page

    Click Clear.

    Discard your changes and exit the message flow

    Click Cancel All. When you confirm that you want to exit the Message Flow, the Summary of Proxy Services page is displayed if you initially clicked the Edit Message Flow icon for the proxy service on that page or the Project View or Folder View pages are displayed if you clicked the Edit Message Flow icon for the proxy service on those pages.


     

 


Entering a Comparison Expression Using the Builder Option

The XQuery Condition Editor page enables you to enter a comparison expression using the Builder option. To learn more about this editor, see Using the XQuery Condition Editor.

To Enter a Comparison Expression Using the Builder Option

  1. Select the Builder option.
  2. Make sure the Comparison Expression option is selected.
  3. In the Operand field, enter a context variable, namespace definition or XQuery function.
  4. Note: To build the expression, you can drag XQuery functions from the XQuery Functions Palette, and drop them in the Operand field. You can also add predefined default namespaces, variable namespaces, and user-defined namespaces in this way from the Namespace Definitions panel.

  5. In the Operator field, select =, !=, >, <, >=, or <=.
  6. In the Value field, enter text or enter a context variable.
  7. Note: You must enter the text in quotations—that is, enter "true", not true.

  8. Click Add. The text you entered is displayed in the Expressions pane.
  9. Repeat steps 2-6 to build additional conditions. Each condition is added to the end of the list of conditions.
  10. Note: When you build additional expressions, make sure to select the And or the Or options in the Conjunction field.

    Note: You can select a condition and click an Up arrow to move it up the list of conditions, click a Down arrow to move it down the list of conditions, click an Edit icon to update it, and click a Delete icon to delete it.

    Note: Unary expressions may be intermixed with Comparison expressions in the overall definition of a condition.

  11. Do one of the following:
  12. Table 17-13 Tasks You Can Do in the XQuery Condition Editor

    To...

    Complete These Steps...

    Define a user namespace

    To learn more, see Defining a User Namespace.

    Create a variable structure

    To learn more, see Creating a Variable Structure.

    Use a predefined message context variable

    To learn more, see Using Predefined Variables in the Inline Editors.

    Build an XQuery condition using the Text option

    To learn more, see Building an XQuery Condition Using the Text Option.

    Enter a unary expression using the Builder option

    To learn more, see Entering a Unary Expression Using the Builder Option.

    Save the expression

    Click Save. The Edit Stage Configuration page is displayed. The expression is populated with the transformation you selected. To learn more, continue in Viewing and Changing Stage Configuration Details or Adding an Action.

    Note: When you click Save, the Message Flow is updated in the current session. When you have finished making changes to this configuration, from the left navigation pane, click Activate under Change Center. The session ends and the core configuration is updated. Alternatively, click Discard at any time during the session to delete the changes you have made so far in the current session.

    Validate the expression

    Click Validate. A message is displayed if the expression is validated successfully.

    Test the expression

    Click Test. To learn more, see Performing Inline XQuery Testing.

    Discard your changes and return to the Edit Stage Configuration page

    Click Cancel.

    Discard your changes and remain on the XQuery Condition Editor page

    Click Clear.

    Discard your changes and exit the message flow

    Click Cancel All. When you confirm that you want to exit the Message Flow, the Summary of Proxy Services page is displayed if you initially clicked the Edit Message Flow icon for the proxy service on that page or the Project View or Folder View pages are displayed if you clicked the Edit Message Flow icon for the proxy service on those pages.


     

 


Entering a Unary Expression Using the Builder Option

The XQuery Condition Editor page enables you to enter a unary expression using the Builder option. To learn more about this editor, see Using the XQuery Condition Editor.

To Enter a Unary Expression Using the Builder Option

  1. Select the Builder option.
  2. Select the Unary Expression option.
  3. Select the Not checkbox to make this a negative expression or leave it blank.
  4. Enter a context variable, namespace definition or XQuery function in the Expression field.
  5. Note: To build the expression, you can drag XQuery functions from the XQuery Functions Palette, and drop them in the Expression field. You can also add predefined default namespaces, variable namespaces, and user-defined namespaces in this way from the Namespace Definitions panel.

  6. Click Add. The text you entered is displayed in the pane below.
  7. Repeat steps 2-4 to build additional conditions. Each condition is added to the end of the list of conditions.
  8. Note: When you build additional expressions, make sure to select the And or the Or options in the Conjunction field.

    Note: You can select a condition and click an Up arrow to move it up the list of conditions, click a Down arrow to move it down the list of conditions, click an Edit icon to update it, and click a Delete icon to delete it.

    Note: Unary expressions may be intermixed with Comparison expressions in the overall definition of a condition.

  9. Do one of the following:
  10. Table 17-14 Tasks You Can Do in the XQuery Condition Editor

    To...

    Complete These Steps...

    Define a user namespace

    To learn more, see Defining a User Namespace.

    Create a variable structure

    To learn more, see Creating a Variable Structure.

    Use a predefined message context variable

    To learn more, see Using Predefined Variables in the Inline Editors.

    Build an XQuery condition using the Text option

    To learn more, see Building an XQuery Condition Using the Text Option.

    Enter a comparison expression using the Builder option

    To learn more, see Entering a Comparison Expression Using the Builder Option.

    Save the expression

    Click Save. The Edit Stage Configuration page is displayed. The expression is populated with the transformation you selected. To learn more, continue in Viewing and Changing Stage Configuration Details or Adding an Action.

    Note: When you click Save, the Message Flow is updated in the current session. When you have finished making changes to this configuration, from the left navigation pane, click Activate under Change Center. The session ends and the core configuration is updated. Alternatively, click Discard at any time during the session to delete the changes you have made so far in the current session.

    Validate the expression

    Click Validate. A message is displayed if the expression is validated successfully.

    Test the expression

    Click Test. To learn more, see Performing Inline XQuery Testing.

    Discard your changes and return to the Edit Stage Configuration page

    Click Cancel.

    Discard your changes and remain on the XQuery Condition Editor page

    Click Clear.

    Discard your changes and exit the message flow

    Click Cancel All. When you confirm that you want to exit the Message Flow, the Summary of Proxy Services page is displayed if you initially clicked the Edit Message Flow icon for the proxy service on that page or the Project View or Folder View pages are displayed if you clicked the Edit Message Flow icon for the proxy service on those pages.


     

 

Skip navigation bar  Back to Top Previous Next