使用 wsadmin 命令行工具配置其他 HTTP 传输属性
可以使用 wsadmin 命令行工具来配置 Java™ API for XML-based RPC (JAX-RPC) Web service 的其他 HTTP 传输属性。
开始之前
WebSphere® Application Server wsadmin 工具提供运行脚本的能力。您可以使用 wsadmin 工具管理 WebSphere Application Server 安装以及配置、应用程序部署和服务器运行时操作。WebSphere Application Server 仅支持 Jacl 和 Jython 脚本语言。有关 wsadmin 工具选项的更多信息,请查看关于 AdminApp 对象 install、installInteractive、edit、editInteractive、update 和 updateInteractive 命令的选项的信息。
关于此任务
如果要使用基于 Java API XML-based Remote Procedure Call (JAX-RPC) 编程模型或 Java API for XML Web Services (JAX-WS) 编程模型以编程方式来配置这些属性,请查看 JAX-RPC 或 JAX-WS 规范。有关受支持的标准和规范的完整列表,请参阅 Web service 规范和 API 文档。
- com.ibm.websphere.webservices.http.requestContentEncoding
- com.ibm.websphere.webservices.http.responseContentEncoding
- com.ibm.websphere.webservices.http.connectionKeepAlive
- com.ibm.websphere.webservices.http.requestResendEnabled
- com.ibm.websphere.webservices.http.SocketTimeout
- com.ibm.ws.webservices.enableHTTPPrefix
- http.proxyHost
- http.proxyPort
- https.proxyHost
- https.proxyPort
- http.nonProxyHosts - 只能将此属性配置为 JVM 定制属性。此属性适用于 HTTP 和 HTTPS 连接。
这些是为使用 HTTP 协议的 Web Service 应用程序配置的其他属性。这些属性影响 HTTP 请求、HTTP 响应中的消息的内容编码、HTTP 连接持久性和存在读超时时发生 java.net.ConnectException 错误后重新发送的 HTTP 请求的行为。
用本任务部分中提供的以下步骤,使用 wsadmin 工具配置其他 HTTP 属性:
过程
结果
示例
AdminApp.edit ( 'PlantsByWebSphere', '[ -WebServicesClientCustomProperty [[PlantsByWebSphere.war ""
service/FrontGate_SEIService FrontGate http.proxyHost+http.proxyPort myhost+80]]]')
AdminConfig.save()
AdminApp.edit ( 'WebServicesSamples', '[ -WebServicesServerCustomProperty
[[AddressBookW2JE.jarAddressBookService AddressBook http.proxyHost+http.proxyPort myhost+80]]]')
AdminConfig.save()
下面说明 Jacl 脚本语法的示例:$AdminApp edit PlantsByWebSphere { -WebServicesClientCustomProperty {{PlantsByWebSphere.war {} service/FrontGate_SEIService FrontGate http.proxyHost+http.proxyPort myhost+80 }}}
$AdminConfig save
$AdminApp edit WebServicesSamples {-WebServicesServerCustomProperty {{AddressBookW2JE.jar
AddressBookService AddressBook http.proxyHost+http.proxyPort myhost+80}}}
$AdminConfig save
要将这些示例从 edit 转换到 install,添加 .ear 以形成文件名,并且为部署添加任何额外的关键字,例如 -usedefaultbindings 和 -deployejb。