
⏹
更多企业学院: | ||
《中小企业管理全能版》 | 183套讲座+89700份资料 | |
《总经理、高层管理》 | 49套讲座+16388份资料 | |
《中层管理学院》 | 46套讲座+6020份资料 | |
《国学智慧、易经》 | 46套讲座 | |
《人力资源学院》 | 56套讲座+27123份资料 | |
《各阶段员工培训学院》 | 77套讲座+ 324份资料 | |
《员工管理企业学院》 | 67套讲座+ 8720份资料 | |
《工厂生产管理学院》 | 52套讲座+ 13920份资料 | |
《财务管理学院》 | 53套讲座+ 17945份资料 | |
《销售经理学院》 | 56套讲座+ 14350份资料 | |
《销售人员培训学院》 | 72套讲座+ 4879份资料 | |
eclipse根据wsdl文件生成webservice客户端
一、 前期准备:
1、配置log4j
没有配置的场合提示下列的信息(可以不配置):
(
log4j:WARN No appenders could be found for logger (org.apache.axis.i18n.ProjectResourceBundle).
log4j:WARN Please initialize the log4j system properly.
Error: Missing argument to option -p
)
log4j.properties文件内容:
Logger=info,stdout,R
########################
# Console Appender
#######################
log4j.appender.stdout=org.apache.log4j.ConsoleAppender
log4j.appender.stdout.Target=System.out
log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
log4j.appender.stdout.layout.ConversionPattern=%X{LKV} %d{yyyy-MM-dd HH:mm:ss,SSS} %c %t %L %p - %m%n
########################
# File Appender
#######################
log4j.appender.R=org.apache.log4j.DailyRollingFileAppender
#log4j.appender.R.File=${WORKDIR}/TestWebService/WebRoot/logs/out.log
#log4j.appender.R.File=${catalina.home}/WebRoot/logs/out.log
log4j.appender.R.File=D:/logs/TestWebService.log
log4j.appender.R.DatePattern = '.'yyyy-MM-dd
log4j.appender.R.layout=org.apache.log4j.PatternLayout
log4j.appender.R.layout.ConversionPattern=%X{LKV} %d{yyyy-MM-dd HH:mm:ss,SSS} %c %t %L %p - %m%n
########################
# log level
#######################
ibatis=debug
jdbc.SimpleDataSource=debug
jdbc.ScriptRunner=debug
ine.impl.SqlMapClientDelegate=debug
log4j.logger.java.sql.Connection=debug
log4j.logger.java.sql.Statement=debug
log4j.logger.java.sql.PreparedStatement=debug,stdout
log4j.logger.java.sql.PreparedStatement=debug,stdout,R
jiahelife=debug
jiahelife.platform=error
2、log4j使用jar包:
log4j-1.2.8.jar
commons-discovery-0.2.jar
commons-logging.jar
3、wsdl使用jar包:
axis.jar
wsdl4j-1.5.1.jar
二、 开始生成文件:
具体操作如下图:
选中Include libraries when searching for a main class复选框;
然后点击Search按钮进入如下的画面,在输入框中输入WSDL2Java
点击【OK】按钮进入下图:
点击Arguments的页面,进行如下设置:
说明:1、WSDL文件生成的XML文件
2、XML文件所在工作目录,以及生成后java文件的存放目录。
点击【Run】后生成文件。
三、项目结构图:
com文件夹就是生成后的wsdl代码。
四、补充说明
1、arguments标签栏里输入参数参考:
-h, --help
print this message and exit
-v, --verbose
print informational messages
-n, --noImports
only generate code for the immediate WSDL document
-O, --timeout <argument>
timeout in seconds (default is 45, specify -1 to disable)
-D, --Debug
print debug information
-W, --noWrapped
turn off support for "wrapped" document/literal
-q, --quiet
do not print any informational or debug messages (except err
ors)
-s, --server-side
emit server-side bindings for web service
-S, --skeletonDeploy <argument>
deploy skeleton (true) or implementation (false) in deploy.w
sdd. Default is false. Assumes --server-side.
-N, --NStoPkg <argument>=<value>
mapping of namespace to package
-f, --fileNStoPkg <argument>
file of NStoPkg mappings (default NStoPkg.properties)
-p, --package <argument>
override all namespace to package mappings, use this package
name instead
-o, --output <argument>
output directory for emitted files
-d, --deployScope <argument>
add scope to deploy.wsdd: "Application", "Request", "Session
"
-t, --testCase
emit junit testcase class for web service
-a, --all
generate code for all elements, even unreferenced ones
-T, --typeMappingVersion <argument>
indicate 1.1 or 1.2. The default is 1.1 (SOAP 1.1 JAX-RPC c
ompliant. 1.2 indicates SOAP 1.1 encoded.)
-F, --factory <argument>
name of a custom class that implements GeneratorFactory inte
rface (for extending Java generation functions)
-H, --helperGen
emits separate Helper classes for meta data
-B, --buildFile
emit Ant Buildfile for web service
-U, --user <argument>
username to access the WSDL-URI
👁️ 阅读量:0
© 版权声明:本文《论eclipse根据wsdl文件生成webservice客户端(doc 10页)》内容均为本站精心整理或网友自愿分享,如需转载请注明原文出处:https://www.zastudy.cn/jiangzuo/1685898754a50336.html。