27c27 < Beta 1 Version --- > 1.0 Version 32c32,34 <
  System Management --- >
  Components > 38a41 >
  WSDL Parser and Code Generator Framework 52a56,205 > The first subsection details a number of pluggable components in general. > More details are provided for other components in the remaining > subsections. > >

> Components

> This section describes in general how to plug specializations > of various components into AXIS. > >

> General Strategy >

> To override the default behavior for a pluggable component: > > >

> Example 1 >

> To override the default behavior for the Java Compiler: > > >

> Example 2 >

> To override the default behavior for the SocketFactory > in an environment that does not allow resources to be > located/loaded appropriately, or where the behavior > needs to be forced to a specific implementation: > > >

> Reference >

> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > >
Component/PackageFactoryInterfaceOptional System PropertyDefault Implementation
org.apache.axis.components.compilerCompilerFactory.getCompiler()Compileraxis.CompilerJavac
org.apache.axis.components.imageImageIOFactory.getImageIO()ImageIOaxis.ImageIOMerlinIO, JimiIO, JDK13IO
org.apache.axis.components.jmsJMSVendorAdapterFactory.getJMSVendorAdapter()JMSVendorAdapterJNDIVendorAdapter
org.apache.axis.components.netSocketFactoryFactory.getFactory()SocketFactoryaxis.socketFactoryDefaultSocketFactory
org.apache.axis.components.netSocketFactoryFactory.getSecureFactory()SocketFactoryaxis.socketSecureFactoryJSSESocketFactory
> > 215,219c369,377 < How can AXIS fit into existing configuration systems? < > >

> Extending Message Files

> AXIS provides a Message file extension mechanism > that allows AXIS-based code to use AXIS message keys, > as well as new message keys unique to the extended code. > 293,297c630,639 < <
In order for readers of languages other than English to be comfortable < with AXIS, we provide a mechanism for the strings used in AXIS to be translated.  < We do not provide any translations in AXIS; we merely provide a means by < which translators can easily plug in their translations. --- >
> AXIS provides pluggable interfaces for > various AXIS entities, including EngineConfigurationFactory's, > Provides, and Handlers. > AXIS also provides a variety of implementations > of these entities. > It is convenient to use AXIS source code for > such implementations as starting points for developing > extentions and customizations that fulfill the unique needs > of the end user. 299,300d640 <
  • < Interfaces
  • 302,320d641 <
    AXIS uses the standard Java internationalization class:  PropertyResourceBundle.  < To make this class easy to use, there are a number of methods on JavaUtils < that are used to get the messages within the resource bundle. <

    public static java.util.ResourceBundle < getMessageResourceBundle(); <

    public static String < getMessage(String key) throws java.util.MissingResourceException; <

    public static String < getMessage(String key, String var) throws java.util.MissingResourceException; <

    public static String < getMessage(String key, String var1, String var2) throws java.util.MissingResourceException; <

    public static String < getMessage(String key, String[] vars) throws java.util.MissingResourceException; <

    AXIS programmers can work with the resource bundle directly via a call < to JavaUtils.getMessageResourceBundle, < but the getMessage < methods should be used instead for two reasons: <
      <

      322,326c643,678 < It's a shortcut.  It is cleaner to call < <
        JavaUtils.getMessage("myMsg00");
      < than <
        JavaUtils.getMessageResourceBundle().getString("myMsg00");
      --- > Procedure >
      To extend the AXIS message file: >
        > >
      329,331c681 < The getMessage < methods enable messages with variables. <
    --- > Behavior 333,363c683 <

    < The getMessage methods

    < If you have a message with no variables <
      myMsg00=This is a string.
    < then simply call <
      JavaUtils.getMessage("myMsg00");
    < <


    If you have a message with variables, use the syntax "{X}" < where X is < the number of the variable, starting at 0.  For example: <

      myMsg00=My {0} is {1}.
    < then call: <
      JavaUtils.getMessage("myMsg00", < "name", "Russell");
    < and the resulting string will be:  "My name is Russell." <

    You could also call the String array version of getMessage: <

      JavaUtils.getMessage("myMsg00", < new String[] {"name", "Russell"});
    < <


    The String array version of getMessage < is all that is necessary, but the vast majority of messages will have 0, < 1 or 2 variables, so the other getMessage < methods are provided as a convenience to avoid the complexity of the String < array version. <

    Note that the getMessage < methods throw MissingResourceException < if the resource cannot be found.  And ParseException if there are < more {X} entries than arguments.  These exceptions are RuntimeException's, < so the caller doesn't have to explicitly catch them. <

    The resource bundle properties file is org/apache/axis/utils/resources.properties. <
      --- >

    --- > > 415c718,719 < How can we monitor the performance of AXIS? --- > AXIS does not yet include specific Performance Monitoring Plugs. > 450a756,757 > AXIS does not yet include an Encoding Plug. > > >

    > WSDL Parser and Code Generator Framework

    > WSDL2Java is AXIS's tool to generate Java artifacts from WSDL.  This > tool is extensible.  If users of AXIS wish to extend AXIS, then they > may also need to extend or change the generated artifacts.  For example, > if AXIS is inserted into some product which has an existing deployment > model that's different than AXIS's deployment model, then that product's > version of WSDL2Java will be required to generate deployment descriptors > other than AXIS's deploy.wsdd. >

    What follows immediately is a description of the framework.  If > you would rather dive down into the dirt of examples, > you could learn a good deal just from them.  Then you could come back > up here and learn the gory details. >

    There are three parts to WSDL2Java: >

      >
    1. > The symbol table
    2. > >
    3. > The parser front end with a generator framework
    4. > >
    5. > The code generator back end (WSDL2Java itself)
    6. >
    > >

    > Symbol Table

    > The symbol table, found in org.apache.axis.wsdl.symbolTable, will contain > all the symbols from a WSDL document, both the symbols from the WSDL constructs > themselves (portType, binding, etc), and also the XML schema types that > the WSDL refers to. >

    NOTE:  Needs lots of description here. >

    The symbol table is not extensible, but you can add fields to > it by using the Dynamic Variables construct: >

    > >

    > Parser Front End and Generator Framework

    > The parser front end and generator framework is located in org.apache.axis.wsdl.gen.  > The parser front end consists of two files: > > >

    > Code Generator Back End

    > The meat of the WSDL2Java back end generators is in org.apache.axis.wsdl.toJava.  > Emitter extends Parser.  org.apache.axis.wsdl.WSDL2Java extends WSDL2.  > JavaGeneratorFactory implements GeneratorFactory.  And the various > JavaXXXWriter classes implement the Generator interface. >

    NOTE:  Need lots more description here... >

    > WSDL Framework Extension Examples

    > Everything above sounds rather complex.  It is, but that doesn't mean > your extension has to be. >
    > Example 1 - Simple extension of WSDL2Java - additional artifact
    > The simplest extension of the framework is one which generates everything > that WSDL2Java already generates, plus something new.  Example 1 is > such an extension.  It's extra artifact is a file for each service > that lists that service's ports.  I don't know why you'd want to do > this, but it makes for a good, simple example.  See samples/integrationGuide/example1 > for the complete implementation of this example. >
      > > >
    > Example 2 - Not quite as simple an extension of WSDL2Java - change an artifact
    > In this example, we'll replace deploy.wsdd with mydeploy.useless.  > For brevity, mydeploy.useless is rather useless.  Making it useful > is an exercise left to the reader.  See samples/integrationGuide/example2 > for the complete implementation of this example. >