Java wsimport 命令

wsimport命令用法:

Usage: wsimport [options] <WSDL_URI>

where [options] include:
  -b <path>                 specify jaxws/jaxb binding files or additional schemas
                            (Each <path> must have its own -b)
                            
  -B<jaxbOption>            Pass this option to JAXB schema compiler
  
  -catalog <file>           specify catalog file to resolve external entity references
                            supports TR9401, XCatalog, and OASIS XML Catalog format.
                            
  -d <directory>            specify where to place generated output files
  
  -extension                allow vendor extensions - functionality not specified
                            by the specification.  Use of extensions may
                            result in applications that are not portable or
                            may not interoperate with other implementations
                            
  -help                     display help
  
  -httpproxy:<host>:<port>  specify a HTTP proxy server (port defaults to 8080)
  
  -keep                     keep generated files
  
  -p <pkg>                  specifies the target package
  
  -quiet                    suppress wsimport output
  
  -s <directory>            specify where to place generated source files
  
  -target <version>         generate code as per the given JAXWS spec version
                            e.g. 2.0 will generate compliant code for JAXWS 2.0spec
                            
  -verbose                  output messages about what the compiler is doing
  
  -version                  print version information
  
  -wsdllocation <location>  @WebServiceClient.wsdlLocation value


Extensions:
  -XadditionalHeaders         map headers not bound to request or response message to
                              Java method parameters
                              
  -Xauthfile                  file to carry authorization information in the format
                              http://username:password@example.org/stock?wsdl
                              
  -Xdebug                     print debug information
  
  -Xno-addressing-databinding enable binding of W3C EndpointReferenceType to Java
  
  -Xnocompile                 do not compile generated Java files


Examples:
  wsimport stock.wsdl -b stock.xml -b stock.xjb
  wsimport -d generated http://example.org/stock?wsdl
 

 wsimport -extension -Xnocompile  http://webservice.webxml.com.cn/WebServices/MobileCodeWS.asmx?wsdl

上面这一条命令可以生成调用http://webservice.webxml.com.cn手机号归属地信息WebService客户端Java代码,如图:

转载于:https://www.cnblogs.com/agrimony/p/3253217.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值