You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by hu...@apache.org on 2002/10/29 22:38:57 UTC

cvs commit: xml-axis-wsif/proposals/jca/java/src/org/apache/wsif/providers/jca/toolplugin FormatHandlerGenerator.java Import.java Import.wsdl Import.xsd ImportDefinition.java ImportResource.java ImportXSD.java OperationSelection.java PortTypeArray.java PortTypeSelection.java

hughesj     2002/10/29 13:38:57

  Added:       proposals/jca/j2c_extensions WSDLConn.gif WSDLJ2EE.gif
                        WSIFForm.gif wsif_j1.gif wsif_j2.gif
                        wsif_j2c_extensions.htm
               proposals/jca/java/samples myeis.rar
               proposals/jca/java/src/org/apache/wsif/providers/jca
                        WSIFBindingOperation_JCAProperty.java
                        WSIFFormatHandler_JCA.java WSIFMessage_JCA.java
                        WSIFMessage_JCAStreamable.java
                        WSIFOperation_JCA.java WSIFPort_JCA.java
                        WSIFProviderJCAExtensions.java
                        WSIFResource_JCA.java WSIFResource_JCA.properties
                        WSIFUtils_JCA.java
               proposals/jca/java/src/org/apache/wsif/providers/jca/toolplugin
                        FormatHandlerGenerator.java Import.java Import.wsdl
                        Import.xsd ImportDefinition.java
                        ImportResource.java ImportXSD.java
                        OperationSelection.java PortTypeArray.java
                        PortTypeSelection.java
  Log:
  JCA Provider proposal:
  architecture doc is in xml-axis-wsif/proposals/j2c_extensions
  code is in             xml-axis-wsif/proposals/java/src
  sample is in           xml-axis-wsif/proposals/java/samples
  
  Sample is a rar file (Resource adapter Archive). open it up with
  your favorite ZIP util.
  
  Revision  Changes    Path
  1.1                  xml-axis-wsif/proposals/jca/j2c_extensions/WSDLConn.gif
  
  	<<Binary file>>
  
  
  1.1                  xml-axis-wsif/proposals/jca/j2c_extensions/WSDLJ2EE.gif
  
  	<<Binary file>>
  
  
  1.1                  xml-axis-wsif/proposals/jca/j2c_extensions/WSIFForm.gif
  
  	<<Binary file>>
  
  
  1.1                  xml-axis-wsif/proposals/jca/j2c_extensions/wsif_j1.gif
  
  	<<Binary file>>
  
  
  1.1                  xml-axis-wsif/proposals/jca/j2c_extensions/wsif_j2.gif
  
  	<<Binary file>>
  
  
  1.1                  xml-axis-wsif/proposals/jca/j2c_extensions/wsif_j2c_extensions.htm
  
  Index: wsif_j2c_extensions.htm
  ===================================================================
  <html>
  
   <head>
   <meta http-equiv="Content-Language" content="en-us">
   <meta name="GENERATOR" content="Microsoft FrontPage 5.0">
   <meta name="ProgId" content="FrontPage.Editor.Document">
   <title>WSIF J2C Extensions</title>
   </head>
  
   <body>
  
   <h2>WSIF Extensions for J2EE Connector Architecture</h2>
   <p><font FACE="Verdana" SIZE="2">The WSIF Extensions for J2EE Connector 
   Architecture (J2C) allow Enterprise Information Systems (EIS) to 
   provide the following:</font></p>
   <ul>
     <li><font size="2" face="Verdana">Modeling of interactions with the EIS as 
     services, using WSDL.</font></li>
     <li><font size="2" face="Verdana">Execution of interactions with the EIS using 
     WSIF.</font></li>
     <li><font face="Verdana" size="2">Implementation of the Import 
     Service that  exposes EIS metadata  in WSDL.</font></li>
   </ul>
   <p><font FACE="Verdana" SIZE="2">J2EE Connector Architecture 1.0 (specification 
   available at: &quot;http://java.sun.com/j2ee/download.html#connectorspec&quot;)&nbsp; provides a 
   runtime architecture that allows EIS Resource Adapters to plug into a J2EE 
   Application Server environment. The WSIF Extensions for J2C extend it to bring 
   the Resource Adapters into the world of services and also make them pluggable 
   into tool environments. The extensions specify the format of metadata that an 
   EIS must provide and define how a tool environment interacts with an EIS to get this 
  information, i.e. define the Import Service with operations to 
   list and import the EIS metadata in the tool environment independent manner. 
   The extensions also show how the EIS 
   provides code generation contributions. To support the execution of 
   interactions, the extensions  provide a set of 
   classes and interfaces that allow EIS to easily, especially if Resource 
   Adapter supports CCI, implement its specific WSIF provider. </font></p>
   <h3><a name="Metadata support">Modeling</a></h3>
   <p><font FACE="Verdana" SIZE="2">Metadata support is important from two perspectives. First, tools want to be 
   able to discover meta information about the functions offered by an EIS. The 
   tools then aid a developer in building components (for example, Java Beans, EJBs and others) that use these functions. 
   runtimes either drive a connector 
   through code generated by the tools from the metadata, or they are engines that 
   drive a connector by interpreting the metadata.</font></p>
   <h4>WSDL</h4>
   <p><font size="2" face="Verdana">The following picture shows the WSDL document architecture. Shown at the top 
   are the sections that allow you to describe a service interface in an abstract 
   way. WSDL prefers to use XML Schema as its canonical type system. The sections at the bottom  describe how and where to access the 
   concrete service that implements the abstract interface. Looking at the W in WSDL may cause you to think that the language is for 
   describing Web Services only, but this is not true. The inventors equipped the 
   language with a smart extensibility mechanism, which allows you to describe any 
   kind of service, be it a Web Service or some legacy EIS service 
   (function).</font></p>
   <p>
   &nbsp;<img border="0" src="WSDLJ2EE.gif" alt="WSDL document architecture" width="351" height="331" align="middle"></p>
   <h5>WSDL and J2EE Connector Architecture - A Natural Fit</h5>
   <p><font FACE="Verdana" SIZE="2">WSDL provides a standard way for describing which services are offered by a 
   specific EIS instance, and how you access them. The J2EE Connector Architecture 
   provides a standard client programming model for accessing EIS services.</font></p>
   <p><font FACE="Verdana" SIZE="2">If you look at the WSDL information that is relevant for the single 
   execution of an operation you end up with a very natural fit between the two:</font></p>
   <p>
   <img border="0" src="TextJ2C.gif" alt="Relationship between WSDL and J2EE terms" width="294" height="90" align="center"></p>
   <h4>Connector Binding</h4>
   <p><font FACE="Verdana" SIZE="2">To invoke an operation through a connector we have to be able to capture 
   meta information about the following aspects:</font></p>
   <ul>
     <li><font FACE="Verdana" SIZE="2">The connection properties to be set on a ManagedConnectionFactory.</font></li>
     <li><font FACE="Verdana" SIZE="2">The interaction properties to be set on an InteractionSpec.</font></li>
     <li><font FACE="Verdana" SIZE="2">The Records, for example, their structure and the specific way that they 
     have to be formatted.</font></li>
     <li><font FACE="Verdana" SIZE="2">The operation, which combines InteractionSpec, 
     input Record, and output Record (provided by WSDL). </font></li>
     <li><font face="Verdana" size="2">A specific endpoint that offers particular 
     operation (provided by WSDL).</font></li>
   </ul>
   <p><font FACE="Verdana" SIZE="2">ManagedConnectionFactory describes location or providing endpoint of the operation. The requirement for the Connector Binding is to 
   provide a port extension to capture this information.</font></p>
   <p><font FACE="Verdana" SIZE="2">The InteractionSpec specifies the operation in a way that is
   understood by the endpoint. The  Connector Binding is required to 
   provide an operation binding extension to capture this information.</font></p>
   <p><font FACE="Verdana" SIZE="2">For Records you need to know their structure and the way that they have to 
   be formatted so that an endpoint is able to interpret them. The structure is 
   defined by XML Schema from which you can derive a Java 
   representation, as described later. It is the format aspect that imposes a requirement 
   on the Connector Binding. It has to provide a format binding extension to 
   capture the specific formatting information (see format binding section).</font></p>
   <h5>A Connector WSDL Sample</h5>
   <p>
   <img border="0" src="WSDLConn.gif" alt="Sample of a connector in a WSDL document" width="550" height="560"></p>
   <h5>How the Connector Binding Extends WSDL</h5>
   <pre>  &lt;definitions .... &gt;
       &lt;binding ...&gt;  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
          &lt;<b>connector:binding /</b>&gt;   &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
             <b>format:typeMapping</b> encoding=&quot;...&quot; style=&quot;...&quot;&gt;   &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                &lt;<b>format:typeMap  </b> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                   typeName=&quot;...&quot;  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                   formatType=&quot;...&quot; /&gt; *       &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
             &lt;/format:typeMapping&gt;  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
          &lt;operation .... &gt;  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
             &lt;<b>connector:operation</b> functionName=&quot;name&quot;...
                interaction attributes ... /&gt;   &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
              &lt;input&gt;    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                 ...  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;/input&gt;  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
              &lt;output&gt;  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                 ...  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
              &lt;/output&gt;   &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
          &lt;/operation&gt;  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
       &lt;/binding&gt;</pre>
   <pre>     &lt;port .... &gt;
          &lt;<b>connector:address</b> hostName=&quot;uri&quot; portNumber=&quot;...&quot;
             ...connection attributes ... /&gt;
  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;/port&gt;
  &nbsp;&nbsp;&lt;/definitions&gt;</pre>
   <h6>connector:binding</h6>
   <p><font FACE="Verdana" SIZE="2">The purpose of the connector binding is to signify that the binding is bound 
   to a J2C based Resource Adapter. A &quot;connector&quot; is the short name 
   for the namespace that identifies the particular connector, for example </font> <samp>
   <font FACE="Verdana" SIZE="2">&lt;cics:binding 
   /&gt;</font></samp></p>
   <h6>connector:operation</h6>
   <p><font FACE="Verdana" SIZE="2">The connector operation contains the InteractionSpec attributes that are 
   necessary to execute the operation on the EIS side, for example </font> <samp>
   <font FACE="Verdana" SIZE="2">&lt;cics:operation 
   functionName=&quot;GETCUST&quot; /&gt;</font></samp></p>
   <h6>connector:address</h6>
   <p><font FACE="Verdana" SIZE="2">The connector address contains the attributes 
   of the ManagedConnectionFactory, necessary to configure the connection factory, for example </font> <samp>
   <font FACE="Verdana" SIZE="2">&lt;cics:address 
   connectionURL=&quot;...&quot; serverName=&quot;...&quot; /&gt;</font></samp></p>
   <h4>Format Binding</h4>
   <h5>format:typeMapping</h5>
   <p><font FACE="Verdana" SIZE="2">The format typeMapping identifies the style and encoding of the native 
   types. The typeMapping contains format typeMaps which associate the logical 
   format (XML Schema) with the native format.</font></p>
   <p><font FACE="Verdana" SIZE="2">The native format is identified by a format type identifier.</font></p>
   <p><font FACE="Verdana" SIZE="2">Here a sample where the native format type is described by COBOL:</font></p>
   <pre>  &lt;format:typeMapping encoding=&quot;COBOL&quot; style=&quot;COBOL&quot; &gt;                &nbsp;&nbsp;&nbsp;&nbsp;
       &lt;format:typeMap typename=&quot;Customer&quot; formatType=&quot;CustomerInfo.ccp:CUSTINF&quot;/&gt;
    &lt;/format:typeMapping&gt;</pre>
   <h3><a name="Web Service Invocation Framework (WSIF)">Runtime</a></h3>
   <p><font FACE="Verdana" SIZE="2">This standard way for describing the services that reside in an EIS 
   using WSDL simplifies the current client&nbsp; programming model (CCI) 
   by using Web Service Invocation Framework (WSIF), a WSDL based service invocation runtime. </font></p>
   <h4>Architecture</h4>
   <p><font FACE="Verdana" SIZE="2">The first thing necessary to set up for a service invocation is a 
   port. Ports are factored from services (implementations of 
   the WSIFService interface). WSIF ships the base service factory (WSIFServiceFactory) 
   which is 
   configured using the WSDL document, the service name, and the portType name from 
   which you want to create a port to access an operation.</font></p>
   <p><font FACE="Verdana" SIZE="2">Additionally, the WSIFService 
   is configured using a binding specific dynamic providers (implementations of the WSIFProvider interface). These  providers are the actual 
   factories of the binding specific ports (implementations of the WSIFPort interface)</font></p>
   <p><font FACE="Verdana" SIZE="2">The actual port implementation is not visible 
   to the client.  
  The client uses the WSIFPort interface to create a specific 
   operation for driving an execution. </font></p>
   <p>
   <img border="0" src="wsif_j1.gif" width="666" height="495"></p>
   <h4>WSIF and J2C</h4>
   <p><font FACE="Verdana" SIZE="2">Enabling a J2C connector for WSIF is very straightforward. The element that 
   a Resource Adapter must implement is the dynamic provider. Depending on 
   the native 
   format, a Resource Adapter may need to provide a specific message implementation. 
   In general the Resource Adapter does not have to provide a specific port and 
   operation implementation, since the WSIF Extensions for J2C provide a generic one that is based on 
   J2C CCI.</font></p>
   <p>
   <img border="0" src="wsif_j2.gif" width="575" height="467"></p>
   <p>&nbsp;</p>
   <p><font FACE="Verdana" SIZE="2">If the Resource Adapter's native format is stream based then 
   it can use the 
   provided WSIFMessage_JCAStreamable as it's message implementation. This class 
   extends a class named WSIFMessage_JCA. If a specific message 
   implementation is required, it should extend WSIFMessage_JCA.</font></p>
   <p><font face="Verdana" size="2">The J2C WSIF Provider runtime implementation 
   contains the following classes/interfaces in the package </font><font FACE="Helv" COLOR="#0000ff" size="2">
   org.apache.wsif.providers.jca.</font></p>
   <dir>
     <font FACE="Helv" size="2">
     <li>WSIFMessage_JCA.java - Top level superclass for all J2C WSIF messages 
     which implements javax.resource.cci.Record interface and is extended by the 
     connector specific messages.</li>
     <li>WSIFMessage_JCAStreamable.java - Specialization of WSIFMessage_JCA for 
     connectors that use the Streamable interface.</li>
     <li>WSIFOperation_JCA.java - Implementation of the WSIFOperation interface, which 
     executes the interaction with the EIS.</li>
     <li>WSIFPort_JCA.java - JCA specific implementation of the WSIFPort, which is used to 
     create an operation.</li>
     <li>WSIFProviderJCAExtensions.java - Interface implemented by the specific 
     connector to provide creation of the Connection and InteractionSpec objects</li>
     <li>WSIFFormatHandler_JCA.java - Interface implemented by FormatHandlers for 
     connectors that use the Streamable record interface. </li>
     <li>WSIFBindingOperation_JCAProperty.java - Interface used to expose the 
     InteractionSpec properties as parts in the WSIF message.</li>
     <li>WSIFUtils_JCA.java - A utility class which contains methods to lookup ConnectionFactory in the JNDI context</li>
     <li>WSIFResource_JCA.java - Resource implementation for error messages</li>
     <li>WSIFResource_JCA.properties - Separated Error Messages</li>
     <dir>
       </font><font FACE="Helv" SIZE="1">
       <dir>
         <p>&nbsp;</p>
       </dir>
       </font>
     </dir>
   </dir>
   <h4><a name="Format Handling">Format Handling</a></h4>
   <p><font FACE="Verdana" SIZE="2">Format handling is about marshalling the Java representation of a data 
   structure described by XML Schema to/from its binding dependent native format. 
   Separating the Java representation and format handling enables late binding, and 
   prevents the service client logic from using objects that are binding specific.</font></p>
   <h5>FormatHandler</h5>
   <p><font FACE="Verdana" SIZE="2">On service invocation, messages (input, output, fault) get exchanged with the 
   provider of the service. Messages consist of typed parts. In order 
   for the provider to understand them the invocation runtime has to transform 
   them into the providers native format.</font></p>
   <p><font FACE="Verdana" SIZE="2">Looking at the WSDL, it can be seen that a binding section defines type mappings 
   that map the XML Schema types to respective native types. Given the meta 
   information from the WSDL the user can generate&nbsp; two runtime elements. One is 
   a bean as the Java representation of the structure described by XML Schema. The 
   other is a FormatHandler which is generated based on the defined format 
   typeMapping.</font></p>
   <p>
   <img border="0" src="WSIFForm.gif" alt="Format handler" width="471" height="340"></p>
   <p><font FACE="Verdana" SIZE="2">In order for a message implementation to produce its native format it uses 
   the format handlers for its respective part types. The message is a generic 
   implementation for a particular provider. So how does the message know which 
   format handler to use for its parts? A runtime message knows about the meta 
   information of the concrete message it was factored for. So it knows what type 
   its parts have. These types have qualified names (namespace and localname).The rule for constructing the name of the format handler is:</font></p>
   <pre>&lt;reversed xsd typenamespace&gt;.&lt;binding shortname&gt;.&lt;format encoding+style&gt;.&lt;xsd typelocalname&gt;&quot;FormatHandler&quot;</pre>
   <p><font FACE="Verdana" SIZE="2">The WSIFUtil class, in WSIF, provides a set of utility methods that 
   can be 
   used in the message implementation (for example to use the above formula) as well as in the implementation of the 
   format handler generator. Besides being able to handle a bean derived from the XSD Schema type, the 
   format handler can in addition also support instance of the XSD Schema type in form of a 
   DOMSource or SAXSource. This allows for direct usage of XML in your service 
   invocation if required.</font></p>
   <h5>FormatHandler Generator</h5>
   <p><font FACE="Verdana" SIZE="2">To support EIS native formats the Resource 
   Adapter has to provide format handler generators with its WSIF J2C Extensions. Each format handler generator generates format handlers for 
   a specific encoding and style, possibly using the type mapping information from 
   the FormatBinding.&nbsp;The generator implements FormatHandlerGenerator interface described later. </font></p>
   <h3><a name="Import Service">Import Service</a></h3>
   <p><font FACE="Verdana" SIZE="2">Many EIS's have very rich metadata support describing the services they 
   offer. EIS's provide programmatic access to this meta information. This poses a problem for tools in that  
   the form of the metadata and the access to it is proprietary
   for each EIS. The EIS import service solves this problem by providing a 
   standard interface for accessing the meta information, and it delivers the meta information in the standard
   form of WSDL. The EIS implements (i.e. provides bindings and service of the 
   import service) the import service with its EIS Resource Adapter. </font></p>
   <h4>Interface</h4>
   <p><font FACE="Verdana" SIZE="2">The Import interface consists of three operations getPortTypes, getDefinition 
   and </font><font SIZE="2">getRawEISMetaData. </font></p>
   <p><font FACE="Verdana" SIZE="2">The getPortTypes operation allows you to get an overview about the 
   interfaces and operations the EIS offers. The operation returns an array of 
   portTypes, the number of portTypes returned can be controlled through the 
   queryString input argument (supporting the queryString is optional).</font></p>
   <p><font FACE="Verdana" SIZE="2">Note, if your EIS does not have the notion of interfaces you can just 
   return one portType containing all the operations your EIS offers.</font></p>
   <p><font FACE="Verdana" SIZE="2">The getDefinition operation allows you to retrieve the complete service 
   definition for a chosen portType selection. Besides selecting the portType, the 
   portType selection allows a subset of the portType by identifying the operations 
   that you are interested in. The operation returns the WSDL definition, and an 
   array of XML Schema sources for the case when the portType uses XML Schema complex 
   types.</font></p>
   <p><font face="Verdana" size="2">The optional operation, </font><font SIZE="2">
   getRawEISMetaData returns a binary data that may be used by the Resource 
   Adapter to cache the EIS metadata repository. </font></p>
   <h4><b>Import.wsdl file</b></h4>
   <font SIZE="2">
   <p>&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;</p>
   <p>&lt;definitions name=&quot;ImportRemoteInterface&quot;</p>
   <p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; targetNamespace=&quot;http://importservice.jca.providers.wsif.apache.org/&quot;</p>
   <p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; xmlns=&quot;http://schemas.xmlsoap.org/wsdl/&quot;</p>
   <p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; xmlns:tns=&quot;http://importservice.jca.providers.wsif.apache.org/&quot; 
   xmlns:xsd=&quot;http://www.w3.org/2001/XMLSchema&quot;&gt;</p>
   <p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;import location=&quot;Import.xsd&quot; 
   namespace=&quot;http://importservice.jca.providers.wsif.apache.org/&quot;/&gt;</p>
   <p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;message name=&quot;getDefinitionRequest&quot;&gt;</p>
   <p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;part 
   name=&quot;portTypeSelection&quot; type=&quot;tns:PortTypeSelection&quot;/&gt;</p>
   <p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/message&gt;</p>
   <p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;message name=&quot;getDefinitionResponse&quot;&gt;</p>
   <p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;part 
   name=&quot;result&quot; type=&quot;tns:ImportDefinition&quot;/&gt;</p>
   <p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/message&gt;</p>
   <p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;message name=&quot;getPortTypesRequest&quot;&gt;</p>
   <p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;part 
   name=&quot;queryString&quot; type=&quot;xsd:string&quot;/&gt;</p>
   <p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/message&gt;</p>
   <p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;message name=&quot;getPortTypesResponse&quot;&gt;</p>
   <p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;part 
   name=&quot;result&quot; type=&quot;tns:PortTypeArray&quot;/&gt;</p>
   <p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/message&gt;</p>
   <p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;message name=&quot;getRawEISMetaDataRequest&quot;&gt;</p>
   <p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;part 
   name=&quot;queryString&quot; type=&quot;xsd:string&quot;/&gt;</p>
   <p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/message&gt;</p>
   <p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;message name=&quot;getRawEISMetaDataResponse&quot;&gt;</p>
   <p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;part 
   name=&quot;result&quot; type=&quot;xsd:base64&quot;/&gt;</p>
   <p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/message&gt;</p>
   <p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;portType name=&quot;Import&quot;&gt;</p>
   <p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
   &lt;operation name=&quot;getDefinition&quot; parameterOrder=&quot;portTypeSelection&quot;&gt;</p>
   <p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
   &lt;input message=&quot;tns:getDefinitionRequest&quot; name=&quot;getDefinitionRequest&quot;/&gt;</p>
   <p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
   &lt;output message=&quot;tns:getDefinitionResponse&quot; name=&quot;getDefinitionResponse&quot;/&gt;</p>
   <p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
   &lt;/operation&gt;</p>
   <p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
   &lt;operation name=&quot;getPortTypes&quot; parameterOrder=&quot;queryString&quot;&gt;</p>
   <p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
   &lt;input message=&quot;tns:getPortTypesRequest&quot; name=&quot;getPortTypesRequest&quot;/&gt;</p>
   <p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
   &lt;output message=&quot;tns:getPortTypesResponse&quot; name=&quot;getPortTypesResponse&quot;/&gt;</p>
   <p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
   &lt;/operation&gt;</p>
   <p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
   &lt;operation name=&quot;getRawEISMetaData&quot; parameterOrder=&quot;queryString&quot;&gt;</p>
   <p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
   &lt;input message=&quot;tns:getRawEISMetaDataRequest&quot; name=&quot;getRawEISMetaDataRequest&quot;/&gt;</p>
   <p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
   &lt;output message=&quot;tns:getRawEISMetaDataResponse&quot; name=&quot;getRawEISMetaDataResponse&quot;/&gt;</p>
   <p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
   &lt;/operation&gt;</p>
   <p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/portType&gt;</p>
   <p>&lt;/definitions&gt;</p>
   </font>
   <pre>  </pre>
   
   <h5>Import Service support classes</h5>
   <p><font FACE="Verdana" SIZE="2">To simplify the implementation of the Import 
   service, the WSIF Extensions for J2C include a set of convenience classes in 
   the </font><font FACE="Helv" COLOR="#0000ff" size="2">
   org.apache.wsif.providers.jca.toolplugin </font><font size="2" face="Verdana">
   package. These classes provide Java representation of the XSD types used in the 
   import service and simplify the development of the Import Service. </p>
   </font>
   <dir>
     <font FACE="Helv" size="2">
   </dir>
   <blockquote>
     <ul>
       <li>ImportDefinition.java</li>
       <li>ImportResource.java</li>
       <li>ImportXSD.java</li>
       <li>OperationSelection.java</li>
       <li>PortTypeArray.java</li>
       <li>PortTypeSelection.java</li>
     </ul>
   </blockquote>
   </font>
   <h3>&nbsp;</h3>
   
   <h3>Deployment Descriptor</h3>
   
   <p><font FACE="Verdana" SIZE="2">To allow an arbitrary tools environment to 
   detect this additional capability a connector implementation has to provide the 
   following deployment descriptor xml file (j2c_plugin.xml) in its rar file. It describes 
   details of the implementation, for example the names of classes implementing extensibility 
   elements or the name of the WSDL file providing bindings for the Import service 
   interface. A sample of the xml file is shown below: </font></p>
   <p>&nbsp;</p>
   <blockquote>
     <blockquote>
       <pre><font face="Courier New">&lt;j2c_plugin tns=&quot;http://schemas.xmlsoap.org/wsdl/myeis/&quot; name=&quot;MyEIS&quot;&gt;</font></pre>
       <pre><font face="Courier New">&lt;Description&gt;MyEIS&lt;/Description&gt;</font></pre>
       <pre><font face="Courier New">&lt;version&gt;1.0&lt;/version&gt;</font></pre>
       <pre><font face="Courier New">	&lt;wsdl_extensions&gt;</font></pre>
       <pre><font face="Courier New">		&lt;address classname=&quot;com.myeis.wsdl.extensions.j2c.myeis.MyEISAddress&quot;/&gt;</font></pre>
       <blockquote>
         <blockquote>
           <blockquote>
             <pre><font face="Courier New"> &lt;binding classname=&quot;com.myeis.wsdl.extensions.j2c.myeis.MyEISBinding&quot;/&gt; </font></pre>
           </blockquote>
         </blockquote>
       </blockquote>
       <pre><font face="Courier New">		&lt;operation classname=&quot;com.myeis.wsdl.extensions.j2c.myeis.MyEISOperation&quot;/&gt;</font></pre>
       <pre><font face="Courier New">		&lt;extension_registry classname=&quot;com.myeis.wsdl.extensions.j2c.myeis.MyEISExtensionRegistry&quot; /&gt;</font></pre>
       <pre><font face="Courier New">	&lt;/wsdl_extensions&gt;</font></pre>
       <pre><font face="Courier New">	&lt;wsif_extensions classname=&quot;com.myeis.wsif.providers.j2c.myeis.WSIFProvider_MyEIS&quot; /&gt;</font></pre>
       <pre><font face="Courier New">	&lt;import&gt;</font></pre>
       <pre><font face="Courier New">		&lt;service wsdlfile=&quot;com/myeis/j2c/importservice/myeis/ImportMyEIS.wsdl&quot; servicename=&quot;ImportService&quot; &gt;</font></pre>
       <pre><font face="Courier New">		&lt;/service&gt;</font></pre>
       <pre><font face="Courier New">	&lt;/import&gt; </font></pre>
     </blockquote>
     <pre><font face="Courier New">     	     &lt;formathandler</font></pre>
     <blockquote>
       <pre><font face="Courier New">	     &lt;generator encoding=&quot;myeis&quot; classname=&quot;com.myeis.j2c.myeis.formathandler.MyEISFormatHandlerGenerator&quot; /&gt;</font></pre>
       <pre><font face="Courier New">        &lt;/formathandler&gt;</font></pre>
       <pre><font face="Courier New">&lt;/j2c_plugin&gt;</font></pre>
     </blockquote>
   </blockquote>
   <h3>Sample Resource Adapter</h3>
   
   <p><font size="2">The distribution of the WSIF Extensions for Connector 
   Architecture includes a sample Resource Adapter, MyEIS, illustrating how to 
   extend the Connector to enable it for pluggability into tool environments, 
   implement model and runtime extensions and the Import Service. </font></p>
   
   </body>
  
  </html>
  
  
  1.1                  xml-axis-wsif/proposals/jca/java/samples/myeis.rar
  
  	<<Binary file>>
  
  
  1.1                  xml-axis-wsif/proposals/jca/java/src/org/apache/wsif/providers/jca/WSIFBindingOperation_JCAProperty.java
  
  Index: WSIFBindingOperation_JCAProperty.java
  ===================================================================
  /*
   * The Apache Software License, Version 1.1
   *
   *
   * Copyright (c) 2002 The Apache Software Foundation.  All rights 
   * reserved.
   *
   * Redistribution and use in source and binary forms, with or without
   * modification, are permitted provided that the following conditions
   * are met:
   *
   * 1. Redistributions of source code must retain the above copyright
   *    notice, this list of conditions and the following disclaimer. 
   *
   * 2. Redistributions in binary form must reproduce the above copyright
   *    notice, this list of conditions and the following disclaimer in
   *    the documentation and/or other materials provided with the
   *    distribution.
   *
   * 3. The end-user documentation included with the redistribution,
   *    if any, must include the following acknowledgment:  
   *       "This product includes software developed by the
   *        Apache Software Foundation (http://www.apache.org/)."
   *    Alternately, this acknowledgment may appear in the software itself,
   *    if and wherever such third-party acknowledgments normally appear.
   *
   * 4. The names "WSIF" and "Apache Software Foundation" must
   *    not be used to endorse or promote products derived from this
   *    software without prior written permission. For written 
   *    permission, please contact apache@apache.org.
   *
   * 5. Products derived from this software may not be called "Apache",
   *    nor may "Apache" appear in their name, without prior written
   *    permission of the Apache Software Foundation.
   *
   * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
   * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
   * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
   * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
   * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
   * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
   * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
   * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
   * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
   * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
   * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
   * SUCH DAMAGE.
   * ====================================================================
   *
   * This software consists of voluntary contributions made by many
   * individuals on behalf of the Apache Software Foundation and was
   * originally based on software copyright (c) 2001, 2002, International
   * Business Machines, Inc., http://www.apache.org.  For more
   * information on the Apache Software Foundation, please see
   * <http://www.apache.org/>.
   */
   
   
  package org.apache.wsif.providers.jca;
  
  /**
   * An interface which is used to expose InteractionSpec or ConnectionSpec properties 
   * as data at runtime by using parts in a message.
   * @author John Green
   */
  public interface WSIFBindingOperation_JCAProperty {
  	/**
  	 * Returns the name of the part which contains the InteractionSpec or ConnectionSpec property value.
  	 */
  	public String getPartName();
  
  	/**
  	 * Returns the name of the InteractionSpec or ConnectionSpec property which is being stored.
  	 */	
  	public String getPropertyName();
  	
  	/**
  	 * Sets the name of the part which contains the InteractionSpec or ConnectionSpec property value.
  	 */
  	public void setPartName(String partName);
  	
  	/**
  	 * Sets the name of the InteractionSpec or ConnectionSpec property which is being stored. 
  	 */
  	public void setPropertyName(String propertyName);
  
  }
  
  
  
  
  1.1                  xml-axis-wsif/proposals/jca/java/src/org/apache/wsif/providers/jca/WSIFFormatHandler_JCA.java
  
  Index: WSIFFormatHandler_JCA.java
  ===================================================================
  /*
   * The Apache Software License, Version 1.1
   *
   *
   * Copyright (c) 2002 The Apache Software Foundation.  All rights 
   * reserved.
   *
   * Redistribution and use in source and binary forms, with or without
   * modification, are permitted provided that the following conditions
   * are met:
   *
   * 1. Redistributions of source code must retain the above copyright
   *    notice, this list of conditions and the following disclaimer. 
   *
   * 2. Redistributions in binary form must reproduce the above copyright
   *    notice, this list of conditions and the following disclaimer in
   *    the documentation and/or other materials provided with the
   *    distribution.
   *
   * 3. The end-user documentation included with the redistribution,
   *    if any, must include the following acknowledgment:  
   *       "This product includes software developed by the
   *        Apache Software Foundation (http://www.apache.org/)."
   *    Alternately, this acknowledgment may appear in the software itself,
   *    if and wherever such third-party acknowledgments normally appear.
   *
   * 4. The names "WSIF" and "Apache Software Foundation" must
   *    not be used to endorse or promote products derived from this
   *    software without prior written permission. For written 
   *    permission, please contact apache@apache.org.
   *
   * 5. Products derived from this software may not be called "Apache",
   *    nor may "Apache" appear in their name, without prior written
   *    permission of the Apache Software Foundation.
   *
   * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
   * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
   * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
   * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
   * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
   * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
   * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
   * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
   * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
   * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
   * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
   * SUCH DAMAGE.
   * ====================================================================
   *
   * This software consists of voluntary contributions made by many
   * individuals on behalf of the Apache Software Foundation and was
   * originally based on software copyright (c) 2001, 2002, International
   * Business Machines, Inc., http://www.apache.org.  For more
   * information on the Apache Software Foundation, please see
   * <http://www.apache.org/>.
   */
  
  
  package org.apache.wsif.providers.jca;
  
  /**
   * An interface extending WSIF Format Handler with the Connector Architecture's specific
   * methods from the Streamable interface and a setter for the InteractionSpec field which
   * can be used by a resource adapter, when it is required, to support unmarshalling.
   * 
   * @author John Green
   * @author Michael Beisiegel
   * @author Piotr Przybylski <pi...@ca.ibm.com>
   */
  public interface WSIFFormatHandler_JCA extends org.apache.wsif.format.WSIFFormatHandler {
  
  /**
   * Read data contents from the input stream.
   */
  public void read(java.io.InputStream inputStream) throws java.io.IOException;
  /**
   * Writes the contents of the data to the output stream.
   * @param outputStream
   * @throws IOException
   */
  public void write(java.io.OutputStream outputStream) throws java.io.IOException;
  
  /**
   * Sets the interactionSpec on the format handler. This should be set by the
   * resource adapter when the interactionSpec contains information 
   * that is required to unmarshall returned data.
   * @param interactionSpec
   */
  public void setInteractionSpec(javax.resource.cci.InteractionSpec interactionSpec);
  }
  
  
  
  1.1                  xml-axis-wsif/proposals/jca/java/src/org/apache/wsif/providers/jca/WSIFMessage_JCA.java
  
  Index: WSIFMessage_JCA.java
  ===================================================================
  /*
   * The Apache Software License, Version 1.1
   *
   *
   * Copyright (c) 2002 The Apache Software Foundation.  All rights 
   * reserved.
   *
   * Redistribution and use in source and binary forms, with or without
   * modification, are permitted provided that the following conditions
   * are met:
   *
   * 1. Redistributions of source code must retain the above copyright
   *    notice, this list of conditions and the following disclaimer. 
   *
   * 2. Redistributions in binary form must reproduce the above copyright
   *    notice, this list of conditions and the following disclaimer in
   *    the documentation and/or other materials provided with the
   *    distribution.
   *
   * 3. The end-user documentation included with the redistribution,
   *    if any, must include the following acknowledgment:  
   *       "This product includes software developed by the
   *        Apache Software Foundation (http://www.apache.org/)."
   *    Alternately, this acknowledgment may appear in the software itself,
   *    if and wherever such third-party acknowledgments normally appear.
   *
   * 4. The names "WSIF" and "Apache Software Foundation" must
   *    not be used to endorse or promote products derived from this
   *    software without prior written permission. For written 
   *    permission, please contact apache@apache.org.
   *
   * 5. Products derived from this software may not be called "Apache",
   *    nor may "Apache" appear in their name, without prior written
   *    permission of the Apache Software Foundation.
   *
   * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
   * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
   * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
   * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
   * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
   * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
   * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
   * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
   * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
   * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
   * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
   * SUCH DAMAGE.
   * ====================================================================
   *
   * This software consists of voluntary contributions made by many
   * individuals on behalf of the Apache Software Foundation and was
   * originally based on software copyright (c) 2001, 2002, International
   * Business Machines, Inc., http://www.apache.org.  For more
   * information on the Apache Software Foundation, please see
   * <http://www.apache.org/>.
   */
  
  package org.apache.wsif.providers.jca;
  
  import javax.wsdl.*;
  
  /**
   * This class is the top level superclass for all JCA WSIF messages.  It is extended by the connector specific messages, 
   * and implements the javax.resource.cci.Record interface.
   * 
   * @author Michael Beisiegel
   * @author Piotr Przybylski <pi...@ca.ibm.com>
   */
  
  public class WSIFMessage_JCA extends org.apache.wsif.base.WSIFDefaultMessage implements javax.resource.cci.Record {
  
  	public static final int INPUT_MESSAGE = 1;
  	public static final int OUTPUT_MESSAGE = 2;
  	public static final int FAULT_MESSAGE = 3;
  	
  	protected String fieldRecordName = null;
  	protected String fieldRecordShortDescription = null;
  
  	protected Definition fieldDefinition = null;
  	protected Binding fieldBinding = null;
  	protected String fieldOperationName = null;
  	protected String fieldInputName = null; 
  	protected String fieldOutputName = null;
  	protected int fieldMessageType = 0;
  	protected javax.resource.cci.InteractionSpec fieldInteractionSpec = null;	
  		
  	/**
  	 * WSIFMessage_JCA Constructor
  	 * @param aDefinition A Definition containing the operation to execute.
  	 * @param aBinding A service binding
  	 * @param aOperationName The name of the operation
  	 * @param aInputName Input name
  	 * @param aOutputName Output name
  	 * @param aMessageType Determines what kind of message is created, input, output or fault. 
  	 */
  	public WSIFMessage_JCA(Definition aDefinition, Binding aBinding, String aOperationName, String aInputName, String aOutputName, int aMessageType) {
  		super();
  		this.fieldDefinition = aDefinition;
  		this.fieldBinding = aBinding;
  		this.fieldOperationName = aOperationName;
  		this.fieldInputName = aInputName;
  		this.fieldOutputName = aOutputName;
  		this.fieldMessageType = aMessageType;
  	}
  
  	/**
  	 * Gets the recordName.
  	 * @return Returns a String
  	 */
  	public String getRecordName() {
  		return fieldRecordName;
  	}
  
  	/*
  	 * @see Record#setRecordName(String)
  	 */
  	public void setRecordName(String name) {
  		this.fieldRecordName = name;
  	}
  
  	/*
  	 * @see Record#setRecordShortDescription(String)
  	 */
  	public void setRecordShortDescription(String desription) {
  		this.fieldRecordShortDescription = desription;
  	}
  
  	/**
  	 * Gets the recordShortDescription.
  	 * @return Returns a String
  	 */
  	public String getRecordShortDescription() {
  		return fieldRecordShortDescription;
  	}
  
  	/**
  	 * Method not supported.
  	 */
  	public Object clone()throws CloneNotSupportedException{
  		throw new CloneNotSupportedException();
  	}
  	/**
  	 * Sets the interactionSpec.
  	 * @param interactionSpec The interactionSpec to set
  	 */
  	public void setInteractionSpec(javax.resource.cci.InteractionSpec interactionSpec) {
  		fieldInteractionSpec = interactionSpec;
  	}
  
  }
  
  
  1.1                  xml-axis-wsif/proposals/jca/java/src/org/apache/wsif/providers/jca/WSIFMessage_JCAStreamable.java
  
  Index: WSIFMessage_JCAStreamable.java
  ===================================================================
  /*
   * The Apache Software License, Version 1.1
   *
   *
   * Copyright (c) 2002 The Apache Software Foundation.  All rights 
   * reserved.
   *
   * Redistribution and use in source and binary forms, with or without
   * modification, are permitted provided that the following conditions
   * are met:
   *
   * 1. Redistributions of source code must retain the above copyright
   *    notice, this list of conditions and the following disclaimer. 
   *
   * 2. Redistributions in binary form must reproduce the above copyright
   *    notice, this list of conditions and the following disclaimer in
   *    the documentation and/or other materials provided with the
   *    distribution.
   *
   * 3. The end-user documentation included with the redistribution,
   *    if any, must include the following acknowledgment:  
   *       "This product includes software developed by the
   *        Apache Software Foundation (http://www.apache.org/)."
   *    Alternately, this acknowledgment may appear in the software itself,
   *    if and wherever such third-party acknowledgments normally appear.
   *
   * 4. The names "WSIF" and "Apache Software Foundation" must
   *    not be used to endorse or promote products derived from this
   *    software without prior written permission. For written 
   *    permission, please contact apache@apache.org.
   *
   * 5. Products derived from this software may not be called "Apache",
   *    nor may "Apache" appear in their name, without prior written
   *    permission of the Apache Software Foundation.
   *
   * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
   * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
   * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
   * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
   * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
   * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
   * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
   * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
   * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
   * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
   * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
   * SUCH DAMAGE.
   * ====================================================================
   *
   * This software consists of voluntary contributions made by many
   * individuals on behalf of the Apache Software Foundation and was
   * originally based on software copyright (c) 2001, 2002, International
   * Business Machines, Inc., http://www.apache.org.  For more
   * information on the Apache Software Foundation, please see
   * <http://www.apache.org/>.
   */
  
  
  package org.apache.wsif.providers.jca;
  
  import org.apache.wsif.*;
  import org.apache.wsif.format.*;
  import org.apache.wsif.providers.jca.WSIFUtils_JCA;
  import org.apache.wsif.logging.*;
  import java.net.MalformedURLException;
  import java.net.URL;
  import java.util.*;
  import javax.wsdl.*;
  import javax.wsdl.extensions.ExtensibilityElement;
  
  /**
   * The class WSIFMessage_JCAStreamable is a specialized version of the WSIFMessage_JCA to support Resource Adapters
   * using javax.resource.cci.Streamable. 
   * 
   * @author Michael Beisiegel
   * @author Piotr Przybylski <pi...@ca.ibm.com>
   * @author John Green
   */
   
  public class WSIFMessage_JCAStreamable extends org.apache.wsif.providers.jca.WSIFMessage_JCA implements javax.resource.cci.Streamable {
  	
  	private Message fieldMessageModel = null;
  	private int traceLevel = 0;
  	private final static int ENTRY = 2;
  	private final static int DEBUG = 3;
  	
  	private java.util.HashMap fieldPartNameFormatHandlerMapping = new java.util.HashMap();
  
  	/**
  	 * @see org.apache.wsif.providers.jca.WSIFMessage_JCA#WSIFMessage_JCA(Definition, Binding, String, String, String, int)
  	 */
  	public WSIFMessage_JCAStreamable(Definition aDefinition, Binding aBinding, String aOperationName, String aInputName, String aOutputName, int aMessageType) {
  		super(aDefinition, aBinding, aOperationName, aInputName, aOutputName, aMessageType);
  		Operation operation = aBinding.getPortType().getOperation(aOperationName, aInputName, aOutputName);
  		switch(aMessageType){
  			case WSIFMessage_JCA.INPUT_MESSAGE:
  				if(operation.getInput() != null) {
  					this.fieldMessageModel = operation.getInput().getMessage();
  					setMessageDefinition(this.fieldMessageModel);
  				}
  				break;
  			case WSIFMessage_JCA.OUTPUT_MESSAGE:
  				if(operation.getOutput() != null) {
  					this.fieldMessageModel = operation.getOutput().getMessage();
  					setMessageDefinition(this.fieldMessageModel);
  				}
  				break;
  			case WSIFMessage_JCA.FAULT_MESSAGE:
  				break;
  			default:
  				// Assume input
  				this.fieldMessageModel = operation.getInput().getMessage();
  				setMessageDefinition(this.fieldMessageModel);
  				break;
  		}
  		if(Trc.isTraceEnabled()){
  			if(MessageLogger.isInfoEnabled())
  				this.traceLevel = DEBUG;
  			else
  				this.traceLevel = ENTRY;
  		}
  		
  	}
  
  
  	/**
  	 * The method to read input stream and create message parts. For each part in the message
  	 * (as defined in WSDL), with exception of parts representing ConnectionSpec and InteractionSpec properties, 
  	 * the format handler is created and its read() method is passed the inputStream. The parts
  	 * creation is delayed until they are needed (i.e. when the client invokes <code>getObjectPart</code>).
  	 * In this method only the part's format handler is created and stored. 
  	 *  
  	 * @see javax.resource.cci.Streamable#read(InputStream)
  	 */
  	public void read(java.io.InputStream inputStream) throws java.io.IOException {
  
  		try {
  			if(this.traceLevel >= ENTRY)
  				Trc.entry(this);
  			if(fieldMessageModel == null)
  				return;
  			HashMap partsToNotProcess = new HashMap();
  			BindingOperation bindingOperation = fieldBinding.getBindingOperation(fieldOperationName, fieldInputName, fieldOutputName);
  			BindingOutput bindingOutput = bindingOperation.getBindingOutput();
  			if (bindingOutput != null) {
  				List list = bindingOutput.getExtensibilityElements();
  				Iterator inputIterator = list.iterator();
  				while (inputIterator.hasNext()) {
  					ExtensibilityElement ele = (ExtensibilityElement)inputIterator.next();
  					if (ele instanceof WSIFBindingOperation_JCAProperty) {
  						WSIFBindingOperation_JCAProperty prop = (WSIFBindingOperation_JCAProperty)ele;
  						String partName = prop.getPartName();
  						partsToNotProcess.put(partName,partName);
  					}
  				}
  			}
  			Iterator iterator = this.fieldMessageModel.getOrderedParts(null).iterator();
  			while (iterator.hasNext()) {
  				Part part = (Part) iterator.next();
  				String partName = part.getName();
  				
  				if (partsToNotProcess.get(partName) != null) continue;
  
  				WSIFFormatHandler_JCA formatHandler = null;
  				if (this.fieldPartNameFormatHandlerMapping.containsKey(partName))
  					formatHandler =
  						(WSIFFormatHandler_JCA) this.fieldPartNameFormatHandlerMapping.get(partName);
  				else {
  					formatHandler = (WSIFFormatHandler_JCA) WSIFUtils_JCA.getFormatHandler(part, this.fieldDefinition, this.fieldBinding);
  					this.fieldPartNameFormatHandlerMapping.put(partName, formatHandler);
  				}
  				formatHandler.read(inputStream);
  			}
  			if(this.traceLevel >= ENTRY)
  				Trc.exit();
  		}
  		catch (Exception exn1) {
  			if(this.traceLevel == DEBUG){
  				Trc.exception(exn1);
  			}
  			throw new java.io.IOException(WSIFResource_JCA.get("WSIF1004E", exn1.getLocalizedMessage()));
  		}
  	}
  	
  	
  	/**
  	 * Writes the contents of the message parts into the OutputStream. For each part in the message
  	 * (as defined in WSDL), except parts representing interactionSpec properties, the format handler
  	 * is created, part is set on the format handler and its <code>write</code> method is invoked. 
  	 * The format handlers are stored in the table.
  	 * 
  	 * @see javax.resource.cci.Streamable#write(OutputStream)
  	 */
  	public void write(java.io.OutputStream outputStream) throws java.io.IOException {
  
  		try {
  			if (this.traceLevel >= ENTRY)
  				Trc.entry(this);
  
  			HashMap partsToNotProcess = new HashMap();
  			BindingOperation bindingOperation = fieldBinding.getBindingOperation(fieldOperationName, fieldInputName, fieldOutputName);
  			BindingInput bindingInput = bindingOperation.getBindingInput();
  			if (bindingInput != null) {
  				List list = bindingInput.getExtensibilityElements();
  				Iterator inputIterator = list.iterator();
  				while (inputIterator.hasNext()) {
  					ExtensibilityElement ele = (ExtensibilityElement) inputIterator.next();
  					if (ele instanceof WSIFBindingOperation_JCAProperty) {
  						WSIFBindingOperation_JCAProperty prop = (WSIFBindingOperation_JCAProperty) ele;
  						String partName = prop.getPartName();
  						partsToNotProcess.put(partName, partName);
  					}
  				}
  			}
  
  			Iterator iterator = this.getPartNames();
  			while (iterator.hasNext()) {
  				String partName = (String) iterator.next();
  				if (partsToNotProcess.get(partName) != null)
  					continue;
  				Object oPart = this.parts.get(partName);
  				WSIFFormatHandler_JCA formatHandler = null;
  				if (oPart instanceof WSIFFormatPart) {
  					WSIFFormatPart jcaPart = (WSIFFormatPart) oPart;
  					if (jcaPart._getFormatHandler() != null) {
  						formatHandler = (WSIFFormatHandler_JCA) jcaPart._getFormatHandler();
  						this.fieldPartNameFormatHandlerMapping.put(partName, formatHandler);
  					}
  				}
  				if (formatHandler == null) {
  					if (this.fieldPartNameFormatHandlerMapping.containsKey(partName))
  						formatHandler = (WSIFFormatHandler_JCA) this.fieldPartNameFormatHandlerMapping.get(partName);
  					else {
  						if (fieldMessageModel == null)
  							return;
  						Part part = (Part) this.fieldMessageModel.getPart(partName);
  						formatHandler = (WSIFFormatHandler_JCA) WSIFUtils_JCA.getFormatHandler(part, this.fieldDefinition, this.fieldBinding);
  						this.fieldPartNameFormatHandlerMapping.put(partName, formatHandler);
  					}
  					formatHandler.setObjectPart(oPart);
  				}
  				formatHandler.write(outputStream);
  			}
  			if (this.traceLevel >= ENTRY)
  				Trc.exit();
  		}
  		catch (Exception exn1) {
  			if(this.traceLevel == DEBUG){
  				Trc.exception(exn1);
  			}
  			throw new java.io.IOException(WSIFResource_JCA.get("WSIF1005E", exn1.getLocalizedMessage()));
  
  		}
  
  	}
  
  	/**
  	 * Returns object part with the given name. If the part had already been created, 
  	 * returns it. If there is a format handler for this part, the object part is obtained from 
  	 * it and returned, otherwise it creates the format handler and returns 
  	 * the object parts form it.
  	 * 
  	 * @see org.apache.wsif.WSIFMessage#getObjectPart(String)
  	 */
  	public Object getObjectPart(String partName) {
  
  		if (this.traceLevel >= ENTRY)
  			Trc.entry(this, partName);
  
  		if(this.parts != null){
  			Object existingPart = this.parts.get(partName);
  			if (existingPart != null)
  				return existingPart;
  		}
  		try {
  			WSIFFormatHandler_JCA formatHandler =
  				(WSIFFormatHandler_JCA) this.fieldPartNameFormatHandlerMapping.get(partName);
  			if (formatHandler != null) {
  				if(this.fieldInteractionSpec != null)
  					formatHandler.setInteractionSpec(this.fieldInteractionSpec);
  				Object retPart = formatHandler.getObjectPart();
  				this.setObjectPart(partName, retPart);
  				if (this.traceLevel >= ENTRY)
  					Trc.exit(retPart);
  				return retPart;
  			}
  			else {
  				if(fieldMessageModel == null)
  					return null;
  				Part part = (Part) this.fieldMessageModel.getPart(partName);
  				if (part == null) return null;
  				formatHandler = (WSIFFormatHandler_JCA)WSIFUtils_JCA.getFormatHandler(part, this.fieldDefinition, this.fieldBinding);
  				if(this.fieldInteractionSpec != null)
  					formatHandler.setInteractionSpec(this.fieldInteractionSpec);
  				Object retPart = formatHandler.getObjectPart();
  				this.setObjectPart(partName, retPart);
  				if (this.traceLevel >= ENTRY)
  					Trc.exit(retPart);
  				return retPart;
  			}
  
  		}
  		catch (Exception exn) {
  			if(this.traceLevel == DEBUG){
  				Trc.exception(exn);
  			}
  			throw new RuntimeException(WSIFResource_JCA.get("WSIF1007E", exn.getLocalizedMessage()));
  		}
  	}
  
  	/**
  	 * Returns object part with the given name and requested representation. If the part had already 
  	 * been created, it is returned. If there is a format handler for this part, it gets the object part from the
  	 * format handler and returns it, otherwise the format handler is created and its 
  	 * object part is returned.
  	 * 
  	 * @see org.apache.wsif.WSIFMessage#getObjectPart(String)
  	 */
  	public Object getObjectPart(String partName, Class sourceClass) {
  
  		if (this.traceLevel >= ENTRY)
  			Trc.entry(this, partName, sourceClass);
  			
  		try {
  			if (this.parts != null) {
  				Object existingPart = this.parts.get(partName);
  				if (existingPart != null) {
  					if (sourceClass.isAssignableFrom(existingPart.getClass())){
  						if (this.traceLevel >= ENTRY)
  							Trc.exit(existingPart);
  						return existingPart;
  					}
  				}
  			}
  		}
  		catch (Exception exn) {
  			if(this.traceLevel == DEBUG){
  				Trc.exception(exn);
  			}
  		}
  
  		try {
  			WSIFFormatHandler_JCA formatHandler = (WSIFFormatHandler_JCA) this.fieldPartNameFormatHandlerMapping.get(partName);
  			if (formatHandler != null) {
  				if(this.fieldInteractionSpec != null)
  					formatHandler.setInteractionSpec(this.fieldInteractionSpec);
  				Object retSource = formatHandler.getObjectPart(sourceClass);
  				this.setObjectPart(partName, retSource);
  				if (this.traceLevel >= ENTRY)
  					Trc.exit(retSource);
  				return retSource;
  			}
  			else {
  				if(fieldMessageModel == null)
  					return null;
  				Part part = (Part) this.fieldMessageModel.getPart(partName);
  				if (part == null) return null;
  				formatHandler = (WSIFFormatHandler_JCA)WSIFUtils_JCA.getFormatHandler(part, this.fieldDefinition, this.fieldBinding);
  				if(this.fieldInteractionSpec != null)
  					formatHandler.setInteractionSpec(this.fieldInteractionSpec);
  				Object retSource = formatHandler.getObjectPart(sourceClass);
  				this.setObjectPart(partName, retSource);
  				if (this.traceLevel >= ENTRY)
  					Trc.exit(retSource);
  				return retSource;
  			}
  		}
  		catch (Exception exn) {
  			if(this.traceLevel == DEBUG){
  				Trc.exception(exn);
  			}
  			throw new RuntimeException(WSIFResource_JCA.get("WSIF1007E", exn.getLocalizedMessage()));
  		}
  	}
  
  	/**
  	 * @see org.apache.wsif.WSIFMessage#getPartNames()
  	 */
      public Iterator getPartNames() {
  		
  		try{	
  		    if(this.fieldMessageModel == null)
  		    	return null;
  	    	return this.fieldMessageModel.getParts().keySet().iterator();
  		}
  		catch(Throwable exn){
  			return null;
  		}
      }
  
  	/**
  	 * @see org.apache.wsif.WSIFMessage#getParts()
  	 */
      public Iterator getParts() {
      	
  		try{
  			Iterator partNames = this.getPartNames();
  			while(partNames.hasNext()){
  				String nextName = (String)partNames.next();
  				this.getObjectPart(nextName);
  			}
  			return(this.parts.values().iterator());
  		}
  		catch(Throwable exn){
  			return null;
  		}
      }
  
  
  }
  
  
  1.1                  xml-axis-wsif/proposals/jca/java/src/org/apache/wsif/providers/jca/WSIFOperation_JCA.java
  
  Index: WSIFOperation_JCA.java
  ===================================================================
  /*
   * The Apache Software License, Version 1.1
   *
   *
   * Copyright (c) 2002 The Apache Software Foundation.  All rights 
   * reserved.
   *
   * Redistribution and use in source and binary forms, with or without
   * modification, are permitted provided that the following conditions
   * are met:
   *
   * 1. Redistributions of source code must retain the above copyright
   *    notice, this list of conditions and the following disclaimer. 
   *
   * 2. Redistributions in binary form must reproduce the above copyright
   *    notice, this list of conditions and the following disclaimer in
   *    the documentation and/or other materials provided with the
   *    distribution.
   *
   * 3. The end-user documentation included with the redistribution,
   *    if any, must include the following acknowledgment:  
   *       "This product includes software developed by the
   *        Apache Software Foundation (http://www.apache.org/)."
   *    Alternately, this acknowledgment may appear in the software itself,
   *    if and wherever such third-party acknowledgments normally appear.
   *
   * 4. The names "WSIF" and "Apache Software Foundation" must
   *    not be used to endorse or promote products derived from this
   *    software without prior written permission. For written 
   *    permission, please contact apache@apache.org.
   *
   * 5. Products derived from this software may not be called "Apache",
   *    nor may "Apache" appear in their name, without prior written
   *    permission of the Apache Software Foundation.
   *
   * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
   * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
   * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
   * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
   * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
   * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
   * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
   * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
   * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
   * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
   * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
   * SUCH DAMAGE.
   * ====================================================================
   *
   * This software consists of voluntary contributions made by many
   * individuals on behalf of the Apache Software Foundation and was
   * originally based on software copyright (c) 2001, 2002, International
   * Business Machines, Inc., http://www.apache.org.  For more
   * information on the Apache Software Foundation, please see
   * <http://www.apache.org/>.
   */
  package org.apache.wsif.providers.jca;
  
  import javax.resource.*;
  import org.apache.wsif.logging.*;
  import org.apache.wsif.providers.*;
  import org.apache.wsif.*;
  import org.apache.wsif.base.*;
  import org.apache.wsif.util.*;
  import javax.resource.*;
  import javax.resource.cci.*;
  import javax.wsdl.extensions.*;
  import javax.wsdl.*;
  import java.net.URL;
  import java.util.*;
  import javax.resource.cci.*;
  import java.io.Serializable;
  import java.util.*;
  
  /**
   * The WSIFOperation_JCA class is an implementation of the WSIFOperation interface, 
   * which is used to execute interactions with the EIS.
   * 
   * @author Michael Beisiegel
   * @author Piotr Przybylski <pi...@ca.ibm.com>
   * @author John Green
   */
  public class WSIFOperation_JCA implements WSIFOperation {
  
  	protected Connection fieldConnection;
  	protected InteractionSpec fieldInteractionSpec;
  	protected Definition fieldDefinition;
  	protected Binding fieldBinding;
  	protected String fieldOperationName;
  	protected String fieldInputName;
  	protected String fieldOutputName;
  	protected Operation fieldOperation;
  	protected WSIFProviderJCAExtensions fieldFactory = null;
  	private final static String crlf = System.getProperty("line.separator");
  	private int traceLevel = 0;
  	private final static int ENTRY = 2;
  	private final static int DEBUG = 3;
  	private org.apache.wsif.providers.WSIFDynamicTypeMap fieldTypeMap;
  	private Port fieldPort;
  	private Service fieldService;
  	private WSIFPort_JCA fieldJcaPort;
  	
  	/**
  	 * The WSIFOperation_JCA constructor. 
  	 * @param aDefinition
  	 * @param aBinding
  	 * @param aOperationName
  	 * @param aInputName
  	 * @param aOutputName
  	 * @param aConnection
  	 * @param aInteractionSpec
  	 * @param aFactory
  	 * @param typeMap
  	 * @param aPort
  	 * @param aService
  	 * @param jcaPort
  	 */
  	public WSIFOperation_JCA(
  		Definition aDefinition,
  		Service aService,
  		Port aPort,
  		String aOperationName,
  		String aInputName,
  		String aOutputName,
  		org.apache.wsif.providers.WSIFDynamicTypeMap typeMap,
  		WSIFPort_JCA jcaPort,
  		WSIFProviderJCAExtensions aFactory,
  		Connection aConnection,
  		InteractionSpec aInteractionSpec) {
  
  		super();
  		this.fieldDefinition = aDefinition;
  		this.fieldInteractionSpec = aInteractionSpec;
  		this.fieldConnection = aConnection;
  		this.fieldFactory = aFactory;
  		this.fieldBinding = aPort.getBinding();
  		this.fieldOperationName = aOperationName;
  		this.fieldInputName = aInputName;
  		this.fieldOutputName = aOutputName;
  		this.fieldTypeMap = typeMap;
  		this.fieldPort = aPort;
  		this.fieldService = aService;
  		this.fieldJcaPort = jcaPort;
  		if (Trc.isTraceEnabled()) {
  			if (MessageLogger.isInfoEnabled())
  				this.traceLevel = DEBUG;
  			else
  				this.traceLevel = ENTRY;
  		}
  	}
  
  	/**
  	 * Invokes the request/response operation. This method 
  	 * <ul>
  	 * <li>Updates the InteractionSpec using data from the input message.
  	 * <li>If a Connection is not currently available creates one, where a
  	 * ConnectionSpec can be created using data from the input message and then 
  	 * used when creating the Connection.
  	 * <li>Uses the Connection to create a javax.resource.cci.Interaction.
  	 * <li>Invokes the Interaction execute method.
  	 * <li>Closes the interaction.
  	 * <li>Updates the output message with InteractionSpec properties.
  	 * </ul>
  	 */
  	public boolean executeRequestResponseOperation(WSIFMessage input, WSIFMessage output, WSIFMessage fault) throws WSIFException {
  
  		if (this.traceLevel >= ENTRY)
  			Trc.entry(new Object[] { input, output, fault });
  		if (this.traceLevel == DEBUG)
  			Trc.exit(this.toString());
  		if (!input.getParts().hasNext())
  			input = null;
  		try {
  			fieldFactory.updateInteractionSpec(input, fieldBinding, fieldOperationName, fieldInputName, fieldOutputName, fieldInteractionSpec);
  			if (this.fieldConnection == null){
  				this.fieldConnection = this.fieldFactory.createConnection(input, this.fieldDefinition, this.fieldService, this.fieldPort, this.fieldTypeMap, this.fieldBinding, this.fieldOperationName, this.fieldInputName, this.fieldOutputName);
  				fieldJcaPort.setConnection(fieldConnection);
  			}
  			Interaction interaction = this.fieldConnection.createInteraction();
  			interaction.execute(this.fieldInteractionSpec, (javax.resource.cci.Record) input, (javax.resource.cci.Record) output);
  			interaction.close();
  			if (output instanceof WSIFMessage_JCA) {
  				((WSIFMessage_JCA) output).setInteractionSpec(this.fieldInteractionSpec);
  			}
  			fieldFactory.updateOutputMessage(output, fieldBinding, fieldOperationName, fieldInputName, fieldOutputName, fieldInteractionSpec);
  		}
  		catch (ResourceException exn1) {
  			WSIFException newExn = new WSIFException(WSIFResource_JCA.get("WSIF1000E"));
  			newExn.setTargetException(exn1);
  			if (this.traceLevel == DEBUG) {
  				Trc.exception(exn1);
  				Trc.exit(this.toString());
  			}
  			throw newExn;
  		}
  		catch (Throwable exn3) {
  			WSIFException newExn = new WSIFException(WSIFResource_JCA.get("WSIF1008E", exn3.getLocalizedMessage()));
  			newExn.setTargetException(exn3);
  			if (this.traceLevel == DEBUG) {
  				Trc.exception(newExn);
  				Trc.exit(this.toString());
  			}
  			throw newExn;
  		}
  		if (this.traceLevel >= ENTRY)
  			Trc.exit();
  		return true;
  	}
  
  	/**
  	 * Invokes input only operation.  This method 
  	 * <ul>
  	 * <li>Updates the InteractionSpec using data from the input message.
  	 * <li>If a Connection is not currently available creates one, where a
  	 * ConnectionSpec can be created using data from the input message and then 
  	 * used when creating the Connection.
  	 * <li>Uses the Connection to create a javax.resource.cci.Interaction.
  	 * <li>Invokes the Interaction execute method.
  	 * <li>Closes the interaction.
  	 * </ul>
  	 */
  	public void executeInputOnlyOperation(WSIFMessage input) throws WSIFException {
  
  		if (traceLevel >= ENTRY)
  			Trc.entry(input);
  		if (traceLevel == DEBUG)
  			Trc.entry(this.toString());
  		if (!input.getParts().hasNext())
  			input = null;
  		try {
  			fieldFactory.updateInteractionSpec(input, fieldBinding, fieldOperationName, fieldInputName, fieldOutputName, fieldInteractionSpec);
  			if (fieldConnection == null){
  				fieldConnection = this.fieldFactory.createConnection(input, this.fieldDefinition, this.fieldService, this.fieldPort, this.fieldTypeMap, this.fieldBinding, this.fieldOperationName, this.fieldInputName, this.fieldOutputName);
  				fieldJcaPort.setConnection(fieldConnection);
  			}
  			Interaction interaction = fieldConnection.createInteraction();
  			interaction.execute(fieldInteractionSpec, (javax.resource.cci.Record) input);
  			interaction.close();
  		}
  		catch (ResourceException exn1) {
  			WSIFException newExn = new WSIFException(WSIFResource_JCA.get("WSIF1000E"));
  			if (this.traceLevel == DEBUG) {
  				Trc.exception(exn1);
  				Trc.exit(this.toString());
  			}
  			newExn.setTargetException(exn1);
  			throw newExn;
  		}
  		catch (Throwable exn3) {
  			WSIFException newExn = new WSIFException(WSIFResource_JCA.get("WSIF1008E", exn3.getLocalizedMessage()));
  			newExn.setTargetException(exn3);
  			if (traceLevel == DEBUG) {
  				Trc.exception(newExn);
  				Trc.exit(toString());
  			}
  			throw newExn;
  		}
  		if (traceLevel >= ENTRY)
  			Trc.exit();
  	}
  
  	/**
  	 * This method creates the fault message. It first attempts to use Resource Adapter specific class
  	 * to create the message. If this fails (i.e. the Resource Adapter does not require specialized messages),
  	 * the method creates and returns <code>WSIFMessage_JCAStreamable</code> message. 
  	 */
  	
  	public WSIFMessage createFaultMessage() {
  
  		if (this.traceLevel >= ENTRY)
  			Trc.entry(this);
  		WSIFMessage message = this.fieldFactory.createFaultMessage(this.fieldDefinition, this.fieldBinding, this.fieldOperationName, this.fieldInputName, this.fieldOutputName);
  		if (message != null)
  			return message;
  		return new WSIFMessage_JCAStreamable(this.fieldDefinition, this.fieldBinding, this.fieldOperationName, this.fieldInputName, this.fieldOutputName, WSIFMessage_JCA.FAULT_MESSAGE);
  	}
  
  	/**
  	 * This method creates the fault message with specific name. It first attempts to use Resource Adapter specific class
  	 * to create message. If this fails (i.e. the Resource Adapter does not require specialized messages),
  	 * the method creates and returns <code>WSIFMessage_JCAStreamable</code> message. 
  	 */
  	public WSIFMessage createFaultMessage(String name) {
  
  		if (this.traceLevel >= ENTRY)
  			Trc.entry(name);
  
  		WSIFMessage message = this.fieldFactory.createFaultMessage(this.fieldDefinition, this.fieldBinding, this.fieldOperationName, this.fieldInputName, this.fieldOutputName);
  		if (message != null) {
  			message.setName(name);
  			return message;
  		}
  		message = new WSIFMessage_JCAStreamable(this.fieldDefinition, this.fieldBinding, this.fieldOperationName, this.fieldInputName, this.fieldOutputName, WSIFMessage_JCA.FAULT_MESSAGE);
  		message.setName(name);
  		return message;
  	}
  
  	/**
  	 * This method creates the input message. It first attempts to use Resource Adapter specific class
  	 * to create message. If this fails (i.e. the Resource Adapter does not require specialized messages),
  	 * the method creates and returns <code>WSIFMessage_JCAStreamable</code> message. 
  	 */
  	public WSIFMessage createInputMessage() {
  
  		if (this.traceLevel >= ENTRY)
  			Trc.entry(this);
  		WSIFMessage message = this.fieldFactory.createInputMessage(this.fieldDefinition, this.fieldBinding, this.fieldOperationName, this.fieldInputName, this.fieldOutputName);
  		if (message != null)
  			return message;
  		return new WSIFMessage_JCAStreamable(this.fieldDefinition, this.fieldBinding, this.fieldOperationName, this.fieldInputName, this.fieldOutputName, WSIFMessage_JCA.INPUT_MESSAGE);
  	}
  
  	/**
  	 * This method creates the input message with specific name. It first attempts to use Resource Adapter specific class
  	 * to create message. If this fails (i.e. the Resource Adapter does not require specialized messages),
  	 * the method creates and returns <code>WSIFMessage_JCAStreamable</code> message. 
  	 */
  	public WSIFMessage createInputMessage(String name) {
  
  		if (this.traceLevel >= ENTRY)
  			Trc.entry(name);
  		WSIFMessage message = this.fieldFactory.createInputMessage(this.fieldDefinition, this.fieldBinding, this.fieldOperationName, this.fieldInputName, this.fieldOutputName);
  		if (message != null) {
  			message.setName(name);
  			return message;
  		}
  		message = new WSIFMessage_JCAStreamable(this.fieldDefinition, this.fieldBinding, this.fieldOperationName, this.fieldInputName, this.fieldOutputName, WSIFMessage_JCA.INPUT_MESSAGE);
  		message.setName(name);
  		return message;
  	}
  
  	/**
  	 * This method creates the output message. It first attempts to use Resource Adapter specific class
  	 * to create message. If this fails (i.e. the Resource Adapter does not require specialized messages),
  	 * the method creates and returns <code>WSIFMessage_JCAStreamable</code> message. 
  	 */
  	public WSIFMessage createOutputMessage() {
  
  		if (this.traceLevel >= ENTRY)
  			Trc.entry(this);
  		WSIFMessage message = this.fieldFactory.createOutputMessage(this.fieldDefinition, this.fieldBinding, this.fieldOperationName, this.fieldInputName, this.fieldOutputName);
  		if (message != null)
  			return message;
  		return new WSIFMessage_JCAStreamable(this.fieldDefinition, this.fieldBinding, this.fieldOperationName, this.fieldInputName, this.fieldOutputName, WSIFMessage_JCA.OUTPUT_MESSAGE);
  	}
  
  	/**
  	 * This method creates the output message with specific name. It first attempts to use Resource Adapter specific class
  	 * to create message. If this fails (i.e. the Resource Adapter does not require specialized messages),
  	 * the method creates and returns <code>WSIFMessage_JCAStreamable</code> message. 
  	 */
  	public WSIFMessage createOutputMessage(String name) {
  
  		if (this.traceLevel >= ENTRY)
  			Trc.entry(name);
  		WSIFMessage message = this.fieldFactory.createOutputMessage(this.fieldDefinition, this.fieldBinding, this.fieldOperationName, this.fieldInputName, this.fieldOutputName);
  		if (message != null) {
  			message.setName(name);
  			return message;
  		}
  		message = new WSIFMessage_JCAStreamable(this.fieldDefinition, this.fieldBinding, this.fieldOperationName, this.fieldInputName, this.fieldOutputName, WSIFMessage_JCA.OUTPUT_MESSAGE);
  		message.setName(name);
  		return message;
  	}
  
  	/**
  	 * Returns the interactionSpec.
  	 * @return Returns a InteractionSpec
  	 */
  	public InteractionSpec getInteractionSpec() {
  		return fieldInteractionSpec;
  	}
  
  	/**
  	 * Sets the interactionSpec.
  	 * @param interactionSpec The interactionSpec to set
  	 */
  	public void setInteractionSpec(InteractionSpec interactionSpec) {
  		fieldInteractionSpec = interactionSpec;
  	}
  
  	public String toString() {
  
  		StringBuffer buffer = new StringBuffer();
  		buffer.append(crlf + "[JCAOperation" + crlf);
  		try {
  			if (fieldConnection != null)
  				buffer.append("\tConnection: " + fieldConnection.toString() + crlf);
  			else
  				buffer.append("\tConnection: null" + crlf);
  
  			if (fieldInteractionSpec != null)
  				buffer.append("\tInteractionSpec:       " + fieldInteractionSpec.toString() + crlf);
  			else
  				buffer.append("\tInteractionSpec:       null" + crlf);
  
  			if (fieldBinding != null)
  				buffer.append("\tBinding:    " + fieldBinding.toString() + crlf);
  			else
  				buffer.append("\tBinding:    null" + crlf);
  
  			if (fieldOperation != null)
  				buffer.append("\tOperation:    " + fieldOperation.toString() + crlf);
  			else
  				buffer.append("\tOperation:    null" + crlf);
  
  			if (fieldFactory != null)
  				buffer.append("\tFactory:    " + fieldFactory.toString() + crlf);
  			else
  				buffer.append("\tFactory:    null" + crlf);
  
  			if (fieldOperationName != null)
  				buffer.append("\tOperationName:    " + fieldOperationName + crlf);
  			else
  				buffer.append("\tOperationName:    null" + crlf);
  
  			if (fieldInputName != null)
  				buffer.append("\tInputName:    " + fieldInputName + crlf);
  			else
  				buffer.append("\tInputName:    null" + crlf);
  
  			if (fieldOutputName != null)
  				buffer.append("\tOutputName:    " + fieldOutputName + crlf);
  			else
  				buffer.append("\tOutputName:    null" + crlf);
  
  			buffer.append("]" + crlf);
  		}
  		catch (Throwable exn) {
  		}
  		return buffer.toString();
  	}
  
  	/**
  	 * Method not supported.
  	 */
  	public WSIFCorrelationId executeRequestResponseAsync(WSIFMessage input, WSIFResponseHandler handler) throws WSIFException {
  		return null;
  	}
  
  	/**
  	 * Method not supported.
  	 */
  	public WSIFCorrelationId executeRequestResponseAsync(WSIFMessage input) throws WSIFException {
  		return null;
  	}
  
  	/**
  	 * Method not supported.
  	 */
  	public void fireAsyncResponse(Object response) throws WSIFException {
  		
  	}
  	/**
  	 * Method not supported.
  	 */
  	public boolean processAsyncResponse(Object response, WSIFMessage output, WSIFMessage fault) throws WSIFException {
  		return false;
  	}
  
  	/**
  	 * Method not supported.
  	 */
  	public void setContext(WSIFMessage context) {
  
  	}
  
  	/**
  	 * Method not supported.
  	 */
  	public WSIFMessage getContext() {
  
  		return null;
  	}
  
  }
  
  
  1.1                  xml-axis-wsif/proposals/jca/java/src/org/apache/wsif/providers/jca/WSIFPort_JCA.java
  
  Index: WSIFPort_JCA.java
  ===================================================================
  /*
   * The Apache Software License, Version 1.1
   *
   *
   * Copyright (c) 2002 The Apache Software Foundation.  All rights 
   * reserved.
   *
   * Redistribution and use in source and binary forms, with or without
   * modification, are permitted provided that the following conditions
   * are met:
   *
   * 1. Redistributions of source code must retain the above copyright
   *    notice, this list of conditions and the following disclaimer. 
   *
   * 2. Redistributions in binary form must reproduce the above copyright
   *    notice, this list of conditions and the following disclaimer in
   *    the documentation and/or other materials provided with the
   *    distribution.
   *
   * 3. The end-user documentation included with the redistribution,
   *    if any, must include the following acknowledgment:  
   *       "This product includes software developed by the
   *        Apache Software Foundation (http://www.apache.org/)."
   *    Alternately, this acknowledgment may appear in the software itself,
   *    if and wherever such third-party acknowledgments normally appear.
   *
   * 4. The names "WSIF" and "Apache Software Foundation" must
   *    not be used to endorse or promote products derived from this
   *    software without prior written permission. For written 
   *    permission, please contact apache@apache.org.
   *
   * 5. Products derived from this software may not be called "Apache",
   *    nor may "Apache" appear in their name, without prior written
   *    permission of the Apache Software Foundation.
   *
   * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
   * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
   * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
   * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
   * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
   * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
   * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
   * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
   * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
   * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
   * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
   * SUCH DAMAGE.
   * ====================================================================
   *
   * This software consists of voluntary contributions made by many
   * individuals on behalf of the Apache Software Foundation and was
   * originally based on software copyright (c) 2001, 2002, International
   * Business Machines, Inc., http://www.apache.org.  For more
   * information on the Apache Software Foundation, please see
   * <http://www.apache.org/>.
   */
  
  
  package org.apache.wsif.providers.jca;
  
  import org.apache.wsif.logging.*;
  import org.apache.wsif.providers.*;
  import org.apache.wsif.*;
  import org.apache.wsif.base.*;
  import org.apache.wsif.util.*;
  
  import javax.resource.*;
  import javax.resource.cci.*;
  import javax.wsdl.extensions.*;
  import javax.wsdl.*;
  
  import java.net.URL;
  import java.util.*;
  
  /**
   * The WSIFPort_JCA class is a connector architecture specific implementation of WSIFPort.
   * This port has a handle to resource adapter connection, and is used to create WSIFOperation.
   * 
   * @author Michael Beisiegel
   * @author Piotr Przybylski <pi...@ca.ibm.com>
   */
  public class WSIFPort_JCA extends WSIFDefaultPort {
  
  	private Connection fieldConnection;
  	private Port fieldPort;
  	private Definition fieldDefinition;
  	private Service fieldService;
  	private WSIFProviderJCAExtensions fieldFactory;
  	private final static String crlf = System.getProperty("line.separator");
  	protected Map operationInstances = new HashMap();
  	private int traceLevel = 0;
  	private final static int ENTRY = 2;
  	private final static int DEBUG = 3;
  	private org.apache.wsif.providers.WSIFDynamicTypeMap fieldTypeMap;
  	
  	
  	/**
  	 * Constructor for WSIFPort_JCA.
  	 * @param aDefinition
  	 * @param aService
  	 * @param aPort
  	 * @param aConnection
  	 * @param aFactory
  	 * @param typeMap
  	 */
  	public WSIFPort_JCA(Definition aDefinition, Service aService, Port aPort, Connection aConnection, WSIFProviderJCAExtensions aFactory, org.apache.wsif.providers.WSIFDynamicTypeMap typeMap) {
  
  		super();
  		this.fieldDefinition = aDefinition;
  		this.fieldService = aService;
  		this.fieldPort = aPort;
  		this.fieldConnection = aConnection;
  		this.fieldFactory = aFactory;
  		if(Trc.isTraceEnabled()){
  			if(MessageLogger.isInfoEnabled())
  				this.traceLevel = DEBUG;
  			else
  				this.traceLevel = ENTRY;
  		}
  		this.fieldTypeMap = typeMap;		
  	}
  
  	private void addOperation(String name, String inputName, String outputName, WSIFOperation value) {
  		operationInstances.put(getKey(name, inputName, outputName), value);
  	}
  
  	/**
  	 * This method creates WSIFOperation_JCA using the configured, Resource Adapter specific
  	 * factory (i.e. the implementor of <code>WSIFProviderJCAExtensions</code>).
  	 * @see org.apache.wsif.WSIFPort#createOperation(String, String, String)
  	 */
  	public WSIFOperation createOperation(String aOperationName, String aInputName, String aOutputName) throws WSIFException {
  
  		if (traceLevel >= ENTRY)
  			Trc.entry(new Object[] { aOperationName, aInputName, aOutputName });
  		if (traceLevel == DEBUG)
  			Trc.entry(toString());
  
  		WSIFOperation wsifOperation = getOperation(aOperationName, aInputName, aOutputName);
  		if (wsifOperation == null) {
  			wsifOperation = fieldFactory.createOperation(fieldDefinition, fieldService, fieldPort, aOperationName, 
  														 aInputName, aOutputName, fieldTypeMap, this, fieldConnection);
  			addOperation(aOperationName, aInputName, aOutputName, wsifOperation);
  		}
  		if (traceLevel >= ENTRY)
  			Trc.exit(wsifOperation);
  		return wsifOperation;
  	}
  
  	/**
  	 * Creates a WSIFOperation_JCA using the configured, Resource Adapter specific
  	 * factory (i.e. the implementor of <code>WSIFProviderJCAExtensions</code>).
  	 * @see org.apache.wsif.WSIFPort#createOperation(String)
  	 */
  	public WSIFOperation createOperation(String aOperationName) throws WSIFException {
  
  		if (traceLevel >= ENTRY)
  			Trc.entry(aOperationName);
  		if (traceLevel == DEBUG)
  			Trc.entry(toString());
  
  		WSIFOperation wsifOperation = getOperation(aOperationName, null, null);
  		if (wsifOperation == null) {
  			wsifOperation = fieldFactory.createOperation(fieldDefinition, fieldService, fieldPort, aOperationName, 
  														 null, null, fieldTypeMap, this, fieldConnection);
  
  			addOperation(aOperationName, null, null, wsifOperation);
  		}
  		if (traceLevel >= ENTRY)
  			Trc.exit(wsifOperation);
  		return wsifOperation;
  	}
  
  	/**
  	 * Closes the javax.resource.cci.Connection associated with this port. 
  	 * 
  	 * @see org.apache.wsif.WSIFPort#close()
  	 */
  	public void close() {
  		try {
  			if(this.fieldConnection != null)
  				this.fieldConnection.close();
  		}
  		catch (ResourceException exn) {
  		}
  	}
  
  	private WSIFOperation_JCA getOperation(String name, String inputName, String outputName) {
  
  		return (WSIFOperation_JCA) operationInstances.get(getKey(name, inputName, outputName));
  
  	}
  
  	public String toString() {
  
  		StringBuffer buffer = new StringBuffer();
  		buffer.append(crlf + "[WSIFPort_JCA" + crlf);
  		try {
  			if (fieldConnection != null)
  				buffer.append("\tConnection: " + fieldConnection.toString() + crlf);
  			else
  				buffer.append("\tConnection: null" + crlf);
  
  			if (fieldPort != null)
  				buffer.append("\tPort:       " + fieldPort.toString() + crlf);
  			else
  				buffer.append("\tPort:       null" + crlf);
  
  			if (fieldDefinition != null)
  				buffer.append("\tDefinition: " + fieldDefinition.toString() + crlf);
  			else
  				buffer.append("\tDefinition  null" + crlf);
  
  			if (fieldService != null)
  				buffer.append("\tService:    " + fieldService.toString() + crlf);
  			else
  				buffer.append("\tService:    null" + crlf);
  
  			if (fieldFactory != null)
  				buffer.append("\tFactory:    " + fieldFactory.toString() + crlf);
  			else
  				buffer.append("\tFactory:    null" + crlf);
  			buffer.append("]" + crlf);
  		}
  		catch (Throwable exn) {
  		}
  		return buffer.toString();
  	}
  	/**
  	 * Sets the javax.resource.cci.Connection associated with this port.
  	 * @param connection The connection to set
  	 */
  	void setConnection(Connection connection) {
  		fieldConnection = connection;
  	}
  
  }
  
  
  1.1                  xml-axis-wsif/proposals/jca/java/src/org/apache/wsif/providers/jca/WSIFProviderJCAExtensions.java
  
  Index: WSIFProviderJCAExtensions.java
  ===================================================================
  /*
   * The Apache Software License, Version 1.1
   *
   *
   * Copyright (c) 2002 The Apache Software Foundation.  All rights 
   * reserved.
   *
   * Redistribution and use in source and binary forms, with or without
   * modification, are permitted provided that the following conditions
   * are met:
   *
   * 1. Redistributions of source code must retain the above copyright
   *    notice, this list of conditions and the following disclaimer. 
   *
   * 2. Redistributions in binary form must reproduce the above copyright
   *    notice, this list of conditions and the following disclaimer in
   *    the documentation and/or other materials provided with the
   *    distribution.
   *
   * 3. The end-user documentation included with the redistribution,
   *    if any, must include the following acknowledgment:  
   *       "This product includes software developed by the
   *        Apache Software Foundation (http://www.apache.org/)."
   *    Alternately, this acknowledgment may appear in the software itself,
   *    if and wherever such third-party acknowledgments normally appear.
   *
   * 4. The names "WSIF" and "Apache Software Foundation" must
   *    not be used to endorse or promote products derived from this
   *    software without prior written permission. For written 
   *    permission, please contact apache@apache.org.
   *
   * 5. Products derived from this software may not be called "Apache",
   *    nor may "Apache" appear in their name, without prior written
   *    permission of the Apache Software Foundation.
   *
   * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
   * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
   * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
   * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
   * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
   * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
   * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
   * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
   * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
   * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
   * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
   * SUCH DAMAGE.
   * ====================================================================
   *
   * This software consists of voluntary contributions made by many
   * individuals on behalf of the Apache Software Foundation and was
   * originally based on software copyright (c) 2001, 2002, International
   * Business Machines, Inc., http://www.apache.org.  For more
   * information on the Apache Software Foundation, please see
   * <http://www.apache.org/>.
   */
  
  
  package org.apache.wsif.providers.jca;
  
  import javax.wsdl.*;
  import javax.resource.cci.*;
  import org.apache.wsif.*;
  import org.apache.wsif.providers.WSIFDynamicTypeMap;
  
  /**
   * This interface contains methods implemented by each Resource Adapter and used by the Connector 
   * Architecture provider to delegate Connector specific operations, for example creation of the
   * WSIFOperation to the Resource Adapter.
   * 
   * @author Michael Beisiegel
   * @author Piotr Przybylski <pi...@ca.ibm.com>
   * @author John Green
   */
  public interface WSIFProviderJCAExtensions {
  	
  
  	/**
  	 * The provider for a resource adapter creates a WSIFOperation based on the specified WSDL
  	 * operation.  The binding operation extensibility element allows the resource adapter to
  	 * populate its InteractionSpec to be used in the operation.
  	 * 
  	 * @param definition
  	 * @param aService
  	 * @param aPort
  	 * @param operationName
  	 * @param inputName
  	 * @param outputName
  	 * @param typeMap
  	 * @param jcaPort
  	 * @param connection
  	 * @return WSIFOperation
  	 * @throws WSIFException
  	 */
  	public WSIFOperation createOperation(Definition definition, Service aService, Port aPort, String operationName, String inputName, String outputName, WSIFDynamicTypeMap typeMap, WSIFPort_JCA jcaPort, Connection connection) throws WSIFException;
  	/**
  	 * This method creates input message. It only needs to be implemented by Resource Adapter which
  	 * uses custom format of the input and output records (i.e. does not use javax.resource.cci.Streamable
  	 * interface).
  	 * 
  	 * @param definition
  	 * @param binding
  	 * @param operationName
  	 * @param inputName
  	 * @param outputName
  	 * @return WSIFMessage
  	 */
  	public WSIFMessage createInputMessage(Definition definition, Binding binding, String operationName, String inputName, String outputName);
  	/**
  	 * This method creates output message. It only needs to be implemented by Resource Adapter which
  	 * uses custom format of the input and output records (i.e. does not use javax.resource.cci.Streamable
  	 * interface).
  	 * 
  	 * @param definition
  	 * @param binding
  	 * @param operationName
  	 * @param inputName
  	 * @param outputName
  	 * @return WSIFMessage
  	 */
  	public WSIFMessage createOutputMessage(Definition definition, Binding binding, String operationName, String inputName, String outputName);
  	/**
  	 * This method creates a FaultMessage.
  	 * 
  	 * @param definition
  	 * @param binding
  	 * @param operationName
  	 * @param inputName
  	 * @param outputName
  	 * @return WSIFMessage
  	 */
  	public WSIFMessage createFaultMessage(Definition definition, Binding binding, String operationName, String inputName, String outputName);
  	/**
  	 * Updates the interactionSpec from input message values. The method is called from
  	 * within the operation execute method, before invocation of Interaction.execute() method
  	 * of the resource adapter.
  	 * 
  	 * @param input
  	 * @param aBinding
  	 * @param aOperationName
  	 * @param aInputName
  	 * @param aOutputName
  	 * @param aInteractionSpec
  	 * @throws WSIFException
  	 */
  	public void updateInteractionSpec(WSIFMessage input, Binding aBinding, String aOperationName, String aInputName, String aOutputName, InteractionSpec aInteractionSpec) throws WSIFException;
  	/**
  	 * Updates the output message using output InteractionSpec values.  This method is called
  	 * from within the WSIFOperation execute method, after processing the Interaction.execute() method
  	 * of the resource adapter..	 
  	 * 
  	 * @param output Output message to populate
  	 * @param aBinding Bonding
  	 * @param aOperationName Operation name
  	 * @param aInputName Inpput name
  	 * @param aOutputName Output name
  	 * @param aInteractionSpec InteractionSpec after the execute() method invocation 
  	 * @throws WSIFException
  	 */
  	public void updateOutputMessage(WSIFMessage output, Binding aBinding, String aOperationName, String aInputName, String aOutputName, InteractionSpec aInteractionSpec) throws WSIFException;
  	/**
  	 * Creates a javax.resource.cci.Connection.  This should be used when a resource adapter supports
  	 * passing ConnectionSpec values as part of the input message.  WSIFOperation_JCA will only call
  	 * this method during the execute method if the WSIFPort_JCA does not contain a connection.
  	 * 
  	 * @param input
  	 * @param definition
  	 * @param service
  	 * @param port
  	 * @param typeMap
  	 * @param aBinding
  	 * @param aOperationName
  	 * @param aInputName
  	 * @param aOutputName
  	 * @return Connection
  	 * @throws WSIFException
  	 */
  	public Connection createConnection(WSIFMessage input, Definition definition, Service service, Port port, org.apache.wsif.providers.WSIFDynamicTypeMap typeMap, Binding aBinding, String aOperationName, String aInputName, String aOutputName) throws WSIFException;
  }
  
  
  
  1.1                  xml-axis-wsif/proposals/jca/java/src/org/apache/wsif/providers/jca/WSIFResource_JCA.java
  
  Index: WSIFResource_JCA.java
  ===================================================================
  /*
   * The Apache Software License, Version 1.1
   *
   *
   * Copyright (c) 2002 The Apache Software Foundation.  All rights 
   * reserved.
   *
   * Redistribution and use in source and binary forms, with or without
   * modification, are permitted provided that the following conditions
   * are met:
   *
   * 1. Redistributions of source code must retain the above copyright
   *    notice, this list of conditions and the following disclaimer. 
   *
   * 2. Redistributions in binary form must reproduce the above copyright
   *    notice, this list of conditions and the following disclaimer in
   *    the documentation and/or other materials provided with the
   *    distribution.
   *
   * 3. The end-user documentation included with the redistribution,
   *    if any, must include the following acknowledgment:  
   *       "This product includes software developed by the
   *        Apache Software Foundation (http://www.apache.org/)."
   *    Alternately, this acknowledgment may appear in the software itself,
   *    if and wherever such third-party acknowledgments normally appear.
   *
   * 4. The names "WSIF" and "Apache Software Foundation" must
   *    not be used to endorse or promote products derived from this
   *    software without prior written permission. For written 
   *    permission, please contact apache@apache.org.
   *
   * 5. Products derived from this software may not be called "Apache",
   *    nor may "Apache" appear in their name, without prior written
   *    permission of the Apache Software Foundation.
   *
   * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
   * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
   * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
   * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
   * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
   * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
   * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
   * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
   * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
   * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
   * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
   * SUCH DAMAGE.
   * ====================================================================
   *
   * This software consists of voluntary contributions made by many
   * individuals on behalf of the Apache Software Foundation and was
   * originally based on software copyright (c) 2001, 2002, International
   * Business Machines, Inc., http://www.apache.org.  For more
   * information on the Apache Software Foundation, please see
   * <http://www.apache.org/>.
   */
  
  
  package org.apache.wsif.providers.jca;
  
  import java.text.MessageFormat;
  import java.util.HashMap;
  import java.util.Locale;
  import java.util.MissingResourceException;
  import java.util.ResourceBundle;
  
  /**
   * The WSIFResource_JCA class accesses message resources.
   * 
   * @author John Green
   * @author Michael Beisiegel
   * @author Piotr Przybylski <pi...@ca.ibm.com>
   */
  public class WSIFResource_JCA {
  
  	private static ResourceBundle messages = ResourceBundle.getBundle("org.apache.wsif.providers.jca.WSIFResource_JCA", Locale.getDefault());
  	private static HashMap defaultMessages = new HashMap();
  
  	// Initialize default messages, used if the NL resources are not available.
  	static {
  		defaultMessages.put("WSIF1000E", "WSIF1000E: ResourceException thrown during execution of the interaction, check target exception for details.");
  		defaultMessages.put("WSIF1001E", "WSIF1001E: Could not instantiate Format Handler.");
  		defaultMessages.put("WSIF1002E", "WSIF1002E: Exception thrown during instantiation of the format handler.");
  		defaultMessages.put("WSIF1003E", "WSIF1003E: Exception thrown during execute method of the Interaction, check target exception for details.");
  		defaultMessages.put("WSIF1004E", "WSIF1004E: Exception thrown in WSIFMessage_JCAStreamable read method.");
  		defaultMessages.put("WSIF1005E", "WSIF1005E: Exception thrown in WSIFMessage_JCAStreamable write method.");
  		defaultMessages.put("WSIF1006E", "WSIF1006E: Exception thrown in the initialization of the Service SessionBean.");
  		defaultMessages.put("WSIF1007E", "WSIF1007E: Exception thrown in getObjectPart() method.");
  		defaultMessages.put("WSIF1008E", "WSIF1008E: Exception thrown during execution of the interaction, check target exception for details.");
  		defaultMessages.put("WSIF1009E", "UNKNOWN MESSAGE");
  	}
  
  	private WSIFResource_JCA() {
  		super();
  	}
  
  	/**
  	 * Returns a message, where no substitution variables are used.
  	 */
  	public static String get(String key) {
  		try {
  			if (key != null && messages != null)
  				return messages.getString(key);
  		}
  		catch (MissingResourceException exn) {
  			return ((String) WSIFResource_JCA.defaultMessages.get(key));
  		}
  		return null;
  	}
  
  	/**
  	 * Returns a message, where one substitution variable is used.
  	 */
  	public static String get(String key, Object arg) {
  		return get(key, new Object[] { arg });
  	}
  
  	/**
  	 * Returns a message, where two substitution variable is used.
  	 */
  	public static String get(String key, Object arg1, Object arg2) {
  		return get(key, new Object[] { arg1, arg2 });
  	}
  
  	/**
  	 * Returns a message, where three substitution variable is used.
  	 */
  	public static String get(String key, Object arg1, Object arg2, Object arg3) {
  		return get(key, new Object[] { arg1, arg2, arg3 });
  	}
  
  	/**
  	 * Returns a message, where four substitution variable is used.
  	 */
  	public static String get(String key, Object arg1, Object arg2, Object arg3, Object arg4) {
  		return get(key, new Object[] { arg1, arg2, arg3, arg4 });
  	}
  	
  	/**
  	 * Returns a message, where five substitution variable is used.
  	 */
  	public static String get(String key, Object arg1, Object arg2, Object arg3, Object arg4, Object arg5) {
  		return get(key, new Object[] { arg1, arg2, arg3, arg4, arg5 });
  	}
  	
  	/**
  	 * Returns a message, where an array of substitution variables is used.
  	 */
  	public static String get(String key, Object[] args) {
  		String text = get(key);
  		if (text == null) {
  			text = (String) WSIFResource_JCA.defaultMessages.get(key);
  		}
  		if (text == null) {
  			return null;
  		}
  		return MessageFormat.format(text, args);
  	}
  
  }
  
  
  1.1                  xml-axis-wsif/proposals/jca/java/src/org/apache/wsif/providers/jca/WSIFResource_JCA.properties
  
  Index: WSIFResource_JCA.properties
  ===================================================================
  WSIF1000E=WSIF1000E: ResourceException thrown during execute method of the Interaction, check target exception for details.
  WSIF1001E=WSIF1001E: Could not instantiate ''{0}'' format handler.
  WSIF1002E=WSIF1002E: Exception ''{0}'' thrown during instantiation of the ''{1}'' format handler.
  WSIF1003E=WSIF1003E: Exception thrown during execute method of the Interaction, check target exception for details.
  WSIF1004E=WSIF1004E: Exception ''{0}'' thrown in WSIFMessage_JCAStreamable read method.
  WSIF1005E=WSIF1005E: Exception ''{0}'' thrown in WSIFMessage_JCAStreamable write method.
  WSIF1006E=WSIF1006E: Exception ''{0}'' thrown in the initialization of the Service SessionBean.
  WSIF1007E=WSIF1007E: Exception ''{0}'' thrown in getObjectPart() method.
  WSIF1008E=WSIF1008E: Exception ''{0}'' thrown during execution of the interaction, check target exception for details.
  
  
  
  1.1                  xml-axis-wsif/proposals/jca/java/src/org/apache/wsif/providers/jca/WSIFUtils_JCA.java
  
  Index: WSIFUtils_JCA.java
  ===================================================================
  /*
   * The Apache Software License, Version 1.1
   *
   *
   * Copyright (c) 2002 The Apache Software Foundation.  All rights 
   * reserved.
   *
   * Redistribution and use in source and binary forms, with or without
   * modification, are permitted provided that the following conditions
   * are met:
   *
   * 1. Redistributions of source code must retain the above copyright
   *    notice, this list of conditions and the following disclaimer. 
   *
   * 2. Redistributions in binary form must reproduce the above copyright
   *    notice, this list of conditions and the following disclaimer in
   *    the documentation and/or other materials provided with the
   *    distribution.
   *
   * 3. The end-user documentation included with the redistribution,
   *    if any, must include the following acknowledgment:  
   *       "This product includes software developed by the
   *        Apache Software Foundation (http://www.apache.org/)."
   *    Alternately, this acknowledgment may appear in the software itself,
   *    if and wherever such third-party acknowledgments normally appear.
   *
   * 4. The names "WSIF" and "Apache Software Foundation" must
   *    not be used to endorse or promote products derived from this
   *    software without prior written permission. For written 
   *    permission, please contact apache@apache.org.
   *
   * 5. Products derived from this software may not be called "Apache",
   *    nor may "Apache" appear in their name, without prior written
   *    permission of the Apache Software Foundation.
   *
   * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
   * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
   * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
   * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
   * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
   * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
   * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
   * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
   * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
   * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
   * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
   * SUCH DAMAGE.
   * ====================================================================
   *
   * This software consists of voluntary contributions made by many
   * individuals on behalf of the Apache Software Foundation and was
   * originally based on software copyright (c) 2001, 2002, International
   * Business Machines, Inc., http://www.apache.org.  For more
   * information on the Apache Software Foundation, please see
   * <http://www.apache.org/>.
   */
  
  
  package org.apache.wsif.providers.jca;
  
  import java.net.MalformedURLException;
  import java.net.URL;
  import java.util.ArrayList;
  import java.util.Iterator;
  import java.util.List;
  import java.util.StringTokenizer;
  
  import javax.naming.*;
  import javax.resource.cci.ConnectionFactory;
  import javax.wsdl.*;
  import javax.wsdl.Binding;
  import javax.wsdl.extensions.ExtensibilityElement;
  
  import org.apache.wsif.util.WSIFUtils;
  import org.apache.wsif.wsdl.extensions.format.TypeMapping;
  import org.apache.wsif.format.WSIFFormatHandler;
  
  
  /**
   * A utility class with methods simplifying the JNDI lookup of a ConnectionFactory.
   * 
   * @author Piotr Przybylski <pi...@ca.ibm.com>
   */
  
  
  public class WSIFUtils_JCA extends WSIFUtils{
  
  	private static final String DOT = ".";
  	private static final String lookupPrefix = "java:comp/env/";
  	private static final String emptyString = "";
  
  	/**
  	 * Returns the default lookup name created from the Service namespace,
  	 * Service name and Port name. The default lookup name is used if there is no explicit lookup
  	 * name value specified in the Resource Adapter address extensibility element. 
  	 * 
  	 * @param service
  	 * @param port
  	 * @return String
  	 */
  	public static String getJNDILookupName(Service service, Port port) {
  		
  		String jndiName = getPackageNameFromNamespaceURI(service.getQName().getNamespaceURI());
  		if(!jndiName.endsWith(DOT))
  			jndiName = jndiName + DOT;
  		jndiName = jndiName.replace('.', '/');
  		jndiName = jndiName + WSIFUtils_JCA.getJavaNameFromXMLName(service.getQName().getLocalPart());
  		jndiName = jndiName + WSIFUtils_JCA.getJavaNameFromXMLName(port.getName());
  		return jndiName;
  		
  	}
  
  
  
  	/**
  	 * Returns a Connection Factory from the JNDI context. The order of search 
  	 * is to use the component's local naming context (java:comp/env/) first, then the global naming context.
  	 * If the lookup fails or the lookup result does not match <code>res_type</code>, null is returned.
  	 * 
  	 * @param res_ref_name
  	 * @param res_type
  	 * @return ConnectionFactory
  	 */
  	public static ConnectionFactory lookupConnectionFactory(String res_ref_name, String res_type){
  		
  		ConnectionFactory connectionFactory = null;
  		Context ctx = null;
  		try {
  			// Create the initial context
  			ctx = new InitialContext();
  			if (ctx == null) {
  				return null;
  			}
  			connectionFactory = (ConnectionFactory) ctx.lookup(lookupPrefix + res_ref_name);
  
  			if (connectionFactory == null) {
  				throw new NamingException();
  			}
  
  			// Verify that the retrieved factory is of type "res_type"
  			try {
  				if (!(Class.forName(res_type, false, Thread.currentThread().getContextClassLoader()).isInstance(connectionFactory))) {
  					return null;
  				}
  			}
  			catch (ClassNotFoundException exn5) {
  				return null;
  			}
  
  			ctx.close();
  		}
  		catch (NamingException exn2) {
  			try {
  				if (ctx == null) {
  					return null;
  				}
  				// Try lookup without lookup prefix (java:comp/env/)
  				connectionFactory = (ConnectionFactory) ctx.lookup(res_ref_name);
  
  				if (connectionFactory == null) {
  					return null;
  				}
  				// Verify that the retrieved factory is of type "res_type"
  				try {
  					if (!(Class.forName(res_type, false, Thread.currentThread().getContextClassLoader()).isInstance(connectionFactory))) {
  						return null;
  					}
  				}
  				catch (ClassNotFoundException exn5) {
  					return null;
  				}
  				ctx.close();
  			}
  			catch (NamingException exn3) {
  				return null;
  			}
  		}
  		return connectionFactory;	
  	}
  
  }
  
  
  
  1.1                  xml-axis-wsif/proposals/jca/java/src/org/apache/wsif/providers/jca/toolplugin/FormatHandlerGenerator.java
  
  Index: FormatHandlerGenerator.java
  ===================================================================
  /*
   * The Apache Software License, Version 1.1
   *
   *
   * Copyright (c) 2002 The Apache Software Foundation.  All rights 
   * reserved.
   *
   * Redistribution and use in source and binary forms, with or without
   * modification, are permitted provided that the following conditions
   * are met:
   *
   * 1. Redistributions of source code must retain the above copyright
   *    notice, this list of conditions and the following disclaimer. 
   *
   * 2. Redistributions in binary form must reproduce the above copyright
   *    notice, this list of conditions and the following disclaimer in
   *    the documentation and/or other materials provided with the
   *    distribution.
   *
   * 3. The end-user documentation included with the redistribution,
   *    if any, must include the following acknowledgment:  
   *       "This product includes software developed by the
   *        Apache Software Foundation (http://www.apache.org/)."
   *    Alternately, this acknowledgment may appear in the software itself,
   *    if and wherever such third-party acknowledgments normally appear.
   *
   * 4. The names "WSIF" and "Apache Software Foundation" must
   *    not be used to endorse or promote products derived from this
   *    software without prior written permission. For written 
   *    permission, please contact apache@apache.org.
   *
   * 5. Products derived from this software may not be called "Apache",
   *    nor may "Apache" appear in their name, without prior written
   *    permission of the Apache Software Foundation.
   *
   * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
   * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
   * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
   * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
   * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
   * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
   * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
   * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
   * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
   * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
   * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
   * SUCH DAMAGE.
   * ====================================================================
   *
   * This software consists of voluntary contributions made by many
   * individuals on behalf of the Apache Software Foundation and was
   * originally based on software copyright (c) 2001, 2002, International
   * Business Machines, Inc., http://www.apache.org.  For more
   * information on the Apache Software Foundation, please see
   * <http://www.apache.org/>.
   */
  
  package org.apache.wsif.providers.jca.toolplugin;
  
  /**
   * This interface allows Resource Adapter to provide a code generation contribution to the tool
   * environment. The tooling delegates to the implementation of this interface the generation
   * of all format handlers for the particular encoding and style. 
   * 
   * @author Hesham Fahmy <hf...@ca.ibm.com>
   * @author Piotr Przybylski <pi...@ca.ibm.com>
   * @author Harlod Gartner
   */
  
  public interface FormatHandlerGenerator
  {
  	public final static int XSD_TYPE =0;
  	public final static int XSD_ELEMENT =1;
  
    /**
  	* Generates a Custom Format Handler for a particular XSD Type or Element.
  	* @param <code>generationPackage</code> The fully qualified package that the generator should use to generate its classes in.
  	* @param <code>beanClass</code> The fully qualified name of the Java bean class that represents the XSD type (or element) for which a format handler is being generated.
  	* @param <code>aDefinition</code> The WSDL definition from which the XSD type is derived.
  	* @param <code>aBinding</code> The WSDL binding element that contains the type mapping for the XSD type that is being used.
  	* @param <code>anEncoding</code> The <i>encoding</i> attribute off the TypeMapping element associated with the format handler to be generated.
  	* @param <code>aStyle</code> The <i>style</i> attribute off the TypeMapping element associated with the format handler to be generated.
  	* @param <code>xsdQname</code> The QName of the XSD element(or type) for which the format handler is being generated.
  	* @param <code>elementType</code> The type of element represented by the <code>xsdQname</code> parameter. This is either <code>CustomFormatHandlerGenerator.XSD_TYPE</code>
  	* @param <code>generationContext</code> The generation context
  	* or <code>CustomFormatHandlerGenerator.XSD_ELEMENT</code>.
   	* @param <code>generationContext</code> The generation context or <code>null</code> is no context is required.
  	* @return a <code>HashTable</code> that contains a set of  <code>java.io.InputStream</code> s. Each input stream contains the generated code for a particular
  	* class generated by the format handler generator. The number of input streams returned depends on the number of classes that are generated by the format handler
  	* generator.  The keys of the HashTable must be the name of each class (unqualified) that is represented by its corresponding InputStream value. The class name keys
  	* are unqualified because they must all be in the <code>generationPackage</code> that is passed in as an input parameter.
  	*/
  
  	public java.util.Hashtable generate (String generationPackage, String beanClass, javax.wsdl.Definition aDefinition,javax.wsdl.Binding aBinding, String anEncoding,
  														String aStyle, javax.xml.namespace.QName xsdQname, int elementType, Object generationContext);
  
  	/**
  	 * Creates a new context for format handler generation.
  	 * The context is an optional object that can be used by a FormatHandlerGenerator to assist in code generation, or in keeping track of 
  	 * artifacts generated. The details, and implementation, of the object are specific to each FormatHandlerGenerator.
  	 * Tooling environments must call this method first, before invoking the FormatHandlerGenerator to generate code. The context that is returned must be used
  	 * by the tooling environment for all subsequent calls to the FormatHandlerGenerator.
  	 * @return A new generation context.
  	 */
  
  	public Object createGenerationContext();
  }
  
  
  
  
  1.1                  xml-axis-wsif/proposals/jca/java/src/org/apache/wsif/providers/jca/toolplugin/Import.java
  
  Index: Import.java
  ===================================================================
  /*
   * The Apache Software License, Version 1.1
   *
   *
   * Copyright (c) 2002 The Apache Software Foundation.  All rights 
   * reserved.
   *
   * Redistribution and use in source and binary forms, with or without
   * modification, are permitted provided that the following conditions
   * are met:
   *
   * 1. Redistributions of source code must retain the above copyright
   *    notice, this list of conditions and the following disclaimer. 
   *
   * 2. Redistributions in binary form must reproduce the above copyright
   *    notice, this list of conditions and the following disclaimer in
   *    the documentation and/or other materials provided with the
   *    distribution.
   *
   * 3. The end-user documentation included with the redistribution,
   *    if any, must include the following acknowledgment:  
   *       "This product includes software developed by the
   *        Apache Software Foundation (http://www.apache.org/)."
   *    Alternately, this acknowledgment may appear in the software itself,
   *    if and wherever such third-party acknowledgments normally appear.
   *
   * 4. The names "WSIF" and "Apache Software Foundation" must
   *    not be used to endorse or promote products derived from this
   *    software without prior written permission. For written 
   *    permission, please contact apache@apache.org.
   *
   * 5. Products derived from this software may not be called "Apache",
   *    nor may "Apache" appear in their name, without prior written
   *    permission of the Apache Software Foundation.
   *
   * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
   * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
   * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
   * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
   * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
   * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
   * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
   * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
   * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
   * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
   * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
   * SUCH DAMAGE.
   * ====================================================================
   *
   * This software consists of voluntary contributions made by many
   * individuals on behalf of the Apache Software Foundation and was
   * originally based on software copyright (c) 2001, 2002, International
   * Business Machines, Inc., http://www.apache.org.  For more
   * information on the Apache Software Foundation, please see
   * <http://www.apache.org/>.
   */
  package org.apache.wsif.providers.jca.toolplugin;
  
  import java.util.Arrays;
  import java.util.Iterator;
  import java.util.Map;
  
  import javax.wsdl.Definition;
  import javax.wsdl.Operation;
  import javax.wsdl.PortType;
  import javax.wsdl.Service;
  import javax.xml.namespace.QName;
  
  import org.apache.wsif.WSIFException;
  import org.apache.wsif.WSIFMessage;
  import org.apache.wsif.WSIFOperation;
  import org.apache.wsif.WSIFPort;
  import org.apache.wsif.WSIFService;
  import org.apache.wsif.WSIFServiceFactory;
  
  /**
   * This class is a default implementation proxy for the Operations of the Import Service. Tooling environments can extend this class and customize
   * its behaviour. It is provided as a default implementation of how to invoke the various operations that are defined in the Import Service archictecture.
   * 
   *  @author Hesham Fahmy <hf...@ca.ibm.com>
   */
  public abstract class Import {
  
  	/*The WSDL Definition that is providing the implementation of the Import Service*/
  	private Definition serviceDefintion = null;
  	/*The WSDL Service that is providing the implementation of the Import Service*/
  	private Service importService = null;
  	/*The WSDL PortType that is providing the implementation of the Import Service*/
  	private PortType importPortType = null;
  
  
  	/*Constants that represent standard values of any Import Service implementation*/
  	public static final String IMPORT_SERVICE_BASE_NAMESPACE = "http://importservice.jca.providers.wsif.apache.org/";
  	public static final String IMPORT_SERVICE_BASE_PORTTYPE_NAME = "Import";
  	
  	public static final String GET_PORTTYPES_OPERATION = "getPortTypes";
  	public static final String GET_DEFINITION_OPERATION = "getDefinition";
  	public static final String GET_RAW_EIS_METADATA_OPERATION = "getRawEISMetaData";
  
  	public static final String PORT_TYPE_SELECTION_PART = "portTypeSelection";
  	public static final String RESULT_PART = "result";
  	public static final String QUERY_STRING_PART = "queryString";
  
  	/**
  	 * Default Constructor for <code>Import</code>.
  	 */
  	public Import() {
  		super();
  	}
  
  	/**
  	 * Constructor for <code>Import</code>. This constructor allows a WSDL definition, that defines a concrete implementation of
  	 * the Import Service (i.e. by a particular EIS), to be passed in. In addition to the WSDL Defintion, the constructor needs the name of
  	 * the WSDL Service, contained in the Definition, that provides the implementation of the Import Service.
  	 * @param <code>aServiceDefinition</code> The WSDL Definition
  	 * @param <code>aServiceName</code> The name of the Service
  	 * @throws <code>WSIFException</code>
  	 */
  	public Import(Definition aServiceDefinition, String aServiceName) throws WSIFException {
  		super();
  		try {
  			serviceDefintion = aServiceDefinition;
  			importPortType = serviceDefintion.getPortType(new QName(IMPORT_SERVICE_BASE_NAMESPACE, IMPORT_SERVICE_BASE_PORTTYPE_NAME));
  			importService = serviceDefintion.getService(new QName(serviceDefintion.getTargetNamespace(), aServiceName));
  		} catch (Exception e) {
  			if (e instanceof WSIFException)
  				throw (WSIFException) e;
  			else
  				throw new WSIFException(e.getMessage(), e);
  		}
  	}
  
  
  	/**
  	 * This is the proxy method to invoke the <code>getPortTypes</code> Operation of the Import Service.
  	 * @param <code>queryString</code> - The query string to be used
  	 * @return <code>PortTypeArray</code>
  	 * @throws <code>WSIFException</code>
  	 */
  	public PortTypeArray getPortTypes(String queryString) throws WSIFException {
  		try {
  			WSIFService portFactory = WSIFServiceFactory.newInstance().getService(serviceDefintion, importService, importPortType);
  
  			WSIFPort port = portFactory.getPort();
  
  			WSIFOperation operation = port.createOperation(GET_PORTTYPES_OPERATION);
  			WSIFMessage inputMessage = operation.createInputMessage();
  			WSIFMessage outputMessage = operation.createOutputMessage();
  			inputMessage.setObjectPart(QUERY_STRING_PART, queryString);
  
  			operation.executeRequestResponseOperation(inputMessage, outputMessage, null);
  
  			PortTypeArray portTypeArray = (PortTypeArray) outputMessage.getObjectPart(RESULT_PART);
  
  			port.close();
  			return portTypeArray;
  		} catch (Exception e) {
  			if (e instanceof WSIFException)
  				throw (WSIFException) e;
  			else
  				throw new WSIFException(e.getMessage(), e);
  		}
  	}
  
  	/**
  	 * This is the proxy method to invoke the <code>getDefinition</code> Operation of the Import Service.
  	 * @param <code>portTypeSelection<code>  - the <code>PortTypeSelection</code> to be used.
  	 * @return <code>ImportDefinition</code>
  	 * @throws <code>WSIFException<code>
  	 */
  	public ImportDefinition getDefinition(PortTypeSelection portTypeSelection) throws WSIFException {
  		try {
  			WSIFService portFactory = WSIFServiceFactory.newInstance().getService(serviceDefintion, importService, importPortType);
  			WSIFPort port = portFactory.getPort();
  
  			WSIFOperation operation = port.createOperation(GET_DEFINITION_OPERATION);
  			WSIFMessage inputMessage = operation.createInputMessage();
  			WSIFMessage outputMessage = operation.createOutputMessage();
  
  			inputMessage.setObjectPart(PORT_TYPE_SELECTION_PART, portTypeSelection);
  
  			operation.executeRequestResponseOperation(inputMessage, outputMessage, null);
  
  			ImportDefinition importDefinition = (ImportDefinition) outputMessage.getObjectPart(RESULT_PART);
  			port.close();
  
  			return importDefinition;
  		} catch (Exception e) {
  			if (e instanceof WSIFException)
  				throw (WSIFException) e;
  			else
  				throw new WSIFException(e.getMessage(), e);
  		}
  
  	}
  
  	/**
  	 * This is the proxy method to invoke the <code>getRawEISMetaData</code> Operation of the Import Service
  	 * @param <code>queryString</code> - The query string to be used
  	 * @return <code>byte[]</code>
  	 * @throws <code>WSIFException</code>
  	 */
  	public byte[] getRawEISMetaData(String queryString) throws WSIFException {
  		try {
  			WSIFService portFactory = WSIFServiceFactory.newInstance().getService(serviceDefintion, importService, importPortType);
  
  			WSIFPort port = portFactory.getPort();
  
  			// getPortTypes
  			WSIFOperation operation = port.createOperation(GET_RAW_EIS_METADATA_OPERATION);
  			WSIFMessage inputMessage = operation.createInputMessage();
  			WSIFMessage outputMessage = operation.createOutputMessage();
  			inputMessage.setObjectPart(QUERY_STRING_PART, queryString);
  
  			operation.executeRequestResponseOperation(inputMessage, outputMessage, null);
  
  			byte[] byteArray = (byte[]) outputMessage.getObjectPart(RESULT_PART);
  
  			port.close();
  			return byteArray;
  		} catch (Exception e) {
  			if (e instanceof WSIFException)
  				throw (WSIFException) e;
  			else
  				throw new WSIFException(e.getMessage(), e);
  
  		}
  	}
  
  	/**
  	 * Returns the WSDL PortType for the Import Service
  	 * @return <code>PortType</code>
  	 */
  	public PortType getImportPortType() {
  		return importPortType;
  	}
  
  	/**
  	 * Returns the WSDL Service for the Import Service
  	 * @return <code>Service</code>
  	 */
  	public Service getImportService() {
  		return importService;
  	}
  
  	/**
  	 * Returns the WSDL Definition for the Import Service
  	 * @return <code>Definition</code>
  	 */
  	public Definition getServiceDefintion() {
  		return serviceDefintion;
  	}
  
  	/**
  	 * Sets the WSDL PortType for the Import Service
  	 * @param <code>importPortType</code> The PortType to set
  	 */
  	public void setImportPortType(PortType importPortType) {
  		this.importPortType = importPortType;
  	}
  
  	/**
  	 * Sets the the WSDL Service for the Import Service
  	 * @param <code>importService</code> The Service to set
  	 */
  	public void setImportService(Service importService) {
  		this.importService = importService;
  	}
  
  	/**
  	 * Sets the WSDL Definition for the Import Service
  	 * @param <code>serviceDefintion</code> The Defintion to set
  	 */
  	public void setServiceDefintion(Definition serviceDefintion) {
  		this.serviceDefintion = serviceDefintion;
  	}
  
  }
  
  
  1.1                  xml-axis-wsif/proposals/jca/java/src/org/apache/wsif/providers/jca/toolplugin/Import.wsdl
  
  Index: Import.wsdl
  ===================================================================
  <?xml version="1.0" encoding="UTF-8"?>
  <definitions name="ImportRemoteInterface"
      targetNamespace="http://importservice.jca.providers.wsif.apache.org/"
      xmlns="http://schemas.xmlsoap.org/wsdl/"
      xmlns:tns="http://importservice.jca.providers.wsif.apache.org/" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
      <import location="Import.xsd" namespace="http://importservice.jca.providers.wsif.apache.org/"/>
      
      <message name="getDefinitionRequest">
      	<document>
      		 The input message for the getDefinition Operation
      	</document>
          <part name="portTypeSelection" type="tns:PortTypeSelection"/>
          	<document>
      	 		The input has only one part which is the PortTypeSelection complex type. This type represents the selected PortType, along
      	 		with its selected Operations, for which the getDefinition Operation should generate a WSDL definition for.
      		</document>
      </message>
      
      <message name="getDefinitionResponse">
      	<document>
      	 	The output message for the getDefinition Operation
      	</document>
          <part name="result" type="tns:ImportDefinition"/>
          	<document>
      	 		The output has only one part which is the ImportDefinition complex type. This type will contain the WSDL definition along with
      	 		all required XSD definitions and binary resources.
      		</document>
      </message>
      
      <message name="getPortTypesRequest">
      	<document>
      	 	The input message for the getPortTypes Operation
      	</document>
          <part name="queryString" type="xsd:string"/>
          	<document>
          		The input has only one part, which is the query string that is used to filter out the returned PortTypes.
          	</document>
      </message>
      
      <message name="getPortTypesResponse">
      	<document>
      		The output message for the getPortTypes Operation
      	</document>
          <part name="result" type="tns:PortTypeArray"/>
          	<document>
          		The output has only one part, which is the PortTypeArray complex type. This type represents the array of PortTypes that match 
          		the inputted query string.
          	</document>
      </message>
      
      <message name="getRawEISMetaDataRequest">
      	<document>
      	 	The input message for the getRawEISMetaData Operation
      	</document>
          <part name="queryString" type="xsd:string"/>
          	<document>
          		The input has only one part, which is the query string that is used to filter out the returned raw metadata.
          	</document>
      </message>
      
      <message name="getRawEISMetaDataResponse">
      	<document>
      	 	The output message for the getRawEISMetaData Operation
      	</document>
          <part name="result" type="xsd:base64"/>
          	<document>
          		The output has only one part, which is the binary stream that represents the raw metadata.
          	</document>
      </message>
      
      <portType name="Import">
      	<document>
      		The PortType that represents all the operations that are part of the Import Service.
      	</document>
          <operation name="getDefinition" parameterOrder="portTypeSelection">
          	<document>
          		The Operation that is used to return a complete WSDL defintion, along with any required XSD's and binary resources, for a selected PortType and Operations.
      		</document>
              <input message="tns:getDefinitionRequest" name="getDefinitionRequest"/>
              <output message="tns:getDefinitionResponse" name="getDefinitionResponse"/>
          </operation>
          <operation name="getPortTypes" parameterOrder="queryString">
          	<document>
          		The Operation that is used to discover the available PortTypes, on a given EIS, that match a given search criteria.
      		</document>
              <input message="tns:getPortTypesRequest" name="getPortTypesRequest"/>
              <output message="tns:getPortTypesResponse" name="getPortTypesResponse"/>
          </operation>
          <operation name="getRawEISMetaData" parameterOrder="queryString">
          	<document>
          		The Operation that is used to retrieve a binary representation of the EIS metadata. This metadata can be cached for subsequent Import Service operation invocations.
      		</document>
              <input message="tns:getRawEISMetaDataRequest" name="getRawEISMetaDataRequest"/>
              <output message="tns:getRawEISMetaDataResponse" name="getRawEISMetaDataResponse"/>
          </operation>
      </portType>
  </definitions>
  
  
  
  1.1                  xml-axis-wsif/proposals/jca/java/src/org/apache/wsif/providers/jca/toolplugin/Import.xsd
  
  Index: Import.xsd
  ===================================================================
  <?xml version="1.0" encoding="UTF-8"?>
  <schema attributeFormDefault="qualified" elementFormDefault="qualified"
      targetNamespace="http://importservice.jca.providers.wsif.apache.org/"
      xmlns="http://www.w3.org/2001/XMLSchema"
      xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
      xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
      xmlns:xsd1="http://importservice.jca.providers.wsif.apache.org/" xmlns:xsd2="http://xml.apache.org/xml-soap">
      <import namespace="http://xml.apache.org/xml-soap" schemaLocation="http://xml.apache.org/xml-soap"/>
      <import namespace="http://schemas.xmlsoap.org/wsdl/" schemaLocation="http://schemas.xmlsoap.org/wsdl/"/>
      <import namespace="http://schemas.xmlsoap.org/soap/encoding/" schemaLocation="http://schemas.xmlsoap.org/soap/encoding/"/>
      <complexType name="ImportDefinition">
          <all>
              <element name="importXSDs" type="xsd1:ArrayOfImportXSD"/>
              <element name="definition" type="xsd1:javax.wsdl.Definition"/>
              <element name="importResources" type="xsd1:ArrayOfImportResource"/>
          </all>
      </complexType>
      <complexType name="ImportXSD">
          <all>
              <element name="location" type="string"/>
              <element name="namespace" type="string"/>
              <element name="source" type="string"/>
          </all>
      </complexType>
      <complexType name="ImportResource">
          <all>
              <element name="location" type="string"/>
              <element name="contents" type="base64"/>
          </all>
      </complexType>
      <complexType name="ArrayOfImportXSD">
          <complexContent>
              <restriction base="soapenc:Array">
                  <sequence/>
                  <attribute ref="soapenc:arrayType" wsdl:arrayType="xsd1:ImportXSD[]"/>
              </restriction>
          </complexContent>
      </complexType>
      <complexType name="ArrayOfImportResource">
          <complexContent>
              <restriction base="soapenc:Array">
                  <sequence/>
                  <attribute ref="soapenc:arrayType" wsdl:arrayType="xsd1:ImportResource[]"/>
              </restriction>
          </complexContent>
      </complexType>
      <complexType name="javax.wsdl.Definition">
          <all>
              <element name="imports" type="xsd2:Map"/>
              <element name="bindings" type="xsd2:Map"/>
              <element name="namespaces" type="xsd2:Map"/>
              <element name="documentBase" type="xsd1:java.net.URL"/>
              <element name="documentationElement" type="xsd1:anyElement"/>
              <element name="portTypes" type="xsd2:Map"/>
              <element name="QName" type="xsd1:javax.wsdl.QName"/>
              <element name="messages" type="xsd2:Map"/>
              <element name="extensionRegistry" type="xsd1:javax.wsdl.extensions.ExtensionRegistry"/>
              <element name="targetNamespace" type="string"/>
              <element name="services" type="xsd2:Map"/>
              <element name="extensibilityElements" type="xsd1:java.util.List"/>
              <element name="typesElement" type="xsd1:anyElement"/>
          </all>
      </complexType>
      <complexType name="java.net.URL">
          <all>
              <element name="ref" type="string"/>
              <element name="port" type="int"/>
              <element name="file" type="string"/>
              <element name="authority" type="string"/>
              <element name="content"/>
              <element name="query" type="string"/>
              <element name="URLStreamHandlerFactory" type="xsd1:java.net.URLStreamHandlerFactory"/>
              <element name="userInfo" type="string"/>
              <element name="protocol" type="string"/>
              <element name="host" type="string"/>
              <element name="path" type="string"/>
          </all>
      </complexType>
      <complexType name="java.net.URLStreamHandlerFactory">
          <all/>
      </complexType>
      <complexType name="anyElement">
          <sequence>
              <any processContents="skip"/>
          </sequence>
      </complexType>
      <complexType name="javax.wsdl.QName">
          <all>
              <element name="localPart" type="string"/>
              <element name="namespaceURI" type="string"/>
          </all>
      </complexType>
      <complexType name="javax.wsdl.extensions.ExtensionRegistry">
          <all/>
      </complexType>
      <complexType name="java.util.List">
          <all>
              <element name="empty" type="boolean"/>
          </all>
      </complexType>
      <complexType name="PortTypeSelection">
          <all>
              <element name="operationSelection" type="xsd1:ArrayOfOperationSelection"/>
              <element name="portTypeQName" type="xsd1:javax.wsdl.QName"/>
          </all>
      </complexType>
      <complexType name="OperationSelection">
          <all>
              <element name="operationName" type="string"/>
              <element name="inputName" type="string"/>
              <element name="outputName" type="string"/>
          </all>
      </complexType>
      <complexType name="ArrayOfOperationSelection">
          <complexContent>
              <restriction base="soapenc:Array">
                  <sequence/>
                  <attribute ref="soapenc:arrayType" wsdl:arrayType="xsd1:OperationSelection[]"/>
              </restriction>
          </complexContent>
      </complexType>
      <complexType name="PortTypeArray">
          <all>
              <element name="portTypes" type="xsd1:ArrayOfJavax.wsdl.PortType"/>
          </all>
      </complexType>
      <complexType name="javax.wsdl.PortType">
          <all>
              <element name="QName" type="xsd1:javax.wsdl.QName"/>
              <element name="operations" type="xsd1:java.util.List"/>
              <element name="documentationElement" type="xsd1:anyElement"/>
              <element name="undefined" type="boolean"/>
          </all>
      </complexType>
      <complexType name="ArrayOfJavax.wsdl.PortType">
          <complexContent>
              <restriction base="soapenc:Array">
                  <sequence/>
                  <attribute ref="soapenc:arrayType" wsdl:arrayType="xsd1:javax.wsdl.PortType[]"/>
              </restriction>
          </complexContent>
      </complexType>
  </schema>
  
  
  
  1.1                  xml-axis-wsif/proposals/jca/java/src/org/apache/wsif/providers/jca/toolplugin/ImportDefinition.java
  
  Index: ImportDefinition.java
  ===================================================================
  /*
   * The Apache Software License, Version 1.1
   *
   *
   * Copyright (c) 2002 The Apache Software Foundation.  All rights 
   * reserved.
   *
   * Redistribution and use in source and binary forms, with or without
   * modification, are permitted provided that the following conditions
   * are met:
   *
   * 1. Redistributions of source code must retain the above copyright
   *    notice, this list of conditions and the following disclaimer. 
   *
   * 2. Redistributions in binary form must reproduce the above copyright
   *    notice, this list of conditions and the following disclaimer in
   *    the documentation and/or other materials provided with the
   *    distribution.
   *
   * 3. The end-user documentation included with the redistribution,
   *    if any, must include the following acknowledgment:  
   *       "This product includes software developed by the
   *        Apache Software Foundation (http://www.apache.org/)."
   *    Alternately, this acknowledgment may appear in the software itself,
   *    if and wherever such third-party acknowledgments normally appear.
   *
   * 4. The names "WSIF" and "Apache Software Foundation" must
   *    not be used to endorse or promote products derived from this
   *    software without prior written permission. For written 
   *    permission, please contact apache@apache.org.
   *
   * 5. Products derived from this software may not be called "Apache",
   *    nor may "Apache" appear in their name, without prior written
   *    permission of the Apache Software Foundation.
   *
   * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
   * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
   * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
   * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
   * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
   * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
   * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
   * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
   * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
   * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
   * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
   * SUCH DAMAGE.
   * ====================================================================
   *
   * This software consists of voluntary contributions made by many
   * individuals on behalf of the Apache Software Foundation and was
   * originally based on software copyright (c) 2001, 2002, International
   * Business Machines, Inc., http://www.apache.org.  For more
   * information on the Apache Software Foundation, please see
   * <http://www.apache.org/>.
   */
  package org.apache.wsif.providers.jca.toolplugin;
  
  import javax.wsdl.*;
  
  /**
   * This class represents the type returned from the getDefinition operation.
   * The <code>ImportDefinition</code> class contains the WSDL definition of the imported service, along with
   * all necessary XSD types and additional binary resources that are required.
   * 
   *  @author Hesham Fahmy <hf...@ca.ibm.com>
   *  @author Piotr Przybylski <pi...@ca.ibm.com>
   */
  public class ImportDefinition implements java.io.Serializable {
  
  	private Definition fieldDefinition = null;
  	private ImportXSD[] fieldImportXSDs = null;
  	private ImportResource[] fieldImportResources = null;
  	
  	/**
  	 * Returns the WSDL Definition representing the Imported Service.
  	 * @return a WSDL Definition
  	 */
  	public Definition getDefinition() {
  		return fieldDefinition;
  	}
  	/**
  	 * Sets WSDL representing the Imported Service.
  	 * @param <code>definition</code> - The WSDL Definition
  	 */
  	public void setDefinition(Definition definition) {
  		this.fieldDefinition = definition;
  	}
  	/**
  	 * Returns the XSD types that may be required for the Imported Service.  
  	 * 
  	 * @return Returns an array of ImportXSD types
  	 */
  	public ImportXSD[] getImportXSDs() {
  		return fieldImportXSDs;
  	}
  	/**
  	 * Sets the XSD types that may be required for the Imported Service
  	 * @param <code>importXSDs</code> The array of ImportXSD types
  	 */
  	public void setImportXSDs(ImportXSD[] importXSDs) {
  		this.fieldImportXSDs = importXSDs;
  	}
  	/**
  	 * Returns the binary resources that may be required for the Imported Service
  	 * @return Returns an array of ImportResource types
  	 */
  	public ImportResource[] getImportResources() {
  		return fieldImportResources;
  	}
  
  	/**
  	 * Sets the binary resources that may be required for the Imported Service
  	 * @param <code>importResources</code>  The array of ImportResource types
  	 */
  	public void setImportResources(ImportResource[] importResources) {
  		this.fieldImportResources = importResources;
  	}
  }
  
  
  
  
  1.1                  xml-axis-wsif/proposals/jca/java/src/org/apache/wsif/providers/jca/toolplugin/ImportResource.java
  
  Index: ImportResource.java
  ===================================================================
  /*
   * The Apache Software License, Version 1.1
   *
   *
   * Copyright (c) 2002 The Apache Software Foundation.  All rights 
   * reserved.
   *
   * Redistribution and use in source and binary forms, with or without
   * modification, are permitted provided that the following conditions
   * are met:
   *
   * 1. Redistributions of source code must retain the above copyright
   *    notice, this list of conditions and the following disclaimer. 
   *
   * 2. Redistributions in binary form must reproduce the above copyright
   *    notice, this list of conditions and the following disclaimer in
   *    the documentation and/or other materials provided with the
   *    distribution.
   *
   * 3. The end-user documentation included with the redistribution,
   *    if any, must include the following acknowledgment:  
   *       "This product includes software developed by the
   *        Apache Software Foundation (http://www.apache.org/)."
   *    Alternately, this acknowledgment may appear in the software itself,
   *    if and wherever such third-party acknowledgments normally appear.
   *
   * 4. The names "WSIF" and "Apache Software Foundation" must
   *    not be used to endorse or promote products derived from this
   *    software without prior written permission. For written 
   *    permission, please contact apache@apache.org.
   *
   * 5. Products derived from this software may not be called "Apache",
   *    nor may "Apache" appear in their name, without prior written
   *    permission of the Apache Software Foundation.
   *
   * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
   * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
   * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
   * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
   * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
   * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
   * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
   * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
   * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
   * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
   * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
   * SUCH DAMAGE.
   * ====================================================================
   *
   * This software consists of voluntary contributions made by many
   * individuals on behalf of the Apache Software Foundation and was
   * originally based on software copyright (c) 2001, 2002, International
   * Business Machines, Inc., http://www.apache.org.  For more
   * information on the Apache Software Foundation, please see
   * <http://www.apache.org/>.
   */
  package org.apache.wsif.providers.jca.toolplugin;
  
  /**
   * This class represents a binary resource that may required for an Imported Service.
   *  @author Hesham Fahmy <hf...@ca.ibm.com>
   */
  public class ImportResource implements java.io.Serializable {
  
  	private String fieldLocation = null;
  	private byte[] fieldContents = null;
  
  	/**
  	 * Returns a String representation of the relative path where the resource should be saved.
  	 * The path is relative to the location of the WSDL document that represents the imported service.
  	 * @return Returns a String
  	 */
  	public String getLocation() {
  		return fieldLocation;
  	}
  	/**
  	 * Sets the relative path where the resource should be saved.
  	 * @param <code>location</code> The location to set
  	 */
  	public void setLocation(String location) {
  		this.fieldLocation = location;
  	}
  	/**
  	 * Returns the binary contents of the resource as a byte array.
  	 * @return byte[] - the binary contents of the resource
  	 */
  	public byte[] getContents() {
  		return fieldContents;
  	}
  
  	/**
  	 * Sets the binary contents of the resource.
  	 * @param <code>contents</code> The byte array to set.
  	 */
  	public void setContents(byte[] contents) {
  		this.fieldContents = contents;
  	}
  
  }
  
  
  
  
  1.1                  xml-axis-wsif/proposals/jca/java/src/org/apache/wsif/providers/jca/toolplugin/ImportXSD.java
  
  Index: ImportXSD.java
  ===================================================================
  /*
   * The Apache Software License, Version 1.1
   *
   *
   * Copyright (c) 2002 The Apache Software Foundation.  All rights 
   * reserved.
   *
   * Redistribution and use in source and binary forms, with or without
   * modification, are permitted provided that the following conditions
   * are met:
   *
   * 1. Redistributions of source code must retain the above copyright
   *    notice, this list of conditions and the following disclaimer. 
   *
   * 2. Redistributions in binary form must reproduce the above copyright
   *    notice, this list of conditions and the following disclaimer in
   *    the documentation and/or other materials provided with the
   *    distribution.
   *
   * 3. The end-user documentation included with the redistribution,
   *    if any, must include the following acknowledgment:  
   *       "This product includes software developed by the
   *        Apache Software Foundation (http://www.apache.org/)."
   *    Alternately, this acknowledgment may appear in the software itself,
   *    if and wherever such third-party acknowledgments normally appear.
   *
   * 4. The names "WSIF" and "Apache Software Foundation" must
   *    not be used to endorse or promote products derived from this
   *    software without prior written permission. For written 
   *    permission, please contact apache@apache.org.
   *
   * 5. Products derived from this software may not be called "Apache",
   *    nor may "Apache" appear in their name, without prior written
   *    permission of the Apache Software Foundation.
   *
   * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
   * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
   * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
   * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
   * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
   * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
   * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
   * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
   * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
   * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
   * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
   * SUCH DAMAGE.
   * ====================================================================
   *
   * This software consists of voluntary contributions made by many
   * individuals on behalf of the Apache Software Foundation and was
   * originally based on software copyright (c) 2001, 2002, International
   * Business Machines, Inc., http://www.apache.org.  For more
   * information on the Apache Software Foundation, please see
   * <http://www.apache.org/>.
   */
  package org.apache.wsif.providers.jca.toolplugin;
  /**
   * This class represents an XSD definition that may be required for an Imported Service. The Resource Adapter
   * does not need to implement this class if it returns XSD types inlined within Definition.
   *  @author Hesham Fahmy <hf...@ca.ibm.com>
   *  @author Piotr Przybylski <pi...@ca.ibm.com>
   */
  public class ImportXSD implements java.io.Serializable {
  
  	private String fieldNamespace = null;
  	private String fieldLocation = null;
  	private String fieldSource = null;
  
  	/**
  	 * Returns the namespace that is associated with the XSD definition
  	 * @return Returns a String representation of the namespace
  	 */
  	public String getNamespace() {
  		return fieldNamespace;
  	}
  	/**
  	 * Sets the namespace that is associated with the XSD definition
  	 * @param <code>namespace</code> The namespace to set
  	 */
  	public void setNamespace(String namespace) {
  		this.fieldNamespace = namespace;
  	}
  	/**
  	 * Returns a String representation of the relative path where the XSD should be saved.
  	 * The path is relative to the location of the WSDL document that represents the imported service.
  	 * @return Returns a String
  	 */
  	public String getLocation() {
  		return fieldLocation;
  	}
  	/**
  	 * Sets the relative path where the XSD should be saved.
  	 * @param <code>location</code> The location to set
  	 */
  	public void setLocation(String location) {
  		this.fieldLocation = location;
  	}
  	/**
  	 * Gets the contents of the XSD definiton
  	 * @return Returns a String representation of the contents of the XSD
  	 */
  	public String getSource() {
  		return fieldSource;
  	}
  	/**
  	 * Sets the contents of the XSD definiton.
  	 * @param <code>source</code> The XSD source to set
  	 */
  	public void setSource(String source) {
  		this.fieldSource = source;
  	}
  }
  
  
  
  
  1.1                  xml-axis-wsif/proposals/jca/java/src/org/apache/wsif/providers/jca/toolplugin/OperationSelection.java
  
  Index: OperationSelection.java
  ===================================================================
  /*
   * The Apache Software License, Version 1.1
   *
   *
   * Copyright (c) 2002 The Apache Software Foundation.  All rights 
   * reserved.
   *
   * Redistribution and use in source and binary forms, with or without
   * modification, are permitted provided that the following conditions
   * are met:
   *
   * 1. Redistributions of source code must retain the above copyright
   *    notice, this list of conditions and the following disclaimer. 
   *
   * 2. Redistributions in binary form must reproduce the above copyright
   *    notice, this list of conditions and the following disclaimer in
   *    the documentation and/or other materials provided with the
   *    distribution.
   *
   * 3. The end-user documentation included with the redistribution,
   *    if any, must include the following acknowledgment:  
   *       "This product includes software developed by the
   *        Apache Software Foundation (http://www.apache.org/)."
   *    Alternately, this acknowledgment may appear in the software itself,
   *    if and wherever such third-party acknowledgments normally appear.
   *
   * 4. The names "WSIF" and "Apache Software Foundation" must
   *    not be used to endorse or promote products derived from this
   *    software without prior written permission. For written 
   *    permission, please contact apache@apache.org.
   *
   * 5. Products derived from this software may not be called "Apache",
   *    nor may "Apache" appear in their name, without prior written
   *    permission of the Apache Software Foundation.
   *
   * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
   * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
   * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
   * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
   * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
   * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
   * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
   * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
   * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
   * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
   * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
   * SUCH DAMAGE.
   * ====================================================================
   *
   * This software consists of voluntary contributions made by many
   * individuals on behalf of the Apache Software Foundation and was
   * originally based on software copyright (c) 2001, 2002, International
   * Business Machines, Inc., http://www.apache.org.  For more
   * information on the Apache Software Foundation, please see
   * <http://www.apache.org/>.
   */
  package org.apache.wsif.providers.jca.toolplugin;
  
  import javax.wsdl.*;
  
  /**
   * The <code>OperationSelection</code> class is the representation of a selected Operation
   * that is passed to the <code>getDefinition</code> operation of the ImportService. Tool environments
   * are responsible for constructing instances of this object and passing them to the Import service.
   *  @author Hesham Fahmy <hf...@ca.ibm.com>
   *  @author Piotr Przybylski <pi...@ca.ibm.com>
   */
  public class OperationSelection implements java.io.Serializable {
  
  	private javax.xml.namespace.QName fieldPortTypeQName = null;
  	private String fieldOperationName = null;
  	private String fieldInputName = null;
  	private String fieldOutputName = null;
  
  	public OperationSelection(String operationName, String inputName, String outputName) {
  		
  		this.fieldOperationName = operationName;
  		this.fieldInputName = inputName;
  		this.fieldOutputName = outputName;
  	
  	}
  	public String getOperationName() {
  		return this.fieldOperationName;
  	}
  	public String getInputName() {
  		return this.fieldInputName;
  	}
  	public String getOutputName() {
  		return this.fieldOutputName;
  	}
  	
  	public void setOperationName(String operationName) {
  		this.fieldOperationName = operationName;
  	}
  	public void setInputName(String inputName) {
  		this.fieldInputName = inputName;
  	}
  	public void setOutputName(String outputName) {
  		this.fieldOutputName = outputName;
  	}			
  
  
  }
  
  
  1.1                  xml-axis-wsif/proposals/jca/java/src/org/apache/wsif/providers/jca/toolplugin/PortTypeArray.java
  
  Index: PortTypeArray.java
  ===================================================================
  /*
   * The Apache Software License, Version 1.1
   *
   *
   * Copyright (c) 2002 The Apache Software Foundation.  All rights 
   * reserved.
   *
   * Redistribution and use in source and binary forms, with or without
   * modification, are permitted provided that the following conditions
   * are met:
   *
   * 1. Redistributions of source code must retain the above copyright
   *    notice, this list of conditions and the following disclaimer. 
   *
   * 2. Redistributions in binary form must reproduce the above copyright
   *    notice, this list of conditions and the following disclaimer in
   *    the documentation and/or other materials provided with the
   *    distribution.
   *
   * 3. The end-user documentation included with the redistribution,
   *    if any, must include the following acknowledgment:  
   *       "This product includes software developed by the
   *        Apache Software Foundation (http://www.apache.org/)."
   *    Alternately, this acknowledgment may appear in the software itself,
   *    if and wherever such third-party acknowledgments normally appear.
   *
   * 4. The names "WSIF" and "Apache Software Foundation" must
   *    not be used to endorse or promote products derived from this
   *    software without prior written permission. For written 
   *    permission, please contact apache@apache.org.
   *
   * 5. Products derived from this software may not be called "Apache",
   *    nor may "Apache" appear in their name, without prior written
   *    permission of the Apache Software Foundation.
   *
   * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
   * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
   * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
   * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
   * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
   * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
   * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
   * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
   * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
   * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
   * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
   * SUCH DAMAGE.
   * ====================================================================
   *
   * This software consists of voluntary contributions made by many
   * individuals on behalf of the Apache Software Foundation and was
   * originally based on software copyright (c) 2001, 2002, International
   * Business Machines, Inc., http://www.apache.org.  For more
   * information on the Apache Software Foundation, please see
   * <http://www.apache.org/>.
   */
  package org.apache.wsif.providers.jca.toolplugin;
  
  import javax.wsdl.*;
  
  /**
   * The <code>PortTypeArray</code> is the return type, provided by the EIS, in response to the 
   * <code>getPortTypes</code> operation of the Import Service. It represents the set of WSDL PortTypes
   * that are available in response to the query string passed into the <code>getPortTypes</code> operation.
   *  @author Hesham Fahmy <hf...@ca.ibm.com>
   *  @author Piotr Przybylski <pi...@ca.ibm.com>
   */
  public class PortTypeArray implements java.io.Serializable {
  
  	private PortType[] fieldPortTypes = {};
  	
  	/**
  	 * Returns the array of WSDL PortTypes.
  	 * @return PortType[]
  	 */
  	public PortType[] getPortTypes() {
  		return this.fieldPortTypes;
  	}
  		
  	/**
  	 * Returns the array of WSDL PortTypes.
  	 * @param <code>portTypes</code> The array of WSDL PortTypes to set
  	 */
  	public void setPortTypes(PortType[] portTypes) {
  		this.fieldPortTypes = portTypes;
  	}
  }
  
  
  
  
  1.1                  xml-axis-wsif/proposals/jca/java/src/org/apache/wsif/providers/jca/toolplugin/PortTypeSelection.java
  
  Index: PortTypeSelection.java
  ===================================================================
  /*
   * The Apache Software License, Version 1.1
   *
   *
   * Copyright (c) 2002 The Apache Software Foundation.  All rights 
   * reserved.
   *
   * Redistribution and use in source and binary forms, with or without
   * modification, are permitted provided that the following conditions
   * are met:
   *
   * 1. Redistributions of source code must retain the above copyright
   *    notice, this list of conditions and the following disclaimer. 
   *
   * 2. Redistributions in binary form must reproduce the above copyright
   *    notice, this list of conditions and the following disclaimer in
   *    the documentation and/or other materials provided with the
   *    distribution.
   *
   * 3. The end-user documentation included with the redistribution,
   *    if any, must include the following acknowledgment:  
   *       "This product includes software developed by the
   *        Apache Software Foundation (http://www.apache.org/)."
   *    Alternately, this acknowledgment may appear in the software itself,
   *    if and wherever such third-party acknowledgments normally appear.
   *
   * 4. The names "WSIF" and "Apache Software Foundation" must
   *    not be used to endorse or promote products derived from this
   *    software without prior written permission. For written 
   *    permission, please contact apache@apache.org.
   *
   * 5. Products derived from this software may not be called "Apache",
   *    nor may "Apache" appear in their name, without prior written
   *    permission of the Apache Software Foundation.
   *
   * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
   * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
   * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
   * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
   * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
   * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
   * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
   * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
   * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
   * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
   * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
   * SUCH DAMAGE.
   * ====================================================================
   *
   * This software consists of voluntary contributions made by many
   * individuals on behalf of the Apache Software Foundation and was
   * originally based on software copyright (c) 2001, 2002, International
   * Business Machines, Inc., http://www.apache.org.  For more
   * information on the Apache Software Foundation, please see
   * <http://www.apache.org/>.
   */
  package org.apache.wsif.providers.jca.toolplugin;
  
  import javax.wsdl.*;
  
  /**
   * The <code>PortTypeSelection</code> class is the representation of a selected PortType
   * that is passed to the <code>getDefinition</code> operation of the ImportService. Tool environments
   * are responsible for constructing instances of this object and passing them to the Import service.
   *  @author Hesham Fahmy <hf...@ca.ibm.com>
   *  @author Piotr Przybylski <pi...@ca.ibm.com>
   */
  public class PortTypeSelection implements java.io.Serializable {
  
  	private javax.xml.namespace.QName fieldPortTypeQName = null;
  	private OperationSelection[] fieldOperationSelection = null;
  
  	/**
  	 * Constructs a <code>PortTypeSelection</code> for a given WSDL PortType and selected WSDL Operations
  	 * @param <code>portTypeQName</code> The QName of the WSDL PortType selected
  	 * @param <code>operationSelection</code> The set of WSDL operations that are selected for the given WSDL PortType.
  	 */
  	public PortTypeSelection(javax.xml.namespace.QName portTypeQName, OperationSelection[] operationSelection) {
  		
  		this.fieldPortTypeQName = portTypeQName;
  		this.fieldOperationSelection = operationSelection;
  	}
  
  	/**
  	 * Returns the QName of the selected WSDL PortType.
  	 * @return QName
  	 */
  	public javax.xml.namespace.QName getPortTypeQName() {
  		return this.fieldPortTypeQName;
  	}
  	
  	/**
  	 * Sets the QName of the selected WSDL PortType.
  	 * @param <code>portTypeQName</code> The QName to set
  	 */
  	public void setPortTypeQName(javax.xml.namespace.QName portTypeQName) {
  		this.fieldPortTypeQName = portTypeQName;
  	}
  
  
  	/**
  	 * Returns the selected WSDL Operations for the PortType. The selected operations are represented by an array of <code>OperationSelection</code>
  	 * objects.
  	 * @return Returns a OperationSelection[]
  	 */
  	public OperationSelection[] getOperationSelection() {
  		return fieldOperationSelection;
  	}
  
  	/**
  	 * Sets the selected WSDL Operations for the PortType.
  	 * @param <code>operationSelection</code> The operationSelection to set.
  	 */
  	public void setOperationSelection(OperationSelection[] operationSelection) {
  		fieldOperationSelection = operationSelection;
  	}
  
  }