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

上传人:ji****72 文档编号:37513421 上传时间:2018-04-17 格式:DOC 页数:8 大小:352.58KB
返回 下载 相关 举报
eclipse根据wsdl文件生成webservice客户端-图例_第1页
第1页 / 共8页
eclipse根据wsdl文件生成webservice客户端-图例_第2页
第2页 / 共8页
eclipse根据wsdl文件生成webservice客户端-图例_第3页
第3页 / 共8页
eclipse根据wsdl文件生成webservice客户端-图例_第4页
第4页 / 共8页
eclipse根据wsdl文件生成webservice客户端-图例_第5页
第5页 / 共8页
点击查看更多>>
资源描述

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

1、eclipse 根据 wsdl 文件生成 webservice 客户端一、 前期准备:.1 1、配置 log4j .1 2、log4j 使用 jar 包:.2 3、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 s

2、ystem properly. Error: Missing argument to option -p)log4j.properties 文件内容:log4j.rootLogger=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.std

3、out.layout.ConversionPattern=%XLKV %dyyyy- 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

4、.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=%XLKV %dyyyy-MM-dd HH:mm:ss,SSS %c %t %L %p - %m%n# # log level # .ibatis=debug mon.jdbc.SimpleDataSource=debug mon.jdbc.Scri

5、ptRunner=debug .ibatis.sqlmap.engine.impl.SqlMapClientDelegate=d ebug 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=error2、l

6、og4j 使用使用 jar 包:包:log4j-1.2.8.jar commons-discovery-0.2.jar commons-logging.jar3、wsdl 使用使用 jar 包:包:axis.jar wsdl4j-1.5.1.jar二、二、 开始生成文件:开始生成文件:具体操作如下图:选中 Include libraries when searching for a main class 复选框; 然后点击 Search 按钮进入如下的画面,在输入框中输入 WSDL2Java点击【OK】按钮进入下图:点击 Arguments 的页面,进行如下设置:12说明:1、WSDL 文件生

7、成的 XML 文件2、XML 文件所在工作目录,以及生成后 java 文件的存放目录。点击【Run】后生成文件。三、项目结构图:三、项目结构图:com 文件夹就是生成后的 wsdl 代码。四、补充说明四、补充说明1、arguments 标签栏里输入参数参考:标签栏里输入参数参考:-h, -helpprint this message and exit-v, -verboseprint informational messages-n, -noImportsonly generate code for the immediate WSDL document-O, -timeout timeout

8、 in seconds (default is 45, specify -1 to disable)-D, -Debugprint debug information-W, -noWrappedturn off support for “wrapped“ document/literal-q, -quietdo not print any informational or debug messages (except errors)-s, -server-sideemit server-side bindings for web service-S, -skeletonDeploy deplo

9、y skeleton (true) or implementation (false) in deploy.wsdd. Default is false. Assumes -server-side.-N, -NStoPkg =mapping of namespace to package-f, -fileNStoPkg file of NStoPkg mappings (default NStoPkg.properties)-p, -package override all namespace to package mappings, use this packagename instead-

10、o, -output output directory for emitted files-d, -deployScope add scope to deploy.wsdd: “Application“, “Request“, “Session“-t, -testCaseemit junit testcase class for web service-a, -allgenerate code for all elements, even unreferenced ones-T, -typeMappingVersion indicate 1.1 or 1.2. The default is 1

11、.1 (SOAP 1.1 JAX-RPC compliant. 1.2 indicates SOAP 1.1 encoded.)-F, -factory name of a custom class that implements GeneratorFactory interface (for extending Java generation functions)-H, -helperGenemits separate Helper classes for meta data-B, -buildFileemit Ant Buildfile for web service-U, -user u

12、sername to access the WSDL-URI-P, -password password to access the WSDL-URI-X, -classpathadditional 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, -allowInvalidURLemit file even if WSDL endpoint URL is not a valid URL-w, -wrapArraysPrefers building beans to straight arrays for wrapped XML array types (defaults to off).

展开阅读全文
相关资源
正为您匹配相似的精品文档
相关搜索

最新文档


当前位置:首页 > 行业资料 > 其它行业文档

电脑版 |金锄头文库版权所有
经营许可证:蜀ICP备13022795号 | 川公网安备 51140202000112号