使用axis1.4的org.apache.axis.wsdl.WSDL2Java生成webservice客户端

在项目上新建一个eclipse运行配置并选择项目为此项目,并选择main函数为org.apache.axis.wsdl.WSDL2Java

并勾选上Include system libraries when searching for a main class

并在Arguments面板上传入如下参数(Program arguments)
-o src/main/java/ -p com.yourdomain.ws.client wsdl/businessWdsl.xml[或者url地址如http://www.yourdomain.com/services/businessWs?wsdl]

The wsdl URI was not specified.
Usage:  java org.apache.axis.wsdl.WSDL2Java [options] WSDL-URI
Options:
-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
-P, –password <argument>
password to access the WSDL-URI
-X, –classpath
additional classpath elements
-i, –nsInclude <argument>
include namespace in generated code
-x, –nsExclude <argument>
exclude namespace from generated code
-c, –implementationClassName <argument>
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).

原创文章,转载请注明: 转载自海波无痕

本文链接地址: 使用axis1.4的org.apache.axis.wsdl.WSDL2Java生成webservice客户端

文章的脚注信息由WordPress的wp-posturl插件自动生成

此条目发表在javaee分类目录,贴了, , , , , , 标签。将固定链接加入收藏夹。

发表评论

电子邮件地址不会被公开。 必填项已用*标注

评论链接可以 移除 nofollow.