axis2 生成

来源:互联网 发布:linux如何创建目录 编辑:程序博客网 时间:2024/05/19 07:26

命令行格式为:WSDL2Java [options] -uri <url or path> : A url or path to a WSDL

其中常用的options具体如下:
-o <path> : 指定生成代码的输出路径
-a           :   生成异步模式的代码
-s           :   生成同步模式的代码
-p <pkg> :   指定代码的package名称
-l <languange> : 使用的语言(Java/C) 默认是java
-t            : 为代码生成测试用例
-ss          :   生成服务端代码 默认不生成
-sd          :   生成服务描述文件 services.xml,仅与-ss一同使用
-d <databinding>   : 指定databingding,例如,adb,xmlbean,jibx,jaxme and jaxbri 默认adb
-g           : 生成服务端和客户端的代码 Valid only with -ss.
-pn <port_name>   : 当WSDL中有多个port时,指定其中一个port
-sn <serv_name>   : 选择WSDL中的一个service
-u                       : 展开data-binding的类
-r <path>             : 为代码生成指定一个repository
-ssi                     :   为服务端实现代码生成接口类 (Default: off).
-S                       : 为生成的源码指定存储路径
-R                       :   为生成的resources指定存储路径
--noBuildXML        :   输出中不生成build.xml文件
--noWSDL            :   在resources目录中不生成WSDL文件
--noMessageReceiver : 不生成MessageReceiver类  


    -wv <version>            WSDL 版本号. Valid Options : 2, 2.0, 1.1
   -em                      指定一个mapping文件
  -f                       Flattens the generated files
  -uw                      Switch on un-wrapping.
  -xsdconfig <file path>   Use XMLBeans .xsdconfig file. Valid only with -d xmlbeans.
  -ap                      Generate code for all ports
  -or                      Overwrite the existing classes
  -b                       生成 Axis 1.x 兼容code.
  -sp                      Suppress namespace prefixes (简化soap的response/response大小)
  -E<key> <value> 额外的配置选项指定 databindings. Examples:
                           -Ebindingfile <path>          (for jibx) - 指定一个binding file 的path
                            -Etypesystemname <my_type_system_name> (for xmlbeans) - override the rand
omly generated type system name
                           -Ejavaversion 1.5         (for xmlbeans) - 生成 Java 1.5 风格code如用list代替array
                           -Emp <package name> (for ADB) - extension mapper package name
                           -Eosv (for ADB) - 关闭严格的验证.
                           -Ewdc (for xmlbeans) - Generate code with a dummy schema. if someone use
this option
                              they have to generate the xmlbeans code seperately with the scomp comm
and comes with the
                              xmlbeans distribution and replace the Axis2 generated classes with cor
rect classes
  
  --http-proxy-host        Proxy host address if you are behind a firewall
  --http-proxy-port        Proxy prot address if you are behind a firewall
  -ep                      Exclude packages - these packages are deleted after codegeneration
  -sin                     Skelton interface name - used to specify a name for skelton interface oth
er than the default one
  -scn                     Skelton class name - used to specify a name for skelton class other than
the default one
原创粉丝点击