加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 综合聚焦 > 服务器 > 安全 > 正文

webservice学习中...

发布时间:2020-12-17 02:37:32 所属栏目:安全 来源:网络整理
导读:虽然一年前就了解了其原理,并且是在一很紧急项目的情况下开始找资料学习的.并且现在公司开发也是使用webservice,但是一直都没有仔细去看它的详情配置,所以,现在需要再静下来,了解一下其传递的各种类型的配置. http://www.oio.de/axis-wsdd/ http://ws.apache
虽然一年前就了解了其原理,并且是在一很紧急项目的情况下开始找资料学习的.并且现在公司开发也是使用webservice,但是一直都没有仔细去看它的详情配置,所以,现在需要再静下来,了解一下其传递的各种类型的配置.
http://www.oio.de/axis-wsdd/
http://ws.apache.org/axis/java/user-guide.html#CustomDeploymentIntroducingWSDD
一些实用的执行命令:
根据java生成wsdl文件:
--DOCUMENT
java -Djava.ext.dirs=%AXIS_LIB%?org.apache.axis.wsdl.Java2WSDL?-o *outFileName*.wsdl?-l"http://localhost:8080/%webprojectNme%/services/serviceName"?-n "http://%class all package and classname%"?-p"%class all package%"?"urn:%class all package%"?class all package and classname -y?DOCUMENT
根据wsdl生成部署描述文件(wsdd):
java -Djava.ext.dirs=D:/workspace/server/jakarta-tomcat-5.0.28/webapps/ncms/WEB-INF/lib org.apache.axis.wsdl.WSDL2Java ? --server-side -p com.bdcc.ncms.webservice.applycomp ApplyCompensationService.wsdl
发布
java -Djava.ext.dirs=D:/workspace/server/jakarta-tomcat-5.0.28/webapps/ncms/WEB-INF/lib org.apache.axis.client.AdminClient -lhttp://localhost:8080/ncms/webservices/AdminService deploy.wsdd
生成客户端代码:
java -Djava.ext.dirs=D:/workspace/server/jakarta-tomcat-5.0.28/webapps/ncms/WEB-INF/lib org.apache.axis.wsdl.WSDL2Java http://localhost:8080/ncms/services/ApplyCompensation?wsdl

Java2WSDL emitter?
Usage: java org.apache.axis.wsdl.Java2WSDL [options] class-of-portType?
Options:?
-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 specified)?
-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?
--outputWsdlMode to be ignored?
-i,--implClass <argument>?

optional class that contains implementation of methods in?
class-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?
-y,--style <argument>?
the style of the wsdl document: RPC,DOCUMENT or WRAPPED?
-c,--stopClasses <argument>?
space or comma separated list of class names which stop inheritance search if --all switch is enabled?
-T,--typeMappingVersion <argument>?
indicate 1.1 or 1.2. The default is 1.2 (SOAP 1.2 JAX-RPC compliant)?
-A,--soapAction <argument>?
value of the operations soapAction field. Values are DEFAULT,OPERATION or NONE. OPERATION forces soapAction to the name of the operation. DEFAULT causes the soapAction to be set according to the operations meta data (usually ""). NONE forces the soapAction to "". The default is DEFAULT.?
-y,DOCUMENT or WRAPPED?
Details: ortType element name= <.portTypeName value> OR <class-of-portType name> binding element name= <--bindingName value> OR <--servicePortName value>SoapBinding service element name= <--serviceElementName value> OR <portTypeName value>Service?
port element name= <--servicePortName value>?
address location = <--location value>?
WSDL2Java?
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?
-s,--server-side?
emit server-side bindings for web service?
-S,--skeletonDeploy <argument>?
deploy skeleton (true) or implementation (false) in deploy.wsdd.?
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.xml: "Application","Request","Session"?
-t,--testCase?
emit junit testcase class for web service?
-a,--all?
generate code for all elements,even unreferenced ones?-T,--typeMappingVersion?indicate 1.1 or 1.2. The default is 1.1 (SOAP 1.1 JAX-RPC compliant. 1.2 indicates SOAP 1.1 encoded.)?-F,--factory <argument>?name of a custom class that implements GeneratorFactory interface (for extending Java generation functions)?-H,--helperGen?emits separate Helper classes for meta data?-U,--user <argument>?username to access the WSDL-URI?-P,--password <argument>?password to access the WSDL-URI

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读