使用 wsadmin 脚本编制来配置新的 URL

可以使用脚本编制和 wsadmin 工具来配置新的 URL。

开始之前

开始本任务前,wsadmin 工具必须正在运行。有关更多信息,请参阅关于启动 wsadmin 脚本编制客户机的主题。

关于此任务

执行以下示例配置新的 URL:

过程

  1. 识别父标识并将其指定给 newurlp 变量。
    • 使用 Jacl:

      set newurlp [$AdminConfig  getid  /Cell:mycell/Node:mynode/URLProvider:URLP1/]
    • 使用 Jython:

      newurlp = AdminConfig.getid('/Cell:mycell/Node:mynode/URLProvider:URLP1/')
      print newurlp
    示例输出:
    URLP1(cells/mycell/nodes/mynode|resources.xml#URLProvider_1)
  2. 标识必需属性:
    • 使用 Jacl:

      $AdminConfig required URL
    • 使用 Jython:

      print AdminConfig.required('URL')
    示例输出:
    Attribute   Type
    name     Stringspec         String
  3. 设置必需的属性:
    • 使用 Jacl:

      set name [list name URL1]
      set spec [list spec "Put the spec here"]
      set urlAttrs [list $name $spec]
      示例输出:
      {name URL1} {spec {Put the spec here}}
    • 使用 Jython:

      name = ['name', 'URL1']
      spec = ['spec', "Put the spec here"]
      urlAttrs = [name, spec]
      示例输出:
      [[name, URL1], [spec, "Put the spec here"]]
  4. 创建 URL:
    • 使用 Jacl:

      $AdminConfig create URL $newurlp $urlAttrs
    • 使用 Jython:

      print AdminConfig.create('URL', newurlp, urlAttrs)
    示例输出:
    URL1(cells/mycell/nodes/mynode|resources.xml#URL_1)
  5. 保存配置更改。有关更多信息,请参阅有关使用 wsadmin 工具来保存配置更改的文档。
  6. 仅在 Network Deployment 环境中使节点同步。请参阅“使用 wsadmin 工具同步节点”主题,以了解更多信息。

指示主题类型的图标 任务主题



时间戳记图标 最近一次更新时间: last_date
http://www14.software.ibm.com/webapp/wsbroker/redirect?version=cord&product=was-nd-mp&topic=txml_url
文件名:txml_url.html