Return-Path:
Contents
-1.Functionality
+1 Introduction
1.5Supports for Making Simple Custom Types
+
+ 1.5 Support for Complex Types
+ 2.1 Dependencies on Axis Java tool
3.Dependencies on Axis Java tool
+
-
- The tool should be able to generate different types of Wrappers and Skeletons for the server side and client�s stubs for the client�s Side.WSDL2Ws tool in Axis C++ is written in Java.
-
-
-
-
- The tool should start with a WSDL document and generate following classes.
-�
-WSDL2WS tool is used for building following C/C++ components
- o Server side � Skeletons and Wrappers
- o Client side � Stubs
-
-
-
-
-
-
-
-
-
-
-
-WSDL2Ws
-
-
-
-Contents
-
+Axis C++ WSDL2Ws Tool
+
+ 1.1 Types Of Classes
+ 3.2 Mediator WebServiceContext +
-The generated Wrappers perform the following functions. These wrappers act as RPC Providers.
++ 3.3 Generator +
-o Serialization
-o Deserialization
-o Method invocation
+ + + +The WSDL2Ws tool that comes with Axis C++ can be used to generate different types of wrapper classes / skeletons for the server side and wrapper classes / stubs for the client side for a given WSDL file. WSDL2Ws tool is written in Java and is based on the WSDL tools by Axis Java project. + +
+WSDL2WS tool can be used for generating the following C/C++ source files for a given WSDL file :
+
The generated Wrappers support the following functions :
+
The tool should be able to generate classes for -
� C++
-� C
- - -The tool should be extensible to support other programming languages if required.
- - - +The tool is capable of generating source code for both C++ and C
- -The tool should be able to support SOAP1.2 encoding style and extensible to support other encoding styles as well. +
The tool should be able to support SOAP 1.2 encoding style and extensible to support other encoding styles as well. However verifying the compliance with SOAP 1.1 / SOAP 1.2 and WS-I Basic Profile remains a TODO.
+ +The tool should be able to generate classes for following styles
-� RPC
-� Document
-� Messaging
+The tool is able to generate code for RPC (encoded) and Document Literal style WSDLs
+ +The tool generates wrapper classes / structs / functions for complex types. The generated source include:
+Apache Axis C++ uses WSDL processing tools from Axis Java project and extends those for C/C++ code generation.
+The following jar files that comes with (or used by) Axis Java are required to run Axis C++ WSDL2Ws tool:
+"SchemaUtils" (SchemaUtils.java) and "ElementDecl" (ElementDecl.java) classes of Axis Java tools have been overridden by Axis C++ WSDL2Ws implementation.
+ +Other than the two classes mentioned above, no other class from Axis Java WSDL tool implementation has been overridden or extended at present by Axis C++ WSDL2Ws tool; hence all other classes in Axis Java tool are used as they are.
+ +Except for "SchemaUtils" and "ElementDecl" classes, the rest of the classes of Axis C++ WSDL2Ws are unique to Axis C++ and they use functionality form Axis Java jars.
+ + +If you want to build the WSDL2Ws tool form source, there is an Apache Ant build script to help you. +Assuming that you have installed Ant properly, what you have to do is to set the CLASSPATH to include Axis Java jar files mentioned in the previous section and run ant command in $AXISCPP_HOME/src/wsdl folder. Once you build the tool the generated wsdl2ws.jar file would be placed in $AXISCPP_HOME/lib/axis/ folder. +
- - -Tool generates Wrappers for custom types in following conditions
-� Generates the method signatures of the types (serialize(), deserialize()) so that developer can write serialize desirialize code in most efficient way.
-� Generates the complete wrappers for WSDL types like struts -
- -� Generates the complete wrappers for Array of any simple or WSDL types like struts
- + ++java WSDL2Ws [options] wsdl-file +
+Options
- ++-help, -h print a short help message+ + +
+-o(folder) target output folder - default is current folder
+-l(c++|c) target language (c++|c) - default is c++
+-s(server|client) generate server skeletons or client stubs? (serve|client) - default is server
+-w(wrapped|nonwrapped) wrapping style of the WSDL (wrapped|nonwrapped) - default is wrapped
+-verbose, -v be verbose
+-m(none|gnu) generate make files (none|gnu) - default is none
+
Make sure that your CLASSPATH environment variable has all the jar files mentioned in section 2.1 above. +Then modify your CLASSPATH to include the wsdl2ws.jar file from Axis C++: +
+ +On Linux:
++CLASSPATH=$AXISCPP_HOME/lib/axis/wsdl2ws.jar:$CLASSPATH +export CLASSPATH ++ +
On Windows:
++set CLASSPATH=%AXISCPP_HOME%\lib\axis\wsdl2ws.jar;%CLASSPATH% ++
Alternatively, you can use the -classpath option of java command to specify the CLASSPATH.
+ +NOTE: It is a MUST that that you have wsdl2ws.jar from Axis C++ appearing before all the jar files form Axis Java on the CLASSPATH. If not you will run into trouble when generating code. This is a known problem and happens because the two classes, "SchemaUtils" and "ElementDecl", of Axis C++ that overides Axis Java classes with the same name have identical package names to that of Axis Java classes. +
+ + +You could run the tool as shown in the following example. Assuming you have not included wsdl2ws.jar in your class path:
+ ++java -classpath $AXISCPP_HOME/lib/axis/wsdl2ws.jar:$CLASSPATH org.apache.axis.wsdl.wsdl2ws.WSDL2Ws \ + -obaseServerOut $AXISCPP_DEPLOY/wsdls/base.wsdl ++
+The above command will generate C++ server side skeleton and wrapper classes and place the generated source files in a folder named baseServerOut. You could have also used -sserver and -lc++ options to generate the same. To generate client side C++ code for the same WSDL file and place the generated code in baseClientOut folder, you could run: +
++java -classpath $AXISCPP_HOME/lib/axis/wsdl2ws.jar:$CLASSPATH org.apache.axis.wsdl.wsdl2ws.WSDL2Ws \ + -obaseClientOut -sclient -lc++ $AXISCPP_DEPLOY/wsdls/base.wsdl +- -
The tool takes a top down approach. It starts with a wsdl document and generates all the classes necessary to deploy the web service. It generates
-� Skeleton (wrapper class)
- -� Wrapper classes for complex types
-� Server side and client Side stubs
-
-The tool can be extensible to generate Service classes to be published
-For more information about the generated classes please refer to the architecture documentation.
+
The tool takes a top down approach. It starts with a WSDL document and generates all the classes (skeletons, wrapper classes for complex types and stubs) necessary to deploy (server side) and consume (client side) the web service. For more information about the generated classes please refer to the architecture documentation.
+ +The following figure shows the high level architecture of the WSDL2Ws tool
The WSDL file and the user options are processed by the WSDLWs. The WSDL creates a class called wsContext(WebServiceContext) which is the runtime representation of the processed data. This wsContext passes to the generators. The generators extract the information from the wsContext and creates the files.The wsContext acts as a mediator and creates a loosely coupled system.
- -1. ServiceInfo � information about service
-2. WrapperInfo � information about wrapper options
-3. TypeMap � information about custom types
- - - - -Generator generates a class which depends on the options, It contains a class called SourceWriter and the concrete implementation of the SourceWriter decides what the Genarator generates. The SourceWriter factory creates a correct type of generator which depends on the options.
+The WSDL file and the user options are processed by the WSDL2Ws class. Then WSDL2Ws creates an instance of WebServiceContext class (wscontext), which is the runtime representation of the processed data. This WebServiceContext instance selects the Generator to be used. The Generators extract the information from the WebServiceContext instance and creates the files. The WebServiceContext instance acts as a mediator and creates a loosely coupled system.
++WebServiceContext has the following components +
+1.WSDL file and user options are processed by the WSDL2Ws and WSContext object is created.
-2. WebServiceGenaratorFactory will create WebServiceGenarator which depends on the service style
-3. Then the WebServiceGenarator will create a right set of Generators to create the set of files
-4.Each generator will invoke SourceWriter which is capable of writing each type of file. -Rest of the logic is upto the developer to decide (He has all the needed info as WsContext). +
Generator generates a class based on the options passed by user. It contains a class called SourceWriter and the concrete implementation of the SourceWriter decides what the Generator generates.
+ ++
The document below describes the areas where Apache Axis C++ is dependant upon the Axis Java tool.
-The Axis jars given below are used as they are in the Axis Java tool:
-     axis.jar
-    commons-discovery.jar
-    commons-logging.jar
-    jaxrpc.jar
-    saaj.jar
-    wsdl4j.jar
-    xml-apis.jar
"SchemaUtils.java" and "ElementDecl.java" files have been overridden and their original implementations are no longer used even though they exist in the above mentioned jars.
- -No classes have been extended at the present time.
- -Except for "SchemaUtils.java" and "ElementDecl.java" the rest of the code has been developed for the Axis C++ tool and is not present in the current Axis Java tool.
- -