Summary of AXIS2 Development WebService

Source: Internet
Author: User
Tags wsdl

requirement Environment: The WSDL file is provided by the docking company, and we develop the service side according to the WSDL file.

    1. Configure the AXIS2 development environment, many online tutorials, no longer verbose. Environment after the implementation of Wsdl2java-uri file:///C:/Users/lenovo/Desktop/ws/jc/UtcsService.wsdl-s-ss-ap-sd-ssi-d adb-o build\serv Er1

The command line format is: Wsdl2java [options]-uri <url or path>: A URL or path to A WSDL

The options that are commonly used are as follows:

-O <path> Specifies the output path of the generated code
-A Code to generate the asynchronous Pattern
-S Generate code for synchronous mode
-P <pkg> The package name of the specified code
-L <languange> The language used (JAVA/C) is Java by default
-T Generating test Cases for code
-ss Generate server-side code is not generated by default
-sd Build Service description file Services.xml, use only with-SS
-D <databinding> Specify databingding, for example, Adb,xmlbean,jibx,jaxme and Jaxbri
-G Generate code for the service side and the client
-PN <port_name> When there is more than one port in the WSDL, specify one of the ports
-SN <serv_name> Select a service in the WSDL
-U Expand the Data-binding class
-R <path> Specify a repository for code generation
-ssi Implementing code generation interface classes for the service side
-S Specify the storage path for the generated source code
-R Specify a storage path for the generated resources
--nobuildxml Build.xml file not generated in output
--nowsdl WSDL files are not generated in the resources directory
--nomessagereceiver Do not generate Messagereceiver class

-O <path> Specify a save path for the generated code. Specify a directory path for the generated code.
-A Generates asynchronous code (closed by default). Generate Async Style Code only (Default:off)
-S Generate synchronization code (default off). Priority is higher than option-A. Generate Sync style code only (Default:off). Takes Precedence over-a.
-P <pkg1> Specify a package name for the generated code. Specify a custom package name for the generated code.
-L <language> The language type of the generated code, currently only supports Java and C (default Java). Valid languages is Java and C (Default:java).
-T Generate test code for the production code. Generate a test case for the generated code.
-ss Generate the service-side code (i.e. skeletons) (closed by default.) Generate Server side code (i.e. skeletons) (Default:off).
-sd Generate the service-side descriptor (i.e. services.xml). (off by default). Valid only when using the-SS option. Generate Service descriptor (i.e. services.xml). (Default:off). Valid With-ss.
-D <databinding> Data binding mode, optional adb, XMLBeans, JIBX, and Jaxbri (default adb). Valid DataBinding (s) is ADB, XMLBeans, Jibx and Jaxbri (DEFAULT:ADB).
-G Generates all classes that are valid when used with-SS. Generates all the classes. Valid only With-ss.
-PN <port_name> Specifies a port when WSDL describes multiple ports choose a specific port when there is multiple ports in the WSDL.
-SN <service_name> When WSDL is a multi-service case, specify a service name choose a specific service when there is multiple services in the WSDL.
-U Packaged data binding class unpacks the DataBinding classes
-R <path> Generate a list of generated code specify a repository against which code is generated.
-NS2P NS1=PKG1,NS2=PKG2 Specify a namespace,specify a custom package name for each namespace specified in the WSDLs schema for every schema in the WSDL.
-ssi Generates an interface for each service implementation (default off) Generate an interface for the service implementation (Default:off).
-WV <version> The WSDL version is optional: 2, 2.0, 1.1, WSDL versions. Valid Options:2, 2.0, 1.1
-S <path> Specify a directory for the generated source files specify a directory path for generated source
-R <path> Specify a directory for the generated resource specify a directory path for generated resources
-em <file path> Specify the external mapping file 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 generate codes for all ports
-or Overwrite the already existing class overwrite the existing classes
-B Generate code that is compatible with AXIS1 generate Axis 1.x backward compatible.
-sp Do not generate namespace prefixes (can reduce packet size) 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)-ove Rride 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 has to generate the XMLBeans code seperately with the Scomp command comes with the X Mlbeans 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 <port> Proxy Port address If you are behind a firewall
-ep <package-name-list> Exclude Packages-these packages is deleted after code generation
-sin <interface-name> Skeleton interface name-used To specify a name for Skeleton interface other than the default one
-SCN <class-name> Skeleton class name-used to specify a name for Skeleton class other than the default one
-ebindingfilename <path> (for Jaxbri)-Specify the file path for the episode file
-OAA <override-absolute-address> -change the absolute HTTP addresses to local file addresses generated by Wsdl2java tool
-EBC <exception-base-class> -generated Exceptions is inherited from this exception rather than the Java.lang.Exception class
-uon <use-operation-name> -by default the first letter of the generated method, name changeed to lowercase. This option stops the IT same as Operation name

The main record is that Java code is packaged and released into Tomcat, using Wsdl2java generated src files and resource files, Packaging is to put the Service.xml in the resource file into the SRC folder, the new Meta-inf file, and then the src file into a jar package or arr package, put into the D:\app\apache-tomcat-8.5.3\webapps\ Under the Axis2\web-inf\services folder

This is the jar bag.

Summary of AXIS2 Development WebService

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.