`
samsongbest
  • 浏览: 167785 次
  • 性别: Icon_minigender_1
  • 来自: 上海
社区版块
存档分类
最新评论

WSDL2Java Reference

 
阅读更多
wsdl2java -uri PipeService9.xml -p test.sg.com.abacus.pipe.fe.service



WSDL2Java Reference

NAME
       wsdl2java.sh or wsdl2java.bat - Generates java code according to a given WSDL file to handle Web service invocation.
       These scripts can be found under the bin directory of the Axis2 distribution.

SYNOPSIS
       wsdl2java.sh [OPTION]... -uri <Location of WSDL>

DESCRIPTION
       Given a WSDL file, this generates java code to handle Web service invocations.

      -o <path>          Specify a directory path for the generated code.
      -a                       Generate async style code only (Default: off).
      -s                       Generate sync style code only (Default: off). Takes precedence over -a.
      -p <pkg1>          Specify a custom package name for the generated code.
      -l <language>      Valid languages are java and c (Default: java).
      -t                       Generate a test case for the generated code.
      -ss                      Generate server side code (i.e. skeletons) (Default: off).
      -sd                      Generate service descriptor (i.e. services.xml). (Default: off). Valid with -ss.
      -d <databinding>   Valid databinding(s) are adb, xmlbeans, jibx and jaxbri (Default: adb).
      -g                       Generates all the classes. Valid only with -ss.
      -pn <port_name>    Choose a specific port when there are multiple ports in the wsdl.
      -sn <service_name> Choose a specific service when there are multiple services in the wsdl.
      -u                       Unpacks the databinding classes
      -r <path>          Specify a repository against which code is generated.
      -ns2p ns1=pkg1,ns2=pkg2  Specify a custom package name for each namespace specified in the wsdls schema.
      -ssi                     Generate an interface for the service implementation (Default: off).
      -wv <version>      WSDL Version. Valid Options : 2, 2.0, 1.1
      -S                       Specify a directory path for generated source
      -R                       Specify a directory path for generated resources
      -em                      Specify an external mapping file
      -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                       Generate Axis 1.x backword compatible code.
      -sp                      Suppress namespace prefixes (Optimzation that reduces size of soap request/response)
      -E<key> <value>          Extra configuration options specific to certain databindings. Examples:
                               -Ebindingfile <path>                   (for jibx) - specify the file path for the binding file
                               -Etypesystemname <my_type_system_name> (for xmlbeans) - override the randomly generated type system name
                               -Ejavaversion 1.5                      (for xmlbeans) - generates Java 1.5 code (typed lists instead of arrays)
                               -Emp <package name> (for ADB) - extension mapper package name
                               -Eosv (for ADB) - turn off strict validation.
                               -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 command comes with the
                                  xmlbeans distribution and replace the Axis2 generated classes with correct classes
      --noBuildXML             Dont generate the build.xml in the output directory
      --noWSDL                 Dont generate WSDLs in the resources directory
      --noMessageReceiver      Dont generate a MessageReceiver in the generated sources
      --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
    
EXAMPLES
       wsdl2java.sh -uri ../samples/wsdl/Axis2SampleDocLit.wsdl
       wsdl2java.sh -uri ../samples/wsdl/Axis2SampleDocLit.wsdl -ss -sd 
       wsdl2java.sh -uri ../samples/wsdl/Axis2SampleDocLit.wsdl -ss -sd -d xmlbeans -o ../samples -p org.apache.axis2.userguide

Java2WSDL Reference

NAME
       Java2WSDL.sh or Java2WSDL.bat - Generates the appropriate WSDL file for a given java class.
       These scripts can be found under the bin directory of the Axis2 distribution.

SYNOPSIS
       Java2WSDL.sh [OPTION]... -cn <fully qualified class name>

DESCRIPTION
       Given a java class generates a WSDL file for the given java class. 

      -o <output location>                    output directory
      -of <output file name>                  output file name for the WSDL
      -sn <service name>                      service name
      -l <soap address>                       address of the port for the WSDL
      -cp <class path uri>                    list of classpath entries - (urls)
      -tn <target namespace>                  target namespace for service
      -tp <target namespace prefix>           target namespace prefix for service
      -stn <schema target namespace>          target namespace for schema
      -stp <schema target namespace prefix>   target namespace prefix for schema
      -st <binding style>                     style for the WSDL
      -u <binding use>                        use for the WSDL
      -nsg <class name>                       fully qualified name of a class that implements NamespaceGenerator
      -sg <class name>                        fully qualified name of a class that implements SchemaGenerator
      -p2n [<java package>,<namespace] [<java package>,<namespace]...
                                              java package to namespace mapping for argument and return types
      -p2n [all, <namespace>]                 to assign all types to a single namespace
      -efd <qualified/unqualified>            setting for elementFormDefault (defaults to qualified)
      -afd <qualified/unqualified>            setting for attributeFormDefault (defaults to qualified)
      -xc class1 -xc class2...                extra class(es) for which schematype must be generated.
      -wv <1.1/2.0>                           wsdl version - defaults to 1.1 if not specified
      -dlb                                    generate schemas conforming to doc/lit/bare style
    
EXAMPLES
       Java2WSDL.sh -cn ../samples/test/searchTool.Search
       Java2WSDL.sh -cn ../samples/test/searchTool.Search -sn search
       Java2WSDL.sh -cn ../samples/test/searchTool.Search -u -sn search
       Java2WSDL.sh -cn ../samples/test/searchTool.Search -sn search -o ../samples/test/wsdl  
分享到:
评论

相关推荐

    Axis Reference Guide.pdf

    其中,特别强调了`java2wsdl`与`wsdl2java`命令的应用,这两个工具在Web服务的开发过程中起着至关重要的作用。 #### 二、主要内容概述 ##### 1. 工具参考 这部分内容主要介绍了一系列用于Web服务开发的工具,包括...

    C#调用JavaWebService(客户端)

    接着,使用工具(如`wsimport`或Apache CXF的`wsdl2java`)从Java接口生成WSDL(Web Service Description Language)文件,这是描述WebService的规范。 2. **C#客户端调用**: 在C#中,我们可以利用.NET Framework...

    Java远程通信技术——Axis实战.doc

    此外,Axis 提供了一整套工具,如 wsdl2java 和 java2wsdl,用于在 WSDL 和 Java 代码之间进行互转。 2. Axis 1.x 实例 在 Axis 1.x 中,创建 Web 服务通常涉及以下步骤: - 定义服务接口和服务实现。 - 使用 wsdl2...

    c#调用java WEB服务

    - 添加Web引用:在解决方案资源管理器中右键点击项目,选择“添加服务引用”,输入Java Web服务的URL以获取WSDL。 - 写代码调用Web服务:生成的服务代理类可以直接在C#代码中使用,调用相应的Web方法。 - 测试Web...

    .net调用java WebService

    2. **获取WSDL文件**:Java WebService通常会提供一个包含`.jws`或`.wsdl`扩展名的URL。例如:`http://example.com/service?wsdl`。这个URL返回的即是描述该服务接口的WSDL文件。 3. **解析WSDL文件**:在.NET环境...

    wsdl4j-bin-1.6.2.zip

    WSDL4J is the reference implementation of Java APIs for WSDL (JWSDL). JWSDL is a Java Specification Request (JSR) being developed under the Java Community Process.

    asp.net通过WebService调用Java接口全过程

    2. **添加.NET Web Reference**: - 在ASP.NET项目中,我们需要创建一个新的Web引用来连接Java WebService。右键点击项目,选择`Add Web Reference`,然后输入Java WebService的地址。 - 系统会自动获取服务的元...

    java和.net的webservice调用介绍

    2. Java中的Web服务调用 - JAX-WS(Java API for XML Web Services)是Java中的标准框架,用于创建和消费SOAP Web服务。开发者可以使用JAXB(Java Architecture for XML Binding)将Java对象转换为XML,反之亦然。 ...

    .NET调用JAVA web 服务

    2. 生成代理类:在.NET中,使用svcutil.exe工具或者Visual Studio的Add Service Reference功能,根据WSDL生成代理类。生成的代理类会包含所有需要的方法,可以直接在代码中调用。 3. 实例化代理类:在代码中创建...

    WSDL创建对象,然后传递过程.doc

    2. **设计WSDL** 接着,进入Design视图,对WSDL文件进行设计。在这里,我们可以定义服务(Service)、绑定(Binding)、端口类型(PortType)等元素。 3. **添加服务、绑定和端口类型** - 创建一个服务(Add ...

    c#调用Java webService的专题(一)

    2. 输入Java WebService的WSDL地址,这通常是类似"http://yourserver.com/yourwebservice?wsdl"的URL。 3. 一旦服务被添加,.NET会自动生成一个服务代理类,这个类包含了调用Java WebService所需的所有方法和属性。 ...

    java与wcf通信

    2. **Java Web Service(WS)**:在Java世界中,创建Web服务通常使用JAX-WS(Java API for XML Web Services),如Axis2框架。Axis2是一个高效的Web服务引擎,它支持SOAP 1.1/1.2和WS-*标准。 3. **Java访问WCF服务...

    Web Service Java C# 实现 订餐小系统

    在C#中,我们可以使用.NET Framework的WSDL.exe工具或Visual Studio的Add Service Reference功能来生成客户端代理类,这些类封装了与Web Service交互的所有细节。项目中的"OMSAxisClientV1_0"可能就是这样一个客户端...

    JAVA WebServie Client.docx

    在Java中开发WebService客户端主要涉及以下步骤:创建Java工程、添加WebService客户端、配置WSDL路径等。 #### 二、新建Java工程 1. **开发环境准备**:首先确保安装了Java开发工具包(JDK)以及集成开发环境(IDE),...

    调用 java webservice 的问题

    Axis2是Apache的一个开源项目,用于实现Java WebServices。它提供了一个高性能、可扩展的框架来创建和部署WebServices。Axis2不仅支持传统的RPC风格的WebServices,还支持文档驱动的WebServices,并且能够与.NET平台...

    web service reference

    ### Web Service Reference详解 #### 一、Web Service简介 **Web Service**是一种支持软件间通信的网络服务形式,它提供了一种标准化的方式使得一个应用程序可以通过HTTP等网络协议调用另一个应用程序的功能,就像...

    spring-ws-reference.pdf

    2. **数据契约和接口契约**:编写数据契约(XSD文件),并根据数据契约创建服务契约接口。 3. **项目创建**:在IDE中创建一个新的Spring-WS项目,准备好开发环境。 4. **实现端点**:编写Java代码实现端点,并处理...

    WebService案例,JAVA和.NET下皆可以访问的一个小案例

    无论是Java的JAX-WS还是.NET的ASMX,它们都遵循相同的SOAP协议和WSDL规范,因此可以无缝地进行跨平台通信。 总结: 本案例旨在帮助初学者理解WebService的基本概念和实现方式,通过在Java和.NET环境下创建和调用...

Global site tag (gtag.js) - Google Analytics