XMLAccess简介
/xmlaccess.sh 参数:
EJPXB0001I: 命令行参数: -in <xml input file> [-user <username>] Will be queried over the console, if omitted [-password <password>] Will be queried over the console, if omitted [-out <output file>] default: write to stdout [-url <portal config url>] default: http://localhost/wps/config [-attempts <max connection attempts>] default: 1 attempt, no retries [-truststore <filename of the trust store for HTTPS>] default: $JAVA_HOME/lib/security/cacerts [-trustpwd <password for the trust store for HTTPS>] default: <empty> [-trusttype <filetype of the trust store for HTTPS>] default: jks [-keystore <filename of the key store for HTTPS>] default: $JAVA_HOME/lib/security/cacerts [-keypwd <password for the key store for HTTPS>] default: <empty> [-keytype <filetype of the key store for HTTPS>] default: jks [-credentialexport] enables export and import of credential secrets [-encryptionPassphrase <passphrase>] passphrase for credential encryption and decryption [-echo] simply return input instead of processing it
迁移门户网站的Portlet,(包括Portlet的权限)
从门户网站中导出内容的命令:
操作系统 |
命令 |
Windows |
xmlaccess.bat -in ExportRelease.xml -user wpsadmin -password wpsadminpwd -url http://hostname:port/wps/ config/virtualportalContext -out virtualportal_output.xml |
UNIX |
./xmlaccess.sh -in ExportRelease.xml -user wpsadmin -password wpsadminpwd -url http://hostname:port/wps/ config/virtualportalContext -out virtualportal_output.xml |
IBM i |
xmlaccess.sh -in ExportRelease.xml -user wpsadmin -password wpsadminpwd -url http://hostname:port/wps/ config/virtualportalContext -out virtualportal_output.xml |
导入到门户网站的命令
操作系统 |
命令 |
Windows |
xmlaccess.bat -in virtualportal_output.xml -user wpsadmin -password wpsadminpwd -url http:// hostname:port/wps/config/virtualportalContext -out Output.xml |
UNIX |
./xmlaccess.sh -in virtualportal_output.xml -user wpsadmin -password wpsadminpwd -url http:// hostname:port/wps/config/virtualportalContext -out Output.xml |
IBM i |
xmlaccess.sh -in virtualportal_output.xml -user wpsadmin -password wpsadminpwd -url http:// hostname:port/wps/config/virtualportalContext -out Output.xml |
xml-samples:
在一下目录中可以找到xml的样例文件
/usr/IBM/WebSphere/PortalServer/doc/xml-samples
导出门户网站的Portlet
案例:
XX联通:
/usr/IBM/WebSphere/PortalServer/bin/xmlaccess.sh -in ExportAllPortlets.xml -user wpsbind -password 1qazcde3 -url http://10.68.20.83:10038/wps/config -out Out_ExportNMunicom.xml
/usr/IBM/WebSphere/AppServer/profiles/wp_profile/installedApps/wps01/wps.ear/wps.war/themes/html/NMUnicomNew
看下导出的portel xml文件:
上面截图是导出所有,也就是Object,使用的模板是 ExportAllPortlets.xml
<request xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="PortalConfig_1.4.xsd" type="export"> <!-- Example for using the * wildcard to export all resources of a given type. This script exports all Web modules (and their contained portlets) that are defined in the portal. --> <portal action="locate"> <web-app objectid="*" action="export"/> </portal> </request>
从上面的notepadd++编辑器里看到 我们要导出的portel的uid为
uid="com.ibm.chinaunicomportletv2.ChinaUnicomPortletV2Portlet.f7afb8e112.webmod
所有我们将xml模板修改为:
<request xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="PortalConfig_1.4.xsd" type="export"> <!-- Example for using the * wildcard to export all resources of a given type. This script exports all Web modules (and their contained portlets) that are defined in the portal. --> <portal action="locate"> <web-app action="export" uid="com.ibm.chinaunicomportletv2.ChinaUnicomPortletV2Portlet.f7afb8e112.webmod"/> </portal> </request>
Out_ExportNMunicom.xml 内容:
<?xml version="1.0" encoding="UTF-8"?> <!-- IBM WebSphere Portal/6.0.1.1 build wp6011_073 exported on Fri Mar 14 15:24:10 GMT+08:00 2014 from wps02/10.68.20.82 --> <!-- 1 [web-app 1_HBNK7F5408VNA0IO3KP8UO00K5] --> <!-- 2 [servlet V_HBNK7F5408VNA0IO3KP8UO0024] --> ...... <request xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" build="wp6011_073" type="update" version="6.0.1.1" xsi:noNamespaceSchemaLocation="PortalConfig_6.0.1.xsd"> <portal action="locate"> <web-app action="update" active="true" domain="rel" objectid="1_HBNK7F5408VNA0IO3KP8UO00K5" removable="true" uid="com.ibm.chinaunicomportletv2.ChinaUnicomPortletV2Portlet.f7afb8e112.webmod"> <url>file://localhost/$user_install_root$/PortalServer/deployed/archive/com.ibm.chinaunicomportletv2.ChinaUnicomPortletV2Portlet.f7afb8e112.webmod/ChinaUnicomPortletV2.war</url> <access-control externalized="false" owner="uid=wpsbind,cn=apps,dc=nm,dc=unicom" private="false"/> ...... <localedata locale="ar"> <title>com.ibm.chinaunicomportletv2.ChinaUnicomPortletV2Portlet.f7afb8e112</title> </localedata> .....
注意:<url>标签里相对路径的地址。
导入门户网站的Portlet
导入:
[root@wpstest bin]# ./xmlaccess.sh -in /data/IBM/Out_ExportNMunicom.xml -user wpadmin -password password -url http://172.16.89.7:10040/wps/config -out output_all.xml
导入成功:
后台日志
这样portel就全部导入了。
访问portal管理控制台查看如下
导出Portal的页面
# /usr/IBM/WebSphere/PortalServer/bin/xmlaccess.sh -in ExportPage.xml -user wpsbind -password 1qazcde3 -url http://10.68.20.xx:10038/wps/config -out Out_ExportNMunicom_page.xml
上图是导出的全部页面:
主页下面的所有。
模板:
ExportSubTree.xml
df
<request xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="PortalConfig_1.4.xsd" type="export"> <!-- Sample for exporting subtree of the content hierarchy. This script exports the page customizer place with all contained pages. --> <portal action="locate"> <content-node action="export" uniquename="ibm.portal.Home" export-descendants="true"/> </portal> </request>
相关推荐
- 提到的“xmlaccess-inexport.xml”和“xmlaccess-inresult.xml”表明,管理员可以使用xmlaccess命令导出当前配置,以XML格式保存下来,便于备份和迁移。 9. 对Portlet的特定操作: - 文档中的“deployPortlet....
此外,使用xmlAccess导出主题配置文件也很重要。创建一个名为export.xml的文件,填写XML请求,用于导出主题配置,这样可以方便后续的管理和迁移。导出的XML内容应包括指定主题的相关元素。 在开发自定义主题的过程...
IBM WebSphere Portal是一款强大的企业级门户平台,提供了多种管理工具,以满足不同层次的管理和配置需求。本文主要关注的是XML配置接口,这是一种灵活且强大的方法,允许管理员通过XML文件来管理Portal的配置。 ...
嵌入式系统开发_STM32微控制器_ESP8266WiFi模块_心率传感器_加速度计_OLED显示屏_蓝牙40_低功耗设计_实时操作系统_智能手表_多功能健康监测_运动数据记录_
驾校自动化_网页自动化爬虫技术_Python27多线程HTTP请求模拟_龙泉驾校2014版约车系统自动预约助手_通过模拟登录和循环请求实现自动约车功能_支持失败自动递增车号重试_
Linux系统编程_操作系统内核_系统调用_进程线程_信号处理_文件IO_进程间通信_多线程同步_网络编程_UNIX环境编程_中文翻译勘误_错误修正_代码示例优化_技术文档校对_开
wanjunshe_Python-Tensorflow_12888_1745868924470
scratch少儿编程逻辑思维游戏源码-铅笔画.zip
即时通讯应用开发_基于LeanCloud云服务与Android原生开发_集成QQ第三方登录与即时聊天功能的社交应用_实现用户注册登录创建聊天室发送文字消息展示用户信息头像昵称并提供
scratch少儿编程逻辑思维游戏源码-伞兵大乱斗(云变量).zip
scratch少儿编程逻辑思维游戏源码-楼层酷跑.zip
scratch少儿编程逻辑思维游戏源码-零下之寒颤.zip
scratch少儿编程逻辑思维游戏源码-密室逃生.zip
少儿编程scratch项目源代码文件案例素材-爪猫足球.zip
命令行完成git本地仓库创建、将代码提交到暂存区、查看暂存区信息、将代码提交到本地仓库、将本地仓库关联到远程仓库、推送到远程仓库全过程的截图
少儿编程scratch项目源代码文件案例素材-纸.zip
scratch少儿编程逻辑思维游戏源码-日本冒险.zip
scratch少儿编程逻辑思维游戏源码-狼人杀跑酷.zip
scratch少儿编程逻辑思维游戏源码-史莱姆杀手.zip
少儿编程scratch项目源代码文件案例素材-粘粘世界.zip