Using the AquaLogic Service Bus Console
This section includes the following topics:
The BEA AquaLogic Service Bus Test Console is a browser based test environment used to validate and test the design of your system. You can configure the object of your test (proxy service, business service, resource), execute the test and view the results in the test console. In some instances you can trace through the code and examine the state of the message at specific trace points.
The Test Console can be invoked to test any proxy or business service and certain resources used by these services. You can also do inline XQuery testing. You can invoke the test console in a number of ways in the AquaLogic Service Bus Console depending on what part of your process you want to test. The output from the tests is also displayed in the test console.
You can invoke the test console from:
Note: Only users in the IntegrationAdmin
and IntegrationDeployer
roles are allowed to use the Test Console.
Configuring Proxy Service Test Data
Viewing Proxy Service Test Results
Configuring Business Service Test Data
Performing Inline XQuery Testing
Understanding How the Run Time Uses the Transport Settings in the Test Console
This section includes the following topics:
You must have activated a session to test a proxy service. You can test a proxy service from the Resource Browser or Project Explorer. You can test the following types of proxy services:
Note: You can test SOAP proxy services with Web-Service Security (WSS) policies. See Web-Service Security in Configuring Proxy Service Test Data.
The Test Console is opened on the Proxy Service Testing page. For example, using the examples provided with the product (see BEA AquaLogic Service Bus Examples), click the icon associated with the LoanGateway1
proxy service.
Note that by default both test Configuration options, Direct Call and Include Tracing are enabled. You can unselect the Direct Call option, which automatically unselects the Include Tracing option. By doing so, testing is performed using the indirect call method where the message is sent through the transport layer.
You can use the direct call option (leave Direct Call checked) and disable tracing. To disable tracing, simply unselect the associated checkbox.
The following is a description of the configuration page that appears in the test console when you launch it to test a proxy service.
Note: The fields that appear on the console for accepting input to the request document are based on the service type.
The name of the proxy service being tested is written on the top of the page |
||
If there are any operations associated with the proxy service, they are displayed showing the details for the proxy service. An arrow indicates the currently selected operation. |
||
You can set the testing configuration to execute in a number of ways depending on the options you select in this section. |
||
Send a message to the proxy service without using the AquaLogic Service Bus transport layer. The input data to the test console must be that which is sent from the client to the proxy service. The opposite of the Direct Call is an Indirect Call. It can be invoked by unselecting the Direct Call option. It is performed by default for Business services. The Indirect call sends messages through the transport layer. In this case, the input data to the test console must be that which is being sent from a proxy service to the invoked service. |
||
The configuration data entered here represents the request message. The list of input fields is used to generate the request message that is sent to the proxy service. Click Execute to run the test with the values entered. The test console displays the request message and the service's response message and metadata. The set of inputs for which you are prompted in the Request Document page are specific to the service type—the service types are listed in the following sections and a description of the input required by each. |
||
The service requests input in the form of a payload.The payload is the content of the message being sent. The content is expected to be an XML document. You can browse to a file or you can enter the message content in the text box provided. |
||
The service requests input in the form of a payload. The payload is the content of the message being sent. The content is expected to be the SOAP envelope. You can browse to a file or you can enter the message content in the text box provided. |
||
Messaging Services define four possible input types: It is recommended to enter binary input from a file. Data entered in the text area are converted to binary using the system encoding. Data entered from file for Text Services must be converted to text. The encoding input field is used to specify the encoding to apply during the conversion. The system encoding is used if this field is not configured. By default, the encoding field is initialized with the encoding value configured on the Proxy Service endpoint. |
||
The service requests input in the form of a payload.The payload is the content of the message being sent. The content is expected to be an XML document. You can browse to a file or you can enter the message content in the text box provided. If your proxy service is a WSDL-based service with multiple operations defined, the test console generates and provides a sample document to use when testing the service. You can use this sample data directly, edit it and then run the test, or provide your own test data. All operations are listed at the top of the page with an arrow highlighting the selected operation. |
||
For a SOAP Document, the SOAP envelope is usually composed of zero or more headers and one body payload. The Form and XML tabs provide alternative ways to specify the content. The Form tab contains a SOAP Header field and a SOAP Body field. The content of the SOAP Header field is expected to be a SOAP Header tag (this allows for the definition of more than one header). The SOAP Body field contains the data that is actually sent as part of the message. The content is expected to be an XML document. Both the header and the body are used to generate the SOAP envelope. |
||
For SOAP RPC, the SOAP envelope is composed of zero or more headers, and zero or more arguments. The Form and XML tabs provide alternative ways to specify the content. The Form Tab contains a single input for SOAP headers, and one input field for each argument (the name of the input field corresponds to the name of the argument). The content of the SOAP Header field is expected to be a SOAP Header tag (this allows for the definition of more than one header). The WSDL is used to detect the type of each argument. A single-line input field is used for primitive types; a multi-line input field is used for XML types. A sample document is automatically generated to facilitate testing. The headers and arguments are used by the Test Console to generate the SOAP envelope. The XML Tab contains a single input field. The content of this field is expected to be the SOAP envelope being sent. The payload (XML input) can be file based or text based. Referencing a file for input takes precedence over textual input. Browse and select a specific file you want to use in your test. |
||
This section is available only for SOAP services when the selected operation has a Web-Service Security (WSS) policy. |
||
The test service gets all client-side PKI (key-pair) credentials for Web Service Security operations (digital signature and encryption) from this service provider. This field is optional. Certain scenarios require a service provider, depending on the request/response policy for the operation. For more information, see "Testing Services with Web Service Security" in Using the Test Console in the BEA AquaLogic Service Bus User Guide. |
||
This is the username used in Web Service Security Username tokens generated from the test service. This field is optional. This username is only needed in some scenarios where the operation's request policy specifies an identity assertion. Do not confuse this field with the transport security context username field. Note: This must be a valid username and password in the local security realm. An invalid username or invalid password causes a client-side error on the test service. |
||
This is the password used in Web Service Security Username tokens generated from the test service. |
||
The Transport section is collapsed by default as it is an advance option. The fields and value of the fields displayed for the transports depend on the test configuration. |
||
This username and the associated password are used to set the security context used by the test service when invoking the proxy service. If the proxy servie routes the message to a business service that expects a SAML token, this is the identity that will be represented by the token. For more information, see "SAML Support " in Securing Inbound and Outbound Messages in the BEA AquaLogic Service Bus User Guide. Do not confuse this field with the Web Service Security (WSS) username field. Note: That this must be a valid username and password in the local security realm. An invalid username or invalid password will cause a client-side error on the test service. |
||
This is the associated password. For more information, see Username. |
||
This option is only displayed when testing on any SOAP or any XML proxy service. Unselect Request/Response for one-way service invocations. |
||
See Limitations to Transport Header and Metadata Values You Specify in the Test Console When Testing a Service |
||
See Limitations to Transport Header and Metadata Values You Specify in the Test Console When Testing a Service |
Note: The secured SOAP message is displayed printed with extra whitespaces. Because whitespaces can affect the semantic of the document, this SOAP message cannot always be used as the literal data. For example, digital signatures are whitespace sensitive and can become invalid.
The Results page displays the results of testing the proxy service. Note that tracing is only enabled if the Direct Call and the Include Tracing options are selected. If they are not enabled, then tracing will not appear as part of your test results. A description of the Results page is provides in Table 23-2.
This is the request message sent to the proxy service by the test console. This section is initially collapsed if the test console did not modify the request message. This section is initially expanded for SOAP services configured using the Form tab, or if WS-Security has been applied. In the case WS-Security applies, this section will contain two SOAP messages—the first message is the clear text message; the second is the secured SOAP message. |
|
For SOAP service with response WS-Security, this section contains two SOAP messages. The first SOAP message is the secured message as received by the client. The second SOAP message is the corresponding clear text message.. |
|
Tracing shows the state of the message as it passes through the system.When the Direct Call option is not selected, tracing is not performed and not displayed on the Results page for the proxy service.For more information on tracing, see Tracing Proxy Services. |
Tracing is enabled when you test a proxy service using a Direct Call. The Invocation Trace checkbox is automatically selected with the Direct Call option. If you do not want to enable tracing, then you must uncheck the checkbox.When you turn tracing on the test results include the details of the trace. Tracing enables you to track problems in the system and to isolate them for corection.The trace information shows the path taken through the request and response paths in the code.
For each stage, the trace includes the changes that occurred to the message context and all the services invoked during the stage execution. The following information is available in the trace:
The trace contains similar information for the Route Node. In this case, the trace contains four categories:
You must have activated a session to test a business service. You can test the following types of business services:
Note: You can test SOAP Business Services with Web-Service Security policies. For more information, see "Testing Services with Web Service Security" in Using the Test Console in the BEA AquaLogic Service Bus User Guide.
When testing business services you always send the message through the transport layer. The Direct Call option is not available. The configuration data that you provide to the test console to test the service is that which represents the state of the message that is expected to be sent to that business service—for example from a Route Node or a Service Callout action of another proxy service. The test console is in the role of the caller proxy service when you use it to test a business service.
In this section we describe the configuration page that appears in the test console when you select to test a business service. The fields that appear on the test console for accepting input to the request document are based on the service type.
Table 23-3 describes the configuration page for the test Console.
The name of the business service being tested in written on the top of the page |
||
If there are any operations associated with the business service they are displayed showing the details for the business service.An arrow indicates the curently selected operation. |
||
The configuration data entered here represents the request message. The list of input fields is used to generate the request message that is sent to the Business Service. Click Execute to run the test with the values entered. The test console page refreshes to display the request message and the service's response. The set of inputs displayed is specific to each service type. The service types are listed in the following sections and a description of the input required by each. |
||
The service requests input in the form of a payload. The payload is the content of the message being sent. The content is expected to be an XML document. You can browse to a file or you can enter the message content in the text box provided. |
||
The service requests input in the form of a payload. The payload is the content of the message being sent. The content is expected to be the SOAP envelope. You can browse to a file or you can enter the message content in the text box provided. |
||
Messaging Services define 4 possible input types: none, XML, Binary or Text. The service requests a single input either file based or text based, except for the type none that does no require any input. It is recommended to enter binary input from a file. Data entered in the text area are converted to binary using the system encoding. Data entered from file for Text Services must be converted to text. The encoding input field is used to specify the encoding to apply during the conversion. The system encoding is used if this field is not configured. By default, the encoding field is initialized with the encoding value configured on the Proxy Service endpoint. |
||
The service requests input in the form of a payload. The payload is the content of the message being sent. The content is expected to be an XML document. You can browse to a file or you can enter the message content in the text box provided. This is a WSDL based service with multiple operations defined. We provide the sample document to use in testing this service. All operations are listed at the top of the page with an arrow highlighting the selected operation. |
||
For SOAP Document, the SOAP envelope is usually composed of zero or more headers and one body payload. The Form and XML tabs provide alternative ways to specify the content. The Form tab contains a SOAP Header field and a SOAP Body field. The content of the SOAP Header field is expected to be a SOAP Header tag (this allows for the definition of more than one header). The SOAP Body field contains the data that is actually sent as part of the message. The content is expected to be an XML document. Both the header and the body are used to generate the SOAP envelope. The XML Tab contains a single input field. The content of this field is expected to be the SOAP envelope being sent. |
||
For SOAP RPC, the SOAP envelope is composed of zero or more headers, and zero or more arguments. The Form and XML tabs provide alternative ways to specify the content. The Form Tab contains a single input for SOAP headers, and one input field for each argument (the name of the input field corresponds to the name of the argument). The content of the SOAP Header field is expected to be a SOAP Header tag (this allows for the definition of more than one header). The WSDL is used to detect the type of each argument. A single-line input field is used for primitive types; a multi-line input field is used for XML types. A sample document is automatically generated to facilitate testing. The headers and arguments are used by the Test Console to generate the SOAP envelope. The XML Tab contains a single input field. The content of this field is expected to be the SOAP envelope being sent. The payload (XML input) can be file based or text based. Referencing a file for input takes precedence over textual input. Browse and select a specific file you want to use in your test. |
||
This section is available only for SOAP service when the selected operation has a Web-Service Security policy. |
||
The test service gets all client-side PKI (key-pair) credentials for Web service security operations (digital signature and encryption) from this service provider. This field is optional. Certain scenarios require a service provider, depending on the request/response policy for the operation. For more information, see "Testing Services with Web Service Security" in Using the Test Console in the BEA AquaLogic Service Bus User Guide. |
||
This is the username used in Web Service Security Username tokens generated from the test service. This field is optional. This username is only needed in some scenarios where the operation's request policy specifies an identity assertion. Do not confuse this field with the transport security context username field. NOTE: this must be a valid username and password in the local security realm. An invalid username or invalid password will cause a client-side error on the test service. In some scenarios, this username/password may also be used when the test service generates a SAML assertion. |
||
This is the password used in Web Service security username tokens generated from the test service. |
||
The Transport section is collapsed by default as it is an advance option. The fields and value of the fields displayed for the transports depend on the test configuration. |
||
This username and the associated password are used to set the security context used by the test service when invoking the business service. If the business service expects a SAML token, this identity may be propagated in the SAML token. See (link to ALSB SAML identity propagation). NOTE: this must be a valid username/password in the local security realm. An invalid username or invalid password will cause a client-side error on the test service. |
||
This is the associated password. For more information, see Username. |
||
This field is used when testing an HTTPS business service with CLIENT-CERT authentication, (see {link to outbound HTTPS section in ALSB UG}). The service provider must have an associated SSL client credential. The test service will use that credential during the SSL handshake |
||
This checkbox is only displayed when testing an any SOAP or any XML Business Service. Unselect the checkbox for one-way service invocations. |
||
See Limitations to Transport Header and Metadata Values You Specify in the Test Console When Testing a Service. |
||
See Limitations to Transport Header and Metadata Values You Specify in the Test Console When Testing a Service. |
The Results page displays the results of testing the business service. A description of the Business Service Results page is provided in Table 23-4. :
Note: The secured SOAP message is displayed pretty printed, i.e. with extra whitespaces. This SOAP message cannot always be used as the literal data as whitespaces can affect the semantic of the document. For example, digital signatures are whitespace sensitive and could become invalid.
Performing Inline XQuery Testing
Understanding How the Run Time Uses the Transport Settings in the Test Console
You can test transformations after activating a session or during a session to ensure that the resources operate with the expected behavior.
Note: You must activate the session to test the runtime, otherwise your testing is done at design time using your local changes.
You can test the following transformations:
This topic includes the following sections:
MFL resources support two transformations:
Each transformation only accepts one input and provides a single output.
A description of the Configuration page for the MFL resource is provides in Table 23-5.
Note: You can test the design time or the runtime. Click Activate if you want to test the runtime.Do not activate the session to test the design time.
To test an XSLT resource you must supply the input XML document and it returns the output XML document. XSLT transformations may have additional named parameters. All parameters required by the transformation are displayed on the configuration page. Default values are available but you can override the values.
A description of the Configuration page for the XSLT resource is provided in Table 23-6:
Note: You can test the design time or the runtime. Click Activate if you want to test the runtime.Do not activate the session to test the design time.
An XQuery transformation can take multiple inputs and returns one output. Each input corresponds to an XQuery external variable declared in the XQuery resource. The value of an XQuery input variable can be a primitive value (string, integer, date, and so on), an XML document, or an sequence of these types. The output value can be primitive value (string, integer, date, and so on ), an XML document, or a sequence of these types.
Note: The test console does not support sequences on input.
A description of the configuration page for the XQuery resource is provided in Table 23-7
Note: You can test the design time or the runtime. Click Activate if you want to test the runtime.Do not activate the session to test the design time.
Performing Inline XQuery Testing
Understanding How the Run Time Uses the Transport Settings in the Test Console
Testing takes the same form for both the XQuery Editor and the Condition Editor. However the scenario is different for the XPath Expression Editor because it takes only one input. You can edit and test an action in the message flow using the following editors:
Note: You must disable the pop-up blockers in your browser for the inline XQuery testing to work. Note that if you have toolbars in the IE browser, you may need to disable the pop-up blockers from under the options menu as well as for all toolbars that are configured to block them.
In-line XQuery Expressions are used to create the data content for the message context variables (or part of a message context variable) during the execution of the flow. The Test Console can be used directly in the XQuery Expression Editor to test the correct definition of the expression.
Similarly, Inlined XQuery Conditions are used to evaluate boolean conditions used in the flow. The Test Console can be used directly in the XQuery Condition Editor to test the correct definition of the condition.
An Inlined XQuery can take multiple inputs and returns one output. Each input corresponds to an XQuery unbound variable defined in the in-line XQuery. The value of an XQuery input can be a primitive value (string, integer, date), an XML document, or a sequence of these types. The output value can be primitive value (string, integer, date), an XML document, or a sequence of these types.
Note: The test console does not support sequences on input.
A description of the configuration page for the Inlined XQuery is provided in Table 23-8
Note: Testing an Inlined XQuery is done in the same way as you test an XQuery resource, except to note that this is an Inline XQuery, not a resource.
Note: When performing Inline XQuery testing with the test console, once you have completed a test, you can click Back to execute a new test. To execure a new test after making changes to the Inlined XQuery, you must closeand reopen the test console for the changes to take effect.
XPath Expressions are used to select a subset of an XML message context variable. The Test Console can be used directly in the XPath Expression Editor to test the correct definition of the xpath. An XPath expression takes a single XML document as input and generates a sequence of XML documents and/or primitives types for result.
A description of the configuration page for the Inlined XPath is provided in Table 23-9
Understanding How the Run Time Uses the Transport Settings in the Test Console
The preceding topics in this section describe how the values of the transport headers, transport metadata, and transport-related security data for outbound requests can be configured when you run the test console to test a proxy service or a business service.
Warning: Some specifications you can make in the test console are not honored at run time. That is, the values of certain headers or metadata are overwritten, or ignored by the AquaLogic Service Bus run time when the test is executed. The headers and metadata for which there are limitations when using the test console are described in Table 23-10.
Table 23-10 Limitations to Transport Header and Metadata Values You Specify in the Test Console When Testing a Service
All transport headers and other fields you set are preserved at run time. |
|||
The AquaLogic Service Bus run time overrides any values you set for these parameters |
|||
When the Direct Call option is used, all transport headers and other fields you set are preserved at run time |
|||
When the Direct Call option is not used, the same limitations apply as for a transport header action configuration |
See the limitations for JMS transport headers described in Table 16-5 |
||
The same limitations apply as for a transport header action configuration |
See the limitations for JMS transport headers described in Table 16-5 |
||
No limitations. In other words, any transport headers and other fields you set are honored by the run time. This is true whether or not Direct Call is specified. |
|||
The AquaLogic Service Bus run time overrides any values you set for these parameters |
|||
No limitations. In other words, any transport headers and other fields you set are honored by the run time.1 |
|||
No limitations. In other words, any transport headers and other fields you set are honored by the run time. |
|||