eclipse根据wsdl文件生成webservice客户端-图例.docx

上传人:小飞机 文档编号:2011327 上传时间:2022-12-31 格式:DOCX 页数:8 大小:324.75KB
返回 下载 相关 举报
eclipse根据wsdl文件生成webservice客户端-图例.docx_第1页
第1页 / 共8页
eclipse根据wsdl文件生成webservice客户端-图例.docx_第2页
第2页 / 共8页
eclipse根据wsdl文件生成webservice客户端-图例.docx_第3页
第3页 / 共8页
eclipse根据wsdl文件生成webservice客户端-图例.docx_第4页
第4页 / 共8页
eclipse根据wsdl文件生成webservice客户端-图例.docx_第5页
第5页 / 共8页
点击查看更多>>
资源描述

《eclipse根据wsdl文件生成webservice客户端-图例.docx》由会员分享,可在线阅读,更多相关《eclipse根据wsdl文件生成webservice客户端-图例.docx(8页珍藏版)》请在三一办公上搜索。

1、eclipse根据wsdl文件生成webservice客户端一、 前期准备:11、配置log4j12、log4j使用jar包:23、wsdl使用jar包:2二、 开始生成文件:2一、 前期准备: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 argume

2、nt to option -p)log4j.properties文件内容:log4j.rootLogger=info,stdout,R# # Console Appender #log4j.appender.stdout=org.apache.log4j.ConsoleAppenderlog4j.appender.stdout.Target=System.outlog4j.appender.stdout.layout=org.apache.log4j.PatternLayoutlog4j.appender.stdout.layout.ConversionPattern=%XLKV %dyyyy

3、-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.loglog4j.appender.R.File=D:/logs/TestWebService.loglog4j.appen

4、der.R.DatePattern = .yyyy-MM-ddlog4j.appender.R.layout=org.apache.log4j.PatternLayoutlog4j.appender.R.layout.ConversionPattern=%XLKV %dyyyy-MM-dd HH:mm:ss,SSS %c %t %L %p - %m%n# # log level# .ibatis=debugmon.jdbc.SimpleDataSource=debugmon.jdbc.ScriptRunner=debug.ibatis.sqlmap.engine.impl.SqlMapClie

5、ntDelegate=debuglog4j.logger.java.sql.Connection=debuglog4j.logger.java.sql.Statement=debuglog4j.logger.java.sql.PreparedStatement=debug,stdoutlog4j.logger.java.sql.PreparedStatement=debug,stdout,R.jiahelife=debug.jiahelife.platform=error2、log4j使用jar包:log4j-1.2.8.jarcommons-discovery-0.2.jarcommons-

6、logging.jar3、wsdl使用jar包:axis.jarwsdl4j-1.5.1.jar二、 开始生成文件:具体操作如下图:选中Include libraries when searching for a main class复选框;然后点击Search按钮进入如下的画面,在输入框中输入WSDL2Java点击【OK】按钮进入下图:点击Arguments的页面,进行如下设置:21说明:1、WSDL文件生成的XML文件 2、XML文件所在工作目录,以及生成后java文件的存放目录。点击【Run】后生成文件。三、项目结构图:com文件夹就是生成后的wsdl代码。四、补充说明1、argumen

7、ts标签栏里输入参数参考: -h, -help print this message and exit -v, -verbose print informational messages -n, -noImports only generate code for the immediate WSDL document -O, -timeout timeout in seconds (default is 45, specify -1 to disable) -D, -Debug print debug information -W, -noWrapped turn off support fo

8、r 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 deploy skeleton (true) or implementation (false) in deploy.w sdd. Default is false. Assumes -server-side. -N, -NStoPk

9、g = mapping of namespace to package -f, -fileNStoPkg file of NStoPkg mappings (default NStoPkg.properties) -p, -package override all namespace to package mappings, use this package name instead -o, -output output directory for emitted files -d, -deployScope add scope to deploy.wsdd: Application, Req

10、uest, Session -t, -testCase emit junit testcase class for web service -a, -all generate code for all elements, even unreferenced ones -T, -typeMappingVersion 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 name of a custom class tha

11、t 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 username to access the WSDL-URI -P, -password password to access the WSDL-URI -X, -classpath addit

12、ional classpath elements -i, -nsInclude include namespace in generated code -x, -nsExclude exclude namespace from generated code -c, -implementationClassName custom name of web service implementation -u, -allowInvalidURL emit file even if WSDL endpoint URL is not a valid URL -w, -wrapArrays Prefers building beans to straight arrays for wrapped XML ar ray types (defaults to off).

展开阅读全文
相关资源
猜你喜欢
相关搜索

当前位置:首页 > 生活休闲 > 在线阅读


备案号:宁ICP备20000045号-2

经营许可证:宁B2-20210002

宁公网安备 64010402000987号