CSDN首页 空间 新闻 论坛 Blog 下载 读书 网摘 搜索 .NET Java 视频 接项目 求职 在线学习 买书 程序员 通知
不看会后悔的Windows XP之经验谈 简单快捷DIY实用家庭影院
CSDN社区
搜索 收藏 打印 关闭
CSDN社区 >  Java >  Web Services / XML

生成WSDL

楼主liuxing23()2006-03-28 18:17:10 在 Java / Web Services / XML 提问

请问已有class文件,怎样生成wsdl文件,并做成ear文件 问题点数:20、回复次数:9Top

1 楼shenpipi(皮皮)回复于 2006-03-28 20:40:46 得分 0

知道有wsdl2java,不知道有没有java2wsdl,呵呵.Top

2 楼guyungong(唉!一声叹息)回复于 2006-03-28 20:50:16 得分 0

to   java   后,axis弄在tomcat中,把   a.java改成a.jws,启动tomcat后在网页输入a.jws在web中的网址,或者直接输入****/a.jws?wsdl可以的Top

3 楼liuxing23()回复于 2006-03-28 21:01:11 得分 0

怎样用oc4j的ant生成wsdl?Top

4 楼shenpipi(皮皮)回复于 2006-03-28 21:11:29 得分 0

觉得还是先写wsdl,然后再to   java比较好。Top

5 楼guyungong(唉!一声叹息)回复于 2006-03-28 23:01:27 得分 0

呵呵,我刚入门,还不会自己写wsdl。简单的java到wsdl可以像我说的那样,复杂的没做过Top

6 楼xstom19(hh)回复于 2006-03-29 01:44:42 得分 20

shenpipi(皮皮)    
  真的有Java2WSDL。  
  用org.apache.axis.wsdl.Java2WSDL就能根据class文件生成wsdl  
  这是它的用法:  
                  -h,   --help  
                                  print   this   message   and   exit  
                  -I,   --input   <argument>  
                                  input   WSDL   filename  
                  -o,   --output   <argument>  
                                  output   WSDL   filename  
                  -l,   --location   <argument>  
                                  service   location   url  
                  -P,   --portTypeName   <argument>  
                                  portType   name   (obtained   from   class-of-portType   if   not   specif  
                                  ied)  
                  -b,   --bindingName   <argument>  
                                  binding   name   (--servicePortName   value   +   "SOAPBinding"   if   not  
                                    specified)  
                  -S,   --serviceElementName   <argument>  
                                  service   element   name   (defaults   to   --servicePortName   value   +  
                                  "Service")  
                  -s,   --servicePortName   <argument>  
                                  service   port   name   (obtained   from   --location   if   not   specified  
                                  )  
                  -n,   --namespace   <argument>  
                                  target   namespace  
                  -p,   --PkgtoNS   <argument>=<value>  
                                  package=namespace,   name   value   pairs  
                  -m,   --methods   <argument>  
                                  space   or   comma   separated   list   of   methods   to   export  
                  -a,   --all  
                                  look   for   allowed   methods   in   inherited   class  
                  -w,   --outputWsdlMode   <argument>  
                                  output   WSDL   mode:   All,   Interface,   Implementation  
                  -L,   --locationImport   <argument>  
                                  location   of   interface   wsdl  
                  -N,   --namespaceImpl   <argument>  
                                  target   namespace   for   implementation   wsdl  
                  -O,   --outputImpl   <argument>  
                                  output   Implementation   WSDL   filename,   setting   this   causes   --o  
                                  utputWsdlMode   to   be   ignored  
                  -i,   --implClass   <argument>  
                                  optional   class   that   contains   implementation   of   methods   in   cl  
                                  ass-of-portType.     The   debug   information   in   the   class   is   used  
                                    to   obtain   the   method   parameter   names,   which   are   used   to   set  
                                    the   WSDL   part   names.  
                  -x,   --exclude   <argument>  
                                  space   or   comma   separated   list   of   methods   not   to   export  
                  -c,   --stopClasses   <argument>  
                                  space   or   comma   separated   list   of   class   names   which   will   stop  
                                    inheritance   search   if   --all   switch   is   given  
                  -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.)  
                  -A,   --soapAction   <argument>  
                                  value   of   the   operation's   soapAction   field.   Values   are   DEFAUL  
                                  T,   OPERATION   or   NONE.   OPERATION   forces   soapAction   to   the   nam  
                                  e   of   the   operation.     DEFAULT   causes   the   soapAction   to   be   set  
                                    according   to   the   operation's   meta   data   (usually   "").     NONE  
                                  forces   the   soapAction   to   "".     The   default   is   DEFAULT.  
                  -y,   --style   <argument>  
                                  The   style   of   binding   in   the   WSDL,   either   DOCUMENT,   RPC,   or   W  
                                  RAPPED.  
                  -u,   --use   <argument>  
                                  The   use   of   items   in   the   binding,   either   LITERAL   or   ENCODED  
                  -e,   --extraClasses   <argument>  
                                  A   space   or   comma   separated   list   of   class   names   to   be   added   t  
                                  o   the   type   section.  
                  -C,   --importSchema  
                                  A   file   or   URL   to   an   XML   Schema   that   should   be   physically   imp  
                                  orted   into   the   generated   WSDL  
                  -X,   --classpath  
                                  additional   classpath   elements  
                  -d,   --deploy  
                                  generate   wsdd   and   java   classes   for   deploying  
  Details:  
        portType   element   name=   <--portTypeName   value>   OR   <class-of-portType   name>  
        binding     element   name=   <--bindingName   value>   OR   <--servicePortName   value>Soap  
  Binding  
        service     element   name=   <--serviceElementName   value>   OR   <--portTypeName   value>  
  Service  
        port           element   name=   <--servicePortName   value>  
        address   location           =   <--location   value>Top

7 楼shenpipi(皮皮)回复于 2006-03-29 08:44:31 得分 0

恩,应该有的Top

8 楼guyungong(唉!一声叹息)回复于 2006-04-03 20:59:23 得分 0

xstom19(hh)正解Top

9 楼liuxing23()回复于 2006-04-05 11:22:54 得分 0

问题解决了,主要是环境问题,由于我的oc4j没有在环境变量中配置j2ee_home的路径所以oc4j的ant一直不好用!  
  Top

相关问题

  • 请问如何生成WSDL文件?
  • 使用微软的SOAPToolKit2.0,IIS5.0,创建WebService,除了生成WSDL之外,必须生成ASP吗?
  • public 中有变量为sqldataadapter时,wsdl生成代理类时执行报错!!
  • WebService的问题,请问是不是客户端一定要加入wsdl生成的proxy类?
  • 如何在JBuilder 2005里用wsdl生成一个web service服务器端的java代码
  • 请问nusoap中如何生成服务的wsdl,熟悉这个的帮帮忙,谢谢!
  • 生成DLL
  • asp 生成 html
  • 动态生成.......
  • 代码生成

关键词

  • java2
  • wsdl
  • 文件
  • service
  • 生成
  • serviceportname
  • soapaction
  • oc4j
  • porttype
  • jws

得分解答快速导航

  • 帖主:liuxing23
  • xstom19

相关链接

  • CSDN Java频道
  • Java类图书
  • Java类源码下载

广告也精彩

反馈

请通过下述方式给我们反馈
反馈
提问
网站简介|广告服务|VIP资费标准|银行汇款帐号|网站地图|帮助|联系方式|诚聘英才|English|问题报告
北京创新乐知广告有限公司 版权所有, 京 ICP 证 070598 号
世纪乐知(北京)网络技术有限公司 提供技术支持
Copyright © 2000-2008, CSDN.NET, All Rights Reserved
GongshangLogo