可以为 CA SDM Web 服务生成 Stub 类。
使用 WSDL2Java 生成 stub 类
此时将显示该目录。
此时将显示 CA SDM 目录的简略形式。 例如,简称是“SERVIC~1”
注意:如果找不到 javac.exe,请访问 Http://java.sun.com 并搜索 Java J2SE SDK 以下载。 这可能需要重新启动。
$NX_ROOT\bopcfg\www\CATALINA_BASE\webapps\axis
@echo off ::################################################################## ::# Simple bat file to Build Unicenter Service Desk Version 11.0 USD Stub classes ::# Use it to create the required USD Unicenter Service Desk Version 11.0 Java Web Services classes ::# ::# Usage: build_wsdl ::################################################################# @REM Update this with the PATH to USD NX_ROOT location @SET USD_SHORT_PATH=C:\Progra~1/CA/Servic~1/ @REM Update this with the PATH to the JDK javac.exe compiler @REM(这是此文件的第二部分) @SET JAVAC_EXE="C:\j2sdk1.4.2_13\bin\javac.exe" @REM Update this to the path to the USD Unicenter Service Desk Version 12.7 NX_ROOT/java/lib location @SET USD_TOMCAT=%USD_SHORT_PATH%java/lib @SET CP=%USD_TOMCAT%/axis.jar;%USD_TOMCAT%/commons-discovery.jar;%USD_TOMCAT%/commons-logging.jar;%USD_TOMCAT%/jaxrpc.jar;%USD_TOMCAT%/saaj.jar;%USD_TOMCAT%/log4j-1.2.8.jar;%USD_TOMCAT%/xml-apis.jar;%USD_TOMCAT%/xercesImpl.jar;%USD_TOMCAT%/wsdl4j.jar;%USD_TOMCAT%/axis-ant.jar @REM Please specify the path to java.exe file below @REM You can obtain this by reviewing the NX.env file use the @NX_JRE_INSTALL_DUR @REM variable to derive this info @SET JAVA_PATH=C:\Program Files(x86)\CA\SC\JRE\1.6.0_30 @SET JAVA_EXE="%JAVA_PATH%\bin\java.exe" @cd WEB-INF\classes %JAVA_EXE% -cp %CP% org.apache.axis.wsdl.WSDL2Java http://localhost:8080/axis/services/USD_Unicenter Service Desk Version 11.0_WebService?wsdl @cd ..\.. ::################################################################## ::# This next section compiles the Service Desk stub code ::# Once complete, you should recycle tomcat with the following ::# commands or by recycling Service Desk: ::# pdm_tomcat_nxd -c STOP ::# pdm_tomcat_nxd -c START ::################################################################## @SET CP=".\classes;%CP%" @SET STUBS_DIR=classes\com\ca\www\UnicenterServicePlus\ServiceDesk @cd WEB-INF %JAVAC_EXE% -classpath %CP% -deprecation -d classes %STUBS_DIR%\ArrayOfInt.java %JAVAC_EXE% -classpath %CP% -deprecation -d classes %STUBS_DIR%\ArrayOfString.java %JAVAC_EXE% -classpath %CP% -deprecation -d classes %STUBS_DIR%\ListResult.java %JAVAC_EXE% -classpath %CP% -deprecation -d classes %STUBS_DIR%\USD_WebService.java %JAVAC_EXE% -classpath %CP% -deprecation -d classes %STUBS_DIR%\USD_WebServiceLocator.java %JAVAC_EXE% -classpath %CP% -deprecation -d classes %STUBS_DIR%\USD_WebServiceSoap.java %JAVAC_EXE% -classpath %CP% -deprecation -d classes %STUBS_DIR%\USD_WebServiceSoapSoapBindingStub.java @cd ..
在命令提示符下运行该批处理文件之后,会创建并编译 stub 类。
| 版权所有 © 2012 CA。 保留所有权利。 | 就该主题发送电子邮件至 CA Technologies |