XML 调用详细信息

XML 调用元素包含调用内容以及此调用的传输信息。内容包含通过 HTTP 或 JMS 传输方法传输的纯 XML。传输信息指根据所选协议进行发送、接收和应答所需要的信息。
自动更新节点名
启用后,此选项将更新测试内容中 XML 调用元素的名称。
单向
此选项指定在调用后预期没有来自服务器的响应。这将禁用更新返回按钮。
超时(毫秒)
这是超时值,单位为毫秒。如果在经过指定时间后未收到响应,那么会产生错误。
思考时间(毫秒)
这指定在使用多个虚拟用户运行此测试时,对每个用户所观察到的以编程方式计算的时间延迟。思考时间是对实际用户在执行操作之前用于阅读或思考的时间量的统计仿真。
更新返回
这将打开“返回预览”窗口。从此窗口中,您可以从工作台执行调用来创建或更新与调用关联的消息返回。

消息

这些页面呈现调用的 XML 内容并以三种不同形式提供对数据关联的访问权。

表单
This view provides a simplified view of the message that focuses on editing the values of the XML content. Use the Schema menu to enable assistance with editing XML content so that the XML is valid and complies with the XSD specification.

In the Form view, add the XML headers that are required for standard web service calls. On the Header bar, click Add (Add button) to create the default XML header structure for WS-Addressing, WS-ReliableMessaging or WS-Coordination requests, or click More for other standards. You can enable or disable XML header elements and specify the correct values for each XML element. Checks are performed to ensure that the XML content is valid.

注: To add XML headers to calls in IBM® Security AppScan®, add a Static XML Headers algorithm on the Request Stack tab of the request.

This view provides a hierarchical view of the XML structure of the message, including elements, namespaces, and the associated values. You can use Add, Insert, Remove, Up, and Down to edit the XML elements and namespaces in the tree.

Use Skip if Empty column to select the empty XML elements that you want to skip. This column is visible only if you selected the Display the 'Skip if Empty' column in XML tree viewer check box in Window > Preferences > Test > Test editor > Service test.

Click Filter to hide or show namespace, attribute, or text nodes, depending on your requirements.

单击只允许有效修改可启用基于指定 XML 模式文档 (XSD) 的智能编辑。要为工作台指定一组 XSD 文档,请在测试导航器中,右键单击项目,然后选择属性模式目录。Disable Allow only valid modifications if you do not have an XSD or if you want to bypass the schema.

You can right-click an XML element to convert it to an XML fragment. This enables you to perform data correlation (use datapools and create references) on the entire XML fragment instead of only on the value.

This view displays the source XML content of the message or plain text content. To format XML content, click Format XML text. To wrap XML content into a single line, click Pack XML text to single line. Similar controls are available for JSON content.
要点: In the Source view, do not edit the tags that start with SoaTag. If you delete or change these tags, any references and substitutions in the test will be broken. You cannot recreate these tags after you delete them.

附件

此页列出附加到调用的 MIME 附件。此视图的内容与多用途因特网邮件扩展 (MIME) 的规范对应。 可以使用此页面将工作台资源添加为 MIME 附件并更改属性。

内容标识是调用用来引用附件的标识。 使用此标识的方法取决于服务器要求。

协议

此页面涵盖用于发送调用的协议。此协议可以是逐条消息的 HTTP 或 Java™ 消息服务 (JMS)。

HTTP
此页面使您能够覆盖一些 HTTP 设置,这些设置附加到对本地 HTTP 配置的调用。
方法
此选项使您能够从以下方法列表中指定 XML 调用的 HTTP 方法:
  • POST
  • GET
  • PUT
  • DELETE
版本

此选项使您能够指定 HTTP 1.0 或 HTTP 1.1。

URL

此字段使您能够指定 XML 调用的 URL。

此部分使您能够向调用添加头。头必须适合于指定的 HTTP 方法。

应用程序管理以下头,这些头无法添加:
  • User Agent
  • Host Connection
  • Cache-Control
  • Pragma
  • Content-Type
  • Content-Length
cookie

此部分使您能够管理 cookies。您可以添加、编辑和移除 cookie,以及创建引用。

JMS

此页面使您能够添加一些字符串属性,这些属性附加到对本地 JMS 配置的调用。这些属性将通过 JMS 发送为消息属性。

MQ

此页面使您能够覆盖一些设置,这些设置附加到对本地 WebSphere® MQ 配置的调用。

名称
这是在消息调用中显示为指向此协议配置的链接的名称。
队列管理器名称
指定要向其发送调用的队列管理器的名称。
队列名称
指定队列管理器所管理的队列的名称。
使用本地队列管理器
指定 WebSphere MQ 服务器是否在本地计算机上运行。如果此服务器位于远程计算机上,请取消选择此选项以指定远程 MQ 服务器详细信息。
队列管理器地址
指定远程 MQ 服务器的 IP 地址或主机名。
队列管理器端口
指定远程 MQ 服务器的侦听器端口。
客户机通道
指定远程队列管理器的服务器连接方式通道。
使用临时队列
指定 MQ 服务器是否创建临时队列。如果选中此选项,将只为接收特定消息而创建临时队列,然后予以删除。
队列名称
如果取消选择使用临时队列,那么此选项将指定接收消息返回(来自 MQ 服务器)的队列的名称。在队列管理器名称中指定的队列管理器必须管理此队列。

调用和消息返回通过 MQ 消息中的关联标识进行关联,这意味着消息的报告设置将设为 MQC.MQRO_COPY_MSG_ID_TO_CORREL_ID。服务器必须遵守此约束。这支持 WebSphere MQ 提供的 Transport for SOAP 功能部件。

目标服务
此选项用于将 Microsoft .NET 与 IBM WebSphere MQ Transport for SOAP 功能部件一起使用。这指定 .NET 侦听器目录内 ASPX 文件的名称。
使用 RFH2 头
指定 SOAP 消息是否使用 RFH2 头,此头使用预确定的 MQ 消息格式。选择后,将禁用其他消息描述符选项。请将本选项用于 WebSphere MQ Transport for SOAP 功能部件。如果在使用 WebSphere Integration Developer (WID) MQ 绑定,那么此绑定理解带有或不带 RFH2 头的消息。
消息描述符
此部分使您能够配置消息调用的字段。您可以将 MQ 消息描述符的子集替换为定制格式,以用于其他服务器类型(尤其是在使用 XML 消息调用时)。请参阅 WebSphere MQ 文档以了解关于消息描述符的详细信息。
使用临时队列
此部分使您能够为应用程序服务器上的基本认证指定用户名和密码。
SSL 连接
如果客户机通道设置引用了安全通道,请选择此选项以使用 SSL 配置。单击打开 SSL 编辑器以创建新 SSL 配置,或者单击更改以更改与当前测试关联的 SSL 配置。

如果用于创建消息调用的 Web 服务描述语言 (WSDL) 使用受支持的 JMS URI 来指向 WebSphere MQ 服务器,那么将自动创建 SSL 配置。 如果测试生成器无法创建 SSL 配置,那么您必须手动创建新 SSL 配置。

如果 WSDL 已通过 WebSphere MQ 服务 (amqwdeployWMService) 生成,请编辑 WSDL 以将传输绑定从 HTTP 更改为 JMS,从而防止测试生成器创建 HTTP 配置。

密码套件
指定在通道配置中使用的密码套件。

本地 XML 安全性

此页面使您能够添加在 Java 类中实施的定制安全算法。定制算法可应用于发送到服务器和从服务器接收的 XML 内容。

添加、插入、移除、上移和下移
这些按钮使您能够创建安全算法堆栈。 每种算法都将顺序应用于该堆栈。单击添加可添加定制安全算法。
工具
此按钮使您能够更改算法堆栈的显示方式。
定制安全算法

向堆栈添加定制安全算法后,通过此窗口,可以指定用于实施该算法的 Java 类。Java 类使用以下接口:

/**
* ***************************************************************
* IBM Confidential
* 
* (c) Copyright IBM Corporation. 2008. All Rights Reserved.
* 
* The source code for this program is not published or otherwise
* divested of its trade secrets, irrespective of what has been
* deposited with the U.S. Copyright Office.
* *************************************************************** 
* 
*/

package com.ibm.rational.test.lt.models.wscore.datamodel.security.xmlsec;

import java.util.Properties;
import org.w3c.dom.Document;


public interface ICustomSecurityAlgorithm {
	
	/**
	 	 * The following methods can be used in both case:
	 	 * Execution in the workbench and execution of the test.
	 */
	
	
	/**
	 	 * Called to process de Document that is sent over a transport.
	 	 * @param subject
	 */
		void process(Document subject);
	/**
	 	 * Called to un process a document that is received from a server.
	 	 * @param subject
	 */
		void unProcess(Document subject);
	
	/**
	 	 * Properties defined in the UI of the CustomSecurityAlgorithm.
	 	 * @param map
	 */
		void setProperties(Properties map);
	
	/**
	 	 * The following methods can only be used in terms of cast to test service interface,
	 	 * or in terms of access to the previous XML  information, when the jar containing
	 	 * the custom security algorithm is deployed in the performance test project. In
	 	 * this case you cannot use the algorimth directly from the workbench.
	 */
	
	/**
	 	 * This object corresponds to the ITestExecutionService object.
	 	 * This applies only to an algorithm that must link to the execution of the test.
	 	 * If you plan to use this object you will need to deploy the jar containing the
	 	 * implementation into your performance test project and not directly into the JRE.
	 * 
	 	 * In case of a need of the previous xml document received from the execution you can 
	 	 * obtain the value using:
	 	 * IDataArea area = ((ITestExecutionService)executionObject).findDataArea(IDataArea.VIRTUALUSER);
	 	 *String previousXML = (String) area.get("PREVIOUS_XML"); //$NON-NLS-1$
	 * 
	 */
		void setExecutionContext(Object executionObject);
  • process 方法会在将 XML 发送到服务器之前对其进行修改。
  • unprocess 会在从服务器接收 XML 之后对其进行修改。
  • setProperties 方法接收在安全性编辑器中为该定制安全接口定义的任何属性。
  • 在使用该定制安全接口对与消息对应的对象 ITestExecutionServices 进行测试期间将调用 setExecutionContext 方法。
定制安全算法类名
这指定用于实施安全算法的类。 单击浏览类可从工作空间选择类。
算法名称
这指定当前算法的名称。
属性
此列表指定 setProperties 方法在算法中使用的属性。使用添加移除编辑可创建属性列表。

反馈