The process for building outbound connectors is briefly:
- 1. Include the WSDL file(s) in your components file system
- You must have a WSDL file in order to generate client stubs. Once you have the necessary WSDL file(s) you need to store it within the file system of your EJBServer/components/custom directory as shown in Getting Started. These WSDL files will be referenced in the following step.
- 2. Add the WSDL file location(s) to the component ws_outbound.xml file
- For each component you wish to have outbound web service connectors built you must place a ws_outbound.xml file in the EJBServer/components/custom/axis directory. The format of this file is described in Adding the WSDL File Location to the Outbound Web Services File.
- 3. Generate stubs
- You are now ready to generate the web service stubs by invoking the following build script: build wsconnector2
- 4. Create a client and invoke the web service
- To invoke the web service you must create and build a client (e.g. a Java main program) that utilizes the generated stubs to prepare arguments, call the web service, and process the return results.
Each of the above steps is explained in more detail in the sections that follow. To better understand the process just outlined the following illustrates the structure of directories and files used.
Figure 1. File System Usage For Outbound Web Services+ EJBServer
+ build
+ svr
+ wsc2
+ <service_name>
- <service_name>.wsdl - where modeled service
WSDL files are built to
+ jav
+ src
+ wsconnector - default location for
generated stub source;
override with property
axis2.java.outdir
+ wsconnector - default location for
compiled stub code;
override, with axis2.
extra.wsdl2java.args
property
+ components
+ custom
+ axis
- ws_outbound.xml - where you identify
your WSDL files as
below
+ <service_name>
+ <service_name>.wsdl - where you might copy a
WSDL file as pointed to
by ws_outbound.xml