axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pio...@apache.org
Subject cvs commit: xml-axis-wsif/java/samples/jca/ra/com/myeis/wsif/providers/j2c/myeis WSIFProvider_MyEIS.java
Date Fri, 10 Jan 2003 07:13:21 GMT
piotrp      2003/01/09 23:13:20

  Modified:    java/samples/jca README.html
  Added:       java/samples/jca/customer/com/myeis/services Customer.java
               java/samples/jca/ra/META-INF/services
                        org.apache.wsif.spi.WSIFProvider
               java/samples/jca/ra/com/myeis/j2c
                        MyEISManagedConnectionFactory.java
                        MyEISManagedConnection.java MyEISInteraction.java
                        MyEISConnectionFactory.java
                        MyEISInteractionSpec.java MyEISConnection.java
               java/samples/jca/ra/com/myeis/services PurchaseOrderInfo.xsd
                        PurchaseOrderInfo.wsdl CustomerInfo.xsd
                        CustomerInfo.wsdl
               java/samples/jca/ra/com/myeis/j2c/importservice/myeis/myeis
                        PortTypeSelectionFormatHandler.java
                        PortTypeArrayFormatHandler.java
                        ImportDefinitionFormatHandler.java
               java/samples/jca/ra/com/myeis/repository Repository.java
               java/samples/jca/ra/com/myeis/wsdl/extensions/j2c/myeis
                        MyEISAddress.java MyEISOperation.java
                        MyEISBindingSerializer.java
                        MyEISBindingConstants.java
                        MyEISExtensionRegistry.java MyEISBinding.java
               java/samples/jca/ra/com/myeis/j2c/formathandler
                        MyEISFormatHandlerGenerator.java
               java/samples/jca/customer/com/myeis/customer
                        J2C_MyEIS_CustomerInfoProxy.java
                        CustomerInfoMYEISService.wsdl CustomerInfo.wsdl
                        CustomerInfoMYEISBinding.wsdl
               java/samples/jca/ra/META-INF ra.xml j2c_plugin.xml
               java/samples/jca/ra/org/apache/wsif/providers/jca/toolplugin/myeis/myeis
                        PortTypeArrayFormatHandler.java
                        PortTypeSelectionFormatHandler.java
                        ImportDefinitionFormatHandler.java
               java/samples/jca/customer/com/myeis/services/myeis/myeis
                        CustomerFormatHandler.java
               java/samples/jca/ra/com/myeis/services/internal
                        PurchaseOrderDataObject.java
                        CustomerDataObject.java PurchaseOrderInfo.java
                        AddressDataObject.java CustomerInfo.java
               java/samples/jca/ra/com/myeis/j2c/importservice/myeis
                        ImportMyEIS.wsdl
               java/samples/jca/customer/com/myeis/customer/com/myeis/services
                        CustomerInfo.xsd
               java/samples/jca/ra/com/myeis MyEIS.java
               java/samples/jca/ra/org/w3/www/_2001/XMLSchema/myeis/myeis
                        StringFormatHandler.java
               java/samples/jca/ra/org/w3/_2001/xmlschema/myeis/myeis
                        StringFormatHandler.java
               java/samples/jca/ra/com/myeis/wsif/providers/j2c/myeis
                        WSIFProvider_MyEIS.java
  Removed:     java/samples/jca myeis.rar
  Log:
  Modify and update J2C samples. The changes are as follows:
  1. MyEIS.rar file is built from the source in smaples directory
     instead of being stored as a sample
  2. Added new Sample Customer Info service
  3. Updated and expanded README.html
  
  Revision  Changes    Path
  1.4       +397 -5    xml-axis-wsif/java/samples/jca/README.html
  
  Index: README.html
  ===================================================================
  RCS file: /home/cvs/xml-axis-wsif/java/samples/jca/README.html,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- README.html	31 Dec 2002 21:24:30 -0000	1.3
  +++ README.html	10 Jan 2003 07:13:15 -0000	1.4
  @@ -7,9 +7,401 @@
   
   <body alink="#0000ff" bgcolor="#ffffff" leftmargin="2" topmargin="2" marginwidth="2" marginheight="2">
   
  -<h1>
  +<h2>
   Web Services Invocation Framework:<br>
  -JCA Sample</h1>
  -<p>For more information on this sample, see the <a href="../../doc/wsdl_extensions/j2c_extensions/wsif_j2c_extensions.htm">WSIF JCA documentation</a>.</p>
  -<p>The <a href="myeis.rar"><tt>RAR</tt> file</a> for the sample can be found in this directory.</p>
  -</body></html>
  +J2C Sample</h2>
  +
  +<p>
  +<font face="Verdana" size="2">The sample for the J2C WSIF provider consists of two 
  +elements, a sample Resource Adapter, MyEIS, and the Customer Info Service, a 
  +sample service implemented by the EIS system, access through MyEIS Resource 
  +Adapter, described in WSDL and executable via J2C WSIF.&nbsp; </font></p>
  +
  +<h4>Customer Info Service</h4>
  +<p><font  face="Verdana" size="2">The Customer Info service sample illustrates the invocation of 
  +the service implemented by the back end system (MyEIS). The service is described 
  +in wsdl and invoked using WSIF J2C provider and MyEIS Resource Adapter. The 
  +sample shows how the customer retrieval business function of the back end can be 
  +described in WSDL, including complex types schama,&nbsp; the format handling 
  +mechanism and the dynamic invocation. To run the the sample set the classpath to 
  +include wsdl4j, wsif.jar, wsif-j2c.jar, j2ee.jar, myeis.jar and run &quot;</font><font face="Courier New" size="2">com.myeis.customer.J2C_MyEIS_CustomerInfoProxy&quot;. 
  +You should see the following result: </font></p>
  +<blockquote>
  +  <blockquote>
  +    <p><font face="Courier New" size="2" color="#0000FF">Customer number: 33333<br>
  +    Customer name: Alan Turing</font></p>
  +  </blockquote>
  +</blockquote>
  +<p><font face="Verdana" size="2">The Customer Info Sample consists of the 
  +following files:</font></p>
  +<ul>
  +  <li><font face="Courier New" size="2">com\myeis\customer\CustomerInfo.wsdl - 
  +  the service interface.</font></li>
  +  <li><font face="Courier New" size="2">com\myeis\customer\CustomerInfoMYEISBinding.wsdl 
  +  - the bindings.</font></li>
  +  <li><font face="Courier New" size="2">com\myeis\customer\CustomerInfoMYEISService.wsdl 
  +  - the service file. </font></li>
  +  <li><font face="Courier New" size="2">com\myeis\customer\J2C_MyEIS_CustomerInfoProxy.java 
  +  - dynamic proxy. </font></li>
  +  <li><font face="Courier New" size="2">com\myeis\customer\com\myeis\services\CustomerInfo.xsd 
  +  - schema file describing complex type used by the servive. </font></li>
  +  <li><font face="Courier New" size="2">com\myeis\services\Customer.java - the 
  +  java representation of the complex schema. </font></li>
  +  <li><font face="Courier New" size="2">com\myeis\services\myeis\myeis\CustomerFormatHandler.java 
  +  - the format handler for the complex type converting between java and wire 
  +  representation. </font><font face="Courier New" size="1"><br>
  +  </font><font face="Courier New" size="2">&nbsp;</font></li>
  +</ul>
  +
  +<h4>
  +<font face="Verdana">MyEIS Resource Adapter</font></h4>
  +
  + <p><font face="Verdana" size="2">The connector provided as a sample contains the minimal set of classes 
  + necessary to execute the interaction with the MyEIS back-end system. The back 
  + end is implemented as a Java class (MyEIS) and therefore all services it 
  + provides can be accessed without any additional setup. It is not 
  + meant to provide a sample implementation of the J2C Resource Adapter but only 
  + shows the skeleton classes necessary to support Resource Adapter's pluggability 
  + into the tools, import and sample services. Because of the minimal 
  + implementation, the Resource Adapter cannot be deployed in the managed 
  + environment of the J2EE Application Server, only the non-managed use is 
  + supported.&nbsp; The Connector consists of the 
  + following classes, implementing J2EE Connector Architecture interfaces (in the com.myeis.j2c&nbsp; package):</font></p>
  + <table border="1" width="68%">
  +   <tr>
  +     <td width="24%"><b><font face="Verdana"  size="2">Class</font></b></td>
  +     <td width="76%"><b><font  face="Verdana" size="2">Description</font></b></td>
  +   </tr>
  +   <tr>
  +     <td width="24%"><font  face="Verdana" size="2">MyEISConnection </font> </td>
  +     <td width="76%"><font  face="Verdana" size="2">Client view of the managed connection (connection handle)</font></td>
  +   </tr>
  +   <tr>
  +     <td width="24%"><font  face="Verdana" size="2">MyEISConnectionFactory</font></td>
  +     <td width="76%"><font  face="Verdana" size="2">Factory of connection handles</font></td>
  +   </tr>
  +   <tr>
  +     <td width="24%"><font  face="Verdana" size="2">MyEISInteraction</font></td>
  +     <td width="76%"><font  face="Verdana" size="2">Object providing methods to execute interactions with EIS</font></td>
  +   </tr>
  +   <tr>
  +     <td width="24%"><font  face="Verdana" size="2">MyEISInteractionSpec</font></td>
  +     <td width="76%"><font  face="Verdana" size="2">Object encapsulating properties of a specific interaction</font></td>
  +   </tr>
  +   <tr>
  +     <td width="24%"><font face="Verdana"  size="2">MyEISManagedConnection </font> </td>
  +     <td width="76%"><font  face="Verdana" size="2">Physical connection to the backend system. The 
  +     implementation of this class illustrates two different possibilities of 
  +     retrieving the list of PortTypes and Definition by the Resource Adapter. 
  +     The first method is to ship the service (wsdl) files representing available 
  +     services and definitions with the Resource Adapter. This method would be 
  +     appropriate for the connector to the EIS with the infrequently changing 
  +     (for example only between EIS releases) services available. In the sample 
  +     implementation, the shipped wsdl files are accessed in the 
  +     com.myeis.repository.Repository class implementation. The second method 
  +     to get the services available is by querying the EIS (com.myeis.MyEIS 
  +     class in the sample). In that case the Resource Adapter would connect to 
  +     and query the EIS for available services.&nbsp; The tooling does not make 
  +     any assumptions about which method is used.&nbsp; The sample connector 
  +     illustrates support for both methods, switchable through the property on 
  +     the Managed Connection Factory.</font></td>
  +   </tr>
  +   <tr>
  +     <td width="24%"><font  face="Verdana" size="2">MyEISManagedConnectionFactory </font> </td>
  +     <td width="76%"><font face="Verdana"  size="2">Factory of physical connections to the EIS system
  +     </font> </td>
  +   </tr>
  + </table>
  + <h5>Create the MyEIS specific Connector Binding</h5>
  + <p><font  face="Verdana" size="2">To enable capturing of the meta information characterizing the details of 
  + the interactions with the EIS in the wsdl model, the Resource Adapter provides 
  + Connector Bindings. These bindings consist of the following:</font></p>
  + <ul>
  +   <li><font  face="Verdana" size="2">Extensibility elements for the Binding, Operation and Port</font></li>
  +   <li><font face="Verdana"  size="2">Binding serializer</font></li>
  +   <li><font face="Verdana"  size="2">Binding deserializer</font></li>
  +   <li><font face="Verdana"  size="2">ExtensionRegistry used to register the serializer and deserializer with 
  +   the run time and tools.</font></li>
  + </ul>
  + <p><font face="Verdana" size="2">The sample connector implements Connector Bindings in the 
  + com.myeis.wsdl.extensions.j2c.myeis package. The Binding extensibility element is 
  + used as a tag (has no properties) and defines the binding type. The 
  + extensibility element for the Operation captures the meta information 
  + describing a single interaction with the EIS system. The properties of this 
  + extensibility element correspond to the properties of the Resource Adapter's 
  + InteractionSpec. The Port extensibility element represents the endpoint 
  + (address) where the service is available. It contains properties corresponding 
  + to the properties of the ManagedConnectionFactory.&nbsp;&nbsp; To implement 
  + Extensibility Element, create class implementing the 
  + javax.wsdl.extensions.ExtensibilityElement and java.io.Serializable interfaces 
  + and add appropriate properties from InteractionSpec to the Operation 
  + extensibility element and from Managed Connection Factory to Port extensibility 
  + element. Next, you need to select the namespace for your bindings. The sample 
  + connector uses the following namespace URI: http://schemas.xmlsoap.org/wsdl/myeis/ 
  + with the standard prefix, followed by the connector specific last segment. The 
  + element names are left to the implementor, however the ones used in the sample 
  + connector (MyEISBinding, MyEISAddress, MyEISOperation) make the wsdl files 
  + easier to read. The next step is to provide a serializer and deserializer for 
  + your bindings. This is necessary since the wsdl file reader and writer cannot 
  + handle arbitrary extensibility elements. The serializer writes the XML format 
  + of your extensibility elements, for example Operation, the deserializer reads 
  + in and parses the XML, creating from it instances of these elements. For 
  + example to serialize MyEISOperation object from the sample connector, you need 
  + to create the following XML fragment:</font></p>
  + <p><samp>&lt;myeis:operation functionName=&quot;CUSTOMERINFO_getAddress&quot; /&gt;</samp></p>
  + <p><font face="Verdana" size="2">with the following code:</font></p>
  + <pre>  if (extension instanceof MyEISOperation) {  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
  +                  MyEISOperation operation = (MyEISOperation) extension;  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
  +                  pw.print( &quot;      &lt;&quot;  +  TPrefix +  &quot;:operation&quot; ); &nbsp;
  +  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
  +                  if (operation.getFunctionName() !=  null ) {   &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;
  +                          DOMUtils.printAttribute( &quot;functionName&quot; ,
  +                          operation.getFunctionName(), pw);  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
  +                  }<font SIZE="1"> </font><font size="2">pw.println(</font><font SIZE="2" COLOR="#2a00ff">&quot;/&gt;&quot;</font><font SIZE="2">); }</pre>
  + </font>
  + <pre>  </pre>
  + <p>To deserialize the XML fragment, use the following:</p>
  + <pre>  if (MyEISBindingConstants.Q_ELEM_OPERATION.equals(elementType)) { &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
  +                  MyEISOperation operation =  new  MyEISOperation();  
  +  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
  +                  String functionName = DOMUtils.getAttribute(el, &quot;functionName&quot; );  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
  +                  if (functionName !=  null ) {   &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;
  +                          operation.setFunctionName(functionName);  &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;
  +                  return operation;</pre>
  + <p><font face="Verdana"  size="2">The last component that you need to provide with your bindings is the 
  + Extension Registry. Its purpose is to provide convenient way to register 
  + serializer and deserializer for your extensibility elements with tools and run 
  + time. The class implements the javax.wsdl.extensions.ExtensionRegistry 
  + interface and registers serializer/deserializer for each element in its 
  + constructor using the following code:</font></p>
  + <pre>  MyEISBindingSerializer ser =  new  MyEISBindingSerializer();</pre>
  + <pre>  // operation
  +  this.registerSerializer(javax.wsdl.BindingOperation.class, 
  +     MyEISOperation. class , ser);
  +  this.registerDeserializer(javax.wsdl.BindingOperation.class,
  +     MyEISBindingConstants.Q_ELEM_OPERATION, ser);</pre>
  + <h5>Create the WSIF extensions for MyEIS Connector</h5>
  + <p><font face="Verdana" size="2">The WSIF requires that every binding to be executed has to provide the set 
  + of supporting classes implementing binding run time. J2C Plugin provides 
  + elements of the run time and delegates to the specific connector only these 
  + elements that cannot be handled in a generic manner for example,&nbsp; 
  + corresponding to the extensibility elements provided by the connector, Address 
  + and Operation. </font> </p>
  + <p><font face="Verdana" size="2">The J2C Plugin implements&nbsp; WSIFMessage_JCA, 
  + WSIFPort_JCA and WSIFOperation_JCA 
  + and requires the resource adapter to provide WSIFProvider and 
  + WSIFProviderJCAExtensions implementations.</font></p>
  + <p><font face="Verdana" size="2">The WSIF uses WSIFService to create a dynamic port corresponding to 
  + the endpoint at which the service is accessible. This, in turn, corresponds to 
  + the creation of the Connection to the EIS. The resource adapter implements the 
  + WSIFProvider and WSIFProviderJCAExtensions interfaces. In its 
  + createDynamicWSIFPort method, it creates the WSIFPort_JCA (part of the J2C 
  + Plugin run time) initialized with the active javax.resource.cci.Connection. 
  + The resource adapter creates the connection either using JNDI lookup or 
  + directly using Managed Connection Factory. The name used for the lookup is 
  + either 
  + built from the service namespace URI, service name and port name or specified 
  + explicitly in the Address extensibility element. The provided 
  + org.apache.wsif.util.WSIFUtils class contains a set of 
  + utility methods that should be used to construct names (for example, JNDI 
  + lookup name, Format Handler class name etc.).&nbsp; In the required implementation 
  + of the createOperation method the resource adapter creates WSIFOperation_JCA and 
  + initializes is with the instance of Connection and InteractionSpec as shown 
  + below:</font></p>
  + <font size="2">
  +<pre><font face="Courier New">	BindingOperation bindingOperationModel = aPort.getBinding().getBindingOperation(aOperationName, aInputName, aOutputName);</font></pre>
  +<pre><font face="Courier New">	ExtensibilityElement bindingOperationModelExtension = (ExtensibilityElement)bindingOperationModel.getExtensibilityElements().get(0);</font></pre>
  +</font>
  +<pre><font face="Courier New"><font SIZE="2" COLOR="#7f0055">	if</font><font SIZE="2"> (bindingOperationModelExtension == </font><font SIZE="2" COLOR="#7f0055">null</font></font><font face="Courier New" size="2">) {</font></pre>
  +<pre><font face="Courier New"><font SIZE="2" COLOR="#7f0055">		throw</font><font SIZE="2"> </font><font SIZE="2" COLOR="#7f0055">new</font><font SIZE="2"> WSIFException(</font><font COLOR="#2a00ff" size="2">&quot;missing</font><font COLOR="#2a00ff" size="2"> bindingOperation extension&quot;</font></font><font face="Courier New" size="2">);</font></pre>
  +<pre><font face="Courier New" size="2">	}</font></pre>
  +<pre><font face="Courier New"><font SIZE="2" COLOR="#7f0055">	if</font><font SIZE="2"> (!(bindingOperationModelExtension </font><font SIZE="2" COLOR="#7f0055">instanceof</font></font><font face="Courier New" size="2"> MyEISOperation)) {</font></pre>
  +<pre><font face="Courier New"><font SIZE="2" COLOR="#7f0055">		throw</font><font SIZE="2"> </font><font SIZE="2" COLOR="#7f0055">new</font><font SIZE="2"> WSIFException(</font><font COLOR="#2a00ff" size="2">&quot;invalid</font><font COLOR="#2a00ff" size="2"> extensibility element&quot;</font></font><font face="Courier New" size="2">);</font></pre>
  +<font size="2">
  +<pre><font face="Courier New">	}</font></pre>
  +<pre><font face="Courier New">	MyEISOperation operationModelExtension = (MyEISOperation) bindingOperationModelExtension;</font></pre>
  +<pre><font face="Courier New">	MyEISInteractionSpec interactionSpec = </font></font><font SIZE="2" COLOR="#7f0055" face="Courier New">new</font><font face="Courier New" size="2"> MyEISInteractionSpec();</font></pre>
  +<font size="2">
  +<pre><font face="Courier New">	interactionSpec.setFunctionName(operationModelExtension.getFunctionName());</font></pre>
  +<pre><font face="Courier New">	operation = </font></font><font face="Courier New"><font SIZE="2" COLOR="#7f0055">new</font><font SIZE="2"> WSIFOperation_JCA(aDefinition, aService, aPort, aOperationName, aInputName, aOutputName, typeMap, jcaPort, </font><font SIZE="2" COLOR="#7f0055">this</font></font><font SIZE="2"><font face="Courier New">, aConnection, interactionSpec);</font></pre>
  +</font>
  + <p><font face="Verdana"  size="2">Optionally, the Resource Adapter can provide implementation of the Message 
  + creation methods to be able to create customized messages. The default 
  + implementation uses the Streamable interface to exchange input and output data 
  + with the Connector.</font></p>
  + <h5>Create the FormatHandler Generator for MyEIS</h5>
  + <p><font  face="Verdana" size="2">The connector provides the format handler generator by implementing 
  + com.ibm.jca.formathandler.FormatHandlerGenerator interface. During connector&nbsp; 
  + deployment into the tools, the format handler generator is registered, based on 
  + the encoding and style it specifies in the&nbsp;XML file. When the service 
  + definition is deployed and the helper classes need to be generated, the 
  + encoding and style are used to lookup the format handler generator and invoke 
  + it from the tooling. The generate method is passed with the following 
  + arguments:</font></p>
  + <table border="1" width="69%" height="79">
  +   <tr>
  +     <td width="14%" height="19"><b><font size="2">Argument</font></b></td>
  +     <td width="86%" height="19"><b><font size="2">Description</font></b></td>
  +   </tr>
  +   <tr>
  +     <td width="14%" height="19"><font size="2">generationPackage</font></td>
  +     <td width="86%" height="19"><font size="2">the fully qualified package that the generator 
  +     should use to generate its classes in. This name follows the naming 
  +     convention described earlier in the document. </font> </td>
  +   </tr>
  +   <tr>
  +     <td width="14%" height="19"><font size="2">beanClass </font> </td>
  +     <td width="86%" height="19"><font size="2">the fully qualified name of the Java bean class 
  +     that represents the XSD type (or element) for which a format handler is 
  +     being generated. </font> </td>
  +   </tr>
  +   <tr>
  +     <td width="14%" height="19"><font size="2">aDefinition</font></td>
  +     <td width="86%" height="19"><font size="2">the WSDL definition from which the XSD type is 
  +     derived. </font> </td>
  +   </tr>
  +   <tr>
  +     <td width="14%" height="19"><font size="2">aBinding</font></td>
  +     <td width="86%" height="19"><font size="2">the WSDL binding element that contains the type 
  +     mapping for the XSD type that is being used. </font> </td>
  +   </tr>
  +   <tr>
  +     <td width="14%" height="19"><font size="2">anEncoding</font></td>
  +     <td width="86%" height="19"><font size="2">the encoding attribute off the TypeMapping 
  +     element associated with the format handler to be generated. </font> </td>
  +   </tr>
  +   <tr>
  +     <td width="14%" height="19"><font size="2">aStyle</font></td>
  +     <td width="86%" height="19"><font size="2">the style attribute off the TypeMapping element 
  +     associated with the format handler to be generated </font> </td>
  +   </tr>
  +   <tr>
  +     <td width="14%" height="19"><font size="2">xsdQname </font> </td>
  +     <td width="86%" height="19"><font size="2">the QName of the XSD element (or type) for 
  +     which the format handler is being generated. </font> </td>
  +   </tr>
  +   <tr>
  +     <td width="14%" height="19"><font size="2">elementType</font></td>
  +     <td width="86%" height="19"><font size="2">the type of element represented by the xsdQname 
  +     parameter. This is either CustomFormatHandlerGenerator.XSD_TYPE or 
  +     CustomFormatHandlerGenerator.XSD_ELEMENT </font> </td>
  +   </tr>
  +   <tr>
  +     <td width="14%" height="19"><font size="2">generationContext</font></td>
  +     <td width="86%" height="19"><font size="2">The context is an optional 
  +     object that can be used by a FormatHandlerGenerator to assist in code 
  +     generation, or in keeping track of <br>
  +     artifacts generated. The details, and implementation, of the object are 
  +     specific to each FormatHandlerGenerator.<br>
  +     Tooling environments must create context, before invoking the 
  +     FormatHandlerGenerator to generate code. </font> </td>
  +   </tr>
  + </table>
  + <p><font face="Verdana"  size="2">The format handler generator returns a Hashtable that contains a set of&nbsp; 
  + java.io.InputStreams. 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.&nbsp; 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 
  + generationPackage that is passed in as an input parameter.</font></p>
  + <p><font  face="Verdana" size="2">The arguments to the generate method may contain sufficient information to 
  + generate the specific format handler for example, the xsd type of the part and 
  + assumed encoding and style since these were used to locate and invoke the 
  + generator.&nbsp; In some cases, additional information may be required. In this 
  + case, the TypeMappings from the passed bindings can be used: </font> </p>
  + <pre>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
  +  TypeMapping typeMapping =  null ;   &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
  +  Iterator iterator = aBinding.getExtensibilityElements().iterator();   &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
  +  while (iterator.hasNext()){   &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
  +           Object element = iterator.next();   &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
  +           if (element instanceof TypeMapping){   &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;
  +                    typeMapping = (TypeMapping)element;   &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;
  +                     break ;  &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;
  +  } </pre>
  + <p><font  face="Verdana" size="2">When the type mappings are used, the generator should verify that type 
  + mapping has an encoding, and optionally a style it supports for example</font></p>
  + <pre>&nbsp;&nbsp;if (!typeMapping.getEncoding().equals( &quot;myeis&quot; ))  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
  +          return null ; </pre>
  + <p><font face="Verdana"  size="2">Finally, the generator could retrieve from the format binding the formatType 
  + string corresponding to the xsd (type or element) for which the format handler 
  + is being generated: </font> </p>
  + <pre>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
  +  String formatType = null ; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
  +  iterator = typeMapping.getMaps().iterator(); &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
  +  while (iterator.hasNext()){
  + &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;TypeMap typeMap = (TypeMap)iterator.next(); &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
  +           if (typeMap.getTypeName().equals(xsdQname)){ &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 = typeMap.getFormatType();
  +&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;break ;
  +           }&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
  +  }   </pre>
  + <p><font face="Verdana"  size="2">The formatType is a string and tools do not make any assumption about it 
  + contents. It is a specific value understood by the generator. In the sample 
  + generator, the native format for all types is Java serialization and therefore 
  + the formatType string is empty. </font> </p>
  + <p><font face="Verdana"  size="2">The sample generator: com.myeis.j2c.formathandler. 
  + MyEISFormatHandlerGenerator does not use typeMaps since the native format it 
  + generates is a simple Java serialization and therefore formatTypes in the wsdl 
  + files are empty. </font> </p>
  + <p><font face="Verdana"  size="2">In addition to handling the associated part as a Java bean, the format 
  + handler should have a capability to read and write the native format to and 
  + from the SAXSource and DOMSource. This allows the invoker of the service to 
  + pass or retrieve the data as XML. The sample format handler generator shows one 
  + of the possible methods to convert a native format, in its case a Java bean, to 
  + the &quot;javax.xml.transform.sax.SAXSource&quot; format. </font> </p>
  + <h5>Create the Import Service for MyEIS</h5>
  + <p><font face="Verdana"  size="2">The resource adapter supporting the import service is 
  + required to provide, in addition to the implementation described in the section 
  + above, the following: a service file with the bindings for the Import interface 
  + from the J2C Plugin and a set of format handlers for the 
  + conversion to native format during execution of the import service. The sample 
  + connector binding file is as follows: </font> </p>
  + <pre> 	&lt;binding name=&quot;ImportMyEISBinding&quot; type=&quot;interface:Import&quot;&gt;
  +		&lt;myeis:binding/&gt;
  +		&lt;format:typeMapping encoding=&quot;myeis&quot;&gt;
  +		&lt;/format:typeMapping&gt;
  +		&lt;operation name=&quot;getDefinition&quot;&gt;
  +		&lt;myeis:operation functionName=&quot;IMPORT_DEFINITION&quot;/&gt;
  +			&lt;input name=&quot;getDefinitionRequest&quot;/&gt;
  +			&lt;output name=&quot;getDefinitionResponse&quot;/&gt;
  +		&lt;/operation&gt;
  +		&lt;operation name=&quot;getPortTypes&quot;&gt;
  +		&lt;myeis:operation functionName=&quot;IMPORT_PORTTYPES&quot;/&gt;
  +			&lt;input name=&quot;getPortTypesRequest&quot;/&gt;
  +			&lt;output name=&quot;getPortTypesResponse&quot;/&gt;
  +		&lt;/operation&gt;
  +		&lt;operation name=&quot;getRawEISMetaData&quot;&gt;
  +		&lt;myeis:operation functionName=&quot;IMPORT_RAWMETADATA&quot;/&gt;
  +			&lt;input name=&quot;getRawEISMetaDataRequest&quot;/&gt;
  +			&lt;output name=&quot;getRawEISMetaDataResponse&quot;/&gt;
  +		&lt;/operation&gt;
  +	&lt;/binding&gt;
  +	&lt;service name=&quot;ImportService&quot;&gt;
  +		&lt;port binding=&quot;tns:ImportMyEISBinding&quot; name=&quot;ImportMyEISPort&quot;&gt;
  +		&lt;myeis:address repositoryLocation=&quot;remote&quot;/&gt;
  +		&lt;/port&gt;
  +	&lt;/service&gt;
  +</pre>
  + <p><font face="Verdana"  size="2">It contains all the information needed to execute import service, for 
  + example function names (in the operation binding) and the repository location 
  + (in the port binding). The user will be able to edit these values if necessary, 
  + for example if the port binding contains the location of the target EIS system.
  + </font>
  + </p>
  + <p><font face="Verdana"  size="2">The format handlers necessary to execute the import service are no different 
  + than any other format handlers generated by the Resource Adapter and the format 
  + handler generator can be used to create them. The sample connector provides all 
  + the elements needed for the import service. </font> </p>
  + <h5>Packaging the MyEIS Connector together with the Tool Extensions</h5>
  + <p><font  face="Verdana" size="2">The sample MyEIS Connector is packaged into myeis.rar, a resource adapter 
  + archive file. It contains the &quot;META-INF/j2c_plugin.xml&quot; file, &quot;ra.xml&quot; and 
  + one jar with the connector run time and tool extensions. The rar file can 
  + contain more than one jar file so for example when the tool extensions are 
  + added to the existing connector, they could be packaged in the separate jar.&nbsp;
  + </font>
  + </p>
  +
  +</body></html>
  \ No newline at end of file
  
  
  
  1.1                  xml-axis-wsif/java/samples/jca/customer/com/myeis/services/Customer.java
  
  Index: Customer.java
  ===================================================================
  package com.myeis.services;
  
  import org.apache.wsif.format.WSIFFormatHandler;
  import org.apache.wsif.format.WSIFFormatPart;
  import org.w3c.dom.Element;
  
  public class Customer implements WSIFFormatPart {
  	
  	private String lastName;
  	private String number;
  	private String firstName;
  	private WSIFFormatHandler fh;
  	
  	public Customer() {
  		super();
  	}
  
  
  	/**
  	 * Returns the irstName.
  	 * @return String
  	 */
  	public String getFirstName() {
  		return firstName;
  	}
  
  	/**
  	 * Returns the lastName.
  	 * @return String
  	 */
  	public String getLastName() {
  		return lastName;
  	}
  
  	/**
  	 * Returns the number.
  	 * @return String
  	 */
  	public String getNumber() {
  		return number;
  	}
  
  	/**
  	 * Sets the irstName.
  	 * @param irstName The irstName to set
  	 */
  	public void setFirstName(String irstName) {
  		firstName = irstName;
  	}
  
  	/**
  	 * Sets the lastName.
  	 * @param lastName The lastName to set
  	 */
  	public void setLastName(String lastName) {
  		this.lastName = lastName;
  	}
  
  	/**
  	 * Sets the number.
  	 * @param number The number to set
  	 */
  	public void setNumber(String number) {
  		this.number = number;
  	}
  
  	/**
  	 * Returns the h.
  	 * @return WSIFFormatHandler
  	 */
  	public WSIFFormatHandler _getFormatHandler() {
  		return fh;
  	}
  
  	/**
  	 * Sets the h.
  	 * @param h The h to set
  	 */
  	public void _setFormatHandler(WSIFFormatHandler h) {
  		fh = h;
  	}
  
  	public void fireElementEvents(){
  		
  	}
  }
  
  
  
  1.1                  xml-axis-wsif/java/samples/jca/ra/META-INF/services/org.apache.wsif.spi.WSIFProvider
  
  Index: org.apache.wsif.spi.WSIFProvider
  ===================================================================
  
  # MyEIS provider
  com.myeis.wsif.providers.j2c.myeis.WSIFProvider_MyEIS
  
  
  
  1.1                  xml-axis-wsif/java/samples/jca/ra/com/myeis/j2c/MyEISManagedConnectionFactory.java
  
  Index: MyEISManagedConnectionFactory.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 com.myeis.j2c;
  
  import java.io.PrintWriter;
  import java.util.Set;
  
  import javax.resource.*;
  import javax.resource.spi.*;
  import javax.security.auth.*;
  
  public class MyEISManagedConnectionFactory implements ManagedConnectionFactory {
  
  	private String fieldRepositoryLocation = null;
  
  	/**
  	 * @see ManagedConnectionFactory#createConnectionFactory(ConnectionManager)
  	 */
  	public Object createConnectionFactory(ConnectionManager connectionManager)
  		throws ResourceException {
  			
  			
  		return new MyEISConnectionFactory(connectionManager, this);
  	}
  
  	/**
  	 * @see ManagedConnectionFactory#createConnectionFactory()
  	 */
  	public Object createConnectionFactory() throws ResourceException {
  		
  		return new MyEISConnectionFactory(null, this);
  	}
  
  	/**
  	 * @see ManagedConnectionFactory#createManagedConnection(Subject, ConnectionRequestInfo)
  	 */
  	public ManagedConnection createManagedConnection(
  		Subject subject,
  		ConnectionRequestInfo connectionRequestInfo)
  		throws ResourceException {
  			
  		return new MyEISManagedConnection(subject, connectionRequestInfo, this);
  	}
  
  	/**
  	 * @see ManagedConnectionFactory#matchManagedConnections(Set, Subject, ConnectionRequestInfo)
  	 */
  	public ManagedConnection matchManagedConnections(
  		Set arg0,
  		Subject arg1,
  		ConnectionRequestInfo arg2)
  		throws ResourceException {
  		return null;
  	}
  
  	/**
  	 * @see ManagedConnectionFactory#getLogWriter()
  	 */
  	public PrintWriter getLogWriter() throws ResourceException {
  		return null;
  	}
  	
  	/**
  	 * @see ManagedConnectionFactory#setLogWriter(PrintWriter)
  	 */
  	public void setLogWriter(PrintWriter arg0) throws ResourceException {
  	}
  
  	/**
  	 * Gets the fieldRepositoryLocation
  	 * @return Returns a String
  	 */
  	public String getRepositoryLocation() {
  		return fieldRepositoryLocation;
  	}
  	/**
  	 * Sets the fieldRepositoryLocation
  	 * @param fieldRepositoryLocation The fieldRepositoryLocation to set
  	 */
  	public void setRepositoryLocation(String fieldRepositoryLocation) {
  		this.fieldRepositoryLocation = fieldRepositoryLocation;
  	}
  
  }
  
  
  
  
  1.1                  xml-axis-wsif/java/samples/jca/ra/com/myeis/j2c/MyEISManagedConnection.java
  
  Index: MyEISManagedConnection.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 com.myeis.j2c;
  
  import java.io.*;
  import javax.resource.*;
  import javax.resource.cci.*;
  import javax.resource.spi.*;
  import javax.security.auth.*;
  import javax.transaction.xa.XAResource;
  import org.apache.wsif.providers.jca.toolplugin.*;
  import org.apache.wsif.providers.jca.WSIFFormatHandler_JCA;
  import com.myeis.repository.*;
  import com.myeis.*;
  import org.apache.wsif.WSIFException;
  import org.apache.wsif.providers.jca.*;
  
  public class MyEISManagedConnection implements ManagedConnection {
  
  	private Subject fieldSubject = null;
  	private ConnectionRequestInfo fieldConnectionRequestInfo = null;
  	private MyEISManagedConnectionFactory fieldManagedConnectionFactory = null;
  
  	/**
  	 * Constructor
  	 */
  	public MyEISManagedConnection(Subject subject, ConnectionRequestInfo connectionRequestInfo, ManagedConnectionFactory managedConnectionFactory) {
  
  		this.fieldSubject = subject;
  		this.fieldConnectionRequestInfo = connectionRequestInfo;
  		this.fieldManagedConnectionFactory = (MyEISManagedConnectionFactory) managedConnectionFactory;
  	}
  
  	/**
  	 * @see ManagedConnection#getConnection(Subject, ConnectionRequestInfo)
  	 */
  	public Object getConnection(Subject arg0, ConnectionRequestInfo arg1) throws ResourceException {
  
  		return new MyEISConnection(this);
  	}
  
  	/**
  	 * @see ManagedConnection#destroy()
  	 */
  	public void destroy() throws ResourceException {
  	}
  
  	/**
  	 * @see ManagedConnection#cleanup()
  	 */
  	public void cleanup() throws ResourceException {
  	}
  
  	/**
  	 * @see ManagedConnection#associateConnection(Object)
  	 */
  	public void associateConnection(Object arg0) throws ResourceException {
  	}
  
  	/**
  	 * @see ManagedConnection#addConnectionEventListener(ConnectionEventListener)
  	 */
  	public void addConnectionEventListener(ConnectionEventListener arg0) {
  	}
  
  	/**
  	 * @see ManagedConnection#removeConnectionEventListener(ConnectionEventListener)
  	 */
  	public void removeConnectionEventListener(ConnectionEventListener arg0) {
  	}
  
  	/**
  	 * @see ManagedConnection#getXAResource()
  	 */
  	public XAResource getXAResource() throws ResourceException {
  		return null;
  	}
  
  	/**
  	 * @see ManagedConnection#getLocalTransaction()
  	 */
  	public javax.resource.spi.LocalTransaction getLocalTransaction() throws ResourceException {
  		return null;
  	}
  
  	/**
  	 * @see ManagedConnection#getMetaData()
  	 */
  	public ManagedConnectionMetaData getMetaData() throws ResourceException {
  		return null;
  	}
  
  	/**
  	 * @see ManagedConnection#setLogWriter(PrintWriter)
  	 */
  	public void setLogWriter(PrintWriter arg0) throws ResourceException {
  	}
  
  	/**
  	 * @see ManagedConnection#getLogWriter()
  	 */
  	public PrintWriter getLogWriter() throws ResourceException {
  		return null;
  	}
  
  	/**
  	 * close()
  	 */
  	public void close() throws ResourceException {
  
  	}
  
  	/**
  	 * call
  	 */
  	public boolean call(InteractionSpec interactionSpec, Record inputRecord, Record outputRecord) throws ResourceException {
  		/*
  		 * Depending on the capabilities of the real EIS backend, the implementation of this method will differ. If the backend system
  		 * supports the metadata browsing capabilities (as part of its normal business functions) then this method can simply delegate
  		 * all the calls to the backend. If the EIS does not have this capability, then the resource adapter needs to implement the logic
  		 * to run the getDefinition and getPortTypes operations.
  		 * 
  		 * In the myEIS sample, the backend implements the import service as business functions. Hence all calls can be passed directly to 
  		 * the backend. As an illustration of how the resource adapter can implement the functions, we introduced the 'local' setting on the 'RepositoryLocation'
  		 * property. If the property is set to 'local' then the resource adapter implements the logic.
  		 */
          try {
          	/*
          	 * If the repository is 'local' then perform the import service logic here.
          	 */
  			if ((this.fieldManagedConnectionFactory.getRepositoryLocation().equals("local")) && (((MyEISInteractionSpec) interactionSpec).getFunctionName().equals("IMPORT_PORTTYPES"))) {
  				// local import
  				String queryString = (String) ((WSIFMessage_JCAStreamable) inputRecord).getObjectPart("queryString");
  				PortTypeArray portTypeArray = (new Repository()).getPortTypes(queryString);
  				((WSIFMessage_JCAStreamable) outputRecord).setObjectPart("result", portTypeArray);
  	
  				return true;
  			}
  			if ((this.fieldManagedConnectionFactory.getRepositoryLocation().equals("local")) && (((MyEISInteractionSpec) interactionSpec).getFunctionName().equals("IMPORT_DEFINITION"))) {
  				// local import
  				PortTypeSelection selection = (PortTypeSelection) ((WSIFMessage_JCAStreamable) inputRecord).getObjectPart("portTypeSelection");
  				ImportDefinition importDefinition = (new Repository()).getDefinition(selection);
  				((WSIFMessage_JCAStreamable) outputRecord).setObjectPart("result", importDefinition);
  	
  				return true;
  			}
          } catch (WSIFException e) {
  			e.printStackTrace();
  			throw new ResourceException(e.getMessage());
          }
  
  		// invocation of remote import and all other business services
  		try {
  			ByteArrayOutputStream outputStream = new ByteArrayOutputStream();
  
  			ObjectOutputStream objectOutputStream = new ObjectOutputStream(outputStream);
  			objectOutputStream.writeObject(((MyEISInteractionSpec) interactionSpec).getFunctionName());
  			objectOutputStream.flush();
  
  			((WSIFMessage_JCAStreamable) inputRecord).write(outputStream);
  
  			// call my EIS
  			MyEIS myEIS = new MyEIS();
  			byte[] outBytes = myEIS.doIt(outputStream.toByteArray());
  
  			ByteArrayInputStream inputStream = new ByteArrayInputStream(outBytes);
  			((WSIFMessage_JCAStreamable) outputRecord).read(inputStream);
  		}
  		catch (IOException e) {
  			e.printStackTrace();
  			throw new ResourceException(e.getMessage());
  		}
  
  		return true;
  	}
  }
  
  
  1.1                  xml-axis-wsif/java/samples/jca/ra/com/myeis/j2c/MyEISInteraction.java
  
  Index: MyEISInteraction.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 com.myeis.j2c;
  
  import javax.resource.*;
  import javax.resource.cci.*;
  
  public class MyEISInteraction implements Interaction {
  
  	private MyEISConnection fieldConnection = null;
  	
  	/**
  	 * Constructor
  	 */
  	public MyEISInteraction(Connection connection) {
  		
  		this.fieldConnection = (MyEISConnection)connection;
  	}
  
  	/**
  	 * @see Interaction#close()
  	 */
  	public void close() throws ResourceException {
  	}
  
  	/**
  	 * @see Interaction#getConnection()
  	 */
  	public Connection getConnection() {
  		return null;
  	}
  
  	/**
  	 * @see Interaction#execute(InteractionSpec, Record, Record)
  	 */
  	public boolean execute(InteractionSpec interactionSpec, Record inputRecord, Record outputRecord)
  		throws ResourceException {
  			
  		return this.fieldConnection.call(interactionSpec, inputRecord, outputRecord);
  	}
  
  	/**
  	 * @see Interaction#execute(InteractionSpec, Record)
  	 */
  	public Record execute(InteractionSpec arg0, Record arg1)
  		throws ResourceException {
  		return null;
  	}
  
  	/**
  	 * @see Interaction#getWarnings()
  	 */
  	public ResourceWarning getWarnings() throws ResourceException {
  		return null;
  	}
  
  	/**
  	 * @see Interaction#clearWarnings()
  	 */
  	public void clearWarnings() throws ResourceException {
  	}
  
  }
  
  
  
  
  1.1                  xml-axis-wsif/java/samples/jca/ra/com/myeis/j2c/MyEISConnectionFactory.java
  
  Index: MyEISConnectionFactory.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 com.myeis.j2c;
  
  import javax.naming.*;
  import javax.resource.*;
  import javax.resource.cci.*;
  import javax.resource.spi.*;
  
  public class MyEISConnectionFactory implements ConnectionFactory {
  
  	private ConnectionManager fieldConnectionManager = null;
  	private ManagedConnectionFactory fieldManagedConnectionFactory = null;
  
  	/**
  	 * Constructor
  	 */
  	public MyEISConnectionFactory(ConnectionManager connectionManager, ManagedConnectionFactory managedConnectionFactory) {
  		
  		this.fieldConnectionManager = connectionManager;
  		this.fieldManagedConnectionFactory = managedConnectionFactory;
  	}
  	
  	/**
  	 * @see ConnectionFactory#getConnection()
  	 */
  	public Connection getConnection() throws ResourceException {
  		
  		if (this.fieldConnectionManager == null) {
  			return (Connection)this.fieldManagedConnectionFactory.createManagedConnection(null, null).getConnection(null, null);
  		}
  		
  		return null;
  	}
  
  	/**
  	 * @see ConnectionFactory#getConnection(ConnectionSpec)
  	 */
  	public Connection getConnection(ConnectionSpec arg0) throws ResourceException {
  		return null;
  	}
  
  	/**
  	 * @see ConnectionFactory#getRecordFactory()
  	 */
  	public RecordFactory getRecordFactory() throws ResourceException {
  		return null;
  	}
  
  	/**
  	 * @see ConnectionFactory#getMetaData()
  	 */
  	public ResourceAdapterMetaData getMetaData() throws ResourceException {
  		return null;
  	}
  
  	/**
  	 * @see Referenceable#setReference(Reference)
  	 */
  	public void setReference(Reference arg0) {
  	}
  
  	/**
  	 * @see Referenceable#getReference()
  	 */
  	public Reference getReference() throws NamingException {
  		return null;
  	}
  
  }
  
  
  
  
  1.1                  xml-axis-wsif/java/samples/jca/ra/com/myeis/j2c/MyEISInteractionSpec.java
  
  Index: MyEISInteractionSpec.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 com.myeis.j2c;
  
  import javax.resource.*;
  import javax.resource.cci.*;
  
  public class MyEISInteractionSpec implements InteractionSpec {
  
  	private String fieldFunctionName = null;
  
  	/**
  	 * Gets the fieldFunctionName
  	 * @return Returns a String
  	 */
  	public String getFunctionName() {
  		return fieldFunctionName;
  	}
  	/**
  	 * Sets the fieldFunctionName
  	 * @param fieldFunctionName The fieldFunctionName to set
  	 */
  	public void setFunctionName(String fieldFunctionName) {
  		this.fieldFunctionName = fieldFunctionName;
  	}
  }
  
  
  
  
  1.1                  xml-axis-wsif/java/samples/jca/ra/com/myeis/j2c/MyEISConnection.java
  
  Index: MyEISConnection.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 com.myeis.j2c;
  
  import javax.resource.*;
  import javax.resource.cci.*;
  import javax.resource.spi.*;
  
  public class MyEISConnection implements Connection {
  
  	private MyEISManagedConnection fieldManagedConnection = null;
  
  	/**
  	 * Constructor
  	 */
  	public MyEISConnection(ManagedConnection managedConnection) {
  		
  		this.fieldManagedConnection = (MyEISManagedConnection)managedConnection;
  	}
  
  	/**
  	 * @see Connection#createInteraction()
  	 */
  	public Interaction createInteraction() throws ResourceException {
  		
  		return new MyEISInteraction(this);
  	}
  
  	/**
  	 * @see Connection#getLocalTransaction()
  	 */
  	public javax.resource.cci.LocalTransaction getLocalTransaction() throws ResourceException {
  		return null;
  	}
  
  	/**
  	 * @see Connection#setAutoCommit(boolean)
  	 */
  	public void setAutoCommit(boolean arg0) throws ResourceException {
  	}
  
  	/**
  	 * @see Connection#getAutoCommit()
  	 */
  	public boolean getAutoCommit() throws ResourceException {
  		return false;
  	}
  
  	/**
  	 * @see Connection#getMetaData()
  	 */
  	public ConnectionMetaData getMetaData() throws ResourceException {
  		return null;
  	}
  
  	/**
  	 * @see Connection#getResultSetInfo()
  	 */
  	public ResultSetInfo getResultSetInfo() throws ResourceException {
  		return null;
  	}
  
  	/**
  	 * @see Connection#close()
  	 */
  	public void close() throws ResourceException {
  		
  		this.fieldManagedConnection.close();
  		this.fieldManagedConnection = null;
  	}
  
  	/**
  	 * call
  	 */
  	public boolean call(InteractionSpec interactionSpec, Record inputRecord, Record outputRecord)
  		throws ResourceException {
  			
  		return this.fieldManagedConnection.call(interactionSpec, inputRecord, outputRecord);
  	}
  
  }
  
  
  
  
  1.1                  xml-axis-wsif/java/samples/jca/ra/com/myeis/services/PurchaseOrderInfo.xsd
  
  Index: PurchaseOrderInfo.xsd
  ===================================================================
  <?xml version="1.0" encoding="UTF-8"?>
  <schema attributeFormDefault="qualified" elementFormDefault="qualified"
      targetNamespace="http://services.myeis.com/"
      xmlns="http://www.w3.org/2001/XMLSchema" xmlns:xsd1="http://services.myeis.com/">
      <complexType name="PurchaseOrder">
          <all>
              <element name="unitPrice" type="double"/>
              <element name="orderNumber" type="string"/>
              <element name="partNumber" type="string"/>
              <element name="quantity" type="int"/>
              <element name="description" type="string"/>
          </all>
      </complexType>
  </schema>
  
  
  
  1.1                  xml-axis-wsif/java/samples/jca/ra/com/myeis/services/PurchaseOrderInfo.wsdl
  
  Index: PurchaseOrderInfo.wsdl
  ===================================================================
  <?xml version="1.0" encoding="UTF-8"?>
  <definitions name="PurchaseOrderInfoRemoteInterface"
      targetNamespace="http://services.myeis.com/"
      xmlns="http://schemas.xmlsoap.org/wsdl/"
      xmlns:myeis="http://schemas.xmlsoap.org/wsdl/myeis/"
      xmlns:format="http://schemas.xmlsoap.org/wsdl/formatbinding/"
      xmlns:tns="http://services.myeis.com/" 
      xmlns:xsd="http://www.w3.org/2001/XMLSchema">
      <import location="/com/myeis/services/PurchaseOrderInfo.xsd" namespace="http://services.myeis.com/"/>
      <message name="getPurchaseOrderRequest">
          <part name="orderNumber" type="xsd:string"/>
      </message>
      <message name="getPurchaseOrderResponse">
          <part name="result" type="tns:PurchaseOrder"/>
      </message>
      <portType name="PurchaseOrderInfo">
          <operation name="getPurchaseOrder" parameterOrder="orderNumber">
              <input message="tns:getPurchaseOrderRequest" name="getPurchaseOrderRequest"/>
              <output message="tns:getPurchaseOrderResponse" name="getPurchaseOrderResponse"/>
          </operation>
      </portType>
      <binding name="PurchaseOrderInfoMyEISBinding" type="tns:PurchaseOrderInfo">
          <myeis:binding/>
          <format:typeMapping encoding="myeis">
              <format:typeMap formatType="" typeName="xsd:int"/>
              <format:typeMap formatType="" typeName="tns:PurchaseOrder"/>
              <format:typeMap formatType="" typeName="xsd:string"/>
              <format:typeMap formatType="" typeName="xsd:double"/>
          </format:typeMapping>
          <operation name="getPurchaseOrder">
              <myeis:operation functionName="PURCHASEORDERINFO_getPurchaseOrder"/>
              <input name="getPurchaseOrderRequest"/>
              <output name="getPurchaseOrderResponse"/>
          </operation>
      </binding>
      <service name="PurchaseOrderInfoService">
          <port binding="tns:PurchaseOrderInfoMyEISBinding" name="PurchaseOrderInfoMyEISPort">
              <myeis:address/>
          </port>
      </service>
      
  </definitions>
  
  
  
  1.1                  xml-axis-wsif/java/samples/jca/ra/com/myeis/services/CustomerInfo.xsd
  
  Index: CustomerInfo.xsd
  ===================================================================
  <?xml version="1.0" encoding="UTF-8"?>
  <schema attributeFormDefault="qualified" elementFormDefault="qualified"
      targetNamespace="http://services.myeis.com/"
      xmlns="http://www.w3.org/2001/XMLSchema" xmlns:xsd1="http://services.myeis.com/">
      <complexType name="Address">
          <all>
              <element name="street" type="string"/>
              <element name="zipCode" type="string"/>
              <element name="city" type="string"/>
              <element name="customerNumber" type="string"/>
              <element name="state" type="string"/>
          </all>
      </complexType>
      <complexType name="Customer">
          <all>
              <element name="lastName" type="string"/>
              <element name="firstName" type="string"/>
              <element name="number" type="string"/>
          </all>
      </complexType>
  </schema>
  
  
  
  1.1                  xml-axis-wsif/java/samples/jca/ra/com/myeis/services/CustomerInfo.wsdl
  
  Index: CustomerInfo.wsdl
  ===================================================================
  <?xml version="1.0" encoding="UTF-8"?>
  <definitions name="CustomerInfoImpl"
      targetNamespace="http://services.myeis.com/"
      xmlns="http://schemas.xmlsoap.org/wsdl/"
      xmlns:format="http://schemas.xmlsoap.org/wsdl/formatbinding/"
      xmlns:myeis="http://schemas.xmlsoap.org/wsdl/myeis/"
      xmlns:tns="http://services.myeis.com/" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
     <import location="/com/myeis/services/CustomerInfo.xsd" namespace="http://services.myeis.com/"/>
      <message name="getAddressRequest">
          <part name="number" type="xsd:string"/>
      </message>
      <message name="getAddressResponse">
          <part name="result" type="tns:Address"/>
      </message>
      <message name="getCustomerRequest">
          <part name="number" type="xsd:string"/>
      </message>
      <message name="getCustomerResponse">
          <part name="result" type="tns:Customer"/>
      </message>
      <portType name="CustomerInfo">
          <operation name="getAddress" parameterOrder="number">
              <input message="tns:getAddressRequest" name="getAddressRequest"/>
              <output message="tns:getAddressResponse" name="getAddressResponse"/>
          </operation>
          <operation name="getCustomer" parameterOrder="number">
              <input message="tns:getCustomerRequest" name="getCustomerRequest"/>
              <output message="tns:getCustomerResponse" name="getCustomerResponse"/>
          </operation>
      </portType>
      <binding name="CustomerInfoMyEISBinding" type="tns:CustomerInfo">
          <myeis:binding/>
          <format:typeMapping encoding="myeis">
              <format:typeMap formatType="" typeName="xsd:string"/>
              <format:typeMap formatType="" typeName="tns:Address"/>
              <format:typeMap formatType="" typeName="tns:Customer"/>
          </format:typeMapping>
          <operation name="getAddress">
              <myeis:operation functionName="CUSTOMERINFO_getAddress" />
              <input name="getAddressRequest"/>
              <output name="getAddressResponse"/>
          </operation>
          <operation name="getCustomer">
              <myeis:operation functionName="CUSTOMERINFO_getCustomer" />
              <input name="getCustomerRequest"/>
              <output name="getCustomerResponse"/>
          </operation>
      </binding>
      <service name="CustomerInfoService">
          <port binding="tns:CustomerInfoMyEISBinding" name="CustomerInfoMyEISPort">
              <myeis:address />
          </port>
      </service>
  </definitions>
  
  
  
  1.1                  xml-axis-wsif/java/samples/jca/ra/com/myeis/j2c/importservice/myeis/myeis/PortTypeSelectionFormatHandler.java
  
  Index: PortTypeSelectionFormatHandler.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 com.myeis.j2c.importservice.myeis.myeis;
  
  import java.io.*;
  
  import javax.resource.cci.InteractionSpec;
  
  import org.apache.wsif.providers.jca.toolplugin.*;
  import org.apache.wsif.providers.jca.WSIFFormatHandler_JCA;
  
  public class PortTypeSelectionFormatHandler implements WSIFFormatHandler_JCA {
  
  	private PortTypeSelection fieldPortTypeSelection = null;
  
  	/**
  	 * @see JCAFormatHandler#read(InputStream)
  	 */
  	public void read(InputStream inputStream) throws IOException {
  
  		try {
  			ObjectInputStream objectInputStream = new ObjectInputStream(inputStream);
  			this.fieldPortTypeSelection =
  				(PortTypeSelection) objectInputStream.readObject();
  		} catch (ClassNotFoundException e) {
  			e.printStackTrace();
  			throw new IOException("class not found !");
  		}
  	}
  
  	/**
  	 * @see JCAFormatHandler#write(OutputStream)
  	 */
  	public void write(OutputStream outputStream) throws IOException {
  
  		ObjectOutputStream objectOutputStream = new ObjectOutputStream(outputStream);
  		objectOutputStream.writeObject(this.fieldPortTypeSelection);
  		objectOutputStream.flush();
  	}
  
  	/**
  	 * @see WSIFFormatHandler#getElement(String)
  	 */
  	public Object getElement(String elementName) {
  		return null;
  	}
  
  	/**
  	 * @see WSIFFormatHandler#setElement(String, Object)
  	 */
  	public void setElement(String elementName, Object element) {
  	}
  
  	/**
  	 * @see WSIFFormatHandler#getElement(String, int)
  	 */
  	public Object getElement(String name, int index) {
  		return null;
  	}
  
  	/**
  	 * @see WSIFFormatHandler#setElement(String, int, Object)
  	 */
  	public void setElement(String name, int index, Object value) {
  	}
  
  	/**
  	 * @see WSIFFormatHandler#getObjectPart()
  	 */
  	public Object getObjectPart() {
  		return this.fieldPortTypeSelection;
  	}
  
  	/**
  	 * @see WSIFFormatHandler#getObjectPart(Class)
  	 */
  	public Object getObjectPart(Class sourceClass) {
  		return null;
  	}
  
  	/**
  	 * @see WSIFFormatHandler#getCharPart()
  	 */
  	public char getCharPart() {
  		return 0;
  	}
  
  	/**
  	 * @see WSIFFormatHandler#getBytePart()
  	 */
  	public byte getBytePart() {
  		return 0;
  	}
  
  	/**
  	 * @see WSIFFormatHandler#getShortPart()
  	 */
  	public short getShortPart() {
  		return 0;
  	}
  
  	/**
  	 * @see WSIFFormatHandler#getIntPart()
  	 */
  	public int getIntPart() {
  		return 0;
  	}
  
  	/**
  	 * @see WSIFFormatHandler#getLongPart()
  	 */
  	public long getLongPart() {
  		return 0;
  	}
  
  	/**
  	 * @see WSIFFormatHandler#getFloatPart()
  	 */
  	public float getFloatPart() {
  		return 0;
  	}
  
  	/**
  	 * @see WSIFFormatHandler#getDoublePart()
  	 */
  	public double getDoublePart() {
  		return 0;
  	}
  
  	/**
  	 * @see WSIFFormatHandler#setObjectPart(Object)
  	 */
  	public void setObjectPart(Object objectPart) {
  		this.fieldPortTypeSelection = (PortTypeSelection) objectPart;
  	}
  
  	/**
  	 * @see WSIFFormatHandler#setCharPart(char)
  	 */
  	public void setCharPart(char charPart) {
  	}
  
  	/**
  	 * @see WSIFFormatHandler#setBytePart(byte)
  	 */
  	public void setBytePart(byte bytePart) {
  	}
  
  	/**
  	 * @see WSIFFormatHandler#setShortPart(short)
  	 */
  	public void setShortPart(short shortPart) {
  	}
  
  	/**
  	 * @see WSIFFormatHandler#setIntPart(int)
  	 */
  	public void setIntPart(int intPart) {
  	}
  
  	/**
  	 * @see WSIFFormatHandler#setLongPart(long)
  	 */
  	public void setLongPart(long longPart) {
  	}
  
  	/**
  	 * @see WSIFFormatHandler#setFloatPart(float)
  	 */
  	public void setFloatPart(float floatPart) {
  	}
  
  	/**
  	 * @see WSIFFormatHandler#setDoublePart(double)
  	 */
  	public void setDoublePart(double doublePart) {
  	}
  	public void setPartQName(javax.xml.namespace.QName qname){
  	}
  	
  	public javax.xml.namespace.QName getPartQName(){
  		return null;
  	}
  	public void setInteractionSpec(InteractionSpec is){
  		
  	}
  
  }
  
  
  1.1                  xml-axis-wsif/java/samples/jca/ra/com/myeis/j2c/importservice/myeis/myeis/PortTypeArrayFormatHandler.java
  
  Index: PortTypeArrayFormatHandler.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 com.myeis.j2c.importservice.myeis.myeis;
  
  import java.io.*;
  
  import javax.resource.cci.InteractionSpec;
  
  import org.apache.wsif.providers.jca.toolplugin.*;
  import org.apache.wsif.providers.jca.WSIFFormatHandler_JCA;
  
  public class PortTypeArrayFormatHandler implements WSIFFormatHandler_JCA {
  
  	private PortTypeArray fieldPortTypeArray = null;
  	
  	/**
  	 * @see JCAFormatHandler#read(InputStream)
  	 */
  	public void read(InputStream inputStream) throws IOException {
  	
  		try {
  			ObjectInputStream objectInputStream = new ObjectInputStream(inputStream);
  			this.fieldPortTypeArray =
  				(PortTypeArray)objectInputStream.readObject();
  		} catch (ClassNotFoundException e) {
  			e.printStackTrace();
  			throw new IOException("class not found !");
  		}		
  	}
  
  	/**
  	 * @see JCAFormatHandler#write(OutputStream)
  	 */
  	public void write(OutputStream outputStream) throws IOException {
  		
          ObjectOutputStream objectOutputStream = new ObjectOutputStream(outputStream);
          objectOutputStream.writeObject(this.fieldPortTypeArray);
          objectOutputStream.flush();
  	}
  
  	/**
  	 * @see WSIFFormatHandler#getElement(String)
  	 */
  	public Object getElement(String elementName) {
  		return null;
  	}
  
  	/**
  	 * @see WSIFFormatHandler#setElement(String, Object)
  	 */
  	public void setElement(String elementName, Object element) {
  	}
  
  	/**
  	 * @see WSIFFormatHandler#getElement(String, int)
  	 */
  	public Object getElement(String name, int index) {
  		return null;
  	}
  
  	/**
  	 * @see WSIFFormatHandler#setElement(String, int, Object)
  	 */
  	public void setElement(String name, int index, Object value) {
  	}
  
  	/**
  	 * @see WSIFFormatHandler#getObjectPart()
  	 */
  	public Object getObjectPart() {
  		return this.fieldPortTypeArray;
  	}
  
  	/**
  	 * @see WSIFFormatHandler#getObjectPart(Class)
  	 */
  	public Object getObjectPart(Class sourceClass) {
  		return null;
  	}
  
  	/**
  	 * @see WSIFFormatHandler#getCharPart()
  	 */
  	public char getCharPart() {
  		return 0;
  	}
  
  	/**
  	 * @see WSIFFormatHandler#getBytePart()
  	 */
  	public byte getBytePart() {
  		return 0;
  	}
  
  	/**
  	 * @see WSIFFormatHandler#getShortPart()
  	 */
  	public short getShortPart() {
  		return 0;
  	}
  
  	/**
  	 * @see WSIFFormatHandler#getIntPart()
  	 */
  	public int getIntPart() {
  		return 0;
  	}
  
  	/**
  	 * @see WSIFFormatHandler#getLongPart()
  	 */
  	public long getLongPart() {
  		return 0;
  	}
  
  	/**
  	 * @see WSIFFormatHandler#getFloatPart()
  	 */
  	public float getFloatPart() {
  		return 0;
  	}
  
  	/**
  	 * @see WSIFFormatHandler#getDoublePart()
  	 */
  	public double getDoublePart() {
  		return 0;
  	}
  
  	/**
  	 * @see WSIFFormatHandler#setObjectPart(Object)
  	 */
  	public void setObjectPart(Object objectPart) {
  		this.fieldPortTypeArray = (PortTypeArray) objectPart;
  	}
  
  	/**
  	 * @see WSIFFormatHandler#setCharPart(char)
  	 */
  	public void setCharPart(char charPart) {
  	}
  
  	/**
  	 * @see WSIFFormatHandler#setBytePart(byte)
  	 */
  	public void setBytePart(byte bytePart) {
  	}
  
  	/**
  	 * @see WSIFFormatHandler#setShortPart(short)
  	 */
  	public void setShortPart(short shortPart) {
  	}
  
  	/**
  	 * @see WSIFFormatHandler#setIntPart(int)
  	 */
  	public void setIntPart(int intPart) {
  	}
  
  	/**
  	 * @see WSIFFormatHandler#setLongPart(long)
  	 */
  	public void setLongPart(long longPart) {
  	}
  
  	/**
  	 * @see WSIFFormatHandler#setFloatPart(float)
  	 */
  	public void setFloatPart(float floatPart) {
  	}
  
  	/**
  	 * @see WSIFFormatHandler#setDoublePart(double)
  	 */
  	public void setDoublePart(double doublePart) {
  	}
  	
  	public void setPartQName(javax.xml.namespace.QName qname){
  	}
  	
  	public javax.xml.namespace.QName getPartQName(){
  		return null;
  	}
  	public void setInteractionSpec(InteractionSpec is){
  		
  	}
  
  }
  
  
  
  
  1.1                  xml-axis-wsif/java/samples/jca/ra/com/myeis/j2c/importservice/myeis/myeis/ImportDefinitionFormatHandler.java
  
  Index: ImportDefinitionFormatHandler.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 com.myeis.j2c.importservice.myeis.myeis;
  
  import java.io.*;
  
  import javax.resource.cci.InteractionSpec;
  import javax.xml.namespace.QName;
  
  import org.apache.wsif.providers.jca.toolplugin.*;
  import org.apache.wsif.providers.jca.WSIFFormatHandler_JCA;
  
  public class ImportDefinitionFormatHandler implements WSIFFormatHandler_JCA {
  
  	private ImportDefinition fieldImportDefinition = null;
  
  	/**
  	 * @see JCAFormatHandler#read(InputStream)
  	 */
  	public void read(InputStream inputStream) throws IOException {
  
  		try {
  			ObjectInputStream objectInputStream = new ObjectInputStream(inputStream);
  			this.fieldImportDefinition =
  				(ImportDefinition)objectInputStream.readObject();
  		} catch (ClassNotFoundException e) {
  			e.printStackTrace();
  			throw new IOException("class not found !");
  		}		
  	}
  
  	/**
  	 * @see JCAFormatHandler#write(OutputStream)
  	 */
  	public void write(OutputStream outputStream) throws IOException {
  
          ObjectOutputStream objectOutputStream = new ObjectOutputStream(outputStream);
          objectOutputStream.writeObject(this.fieldImportDefinition);
          objectOutputStream.flush();
      }
  
  	/**
  	 * @see WSIFFormatHandler#getElement(String)
  	 */
  	public Object getElement(String elementName) {
  		return null;
  	}
  
  	/**
  	 * @see WSIFFormatHandler#setElement(String, Object)
  	 */
  	public void setElement(String elementName, Object element) {
  	}
  
  	/**
  	 * @see WSIFFormatHandler#getElement(String, int)
  	 */
  	public Object getElement(String name, int index) {
  		return null;
  	}
  
  	/**
  	 * @see WSIFFormatHandler#setElement(String, int, Object)
  	 */
  	public void setElement(String name, int index, Object value) {
  	}
  
  	/**
  	 * @see WSIFFormatHandler#getObjectPart()
  	 */
  	public Object getObjectPart() {
  		return this.fieldImportDefinition;
  	}
  
  	/**
  	 * @see WSIFFormatHandler#getObjectPart(Class)
  	 */
  	public Object getObjectPart(Class sourceClass) {
  		return null;
  	}
  
  	/**
  	 * @see WSIFFormatHandler#setObjectPart(Object)
  	 */
  	public void setObjectPart(Object objectPart) {
  		this.fieldImportDefinition = (ImportDefinition)objectPart;
  	}
  
  	public void setPartQName(QName qname){
  	}
  	
  	public QName getPartQName(){
  		return null;
  	}
  	public void setInteractionSpec(InteractionSpec is){
  		
  	}
  	
  }
  
  
  
  
  1.1                  xml-axis-wsif/java/samples/jca/ra/com/myeis/repository/Repository.java
  
  Index: Repository.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 com.myeis.repository;
  
  import java.io.InputStream;
  import java.io.StringReader;
  import java.util.*;
  
  import javax.wsdl.*;
  import javax.xml.namespace.QName;
  
  import org.apache.wsif.base.WSIFServiceImpl;
  import org.apache.wsif.providers.jca.toolplugin.*;
  import org.apache.wsif.util.WSIFUtils;
  
  import com.ibm.wsdl.PortTypeImpl;
  import com.myeis.wsdl.extensions.j2c.myeis.MyEISExtensionRegistry;
  import com.ibm.wsdl.xml.*;
  
  public class Repository {
  
  	public PortTypeArray getPortTypes(String queryString) {
  		/*
  		 * If the back end exposes business functions that allow the browsing of the metadata then getting the port types can
  		 * be delegated directly. In this sample, the metadata is represented by the two WSDL files (CustomerInfo and PurchaseOrderInfo).
  		 * Hence, we simply retrieve those files and return their corresponding port types.
  		 */
  		ArrayList portTypes = new ArrayList();
  		try {
  			WSIFServiceImpl.addExtensionRegistry(new MyEISExtensionRegistry());
  			WSIFServiceImpl.addExtensionRegistry(new org.apache.wsif.wsdl.extensions.format.FormatExtensionRegistry());
  			WSIFServiceImpl.addExtensionRegistry(new org.apache.wsif.wsdl.extensions.java.JavaExtensionRegistry());
  			// load all definitions
  			ArrayList definitions = new ArrayList();
  			Definition definition = WSIFUtils.readWSDL(null, "com/myeis/services/CustomerInfo.wsdl", this.getClass().getClassLoader());
  			definitions.add(definition);
  			definition = WSIFUtils.readWSDL(null, "com/myeis/services/PurchaseOrderInfo.wsdl", this.getClass().getClassLoader());
  			definitions.add(definition);
  
  			Iterator definitionIterator = definitions.iterator();
  			while (definitionIterator.hasNext()) {
  				definition = (Definition) definitionIterator.next();
  				Iterator portTypeIterator = definition.getPortTypes().values().iterator();
  				while (portTypeIterator.hasNext()) {
  					PortType portType = (PortType) portTypeIterator.next();
  					if ((queryString.equals("")) || (queryString.equals("*")) || (portType.getQName().getLocalPart().indexOf(queryString) != -1)) {
  						portTypes.add(portType);
  					}
  				}
  			}
  		} catch (Exception e) {
  			e.printStackTrace();
  		}
  
  		PortType[] portTypeA = new PortType[portTypes.size()];
  		portTypes.toArray(portTypeA);
  		PortTypeArray portTypeArray = new PortTypeArray();
  		portTypeArray.setPortTypes(portTypeA);
  
  		return portTypeArray;
  	}
  
  	public ImportDefinition getDefinition(PortTypeSelection portTypeSelection) {
  		/*
  		 * If the back end exposes business functions that allow the browsing of the metadata then getting the definitions can
  		 * be delegated directly. In this sample, the metadata is represented by the two WSDL files (CustomerInfo and PurchaseOrderInfo).
  		 * Hence, we simply retrieve those files and filter their corresponding port types and operations based on the selection passed in.
  		 */
  		ArrayList importDefinitions = new ArrayList();
  		ArrayList importDefinitionsResult = new ArrayList();
  		try {
  			WSIFServiceImpl.addExtensionRegistry(new MyEISExtensionRegistry());
  			WSIFServiceImpl.addExtensionRegistry(new org.apache.wsif.wsdl.extensions.format.FormatExtensionRegistry());
  			WSIFServiceImpl.addExtensionRegistry(new org.apache.wsif.wsdl.extensions.java.JavaExtensionRegistry());
  			// load all definitions
  			ImportDefinition importDefinition = new ImportDefinition();
  			importDefinition.setDefinition(WSIFUtils.readWSDL(null, "com/myeis/services/CustomerInfo.wsdl", this.getClass().getClassLoader()));
  
  			ImportResource[] importResources = new ImportResource[1];
  			ImportResource importResource = new ImportResource();
  			importResource.setLocation("com/myeis/services/MyEISFormatHandlerGenMetaData.eis");
  			String metaData = "MyEIS Resource Adapter version 1.0 meta data";
  			importResource.setContents(metaData.getBytes());
  			importResources[0] = importResource;
  
  			ImportXSD[] importXSDs = new ImportXSD[1];
  			ImportXSD importXSD = new ImportXSD();
  			importXSD.setNamespace("http://services.myeis.ibm.com/");
  			importXSD.setLocation("com/myeis/services/CustomerInfo.xsd");
  
  			InputStream inputStream = this.getClass().getClassLoader().getResourceAsStream("com/myeis/services/CustomerInfo.xsd");
  			byte[] inputBytes = new byte[inputStream.available()];
  			inputStream.read(inputBytes);
  			importXSD.setSource(new String(inputBytes));
  
  			importXSDs[0] = importXSD;
  			importDefinition.setImportXSDs(importXSDs);
  			importDefinitions.add(importDefinition);
  
  			importDefinition = new ImportDefinition();
  			importDefinition.setDefinition(WSIFUtils.readWSDL(null, "com/myeis/services/PurchaseOrderInfo.wsdl", this.getClass().getClassLoader()));
  			importXSDs = new ImportXSD[1];
  			importXSD = new ImportXSD();
  			importXSD.setNamespace("http://services.myeis.ibm.com/");
  			importXSD.setLocation("com/myeis/services/PurchaseOrderInfo.xsd");
  
  			inputStream = this.getClass().getClassLoader().getResourceAsStream("com/myeis/services/PurchaseOrderInfo.xsd");
  			inputBytes = new byte[inputStream.available()];
  			inputStream.read(inputBytes);
  			importXSD.setSource(new String(inputBytes));
  
  			importXSDs[0] = importXSD;
  			importDefinition.setImportXSDs(importXSDs);
  			importDefinition.setImportResources(importResources);
  			importDefinitions.add(importDefinition);
  
  			for (int j = 0; j < importDefinitions.size(); j++) {
  				if (((ImportDefinition) importDefinitions.get(j)).getDefinition().getPortTypes().containsKey(portTypeSelection.getPortTypeQName())) {
  
  					ImportDefinition returnDefinition = (ImportDefinition) importDefinitions.get(j);
  					Definition def = returnDefinition.getDefinition();
  
  					//Adjust the import statements to be relative paths
  					Iterator importIter = def.getImports().values().iterator();
  					while (importIter.hasNext()) {
  						List imports = (List) importIter.next();
  						Iterator listIterator = imports.iterator();
  						while (listIterator.hasNext()) {
  							javax.wsdl.Import imp = (javax.wsdl.Import) listIterator.next();
  							if (imp.getLocationURI().startsWith("/com/myeis/services/")) {
  								imp.setLocationURI("." + imp.getLocationURI());
  							}
  						}
  
  					}
  					//Remove all the portTypes that were not part of the selection
  
  					Iterator iter = def.getPortTypes().keySet().iterator();
  					List unusedPortTypes = new ArrayList();
  					PortType selectedPortType = null;
  					while (iter.hasNext()) {
  						QName portTypeQName = (QName) iter.next();
  						if (!portTypeQName.equals(portTypeSelection.getPortTypeQName())) {
  							unusedPortTypes.add(portTypeQName);
  						} else {
  							selectedPortType = def.getPortType(portTypeQName);
  						}
  					}
  					iter = unusedPortTypes.iterator();
  					while (iter.hasNext()) {
  						def.removePortType((QName) iter.next());
  					}
  
  					//Remove all the operations that were not part of the selection
  					List operationList = selectedPortType.getOperations();
  					List selectedOperationsList = new ArrayList();
  					for (int index = 0; index < portTypeSelection.getOperationSelection().length; index++) {
  						OperationSelection selection = portTypeSelection.getOperationSelection()[index];
  						Operation op = selectedPortType.getOperation(selection.getOperationName(), selection.getInputName(), selection.getOutputName());
  						if (op != null) {
  							selectedOperationsList.add(op);
  						}
  					}
  
  					iter = operationList.iterator();
  					List unusedOperationsList = new ArrayList();
  
  					while (iter.hasNext()) {
  						Operation op = (Operation) iter.next();
  						if (!selectedOperationsList.contains(op)) {
  							unusedOperationsList.add(op);
  						}
  					}
  
  					iter = unusedOperationsList.iterator();
  					while (iter.hasNext()) {
  						Operation op = (Operation) iter.next();
  						operationList.remove(op);
  						Iterator bindingIterator = def.getBindings().values().iterator();
  						while (bindingIterator.hasNext()) {
  							Binding binding = (Binding) bindingIterator.next();
  							String inputName = null;
  							if (op.getInput() != null)
  								inputName = op.getInput().getName();
  
  							String outputName = null;
  							if (op.getOutput() != null)
  								outputName = op.getOutput().getName();
  							BindingOperation bindingOp = binding.getBindingOperation(op.getName(), inputName, outputName);
  							if (bindingOp != null)
  								binding.getBindingOperations().remove(bindingOp);
  						}
  					}
  
  					return returnDefinition;
  				}
  			}
  			//			}
  		} catch (Exception e) {
  			e.printStackTrace();
  		}
  		return null;
  	}
  
  	public byte[] getRawEISMetaData(String queryString) {
  		/*
  		 * This method is just for illustrative purposes, to demonstrate how an EIS can return a proprietary metadata format.
  		 * This metadata can be cached in tool environments for performance improvements if several services are to be imported from 
  		 * the same EIS system.
  		 */
  		String customerInfoData = "PortType: CustomerInfo\n Operation: getAddress\n Operation: getCustomer\n";
  		String purchaseOrderData = "PortType: PurchaseOrderInfo\n Operation: getPurchaseOrder\n";
  		String result = new String();
  		if ((queryString.equals("")) || (queryString.equals("*"))) {
  			result = customerInfoData + purchaseOrderData;
  
  		} else {
  			if ("CustomerInfo".indexOf(queryString) != -1) {
  				result = result + customerInfoData;
  			}
  			if ("PurchaseOrderInfo".indexOf(queryString) != -1) {
  				result = result + purchaseOrderData;
  			}
  
  		}
  		return result.getBytes();
  	}
  }
  
  
  1.1                  xml-axis-wsif/java/samples/jca/ra/com/myeis/wsdl/extensions/j2c/myeis/MyEISAddress.java
  
  Index: MyEISAddress.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 com.myeis.wsdl.extensions.j2c.myeis;
  
  import javax.wsdl.*;
  import javax.xml.namespace.*;
  
  /**
   * Insert the type's description here.
   * Creation date: (6/23/2001 8:34:57 PM)
   * @author: Administrator
   */
  public class MyEISAddress
  	implements java.io.Serializable, javax.wsdl.extensions.ExtensibilityElement {
  
  	private javax.xml.namespace.QName fieldElementType = MyEISBindingConstants.Q_ELEM_ADDRESS;
  	private Boolean required = null;
  
  	private String fieldRepositoryLocation = "local";
  
  	/**
  	 * EISAddress constructor comment.
  	 */
  	public MyEISAddress() {
  		super();
  	}
  	/**
  	  * Get the type of this extensibility element. 
  	  *
  	  * @return the extensibility element's type
  	  */
  	public javax.xml.namespace.QName getElementType() {
  		return fieldElementType;
  	}
  	/**
  	  * Get whether or not the semantics of this extension
  	  * are required. Relates to the wsdl:required attribute.
  	  */
  	public Boolean getRequired() {
  		return required;
  	}	
  	/**
  	 * Insert the method's description here.
  	 * Creation date: (7/25/2001 3:17:56 AM)
  	 * @return java.lang.String
  	 */
  	public java.lang.String getRepositoryLocation() {
  		return fieldRepositoryLocation;
  	}
  	/**
  	  * Set the type of this extensibility element.
  	  *
  	  * @param elementType the type
  	  */
  	public void setElementType(javax.xml.namespace.QName elementType) {
  		this.fieldElementType = elementType;
  	}
  	/**
  	  * Set whether or not the semantics of this extension
  	  * are required. Relates to the wsdl:required attribute.
  	  */
  	public void setRequired(Boolean required) {
  		this.required = required;
  	}
  	/**
  	 * Insert the method's description here.
  	 * Creation date: (7/25/2001 3:17:56 AM)
  	 * @param newLanguage java.lang.String
  	 */
  	public void setRepositoryLocation(java.lang.String repositoryLocation) {
  		fieldRepositoryLocation = repositoryLocation;
  	}
  }
  
  
  1.1                  xml-axis-wsif/java/samples/jca/ra/com/myeis/wsdl/extensions/j2c/myeis/MyEISOperation.java
  
  Index: MyEISOperation.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 com.myeis.wsdl.extensions.j2c.myeis;
  
  import javax.xml.namespace.*;
  
  /**
   * Insert the type's description here.
   * Creation date: (6/23/2001 8:32:04 PM)
   * @author: Administrator
   */
  public class MyEISOperation
  	implements javax.wsdl.extensions.ExtensibilityElement, java.io.Serializable {
  
  	private QName fieldElementType = MyEISBindingConstants.Q_ELEM_OPERATION;
  	private Boolean required = null;
  
  	private String fieldFunctionName = null;
  
  	/**
  	 * CICSOperation constructor comment.
  	 */
  	public MyEISOperation() {
  		super();
  	}
  	/**
  	  * Get the type of this extensibility element.
  	  *
  	  * @return the extensibility element's type
  	  */
  	public javax.xml.namespace.QName getElementType() {
  		return fieldElementType;
  	}
  	/**
  	  * Get whether or not the semantics of this extension
  	  * are required. Relates to the wsdl:required attribute.
  	  */
  	public Boolean getRequired() {
  		return required;
  	}
  	/**
  	 * Insert the method's description here.
  	 * Creation date: (7/25/2001 3:17:56 AM)
  	 * @return java.lang.String
  	 */
  	public java.lang.String getFunctionName() {
  		return fieldFunctionName;
  	}
  	/**
  	  * Set the type of this extensibility element.
  	  *
  	  * @param elementType the type
  	  */
  	public void setElementType(javax.xml.namespace.QName elementType) {
  	}
  	/**
  	  * Set whether or not the semantics of this extension
  	  * are required. Relates to the wsdl:required attribute.
  	  */
  	public void setRequired(Boolean required) {
  		this.required = required;
  	}
  	/**
  	 * Insert the method's description here.
  	 * Creation date: (7/25/2001 3:17:56 AM)
  	 * @param functionName java.lang.String
  	 */
  	public void setFunctionName(java.lang.String functionName) {
  		fieldFunctionName = functionName;
  	}
  }
  
  
  1.1                  xml-axis-wsif/java/samples/jca/ra/com/myeis/wsdl/extensions/j2c/myeis/MyEISBindingSerializer.java
  
  Index: MyEISBindingSerializer.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 com.myeis.wsdl.extensions.j2c.myeis;
  
  import java.io.*;
  import java.util.*;
  import javax.wsdl.*;
  import javax.xml.namespace.*;
  import javax.wsdl.extensions.*;
  import com.ibm.wsdl.*;
  import com.ibm.wsdl.util.xml.*;
  
  /**
   * Insert the type's description here.
   * Creation date: (5/21/2001 8:48:12 PM)
   * @author: Administrator
   */
  public class MyEISBindingSerializer
  	implements
  		javax.wsdl.extensions.ExtensionDeserializer,
  		javax.wsdl.extensions.ExtensionSerializer,
  		java.io.Serializable {
  	/**
  	 * ConnectorBindingSerializer constructor comment.
  	 */
  	public MyEISBindingSerializer() {
  		super();
  	}
  
  	/**
  	  * 
  	  */
  	public void marshall(
  		Class parentType,
  		javax.xml.namespace.QName extensionType,
  		javax.wsdl.extensions.ExtensibilityElement extension,
  		java.io.PrintWriter pw,
  		javax.wsdl.Definition def,
  		javax.wsdl.extensions.ExtensionRegistry extReg)
  		throws javax.wsdl.WSDLException {
  
  		if (extension == null)
  			return;
  
  		//Get the EIS namespace prefix from this definition	
  		String TPrefix = null;
  		Map nameSpaces = def.getNamespaces();
  		Iterator i = nameSpaces.keySet().iterator();
  
  		while (i.hasNext()) {
  			String prefix = (String) i.next();
  			String namespaceURI = (String) nameSpaces.get(prefix);
  			if (namespaceURI.equals(MyEISBindingConstants.NS_URI)) {
  				TPrefix = prefix;
  				break;
  			}
  		}
  
  		//Check if the namespace prefix was found. if not thrwo an exception
  		if (TPrefix == null)
  			throw new WSDLException(
  				"001",
  				"The EIS binding namespace was not found in the definition");
  
  		if (extension instanceof MyEISBinding) {
  			MyEISBinding binding = (MyEISBinding) extension;
  			pw.print("      <" + TPrefix + ":binding");
  
  			Boolean required = extension.getRequired();
  			if (required != null) {
  				DOMUtils.printQualifiedAttribute(
  					Constants.Q_ATTR_REQUIRED,
  					required.toString(),
  					def,
  					pw);
  			}
  
  			pw.println("/>");
  		} else
  			if (extension instanceof MyEISOperation) {
  				MyEISOperation operation = (MyEISOperation) extension;
  				pw.print("      <" + TPrefix + ":operation");
  				
  				if (operation.getFunctionName() != null) {
  					DOMUtils.printAttribute("functionName", operation.getFunctionName(), pw);
  				}
  
  				Boolean required = extension.getRequired();
  				if (required != null) {
  					DOMUtils.printQualifiedAttribute(
  						Constants.Q_ATTR_REQUIRED,
  						required.toString(),
  						def,
  						pw);
  				}
  
  				pw.println("/>");
  			} else
  				if (extension instanceof MyEISAddress) {
  					MyEISAddress address = (MyEISAddress) extension;
  					pw.print("      <" + TPrefix + ":address");
  
  					if (address.getRepositoryLocation() != null) {
  						DOMUtils.printAttribute("repositoryLocation", address.getRepositoryLocation(), pw);
  					}
  
  					Boolean required = extension.getRequired();
  					if (required != null) {
  						DOMUtils.printQualifiedAttribute(
  							Constants.Q_ATTR_REQUIRED,
  							required.toString(),
  							def,
  							pw);
  					}
  					pw.println("/>");
  				}
  	}
  	/**
  	 * unmarshall method comment.
  	 */
  	public javax.wsdl.extensions.ExtensibilityElement unmarshall(
  		Class parentType,
  		javax.xml.namespace.QName elementType,
  		org.w3c.dom.Element el,
  		javax.wsdl.Definition def,
  		javax.wsdl.extensions.ExtensionRegistry extReg)
  		throws javax.wsdl.WSDLException {
  
  		javax.wsdl.extensions.ExtensibilityElement returnValue = null;
  
  		if (MyEISBindingConstants.Q_ELEM_BINDING.equals(elementType)) {
  			MyEISBinding binding = new MyEISBinding();
  
  			return binding;
  		} else
  			if (MyEISBindingConstants.Q_ELEM_OPERATION.equals(elementType)) {
  				MyEISOperation operation = new MyEISOperation();
  						
  				String functionName = DOMUtils.getAttribute(el, "functionName");
  				if (functionName != null) {
  					operation.setFunctionName(functionName);
  				}
  				return operation;
  			} else
  				if (MyEISBindingConstants.Q_ELEM_ADDRESS.equals(elementType)) {
  					MyEISAddress address = new MyEISAddress();
  
  					String repositoryLocation = DOMUtils.getAttribute(el, "repositoryLocation");
  					if (repositoryLocation != null) {
  						address.setRepositoryLocation(repositoryLocation);
  					}
  					return address;
  				}
  					
  		return returnValue;
  	}
  }
  
  
  1.1                  xml-axis-wsif/java/samples/jca/ra/com/myeis/wsdl/extensions/j2c/myeis/MyEISBindingConstants.java
  
  Index: MyEISBindingConstants.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 com.myeis.wsdl.extensions.j2c.myeis;
  
  import javax.xml.namespace.*;
  
  public class MyEISBindingConstants {
  
  	// Namespace URIs.
  	public static final String NS_URI = "http://schemas.xmlsoap.org/wsdl/myeis/";
  
  	// Element names.
  	public static final String ELEM_BINDING = "binding";
  	public static final String ELEM_OPERATION = "operation";
  	public static final String ELEM_ADDRESS = "address";
  
  	// Qualified element names.
  	public static final QName Q_ELEM_BINDING = new QName(NS_URI, ELEM_BINDING);
  	public static final QName Q_ELEM_OPERATION = new QName(NS_URI, ELEM_OPERATION);
  	public static final QName Q_ELEM_ADDRESS = new QName(NS_URI, ELEM_ADDRESS);
  }
  
  
  
  1.1                  xml-axis-wsif/java/samples/jca/ra/com/myeis/wsdl/extensions/j2c/myeis/MyEISExtensionRegistry.java
  
  Index: MyEISExtensionRegistry.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 com.myeis.wsdl.extensions.j2c.myeis;
  
  /**
   * Insert the type's description here.
   * Creation date: (12/09/2001 1:07:45 PM)
   * @author: Administrator
   */
  public class MyEISExtensionRegistry
  	extends javax.wsdl.extensions.ExtensionRegistry {
  	/**
  	 * Insert the method's description here.
  	 * Creation date: (12/09/2001 1:08:17 PM)
  	 */
  	public MyEISExtensionRegistry() {
  		MyEISBindingSerializer ser = new MyEISBindingSerializer();
  		// binding	
  		this.registerSerializer(javax.wsdl.Binding.class, MyEISBindingConstants.Q_ELEM_BINDING, ser);
  		this.registerDeserializer(
  			javax.wsdl.Binding.class,
  			MyEISBindingConstants.Q_ELEM_BINDING,
  			ser);
  
  		// operation
  		this.registerSerializer(
  			javax.wsdl.BindingOperation.class,
  			MyEISBindingConstants.Q_ELEM_OPERATION,
  			ser);
  		this.registerDeserializer(
  			javax.wsdl.BindingOperation.class,
  			MyEISBindingConstants.Q_ELEM_OPERATION,
  			ser);
  
  		// address
  		this.registerSerializer(javax.wsdl.Port.class, MyEISBindingConstants.Q_ELEM_ADDRESS, ser);
  		this.registerDeserializer(
  			javax.wsdl.Port.class,
  			MyEISBindingConstants.Q_ELEM_ADDRESS,
  			ser);
  	}
  
  }
  
  
  1.1                  xml-axis-wsif/java/samples/jca/ra/com/myeis/wsdl/extensions/j2c/myeis/MyEISBinding.java
  
  Index: MyEISBinding.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 com.myeis.wsdl.extensions.j2c.myeis;
  
  import javax.xml.namespace.*;
  
  /**
   * Insert the type's description here.
   * Creation date: (6/23/2001 8:33:02 PM)
   * @author: Administrator
   */
  public class MyEISBinding
  	implements javax.wsdl.extensions.ExtensibilityElement, java.io.Serializable {
  
  	private QName fieldElementType = MyEISBindingConstants.Q_ELEM_BINDING;
  	private Boolean required = null;
  
  	/**
  	 * CICSBinding constructor comment.
  	 */
  	public MyEISBinding() {
  		super();
  	}
  
  	/**
  	  * Get the type of this extensibility element.
  	  *
  	  * @return the extensibility element's type
  	  */
  	public javax.xml.namespace.QName getElementType() {
  		return fieldElementType;
  	}
  	/**
  	  * Get whether or not the semantics of this extension
  	  * are required. Relates to the wsdl:required attribute.
  	  */
  	public Boolean getRequired() {
  		return required;
  	}
  	/**
  	  * Set the type of this extensibility element.
  	  *
  	  * @param elementType the type
  	  */
  	public void setElementType(javax.xml.namespace.QName elementType) {
  
  		this.fieldElementType = elementType;
  	}
  	/**
  	  * Set whether or not the semantics of this extension
  	  * are required. Relates to the wsdl:required attribute.
  	  */
  	public void setRequired(Boolean required) {
  		this.required = required;
  	}
  }
  
  
  1.1                  xml-axis-wsif/java/samples/jca/ra/com/myeis/j2c/formathandler/MyEISFormatHandlerGenerator.java
  
  Index: MyEISFormatHandlerGenerator.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 com.myeis.j2c.formathandler;
  
  import java.beans.BeanInfo;
  import java.beans.Introspector;
  import java.beans.PropertyDescriptor;
  import java.io.ByteArrayInputStream;
  import java.io.IOException;
  import java.io.InputStream;
  import java.io.InputStreamReader;
  import java.lang.reflect.Method;
  import java.util.Hashtable;
  
  import javax.wsdl.Binding;
  import javax.wsdl.Definition;
  import javax.xml.namespace.QName;
  /*
  * The class implementing FormatHandlerGenerator interface that 
  * provides view for generating 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> or <code>CustomFormatHandlerGenerator.XSD_ELEMENT</code>
  * @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.
  */
  
  import org.apache.wsif.WSIFException;
  import org.apache.wsif.providers.jca.toolplugin.FormatHandlerGenerator;
  import org.apache.wsif.util.WSIFUtils;
  
  public class MyEISFormatHandlerGenerator implements FormatHandlerGenerator {
  
  	/**
  	 * @see org.apache.wsif.providers.jca.toolplugin.FormatHandlerGenerator#generate(String, String, Definition, Binding, String, String, QName, int, Object)
  	 */
  	public 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) throws WSIFException
  		{
  
  		if (!anEncoding.equals("myeis")) {
  			System.err.println("Encoding: " + anEncoding);
  			return null;
  		}
  
  		ClassLoader threadClassLoader = Thread.currentThread().getContextClassLoader();
  		String definitionPackageName = WSIFUtils.getPackageNameFromNamespaceURI(aDefinition.getTargetNamespace());
  		definitionPackageName = definitionPackageName.replace('.','/');
  		String metaDataFile = "com/myeis/services/MyEISFormatHandlerGenMetaData.eis";
  		InputStream metaDataStream = threadClassLoader.getResourceAsStream(metaDataFile);
  		String metaDatafield =  null;
  		
  		if (metaDataStream != null) {
  			try {
  				//Read in the contents of the stream
  				InputStreamReader reader = new InputStreamReader(metaDataStream);
  				char buffer[] = new char[1024];
  				StringBuffer data = new StringBuffer();
  				int length;
  				length = reader.read(buffer);
  				while (length > 0) {
  					data.append(buffer, 0, length);
  					length = reader.read(buffer);
  				}
  				metaDatafield = data.toString();
  			} catch (IOException e) {
  				//Error occured reading metadata
  				throw new WSIFException("Error occurred reading metadata needed for format handler generator!",e);
  			}
  
  		}
  
  		String beanClassName = beanClass.substring(beanClass.lastIndexOf(".") + 1, beanClass.length());
  		String beanClassField = "field" + beanClassName;
  		String formatHandlerClassName = beanClassName + "FormatHandler";
  
  		StringBuffer buffer = new StringBuffer();
  
  		buffer.append("package " + generationPackage + ";\n");
  		buffer.append(importsGen);
  		buffer.append("public class " + beanClassName + "FormatHandler implements WSIFFormatHandler_JCA {\n");
  
  		buffer.append("private " + beanClassName + " " + beanClassField + " = null;\n");
  		
  		if(metaDatafield!=null && metaDatafield.length()>0){
  			buffer.append("private static String META_DATA_A = \""+ metaDatafield+"\";\n");
  		}
  		
  
  		buffer.append("public void read(InputStream inputStream) throws IOException {\n");
  		buffer.append("	try {\n");
  		buffer.append("		ObjectInputStream objectInputStream = new ObjectInputStream(inputStream);\n");
  		buffer.append("		Object obj = (Object)objectInputStream.readObject();\n");
  		buffer.append("		if(obj instanceof "+beanClassName+"){\n");
  		buffer.append("			this."+ beanClassField +" = ("+ beanClassName + ")obj;\n");
  		buffer.append("		}else if (obj instanceof com.myeis.services.internal."+beanClassName+"DataObject){\n");
  		buffer.append("			com.myeis.services.internal."+ beanClassName + "DataObject a"+ beanClassName + " = (com.myeis.services.internal."+ beanClassName + "DataObject)obj;\n");
  		buffer.append("			this."+ beanClassField +" = new "+ beanClassName +"();\n");
  		
  		try {
  			Class bean =
  				Class.forName("com.myeis.services.internal." + beanClassName+"DataObject");
  			BeanInfo bInfo = Introspector.getBeanInfo(bean);
  			if (bInfo != null) {
  				PropertyDescriptor properties[] =
  					bInfo.getPropertyDescriptors();
  				for (int i = 0; i < properties.length; i++) {
  					Method writer = properties[i].getWriteMethod();
  					Method reader = properties[i].getReadMethod();
  					if (reader != null && writer != null) {
  						String setter = writer.getName();
  						String getter = reader.getName();
  						buffer.append(
  							"			this."
  								+ beanClassField
  								+ "."
  								+ setter
  								+ "(a"
  								+ beanClassName
  								+ "."
  								+ getter
  								+ "());\n");
  					}
  				}
  			}
  		} catch (Exception e) {
  //			throw new WSIFException(
  //				"Error occurred introspecting bean properties in format handler generator!",
  //				e);
  
  			buffer.append(" String ex ="+e+";\n");
  		}
  	
  		buffer.append("		}\n");
  		buffer.append("	} catch (ClassNotFoundException e) {\n");
  		buffer.append("		e.printStackTrace();\n");
  		buffer.append("		throw new IOException(\"class not found !\");\n");
  		buffer.append("	}		\n");
  		buffer.append("}\n\n");
  		buffer.append("public void write(OutputStream outputStream) throws IOException {\n");
  
  		buffer.append("    ObjectOutputStream objectOutputStream = new ObjectOutputStream(outputStream);\n");
  		buffer.append("    objectOutputStream.writeObject(this." + beanClassField + ");\n");
  		buffer.append("    objectOutputStream.flush();\n");
  		buffer.append("}\n\n");
  
  		buffer.append("public void setObjectPart(Object objectPart) {\n");
  		buffer.append("	this." + beanClassField + " = (" + beanClassName + ")objectPart;\n");
  		buffer.append("}\n\n");
  		buffer.append("public Object getObjectPart() {\n");
  		buffer.append("	return this." + beanClassField + ";\n");
  		buffer.append("}\n\n");
  
  		buffer.append("public Object getObjectPart(Class sourceClass) {\n");
  		buffer.append("	try{\n");
  		buffer.append("		if (sourceClass.isAssignableFrom(Class.forName(\"javax.xml.transform.sax.SAXSource\"))){\n");
  		buffer.append("			SAXSource saxSource = new SAXSource(new InputSource());\n");
  		buffer.append("			XMLReader reader = new ContentReader();\n");
  		buffer.append("			saxSource.setXMLReader(reader);\n");
  		buffer.append("			return saxSource;\n");
  		buffer.append("		}\n");
  		buffer.append("	}\n");
  		buffer.append("	catch (Throwable e) {\n");
  		buffer.append("	}\n");
  
  		buffer.append("	return null;\n");
  		buffer.append("}\n\n");
  
  		buffer.append(defaultMethodsGen);
  
  		writeContentReader(buffer, beanClassField);
  		buffer.append("}"); // end of class
  
  		ByteArrayInputStream inputStream = new ByteArrayInputStream(buffer.toString().getBytes());
  		Hashtable returnTable = new Hashtable();
  		returnTable.put(formatHandlerClassName, inputStream);
  		return returnTable;
  
  	}
  
  	private void writeContentReader(StringBuffer buffer, String beanClassField) {
  		buffer.append("public class ContentReader implements org.xml.sax.XMLReader {\n");
  		buffer.append("	private ContentHandler fieldContentHandler = null;\n");
  
  		buffer.append("	public org.xml.sax.ContentHandler getContentHandler() {return null;}\n");
  		buffer.append("	public org.xml.sax.DTDHandler getDTDHandler() {return null;}\n");
  		buffer.append("	public org.xml.sax.EntityResolver getEntityResolver() {return null;}\n");
  		buffer.append("	public org.xml.sax.ErrorHandler getErrorHandler() {return null;}\n");
  		buffer.append("	public boolean getFeature(String name) throws org.xml.sax.SAXNotSupportedException, org.xml.sax.SAXNotRecognizedException {return false;}\n");
  		buffer.append("	public Object getProperty(String name) throws org.xml.sax.SAXNotSupportedException, org.xml.sax.SAXNotRecognizedException {return null;}\n");
  		buffer.append("	public void setDTDHandler(org.xml.sax.DTDHandler handler) {}\n");
  		buffer.append("	public void setEntityResolver(org.xml.sax.EntityResolver resolver) {}\n");
  		buffer.append("	public void setErrorHandler(org.xml.sax.ErrorHandler handler) {}\n");
  		buffer.append("	public void setFeature(String name, boolean value) throws org.xml.sax.SAXNotSupportedException, org.xml.sax.SAXNotRecognizedException {}\n");
  		buffer.append("	public void setProperty(String name, Object value) throws org.xml.sax.SAXNotSupportedException, org.xml.sax.SAXNotRecognizedException {}\n");
  		buffer.append("	public void parse(String systemId) throws java.io.IOException, org.xml.sax.SAXException {}\n");
  		buffer.append("	public void parse(org.xml.sax.InputSource input) throws java.io.IOException, org.xml.sax.SAXException {\n");
  		buffer.append("		try {\n");
  		buffer.append("			Attributes attributes = new AttributesImpl();\n");
  		buffer.append("			this.fieldContentHandler.startDocument();\n");
  
  		if (beanClassField.equals("fieldCustomer")) {
  
  			buffer.append("		this.fieldContentHandler.startElement(\"\", \"number\", \"number\", attributes);\n");
  			buffer.append("				this.fieldContentHandler.characters(" + beanClassField + ".getNumber().toCharArray(), 0, " + beanClassField + ".getNumber().length());\n");
  			buffer.append("		this.fieldContentHandler.endElement(\"\", \"number\", \"number\");\n");
  			buffer.append("		this.fieldContentHandler.startElement(\"\", \"firstName\", \"firstName\", attributes);\n");
  			buffer.append("			this.fieldContentHandler.characters(" + beanClassField + ".getFirstName().toCharArray(), 0, " + beanClassField + ".getFirstName().length());\n");
  			buffer.append("		this.fieldContentHandler.endElement(\"\", \"firstName\", \"firstName\");\n");
  			buffer.append("		this.fieldContentHandler.startElement(\"\", \"lastName\", \"lastName\", attributes);\n");
  			buffer.append("			this.fieldContentHandler.characters(" + beanClassField + ".getLastName().toCharArray(), 0, " + beanClassField + ".getLastName().length());\n");
  			buffer.append("		this.fieldContentHandler.endElement(\"\", \"lastName\", \"lastName\");\n");
  		} else if (beanClassField.equals("fieldPurchaseOrder")) {
  			buffer.append("		this.fieldContentHandler.startElement(\"\", \"orderNumber\", \"orderNumber\", attributes);\n");
  			buffer.append("			this.fieldContentHandler.characters(" + beanClassField + ".getOrderNumber().toCharArray(), 0, " + beanClassField + ".getOrderNumber().length());\n");
  			buffer.append("		this.fieldContentHandler.endElement(\"\", \"orderNumber\", \"orderNumber\");\n");
  
  			buffer.append("		this.fieldContentHandler.startElement(\"\", \"description\", \"description\", attributes);\n");
  			buffer.append("			this.fieldContentHandler.characters(" + beanClassField + ".getDescription().toCharArray(), 0, " + beanClassField + ".getDescription().length());\n");
  			buffer.append("		this.fieldContentHandler.endElement(\"\", \"description\", \"description\");\n");
  
  			buffer.append("		this.fieldContentHandler.startElement(\"\", \"partNumber\", \"partNumber\", attributes);\n");
  			buffer.append("			this.fieldContentHandler.characters(" + beanClassField + ".getPartNumber().toCharArray(), 0, " + beanClassField + ".getPartNumber().length());\n");
  			buffer.append("		this.fieldContentHandler.endElement(\"\", \"partNumber\", \"partNumber\");\n");
  
  		} else if (beanClassField.equals("fieldAddress")) {
  			buffer.append("		this.fieldContentHandler.startElement(\"\", \"customerNumber\", \"customerNumber\", attributes);\n");
  			buffer.append("			this.fieldContentHandler.characters(" + beanClassField + ".getCustomerNumber().toCharArray(), 0, " + beanClassField + ".getCustomerNumber().length());\n");
  			buffer.append("		this.fieldContentHandler.endElement(\"\", \"customerNumber\", \"customerNumber\");\n");
  
  			buffer.append("		this.fieldContentHandler.startElement(\"\", \"city\", \"city\", attributes);\n");
  			buffer.append("			this.fieldContentHandler.characters(" + beanClassField + ".getCity().toCharArray(), 0, " + beanClassField + ".getCity().length());\n");
  			buffer.append("		this.fieldContentHandler.endElement(\"\", \"city\", \"city\");\n");
  
  			buffer.append("		this.fieldContentHandler.startElement(\"\", \"state\", \"state\", attributes);\n");
  			buffer.append("			this.fieldContentHandler.characters(" + beanClassField + ".getState().toCharArray(), 0, " + beanClassField + ".getState().length());\n");
  			buffer.append("		this.fieldContentHandler.endElement(\"\", \"state\", \"state\");\n");
  
  			buffer.append("		this.fieldContentHandler.startElement(\"\", \"street\", \"street\", attributes);\n");
  			buffer.append("			this.fieldContentHandler.characters(" + beanClassField + ".getStreet().toCharArray(), 0, " + beanClassField + ".getStreet().length());\n");
  			buffer.append("		this.fieldContentHandler.endElement(\"\", \"street\", \"street\");\n");
  
  			buffer.append("		this.fieldContentHandler.startElement(\"\", \"zipCode\", \"zipCode\", attributes);\n");
  			buffer.append("			this.fieldContentHandler.characters(" + beanClassField + ".getZipCode().toCharArray(), 0, " + beanClassField + ".getZipCode().length());\n");
  			buffer.append("		this.fieldContentHandler.endElement(\"\", \"zipCode\", \"zipCode\");\n");
  
  		}
  
  		buffer.append("			this.fieldContentHandler.endDocument();\n");
  		buffer.append("		} catch (Exception e) {\n");
  		buffer.append("			e.printStackTrace();\n");
  		buffer.append("		}			\n");
  		buffer.append("	}\n");
  		buffer.append("	public void setContentHandler(org.xml.sax.ContentHandler handler) {\n");
  		buffer.append("		this.fieldContentHandler = handler;\n");
  		buffer.append("	}\n");
  		buffer.append("}  \n");
  
  	}
  
  	private static final String importsGen = "import java.io.*;\n" + "import com.myeis.services.*;\n" + "import org.apache.wsif.providers.jca.WSIFFormatHandler_JCA;\n" +
  	"import javax.xml.transform.Transformer;\n" + "import javax.xml.transform.TransformerFactory;\n" + "import javax.xml.transform.sax.SAXSource;\n" +
  	"import org.xml.sax.XMLReader;\n" +
  	"import org.xml.sax.Attributes;\n" + "import org.xml.sax.ContentHandler;\n" + "import org.xml.sax.InputSource;\n" + "import org.xml.sax.helpers.AttributesImpl;\n\n\n\n";
  
  	private static final String defaultMethodsGen =
  		"public Object getElement(String elementName) {return null;}\n"
  			+ "public void setElement(String elementName, Object element) {}\n"
  			+ "public Object getElement(String name, int index) {return null;}\n"
  			+ "public void setElement(String name, int index, Object value) {}\n"
  			+ "public javax.xml.namespace.QName getPartQName(){\n"
  			+ "        return null;\n"
  			+ "    }\n"
  			+ "    \n"
  			+ "    public void setPartQName(javax.xml.namespace.QName qname){\n"
  			+ "    }\n"
  			+ "public void setInteractionSpec(javax.resource.cci.InteractionSpec arg0) {\n"
  			+ "        return;\n"
  			+ "    }\n";
  	/**
  	 * @see org.apache.wsif.providers.jca.toolplugin.FormatHandlerGenerator#createGenerationContext()
  	 */
  	public Object createGenerationContext() {
  		return null;
  	}
  }
  
  
  1.1                  xml-axis-wsif/java/samples/jca/customer/com/myeis/customer/J2C_MyEIS_CustomerInfoProxy.java
  
  Index: J2C_MyEIS_CustomerInfoProxy.java
  ===================================================================
  package com.myeis.customer;
  import org.apache.wsif.*;
  import org.apache.wsif.base.*;
  
  import com.myeis.services.Customer;
  
  import javax.xml.namespace.QName;
  /**
   * J2C_MyEIS_CustomerInfoProxy
   * Generated code. Only edit user code sections.
   * @generated
   */
  public class J2C_MyEIS_CustomerInfoProxy {
  	/**
  	 * @generated
  	 */
  	private static final int INPUT_ONLY = 0;
  	/**
  	 * @generated
  	 */
  	private static final int REQUEST_RESPONSE = 1;
  	/**
  	 * @generated
  	 */
  	private WSIFPort fieldPort;
  	/**
  	 * @generated
  	 */
  	private WSIFService fieldService;
  	/**
  	 * @generated
  	 */
  	private static WSIFService fieldStaticService = null;
  	/**
  	 * getPort
  	 * @generated
  	 */
  	public WSIFPort getPort() {
  		return fieldPort;
  	}
  	/**
  	 * setPort
  	 * @generated
  	 */
  	public void setPort(WSIFPort newPort) {
  		fieldPort = newPort;
  	}
  	/**
  	 * getService
  	 * @generated
  	 */
  	public WSIFService getService() {
  		return fieldService;
  	}
  	/**
  	 * setService
  	 * @generated
  	 */
  	public void setService(WSIFService newService) {
  		fieldService = newService;
  	}
  	/**
  	 * getCustomer
  	 * @generated
  	 */
  	public com.myeis.services.Customer getCustomer(java.lang.String argNumber) throws org.apache.wsif.WSIFException {
  
  		try {
  
  			// user code begin {pre_execution}
  			// user code end
  
  			WSIFDefaultMessage inputMessage = new WSIFDefaultMessage();
  			inputMessage.setObjectPart("number", argNumber);
  
  			WSIFMessage outputMessage = execute("getCustomer", "getCustomerRequest", "getCustomerResponse", inputMessage, REQUEST_RESPONSE);
  
  			// user code begin {post_execution}
  			// user code end
  
  			return (com.myeis.services.Customer) outputMessage.getObjectPart("result");
  
  		}
  		catch (Exception e) {
  			// user code begin {exception_handling}
  			// user code end
  			if (e instanceof org.apache.wsif.WSIFException)
  				throw (org.apache.wsif.WSIFException) e;
  			throw new org.apache.wsif.WSIFException(e.getMessage(), e);
  		}
  	}
  	/**
  	 * constructor
  	 * @generated
  	 */
  	public J2C_MyEIS_CustomerInfoProxy() throws WSIFException {
  
  		// user code begin {custom_initialization}
  		// user code end
  
  		if (this.fieldStaticService == null) {
  
  			this.fieldStaticService =
  				WSIFServiceFactory.newInstance().getService("com/myeis/customer/CustomerInfoMYEISService.wsdl", this.getClass().getClassLoader(), "http://customer.myeis.com/", "CustomerInfoMYEISService", "http://customer.myeis.com/", "CustomerInfo");
  
  			if (this.fieldStaticService == null)
  				return;
  
  			this.fieldStaticService.mapType(new QName("http://services.myeis.com/", "Customer"), com.myeis.services.Customer.class);
  
  			// user code begin {port_factory_setup}
  			// user code end
  		}
  	}
  	/**
  	 * main method (for proxy unit testing)
  	 * @generated
  	 */
  	public static void main(String[] args) {
  
  		try {
  
  			J2C_MyEIS_CustomerInfoProxy aProxy = new J2C_MyEIS_CustomerInfoProxy();
  
  			// user code begin {proxy_method_calls}
  			String custNum = "33333";
  			Customer customer = aProxy.getCustomer(custNum);
  			System.out.println("Customer number: " + custNum);
  			System.out.println("Customer name:   " + customer.getFirstName() + " " + customer.getLastName());
  			
  			// user code end
  
  		}
  		catch (Exception e) {
  
  			// user code begin {exception_handling}
  			e.printStackTrace();
  			// user code end
  		}
  	}
  	/**
  	 * execute (base message-level execution)
  	 * @generated
  	 */
  	public WSIFMessage execute(String operationName, String inputName, String outputName, WSIFMessage aMessage, int operationType) throws WSIFException, Exception {
  
  		WSIFPort port;
  		if (this.fieldPort == null) {
  			if (this.fieldService == null)
  				this.fieldService = fieldStaticService;
  			if (this.fieldService == null)
  				throw new WSIFException("Failed to resolve WSIFService.");
  			port = this.fieldService.getPort("CustomerInfoMyEISPort");
  		}
  		else {
  			port = this.fieldPort;
  		}
  
  		WSIFOperation operation = port.createOperation(operationName, inputName, outputName);
  
  		WSIFMessage inputMessage = operation.createInputMessage();
  
  		String partName;
  		java.util.Iterator iterator = aMessage.getPartNames();
  		while (iterator.hasNext()) {
  			partName = (String) iterator.next();
  			inputMessage.setObjectPart(partName, aMessage.getObjectPart(partName));
  		}
  
  		WSIFMessage outputMessage = operation.createOutputMessage();
  		WSIFMessage faultMessage = operation.createFaultMessage();
  		boolean success = true;
  		if (operationType == INPUT_ONLY)
  			operation.executeInputOnlyOperation(inputMessage);
  		else if (operationType == REQUEST_RESPONSE)
  			success = operation.executeRequestResponseOperation(inputMessage, outputMessage, faultMessage);
  
  		if (this.fieldPort == null)
  			port.close();
  
  		if (!success) {
  			java.util.Iterator i = faultMessage.getParts();
  			if (i.hasNext()) {
  				Object part = i.next();
  				if (part instanceof Exception)
  					throw (Exception) part;
  				else
  					throw new WSIFException(String.valueOf(part));
  			}
  		}
  
  		return outputMessage;
  	}
  }
  
  
  
  1.1                  xml-axis-wsif/java/samples/jca/customer/com/myeis/customer/CustomerInfoMYEISService.wsdl
  
  Index: CustomerInfoMYEISService.wsdl
  ===================================================================
  <?xml version="1.0" encoding="UTF-8"?>
  <definitions name="CustomerInfoMYEISService"
      targetNamespace="http://customer.myeis.com/"
      xmlns="http://schemas.xmlsoap.org/wsdl/"
      xmlns:format="http://schemas.xmlsoap.org/wsdl/formatbinding/"
      xmlns:myeis="http://schemas.xmlsoap.org/wsdl/myeis/"
      xmlns:tns="http://customer.myeis.com/"
      xmlns:tns2="http://services.myeis.com/" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
      <import location="CustomerInfo.wsdl" namespace="http://customer.myeis.com/"/>
      <import location="CustomerInfoMYEISBinding.wsdl" namespace="http://customer.myeis.com/"/>
      <service name="CustomerInfoMYEISService">
          <port binding="tns:CustomerInfoMYEISBinding" name="CustomerInfoMyEISPort">
              <myeis:address repositoryLocation="local"/>
          </port>
      </service>
  </definitions>
  
  
  
  1.1                  xml-axis-wsif/java/samples/jca/customer/com/myeis/customer/CustomerInfo.wsdl
  
  Index: CustomerInfo.wsdl
  ===================================================================
  <?xml version="1.0" encoding="UTF-8"?>
  <definitions name="CustomerInfoMYEISServiceInterface"
      targetNamespace="http://customer.myeis.com/"
      xmlns="http://schemas.xmlsoap.org/wsdl/"
      xmlns:format="http://schemas.xmlsoap.org/wsdl/formatbinding/"
      xmlns:myeis="http://schemas.xmlsoap.org/wsdl/myeis/"
      xmlns:tns="http://customer.myeis.com/"
      xmlns:tns2="http://services.myeis.com/" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
      <import location="./com/myeis/services/CustomerInfo.xsd" namespace="http://services.myeis.com/"/>
      <message name="getAddressRequest">
          <part name="number" type="xsd:string"/>
      </message>
      <message name="getCustomerResponse">
          <part name="result" type="tns2:Customer"/>
      </message>
      <message name="getCustomerRequest">
          <part name="number" type="xsd:string"/>
      </message>
      <message name="getAddressResponse">
          <part name="result" type="tns2:Address"/>
      </message>
      <portType name="CustomerInfo">
          <operation name="getCustomer" parameterOrder="number">
              <input message="tns:getCustomerRequest" name="getCustomerRequest"/>
              <output message="tns:getCustomerResponse" name="getCustomerResponse"/>
          </operation>
      </portType>
  </definitions>
  
  
  
  1.1                  xml-axis-wsif/java/samples/jca/customer/com/myeis/customer/CustomerInfoMYEISBinding.wsdl
  
  Index: CustomerInfoMYEISBinding.wsdl
  ===================================================================
  <?xml version="1.0" encoding="UTF-8"?>
  <definitions name="CustomerInfoMYEISBinding"
      targetNamespace="http://customer.myeis.com/"
      xmlns="http://schemas.xmlsoap.org/wsdl/"
      xmlns:format="http://schemas.xmlsoap.org/wsdl/formatbinding/"
      xmlns:myeis="http://schemas.xmlsoap.org/wsdl/myeis/"
      xmlns:tns="http://customer.myeis.com/"
      xmlns:tns2="http://services.myeis.com/" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
      <import location="CustomerInfo.wsdl" namespace="http://customer.myeis.com/"/>
      <binding name="CustomerInfoMYEISBinding" type="tns:CustomerInfo">
          <myeis:binding/>
          <format:typeMapping encoding="myeis">
              <format:typeMap formatType="" typeName="xsd:string"/>
              <format:typeMap formatType="" typeName="tns2:Address"/>
              <format:typeMap formatType="" typeName="tns2:Customer"/>
          </format:typeMapping>
          <operation name="getCustomer">
              <myeis:operation functionName="CUSTOMERINFO_getCustomer"/>
              <input name="getCustomerRequest"/>
              <output name="getCustomerResponse"/>
          </operation>
      </binding>
  </definitions>
  
  
  
  1.1                  xml-axis-wsif/java/samples/jca/ra/META-INF/ra.xml
  
  Index: ra.xml
  ===================================================================
  <!DOCTYPE connector PUBLIC "-//Sun Microsystems, Inc.//DTD Connector 1.0//EN"
                             "http://java.sun.com/dtd/connector_1_0.dtd">
  <connector>
    <display-name>MyEISResourceAdapter</display-name>
    <description>Template J2EE Resource Adapter</description>
    <vendor-name>IBM</vendor-name>
    <spec-version>1.0</spec-version>
    <eis-type>MyEIS</eis-type>
    <version>1.0</version>
    <license>                                       
      <description></description>
      <license-required>true</license-required>     
    </license>                                      
    <resourceadapter>
      <managedconnectionfactory-class>com.myeis.j2c.MyEISManagedConnectionFactory</managedconnectionfactory-class>
      <connectionfactory-interface>javax.resource.cci.ConnectionFactory</connectionfactory-interface>
      <connectionfactory-impl-class>com.myeis.j2c.MyEISConnectionFactory</connectionfactory-impl-class>
      <connection-interface>javax.resource.cci.Connection</connection-interface>
      <connection-impl-class>com.myeis.j2c.MyEISConnection</connection-impl-class>
      <transaction-support>NoTransaction</transaction-support>
  	<config-property>
        <description>Location of the repository</description>
        <config-property-name>RepositoryLocation</config-property-name>
        <config-property-type>java.lang.String</config-property-type>
        <config-property-value></config-property-value>
      </config-property>
  	<authentication-mechanism>
        <description></description>
        <authentication-mechanism-type>BasicPassword</authentication-mechanism-type>
        <credential-interface>javax.resource.spi.security.PasswordCredential</credential-interface>
      </authentication-mechanism>
      <reauthentication-support>false</reauthentication-support>
  
    </resourceadapter>
  </connector>
  
  
  
  1.1                  xml-axis-wsif/java/samples/jca/ra/META-INF/j2c_plugin.xml
  
  Index: j2c_plugin.xml
  ===================================================================
  <j2c_plugin tns="http://schemas.xmlsoap.org/wsdl/myeis/"  name="MyEIS">
  	<Description>MyEIS</Description>
  	<version>0.0.1</version>
  	<wsdl_extensions>
  		<address classname="com.myeis.wsdl.extensions.j2c.myeis.MyEISAddress"/> 
  		<binding classname="com.myeis.wsdl.extensions.j2c.myeis.MyEISBinding"/>  
  		<operation classname="com.myeis.wsdl.extensions.j2c.myeis.MyEISOperation"/>
  		<extension_registry classname="com.myeis.wsdl.extensions.j2c.myeis.MyEISExtensionRegistry" />
  	</wsdl_extensions>
  
  	<wsif_extensions classname="com.myeis.wsif.providers.j2c.myeis.WSIFProvider_MyEIS" />
  
  	<import>
  		<service wsdlfile="com/myeis/j2c/importservice/myeis/ImportMyEIS.wsdl" servicename="ImportService" >
  		</service>
  	</import>	
   
  	<formathandler>
  		<generator encoding="myeis" classname="com.myeis.j2c.formathandler.MyEISFormatHandlerGenerator" />
  	</formathandler>
  </j2c_plugin>
   
  
  
  1.1                  xml-axis-wsif/java/samples/jca/ra/org/apache/wsif/providers/jca/toolplugin/myeis/myeis/PortTypeArrayFormatHandler.java
  
  Index: PortTypeArrayFormatHandler.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.myeis.myeis;
  
  import java.io.*;
  
  import javax.resource.cci.InteractionSpec;
  
  import org.apache.wsif.providers.jca.toolplugin.*;
  import org.apache.wsif.providers.jca.WSIFFormatHandler_JCA;
  
  public class PortTypeArrayFormatHandler implements WSIFFormatHandler_JCA {
  
  	private PortTypeArray fieldPortTypeArray = null;
  	
  	/**
  	 * @see JCAFormatHandler#read(InputStream)
  	 */
  	public void read(InputStream inputStream) throws IOException {
  	
  		try {
  			ObjectInputStream objectInputStream = new ObjectInputStream(inputStream);
  			this.fieldPortTypeArray =
  				(PortTypeArray)objectInputStream.readObject();
  		} catch (ClassNotFoundException e) {
  			e.printStackTrace();
  			throw new IOException("class not found !");
  		}		
  	}
  
  	/**
  	 * @see JCAFormatHandler#write(OutputStream)
  	 */
  	public void write(OutputStream outputStream) throws IOException {
  		
          ObjectOutputStream objectOutputStream = new ObjectOutputStream(outputStream);
          objectOutputStream.writeObject(this.fieldPortTypeArray);
          objectOutputStream.flush();
  	}
  
  	/**
  	 * @see WSIFFormatHandler#getElement(String)
  	 */
  	public Object getElement(String elementName) {
  		return null;
  	}
  
  	/**
  	 * @see WSIFFormatHandler#setElement(String, Object)
  	 */
  	public void setElement(String elementName, Object element) {
  	}
  
  	/**
  	 * @see WSIFFormatHandler#getElement(String, int)
  	 */
  	public Object getElement(String name, int index) {
  		return null;
  	}
  
  	/**
  	 * @see WSIFFormatHandler#setElement(String, int, Object)
  	 */
  	public void setElement(String name, int index, Object value) {
  	}
  
  	/**
  	 * @see WSIFFormatHandler#getObjectPart()
  	 */
  	public Object getObjectPart() {
  		return this.fieldPortTypeArray;
  	}
  
  	/**
  	 * @see WSIFFormatHandler#getObjectPart(Class)
  	 */
  	public Object getObjectPart(Class sourceClass) {
  		return null;
  	}
  
  	/**
  	 * @see WSIFFormatHandler#getCharPart()
  	 */
  	public char getCharPart() {
  		return 0;
  	}
  
  	/**
  	 * @see WSIFFormatHandler#getBytePart()
  	 */
  	public byte getBytePart() {
  		return 0;
  	}
  
  	/**
  	 * @see WSIFFormatHandler#getShortPart()
  	 */
  	public short getShortPart() {
  		return 0;
  	}
  
  	/**
  	 * @see WSIFFormatHandler#getIntPart()
  	 */
  	public int getIntPart() {
  		return 0;
  	}
  
  	/**
  	 * @see WSIFFormatHandler#getLongPart()
  	 */
  	public long getLongPart() {
  		return 0;
  	}
  
  	/**
  	 * @see WSIFFormatHandler#getFloatPart()
  	 */
  	public float getFloatPart() {
  		return 0;
  	}
  
  	/**
  	 * @see WSIFFormatHandler#getDoublePart()
  	 */
  	public double getDoublePart() {
  		return 0;
  	}
  
  	/**
  	 * @see WSIFFormatHandler#setObjectPart(Object)
  	 */
  	public void setObjectPart(Object objectPart) {
  		this.fieldPortTypeArray = (PortTypeArray) objectPart;
  	}
  
  	/**
  	 * @see WSIFFormatHandler#setCharPart(char)
  	 */
  	public void setCharPart(char charPart) {
  	}
  
  	/**
  	 * @see WSIFFormatHandler#setBytePart(byte)
  	 */
  	public void setBytePart(byte bytePart) {
  	}
  
  	/**
  	 * @see WSIFFormatHandler#setShortPart(short)
  	 */
  	public void setShortPart(short shortPart) {
  	}
  
  	/**
  	 * @see WSIFFormatHandler#setIntPart(int)
  	 */
  	public void setIntPart(int intPart) {
  	}
  
  	/**
  	 * @see WSIFFormatHandler#setLongPart(long)
  	 */
  	public void setLongPart(long longPart) {
  	}
  
  	/**
  	 * @see WSIFFormatHandler#setFloatPart(float)
  	 */
  	public void setFloatPart(float floatPart) {
  	}
  
  	/**
  	 * @see WSIFFormatHandler#setDoublePart(double)
  	 */
  	public void setDoublePart(double doublePart) {
  	}
  	public void setPartQName(javax.xml.namespace.QName qname){
  	}
  	
  	public javax.xml.namespace.QName getPartQName(){
  		return null;
  	}
  	public void setInteractionSpec(InteractionSpec is){
  		
  	}
  
  }
  
  
  
  
  1.1                  xml-axis-wsif/java/samples/jca/ra/org/apache/wsif/providers/jca/toolplugin/myeis/myeis/PortTypeSelectionFormatHandler.java
  
  Index: PortTypeSelectionFormatHandler.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.myeis.myeis;
  
  import java.io.*;
  
  import javax.resource.cci.InteractionSpec;
  
  import org.apache.wsif.providers.jca.toolplugin.*;
  import org.apache.wsif.providers.jca.WSIFFormatHandler_JCA;
  
  public class PortTypeSelectionFormatHandler implements WSIFFormatHandler_JCA {
  
  	private PortTypeSelection fieldPortTypeSelection = null;
  
  	/**
  	 * @see JCAFormatHandler#read(InputStream)
  	 */
  	public void read(InputStream inputStream) throws IOException {
  
  		try {
  			ObjectInputStream objectInputStream = new ObjectInputStream(inputStream);
  			this.fieldPortTypeSelection =
  				(PortTypeSelection) objectInputStream.readObject();
  		} catch (ClassNotFoundException e) {
  			e.printStackTrace();
  			throw new IOException("class not found !");
  		}
  	}
  
  	/**
  	 * @see JCAFormatHandler#write(OutputStream)
  	 */
  	public void write(OutputStream outputStream) throws IOException {
  
  		ObjectOutputStream objectOutputStream = new ObjectOutputStream(outputStream);
  		objectOutputStream.writeObject(this.fieldPortTypeSelection);
  		objectOutputStream.flush();
  	}
  
  	/**
  	 * @see WSIFFormatHandler#getElement(String)
  	 */
  	public Object getElement(String elementName) {
  		return null;
  	}
  
  	/**
  	 * @see WSIFFormatHandler#setElement(String, Object)
  	 */
  	public void setElement(String elementName, Object element) {
  	}
  
  	/**
  	 * @see WSIFFormatHandler#getElement(String, int)
  	 */
  	public Object getElement(String name, int index) {
  		return null;
  	}
  
  	/**
  	 * @see WSIFFormatHandler#setElement(String, int, Object)
  	 */
  	public void setElement(String name, int index, Object value) {
  	}
  
  	/**
  	 * @see WSIFFormatHandler#getObjectPart()
  	 */
  	public Object getObjectPart() {
  		return this.fieldPortTypeSelection;
  	}
  
  	/**
  	 * @see WSIFFormatHandler#getObjectPart(Class)
  	 */
  	public Object getObjectPart(Class sourceClass) {
  		return null;
  	}
  
  	/**
  	 * @see WSIFFormatHandler#getCharPart()
  	 */
  	public char getCharPart() {
  		return 0;
  	}
  
  	/**
  	 * @see WSIFFormatHandler#getBytePart()
  	 */
  	public byte getBytePart() {
  		return 0;
  	}
  
  	/**
  	 * @see WSIFFormatHandler#getShortPart()
  	 */
  	public short getShortPart() {
  		return 0;
  	}
  
  	/**
  	 * @see WSIFFormatHandler#getIntPart()
  	 */
  	public int getIntPart() {
  		return 0;
  	}
  
  	/**
  	 * @see WSIFFormatHandler#getLongPart()
  	 */
  	public long getLongPart() {
  		return 0;
  	}
  
  	/**
  	 * @see WSIFFormatHandler#getFloatPart()
  	 */
  	public float getFloatPart() {
  		return 0;
  	}
  
  	/**
  	 * @see WSIFFormatHandler#getDoublePart()
  	 */
  	public double getDoublePart() {
  		return 0;
  	}
  
  	/**
  	 * @see WSIFFormatHandler#setObjectPart(Object)
  	 */
  	public void setObjectPart(Object objectPart) {
  		this.fieldPortTypeSelection = (PortTypeSelection) objectPart;
  	}
  
  	/**
  	 * @see WSIFFormatHandler#setCharPart(char)
  	 */
  	public void setCharPart(char charPart) {
  	}
  
  	/**
  	 * @see WSIFFormatHandler#setBytePart(byte)
  	 */
  	public void setBytePart(byte bytePart) {
  	}
  
  	/**
  	 * @see WSIFFormatHandler#setShortPart(short)
  	 */
  	public void setShortPart(short shortPart) {
  	}
  
  	/**
  	 * @see WSIFFormatHandler#setIntPart(int)
  	 */
  	public void setIntPart(int intPart) {
  	}
  
  	/**
  	 * @see WSIFFormatHandler#setLongPart(long)
  	 */
  	public void setLongPart(long longPart) {
  	}
  
  	/**
  	 * @see WSIFFormatHandler#setFloatPart(float)
  	 */
  	public void setFloatPart(float floatPart) {
  	}
  
  	/**
  	 * @see WSIFFormatHandler#setDoublePart(double)
  	 */
  	public void setDoublePart(double doublePart) {
  	}
  	public void setPartQName(javax.xml.namespace.QName qname){
  	}
  	
  	public javax.xml.namespace.QName getPartQName(){
  		return null;
  	}
  	public void setInteractionSpec(InteractionSpec is){
  		
  	}
  
  }
  
  
  1.1                  xml-axis-wsif/java/samples/jca/ra/org/apache/wsif/providers/jca/toolplugin/myeis/myeis/ImportDefinitionFormatHandler.java
  
  Index: ImportDefinitionFormatHandler.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.myeis.myeis;
  
  import java.io.*;
  
  import javax.resource.cci.InteractionSpec;
  
  import org.apache.wsif.providers.jca.toolplugin.*;
  import org.apache.wsif.providers.jca.WSIFFormatHandler_JCA;
  
  public class ImportDefinitionFormatHandler implements WSIFFormatHandler_JCA {
  
  	private ImportDefinition fieldImportDefinition = null;
  
  	/**
  	 * @see JCAFormatHandler#read(InputStream)
  	 */
  	public void read(InputStream inputStream) throws IOException {
  
  		try {
  			ObjectInputStream objectInputStream = new ObjectInputStream(inputStream);
  			this.fieldImportDefinition =
  				(ImportDefinition)objectInputStream.readObject();
  		} catch (ClassNotFoundException e) {
  			e.printStackTrace();
  			throw new IOException("class not found !");
  		}		
  	}
  
  	/**
  	 * @see JCAFormatHandler#write(OutputStream)
  	 */
  	public void write(OutputStream outputStream) throws IOException {
  
          ObjectOutputStream objectOutputStream = new ObjectOutputStream(outputStream);
          objectOutputStream.writeObject(this.fieldImportDefinition);
          objectOutputStream.flush();
      }
  
  	/**
  	 * @see WSIFFormatHandler#getElement(String)
  	 */
  	public Object getElement(String elementName) {
  		return null;
  	}
  
  	/**
  	 * @see WSIFFormatHandler#setElement(String, Object)
  	 */
  	public void setElement(String elementName, Object element) {
  	}
  
  	/**
  	 * @see WSIFFormatHandler#getElement(String, int)
  	 */
  	public Object getElement(String name, int index) {
  		return null;
  	}
  
  	/**
  	 * @see WSIFFormatHandler#setElement(String, int, Object)
  	 */
  	public void setElement(String name, int index, Object value) {
  	}
  
  	/**
  	 * @see WSIFFormatHandler#getObjectPart()
  	 */
  	public Object getObjectPart() {
  		return this.fieldImportDefinition;
  	}
  
  	/**
  	 * @see WSIFFormatHandler#getObjectPart(Class)
  	 */
  	public Object getObjectPart(Class sourceClass) {
  		return null;
  	}
  
  	/**
  	 * @see WSIFFormatHandler#getCharPart()
  	 */
  	public char getCharPart() {
  		return 0;
  	}
  
  	/**
  	 * @see WSIFFormatHandler#getBytePart()
  	 */
  	public byte getBytePart() {
  		return 0;
  	}
  
  	/**
  	 * @see WSIFFormatHandler#getShortPart()
  	 */
  	public short getShortPart() {
  		return 0;
  	}
  
  	/**
  	 * @see WSIFFormatHandler#getIntPart()
  	 */
  	public int getIntPart() {
  		return 0;
  	}
  
  	/**
  	 * @see WSIFFormatHandler#getLongPart()
  	 */
  	public long getLongPart() {
  		return 0;
  	}
  
  	/**
  	 * @see WSIFFormatHandler#getFloatPart()
  	 */
  	public float getFloatPart() {
  		return 0;
  	}
  
  	/**
  	 * @see WSIFFormatHandler#getDoublePart()
  	 */
  	public double getDoublePart() {
  		return 0;
  	}
  
  	/**
  	 * @see WSIFFormatHandler#setObjectPart(Object)
  	 */
  	public void setObjectPart(Object objectPart) {
  		this.fieldImportDefinition = (ImportDefinition)objectPart;
  	}
  
  	/**
  	 * @see WSIFFormatHandler#setCharPart(char)
  	 */
  	public void setCharPart(char charPart) {
  	}
  
  	/**
  	 * @see WSIFFormatHandler#setBytePart(byte)
  	 */
  	public void setBytePart(byte bytePart) {
  	}
  
  	/**
  	 * @see WSIFFormatHandler#setShortPart(short)
  	 */
  	public void setShortPart(short shortPart) {
  	}
  
  	/**
  	 * @see WSIFFormatHandler#setIntPart(int)
  	 */
  	public void setIntPart(int intPart) {
  	}
  
  	/**
  	 * @see WSIFFormatHandler#setLongPart(long)
  	 */
  	public void setLongPart(long longPart) {
  	}
  
  	/**
  	 * @see WSIFFormatHandler#setFloatPart(float)
  	 */
  	public void setFloatPart(float floatPart) {
  	}
  
  	/**
  	 * @see WSIFFormatHandler#setDoublePart(double)
  	 */
  	public void setDoublePart(double doublePart) {
  	}
  	public void setPartQName(javax.xml.namespace.QName qname){
  	}
  	
  	public javax.xml.namespace.QName getPartQName(){
  		return null;
  	}
  	public void setInteractionSpec(InteractionSpec is){
  		
  	}
  
  }
  
  
  
  
  1.1                  xml-axis-wsif/java/samples/jca/customer/com/myeis/services/myeis/myeis/CustomerFormatHandler.java
  
  Index: CustomerFormatHandler.java
  ===================================================================
  package com.myeis.services.myeis.myeis;
  import java.io.*;
  import com.myeis.services.*;
  import org.apache.wsif.providers.jca.WSIFFormatHandler_JCA;
  import javax.xml.transform.Transformer;
  import javax.xml.transform.TransformerFactory;
  import javax.xml.transform.sax.SAXSource;
  import org.xml.sax.XMLReader;
  import org.xml.sax.Attributes;
  import org.xml.sax.ContentHandler;
  import org.xml.sax.InputSource;
  import org.xml.sax.helpers.AttributesImpl;
  
  
  
  public class CustomerFormatHandler implements WSIFFormatHandler_JCA {
  private Customer fieldCustomer = null;
  public void read(InputStream inputStream) throws IOException {
  	try {
  		ObjectInputStream objectInputStream = new ObjectInputStream(inputStream);
  		Object obj = (Object)objectInputStream.readObject();
  		if(obj instanceof Customer){
  			this.fieldCustomer = (Customer)obj;
  		}else if (obj instanceof com.myeis.services.internal.CustomerDataObject){
  			com.myeis.services.internal.CustomerDataObject aCustomer = (com.myeis.services.internal.CustomerDataObject)obj;
  			this.fieldCustomer = new Customer();
  			this.fieldCustomer.setLastName(aCustomer.getLastName());
  			this.fieldCustomer.setFirstName(aCustomer.getFirstName());
  			this.fieldCustomer.setNumber(aCustomer.getNumber());
  		}
  	} catch (ClassNotFoundException e) {
  		e.printStackTrace();
  		throw new IOException("class not found !");
  	}		
  }
  
  public void write(OutputStream outputStream) throws IOException {
      ObjectOutputStream objectOutputStream = new ObjectOutputStream(outputStream);
      objectOutputStream.writeObject(this.fieldCustomer);
      objectOutputStream.flush();
  }
  
  public void setObjectPart(Object objectPart) {
  	this.fieldCustomer = (Customer)objectPart;
  }
  
  public Object getObjectPart() {
  	return this.fieldCustomer;
  }
  
  public Object getObjectPart(Class sourceClass) {
  	try{
  		if (sourceClass.isAssignableFrom(Class.forName("javax.xml.transform.sax.SAXSource"))){
  			SAXSource saxSource = new SAXSource(new InputSource());
  			XMLReader reader = new ContentReader();
  			saxSource.setXMLReader(reader);
  			return saxSource;
  		}
  	}
  	catch (Throwable e) {
  	}
  	return null;
  }
  
  public Object getElement(String elementName) {return null;}
  public void setElement(String elementName, Object element) {}
  public Object getElement(String name, int index) {return null;}
  public void setElement(String name, int index, Object value) {}
  public javax.xml.namespace.QName getPartQName(){
          return null;
      }
      
      public void setPartQName(javax.xml.namespace.QName qname){
      }
  public void setInteractionSpec(javax.resource.cci.InteractionSpec arg0) {
          return;
      }
  public class ContentReader implements org.xml.sax.XMLReader {
  	private ContentHandler fieldContentHandler = null;
  	public org.xml.sax.ContentHandler getContentHandler() {return null;}
  	public org.xml.sax.DTDHandler getDTDHandler() {return null;}
  	public org.xml.sax.EntityResolver getEntityResolver() {return null;}
  	public org.xml.sax.ErrorHandler getErrorHandler() {return null;}
  	public boolean getFeature(String name) throws org.xml.sax.SAXNotSupportedException, org.xml.sax.SAXNotRecognizedException {return false;}
  	public Object getProperty(String name) throws org.xml.sax.SAXNotSupportedException, org.xml.sax.SAXNotRecognizedException {return null;}
  	public void setDTDHandler(org.xml.sax.DTDHandler handler) {}
  	public void setEntityResolver(org.xml.sax.EntityResolver resolver) {}
  	public void setErrorHandler(org.xml.sax.ErrorHandler handler) {}
  	public void setFeature(String name, boolean value) throws org.xml.sax.SAXNotSupportedException, org.xml.sax.SAXNotRecognizedException {}
  	public void setProperty(String name, Object value) throws org.xml.sax.SAXNotSupportedException, org.xml.sax.SAXNotRecognizedException {}
  	public void parse(String systemId) throws java.io.IOException, org.xml.sax.SAXException {}
  	public void parse(org.xml.sax.InputSource input) throws java.io.IOException, org.xml.sax.SAXException {
  		try {
  			Attributes attributes = new AttributesImpl();
  			this.fieldContentHandler.startDocument();
  		this.fieldContentHandler.startElement("", "number", "number", attributes);
  				this.fieldContentHandler.characters(fieldCustomer.getNumber().toCharArray(), 0, fieldCustomer.getNumber().length());
  		this.fieldContentHandler.endElement("", "number", "number");
  		this.fieldContentHandler.startElement("", "firstName", "firstName", attributes);
  			this.fieldContentHandler.characters(fieldCustomer.getFirstName().toCharArray(), 0, fieldCustomer.getFirstName().length());
  		this.fieldContentHandler.endElement("", "firstName", "firstName");
  		this.fieldContentHandler.startElement("", "lastName", "lastName", attributes);
  			this.fieldContentHandler.characters(fieldCustomer.getLastName().toCharArray(), 0, fieldCustomer.getLastName().length());
  		this.fieldContentHandler.endElement("", "lastName", "lastName");
  			this.fieldContentHandler.endDocument();
  		} catch (Exception e) {
  			e.printStackTrace();
  		}			
  	}
  	public void setContentHandler(org.xml.sax.ContentHandler handler) {
  		this.fieldContentHandler = handler;
  	}
  }  
  }
  
  
  1.1                  xml-axis-wsif/java/samples/jca/ra/com/myeis/services/internal/PurchaseOrderDataObject.java
  
  Index: PurchaseOrderDataObject.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 com.myeis.services.internal;
  public class PurchaseOrderDataObject implements java.io.Serializable {
  
  	private String fieldOrderNumber;
  	private String fieldPartNumber;
  	private String fieldDescription;
  	private int fieldQuantity;
  	private double fieldUnitPrice;
  	
  	/**
  	 * Gets the fieldOrderNumber
  	 * @return Returns a String
  	 */
  	public String getOrderNumber() {
  		return fieldOrderNumber;
  	}
  	/**
  	 * Sets the fieldOrderNumber
  	 * @param fieldOrderNumber The fieldOrderNumber to set
  	 */
  	public void setOrderNumber(String fieldOrderNumber) {
  		this.fieldOrderNumber = fieldOrderNumber;
  	}
  
  	/**
  	 * Gets the fieldPartNumber
  	 * @return Returns a String
  	 */
  	public String getPartNumber() {
  		return fieldPartNumber;
  	}
  	/**
  	 * Sets the fieldPartNumber
  	 * @param fieldPartNumber The fieldPartNumber to set
  	 */
  	public void setPartNumber(String fieldPartNumber) {
  		this.fieldPartNumber = fieldPartNumber;
  	}
  
  	/**
  	 * Gets the fieldDescription
  	 * @return Returns a String
  	 */
  	public String getDescription() {
  		return fieldDescription;
  	}
  	/**
  	 * Sets the fieldDescription
  	 * @param fieldDescription The fieldDescription to set
  	 */
  	public void setDescription(String fieldDescription) {
  		this.fieldDescription = fieldDescription;
  	}
  
  	/**
  	 * Gets the fieldQuantity
  	 * @return Returns a int
  	 */
  	public int getQuantity() {
  		return fieldQuantity;
  	}
  	/**
  	 * Sets the fieldQuantity
  	 * @param fieldQuantity The fieldQuantity to set
  	 */
  	public void setQuantity(int fieldQuantity) {
  		this.fieldQuantity = fieldQuantity;
  	}
  
  	/**
  	 * Gets the fieldUnitPrice
  	 * @return Returns a double
  	 */
  	public double getUnitPrice() {
  		return fieldUnitPrice;
  	}
  	/**
  	 * Sets the fieldUnitPrice
  	 * @param fieldUnitPrice The fieldUnitPrice to set
  	 */
  	public void setUnitPrice(double fieldUnitPrice) {
  		this.fieldUnitPrice = fieldUnitPrice;
  	}
  
  }
  
  
  
  
  1.1                  xml-axis-wsif/java/samples/jca/ra/com/myeis/services/internal/CustomerDataObject.java
  
  Index: CustomerDataObject.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 com.myeis.services.internal;
  
  public class CustomerDataObject implements java.io.Serializable {
  	
  	private String fieldNumber = null;
  	private String fieldFirstName = null;
  	private String fieldLastName = null;
  
  	/**
  	 * Gets the fieldNumber
  	 * @return Returns a String
  	 */
  	public String getNumber() {
  		return fieldNumber;
  	}
  	/**
  	 * Sets the fieldNumber
  	 * @param number The fieldNumber to set
  	 */
  	public void setNumber(String number) {
  		this.fieldNumber = number;
  	}
  	/**
  	 * Gets the fieldFirstName
  	 * @return Returns a String
  	 */
  	public String getFirstName() {
  		return fieldFirstName;
  	}
  	/**
  	 * Sets the fieldFirstName
  	 * @param firstName The fieldFirstName to set
  	 */
  	public void setFirstName(String firstName) {
  		this.fieldFirstName = firstName;
  	}
  	/**
  	 * Gets the fieldLastName
  	 * @return Returns a String
  	 */
  	public String getLastName() {
  		return fieldLastName;
  	}
  	/**
  	 * Sets the fieldLastName
  	 * @param lastName The fieldLastName to set
  	 */
  	public void setLastName(String lastName) {
  		this.fieldLastName = lastName;
  	}
  
  }
  
  
  
  
  1.1                  xml-axis-wsif/java/samples/jca/ra/com/myeis/services/internal/PurchaseOrderInfo.java
  
  Index: PurchaseOrderInfo.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 com.myeis.services.internal;
  public class PurchaseOrderInfo {
  
  	public PurchaseOrderDataObject getPurchaseOrder(String orderNumber){
  		if(orderNumber.equals("1234")){
  			PurchaseOrderDataObject po = new PurchaseOrderDataObject();
  			po.setDescription("Hard Drive");
  			po.setOrderNumber(orderNumber);
  			po.setPartNumber("09343");
  			po.setQuantity(12);
  			po.setUnitPrice(453.99d);
  			return po;
  		}
  		else{
  			PurchaseOrderDataObject po = new PurchaseOrderDataObject();
  			po.setDescription("DVD Drive");
  			po.setOrderNumber(orderNumber);
  			po.setPartNumber("09345");
  			po.setQuantity(10);
  			po.setUnitPrice(219.99d);
  			return po;
  		}
  	}
  }
  
  
  
  
  1.1                  xml-axis-wsif/java/samples/jca/ra/com/myeis/services/internal/AddressDataObject.java
  
  Index: AddressDataObject.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 com.myeis.services.internal;
  
  public class AddressDataObject implements java.io.Serializable {
  
  	private String fieldCustomerNumber = null;
  	private String fieldStreet = null;
  	private String fieldCity = null;
  	private String fieldState = null;
  	private String fieldZipCode = null;
  
  	/**
  	 * Gets the fieldCustomerNumber
  	 * @return Returns a String
  	 */
  	public String getCustomerNumber() {
  		return fieldCustomerNumber;
  	}
  	/**
  	 * Sets the fieldCustomerNumber
  	 * @param fieldCustomerNumber The fieldCustomerNumber to set
  	 */
  	public void setCustomerNumber(String fieldCustomerNumber) {
  		this.fieldCustomerNumber = fieldCustomerNumber;
  	}
  	/**
  	 * Gets the fieldStreet
  	 * @return Returns a String
  	 */
  	public String getStreet() {
  		return fieldStreet;
  	}
  	/**
  	 * Sets the fieldStreet
  	 * @param fieldStreet The fieldStreet to set
  	 */
  	public void setStreet(String fieldStreet) {
  		this.fieldStreet = fieldStreet;
  	}
  	/**
  	 * Gets the fieldCity
  	 * @return Returns a String
  	 */
  	public String getCity() {
  		return fieldCity;
  	}
  	/**
  	 * Sets the fieldCity
  	 * @param fieldCity The fieldCity to set
  	 */
  	public void setCity(String fieldCity) {
  		this.fieldCity = fieldCity;
  	}
  	/**
  	 * Gets the fieldState
  	 * @return Returns a String
  	 */
  	public String getState() {
  		return fieldState;
  	}
  	/**
  	 * Sets the fieldState
  	 * @param fieldState The fieldState to set
  	 */
  	public void setState(String fieldState) {
  		this.fieldState = fieldState;
  	}
  	/**
  	 * Gets the fieldZipCode
  	 * @return Returns a String
  	 */
  	public String getZipCode() {
  		return fieldZipCode;
  	}
  	/**
  	 * Sets the fieldZipCode
  	 * @param fieldZipCode The fieldZipCode to set
  	 */
  	public void setZipCode(String fieldZipCode) {
  		this.fieldZipCode = fieldZipCode;
  	}
  }
  
  
  
  
  1.1                  xml-axis-wsif/java/samples/jca/ra/com/myeis/services/internal/CustomerInfo.java
  
  Index: CustomerInfo.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 com.myeis.services.internal;
  
  public class CustomerInfo {
  
  	public CustomerDataObject getCustomer(String number) {
  		
  		CustomerDataObject customer = new CustomerDataObject();
  		customer.setNumber(number);
  		customer.setFirstName("Alan");
  		customer.setLastName("Turing");
  
  		return customer;
  	}
  	
  	public AddressDataObject getAddress(String number) {
  		AddressDataObject address = new AddressDataObject();
  		address.setCity("New York");
  		address.setState("New York");
  		address.setStreet("Madison Avenue");
  		address.setZipCode("10932");
  		address.setCustomerNumber(number);
  		return address;
  	}
  }
  
  
  
  
  1.1                  xml-axis-wsif/java/samples/jca/ra/com/myeis/j2c/importservice/myeis/ImportMyEIS.wsdl
  
  Index: ImportMyEIS.wsdl
  ===================================================================
  <?xml version="1.0" encoding="UTF-8"?>
  <definitions name="ImportService"
  	targetNamespace="http://myeis.importservice.j2c.myeis.com/"
  	xmlns="http://schemas.xmlsoap.org/wsdl/"
  	xmlns:format="http://schemas.xmlsoap.org/wsdl/formatbinding/"
  	xmlns:myeis="http://schemas.xmlsoap.org/wsdl/myeis/"
  	xmlns:tns="http://myeis.importservice.j2c.myeis.com/"
  	xmlns:xsd="http://www.w3.org/2001/XMLSchema"
  	xmlns:xsd1="http://xml.apache.org/xml-soap"
  	xmlns:interface="http://toolplugin.jca.providers.wsif.apache.org/">
  	<import namespace="http://toolplugin.jca.providers.wsif.apache.org/"
  		location="/org/apache/wsif/providers/jca/toolplugin/Import.wsdl"></import>
  	<import namespace="http://toolplugin.jca.providers.wsif.apache.org/"
  		location="/org/apache/wsif/providers/jca/toolplugin/Import.xsd"></import>
  	<import namespace="http://xml.apache.org/xml-soap"></import>
      <binding name="ImportMyEISBinding" type="interface:Import">
         <myeis:binding/>
         <format:typeMapping encoding="myeis">
         </format:typeMapping>
         <operation name="getDefinition">
              <myeis:operation functionName="IMPORT_DEFINITION"/>
              <input name="getDefinitionRequest"/>
              <output name="getDefinitionResponse"/>
          </operation>
          <operation name="getPortTypes">
              <myeis:operation functionName="IMPORT_PORTTYPES"/>
              <input name="getPortTypesRequest"/>
              <output name="getPortTypesResponse"/>
          </operation>
          <operation name="getRawEISMetaData">
              <myeis:operation functionName="IMPORT_RAWMETADATA"/>
              <input name="getRawEISMetaDataRequest"/>
              <output name="getRawEISMetaDataResponse"/>
          </operation>
      </binding>
      <service name="ImportService">
          <port binding="tns:ImportMyEISBinding" name="ImportMyEISPort">
              <myeis:address repositoryLocation="remote"/>
          </port>
      </service>
  </definitions>
  
  
  1.1                  xml-axis-wsif/java/samples/jca/customer/com/myeis/customer/com/myeis/services/CustomerInfo.xsd
  
  Index: CustomerInfo.xsd
  ===================================================================
  <?xml version="1.0" encoding="UTF-8"?>
  <schema attributeFormDefault="qualified" elementFormDefault="qualified"
      targetNamespace="http://services.myeis.com/"
      xmlns="http://www.w3.org/2001/XMLSchema" xmlns:xsd1="http://services.myeis.com/">
      <complexType name="Address">
          <all>
              <element name="street" type="string"/>
              <element name="zipCode" type="string"/>
              <element name="city" type="string"/>
              <element name="customerNumber" type="string"/>
              <element name="state" type="string"/>
          </all>
      </complexType>
      <complexType name="Customer">
          <all>
              <element name="lastName" type="string"/>
              <element name="firstName" type="string"/>
              <element name="number" type="string"/>
          </all>
      </complexType>
  </schema>
  
  
  
  1.1                  xml-axis-wsif/java/samples/jca/ra/com/myeis/MyEIS.java
  
  Index: MyEIS.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 com.myeis;
  
  import java.io.*;
  import org.apache.wsif.providers.jca.toolplugin.*;
  import com.myeis.repository.*;
  import com.myeis.services.*;
  import com.myeis.services.internal.*;
  
  public class MyEIS {
  
  	public byte[] doIt(byte[] input) {
  		
  		/*
  		 * This method represents the actual sample backend (i.e. this method mimics what a real back end system would typically do).
  		 * Based on the function name certain tasks are executed.
  		 */
  	
  		try {
  			ByteArrayInputStream inputStream = new ByteArrayInputStream(input);
  			
  			// get the function name
  			ObjectInputStream headerInputStream = new ObjectInputStream(inputStream);
  			String functionName = (String)headerInputStream.readObject();
  		
  			if (functionName.equals("IMPORT_PORTTYPES")) {
  				// import service porttypes
  				ObjectInputStream payloadInputStream = new ObjectInputStream(inputStream);
  				String queryString = (String)payloadInputStream.readObject();
  				PortTypeArray portTypeArray = (new Repository()).getPortTypes(queryString);
  				
  				ByteArrayOutputStream outputStream = new ByteArrayOutputStream();		
  		        ObjectOutputStream objectOutputStream = new ObjectOutputStream(outputStream);
    				objectOutputStream.writeObject(portTypeArray);
  		        objectOutputStream.flush();					
  			
  				return outputStream.toByteArray();
  			}
  			if (functionName.equals("IMPORT_DEFINITION")) {
  				// import service definitions
  				ObjectInputStream payloadInputStream = new ObjectInputStream(inputStream);				
  				PortTypeSelection selection = (PortTypeSelection)payloadInputStream.readObject();
  				ImportDefinition importDefinition = (new Repository()).getDefinition(selection);
  			
  				ByteArrayOutputStream outputStream = new ByteArrayOutputStream();		
  		        ObjectOutputStream objectOutputStream = new ObjectOutputStream(outputStream);
    				objectOutputStream.writeObject(importDefinition);
  		        objectOutputStream.flush();					
  			
  				return outputStream.toByteArray();
  			}
  			if (functionName.equals("IMPORT_RAWMETADATA")) {
  				// import raw metadata
  				ObjectInputStream payloadInputStream = new ObjectInputStream(inputStream);
  				String queryString = (String)payloadInputStream.readObject();
  				byte[] result  = (new Repository()).getRawEISMetaData(queryString);
  				
  				return result;
  			}
  			if (functionName.equals("CUSTOMERINFO_getCustomer")) {
  				// invoke a business service
  				ObjectInputStream payloadInputStream = new ObjectInputStream(inputStream);				
  				String number = (String)payloadInputStream.readObject();
  				CustomerDataObject customer = (new CustomerInfo()).getCustomer(number);
  			
  				ByteArrayOutputStream outputStream = new ByteArrayOutputStream();		
  		        ObjectOutputStream objectOutputStream = new ObjectOutputStream(outputStream);
    				objectOutputStream.writeObject(customer);
  		        objectOutputStream.flush();					
  			
  				return outputStream.toByteArray();
  			}			
  			if (functionName.equals("PURCHASEORDERINFO_getPurchaseOrder")) {
  				// invoke a business service
  				ObjectInputStream payloadInputStream = new ObjectInputStream(inputStream);				
  				String number = (String)payloadInputStream.readObject();
  				PurchaseOrderDataObject purchaseOrder = (new PurchaseOrderInfo()).getPurchaseOrder(number);
  			
  				ByteArrayOutputStream outputStream = new ByteArrayOutputStream();		
  		        ObjectOutputStream objectOutputStream = new ObjectOutputStream(outputStream);
    				objectOutputStream.writeObject(purchaseOrder);
  		        objectOutputStream.flush();					
  			
  				return outputStream.toByteArray();
  			}			
  			
  			if (functionName.equals("CUSTOMERINFO_getAddress")) {
  				// invoke a business service
  				ObjectInputStream payloadInputStream = new ObjectInputStream(inputStream);				
  				String number = (String)payloadInputStream.readObject();
  				AddressDataObject address = (new CustomerInfo()).getAddress(number);
  			
  				ByteArrayOutputStream outputStream = new ByteArrayOutputStream();		
  		        ObjectOutputStream objectOutputStream = new ObjectOutputStream(outputStream);
    				objectOutputStream.writeObject(address);
  		        objectOutputStream.flush();					
  			
  				return outputStream.toByteArray();
  			}			
  			// process other business services here
  		
  		} catch (Exception e) {
  			e.printStackTrace();
  		}
  		
  		return null;
  	}
  
  }
  
  
  
  
  1.1                  xml-axis-wsif/java/samples/jca/ra/org/w3/www/_2001/XMLSchema/myeis/myeis/StringFormatHandler.java
  
  Index: StringFormatHandler.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.w3.www._2001.XMLSchema.myeis.myeis;
  
  import java.io.*;
  import org.apache.wsif.providers.jca.WSIFFormatHandler_JCA;
  
  
  public class StringFormatHandler implements WSIFFormatHandler_JCA {
  
  
  	private String fieldValue = null;
  
  
  	/**
  	 * @see JCAFormatHandler#read(InputStream)
  	 */
  	public void read(InputStream inputStream) throws IOException {
  		
  		try {
  			ObjectInputStream objectInputStream = new ObjectInputStream(inputStream);
  			this.fieldValue =
  				(String)objectInputStream.readObject();
  		} catch (ClassNotFoundException e) {
  			e.printStackTrace();
  			throw new IOException("class not found !");
  		}	
  	}
  
  
  	/**
  	 * @see JCAFormatHandler#write(OutputStream)
  	 */
  	public void write(OutputStream outputStream) throws IOException {
  
          ObjectOutputStream objectOutputStream = new ObjectOutputStream(outputStream);
          objectOutputStream.writeObject(this.fieldValue);
          objectOutputStream.flush();
  	}
  
  
  	/**
  	 * @see WSIFFormatHandler#getElement(String)
  	 */
  	public Object getElement(String elementName) {
  		return null;
  	}
  
  
  	/**
  	 * @see WSIFFormatHandler#setElement(String, Object)
  	 */
  	public void setElement(String elementName, Object element) {
  	}
  
  
  	/**
  	 * @see WSIFFormatHandler#getElement(String, int)
  	 */
  	public Object getElement(String name, int index) {
  		return null;
  	}
  
  
  	/**
  	 * @see WSIFFormatHandler#setElement(String, int, Object)
  	 */
  	public void setElement(String name, int index, Object value) {
  	}
  
  
  	/**
  	 * @see WSIFFormatHandler#getObjectPart()
  	 */
  	public Object getObjectPart() {
  		return this.fieldValue;
  	}
  
  
  	/**
  	 * @see WSIFFormatHandler#getObjectPart(Class)
  	 */
  	public Object getObjectPart(Class sourceClass) {
  		return null;
  	}
  
  
  	/**
  	 * @see WSIFFormatHandler#getCharPart()
  	 */
  	public char getCharPart() {
  		return 0;
  	}
  
  
  	/**
  	 * @see WSIFFormatHandler#getBytePart()
  	 */
  	public byte getBytePart() {
  		return 0;
  	}
  
  
  	/**
  	 * @see WSIFFormatHandler#getShortPart()
  	 */
  	public short getShortPart() {
  		return 0;
  	}
  
  
  	/**
  	 * @see WSIFFormatHandler#getIntPart()
  	 */
  	public int getIntPart() {
  		return 0;
  	}
  
  
  	/**
  	 * @see WSIFFormatHandler#getLongPart()
  	 */
  	public long getLongPart() {
  		return 0;
  	}
  
  
  	/**
  	 * @see WSIFFormatHandler#getFloatPart()
  	 */
  	public float getFloatPart() {
  		return 0;
  	}
  
  
  	/**
  	 * @see WSIFFormatHandler#getDoublePart()
  	 */
  	public double getDoublePart() {
  		return 0;
  	}
  
  
  	/**
  	 * @see WSIFFormatHandler#setObjectPart(Object)
  	 */
  	public void setObjectPart(Object objectPart) {
  		this.fieldValue = (String)objectPart;
  	}
  
  
  	/**
  	 * @see WSIFFormatHandler#setCharPart(char)
  	 */
  	public void setCharPart(char charPart) {
  	}
  
  
  	/**
  	 * @see WSIFFormatHandler#setBytePart(byte)
  	 */
  	public void setBytePart(byte bytePart) {
  	}
  
  
  	/**
  	 * @see WSIFFormatHandler#setShortPart(short)
  	 */
  	public void setShortPart(short shortPart) {
  	}
  
  
  	/**
  	 * @see WSIFFormatHandler#setIntPart(int)
  	 */
  	public void setIntPart(int intPart) {
  	}
  
  
  	/**
  	 * @see WSIFFormatHandler#setLongPart(long)
  	 */
  	public void setLongPart(long longPart) {
  	}
  
  
  	/**
  	 * @see WSIFFormatHandler#setFloatPart(float)
  	 */
  	public void setFloatPart(float floatPart) {
  	}
  
  
  	/**
  	 * @see WSIFFormatHandler#setDoublePart(double)
  	 */
  	public void setDoublePart(double doublePart) {
  	}
  
  	public void setPartQName(javax.xml.namespace.QName qname){
  	}
  	
  	public javax.xml.namespace.QName getPartQName(){
  		return null;
  	}
  	public void setInteractionSpec(javax.resource.cci.InteractionSpec is){
  		
  	}
  
  }
  
  
  
  
  
  1.1                  xml-axis-wsif/java/samples/jca/ra/org/w3/_2001/xmlschema/myeis/myeis/StringFormatHandler.java
  
  Index: StringFormatHandler.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.w3._2001.xmlschema.myeis.myeis;
  
  import java.io.*;
  import org.apache.wsif.providers.jca.WSIFFormatHandler_JCA;
  
  
  public class StringFormatHandler implements WSIFFormatHandler_JCA {
  
  
  	private String fieldValue = null;
  
  
  	/**
  	 * @see JCAFormatHandler#read(InputStream)
  	 */
  	public void read(InputStream inputStream) throws IOException {
  		
  		try {
  			ObjectInputStream objectInputStream = new ObjectInputStream(inputStream);
  			this.fieldValue =
  				(String)objectInputStream.readObject();
  		} catch (ClassNotFoundException e) {
  			e.printStackTrace();
  			throw new IOException("class not found !");
  		}	
  	}
  
  
  	/**
  	 * @see JCAFormatHandler#write(OutputStream)
  	 */
  	public void write(OutputStream outputStream) throws IOException {
  
          ObjectOutputStream objectOutputStream = new ObjectOutputStream(outputStream);
          objectOutputStream.writeObject(this.fieldValue);
          objectOutputStream.flush();
  	}
  
  
  	/**
  	 * @see WSIFFormatHandler#getElement(String)
  	 */
  	public Object getElement(String elementName) {
  		return null;
  	}
  
  
  	/**
  	 * @see WSIFFormatHandler#setElement(String, Object)
  	 */
  	public void setElement(String elementName, Object element) {
  	}
  
  
  	/**
  	 * @see WSIFFormatHandler#getElement(String, int)
  	 */
  	public Object getElement(String name, int index) {
  		return null;
  	}
  
  
  	/**
  	 * @see WSIFFormatHandler#setElement(String, int, Object)
  	 */
  	public void setElement(String name, int index, Object value) {
  	}
  
  
  	/**
  	 * @see WSIFFormatHandler#getObjectPart()
  	 */
  	public Object getObjectPart() {
  		return this.fieldValue;
  	}
  
  
  	/**
  	 * @see WSIFFormatHandler#getObjectPart(Class)
  	 */
  	public Object getObjectPart(Class sourceClass) {
  		return null;
  	}
  
  
  	/**
  	 * @see WSIFFormatHandler#getCharPart()
  	 */
  	public char getCharPart() {
  		return 0;
  	}
  
  
  	/**
  	 * @see WSIFFormatHandler#getBytePart()
  	 */
  	public byte getBytePart() {
  		return 0;
  	}
  
  
  	/**
  	 * @see WSIFFormatHandler#getShortPart()
  	 */
  	public short getShortPart() {
  		return 0;
  	}
  
  
  	/**
  	 * @see WSIFFormatHandler#getIntPart()
  	 */
  	public int getIntPart() {
  		return 0;
  	}
  
  
  	/**
  	 * @see WSIFFormatHandler#getLongPart()
  	 */
  	public long getLongPart() {
  		return 0;
  	}
  
  
  	/**
  	 * @see WSIFFormatHandler#getFloatPart()
  	 */
  	public float getFloatPart() {
  		return 0;
  	}
  
  
  	/**
  	 * @see WSIFFormatHandler#getDoublePart()
  	 */
  	public double getDoublePart() {
  		return 0;
  	}
  
  
  	/**
  	 * @see WSIFFormatHandler#setObjectPart(Object)
  	 */
  	public void setObjectPart(Object objectPart) {
  		this.fieldValue = (String)objectPart;
  	}
  
  
  	/**
  	 * @see WSIFFormatHandler#setCharPart(char)
  	 */
  	public void setCharPart(char charPart) {
  	}
  
  
  	/**
  	 * @see WSIFFormatHandler#setBytePart(byte)
  	 */
  	public void setBytePart(byte bytePart) {
  	}
  
  
  	/**
  	 * @see WSIFFormatHandler#setShortPart(short)
  	 */
  	public void setShortPart(short shortPart) {
  	}
  
  
  	/**
  	 * @see WSIFFormatHandler#setIntPart(int)
  	 */
  	public void setIntPart(int intPart) {
  	}
  
  
  	/**
  	 * @see WSIFFormatHandler#setLongPart(long)
  	 */
  	public void setLongPart(long longPart) {
  	}
  
  
  	/**
  	 * @see WSIFFormatHandler#setFloatPart(float)
  	 */
  	public void setFloatPart(float floatPart) {
  	}
  
  
  	/**
  	 * @see WSIFFormatHandler#setDoublePart(double)
  	 */
  	public void setDoublePart(double doublePart) {
  	}
  
  	public void setPartQName(javax.xml.namespace.QName qname){
  	}
  	
  	public javax.xml.namespace.QName getPartQName(){
  		return null;
  	}
  
  	public void setInteractionSpec(javax.resource.cci.InteractionSpec is){
  		
  	}
  }
  
  
  
  
  
  1.1                  xml-axis-wsif/java/samples/jca/ra/com/myeis/wsif/providers/j2c/myeis/WSIFProvider_MyEIS.java
  
  Index: WSIFProvider_MyEIS.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 com.myeis.wsif.providers.j2c.myeis;
  
  import javax.resource.*;
  import javax.resource.cci.*;
  import javax.wsdl.*;
  import javax.wsdl.Binding;
  import javax.wsdl.extensions.*;
  
  import java.util.Iterator;
  import java.util.List;
  
  import com.myeis.j2c.*;
  import com.myeis.wsdl.extensions.j2c.myeis.*;
  import org.apache.wsif.*;
  import org.apache.wsif.base.*;
  import org.apache.wsif.providers.jca.*;
  import org.apache.wsif.providers.jca.WSIFUtils_JCA;
  import org.apache.wsif.providers.*;
  
  public class WSIFProvider_MyEIS implements org.apache.wsif.spi.WSIFProvider, org.apache.wsif.providers.jca.WSIFProviderJCAExtensions {
  
  	private final String[] namespaces = {MyEISBindingConstants.NS_URI};
  
      /**
       * WSIFDynamicProvider_MyEIS default constructor
       */
      public WSIFProvider_MyEIS() {
      	super();
      	WSIFServiceImpl.addExtensionRegistry(new MyEISExtensionRegistry());
      }
      
  	/**
  	 * @see WSIFDynamicProvider#createDynamicWSIFPort(Definition, Service, Port, WSIFDynamicTypeMap)
  	 */
  	public WSIFPort createDynamicWSIFPort(Definition definition, Service service, Port port, WSIFDynamicTypeMap typeMap) throws WSIFException {
  		
  		WSIFPort_JCA jcaPort = null;
  		Connection connection = null;
  		ConnectionFactory connectionFactory = null;
  
  		Binding binding = port.getBinding();
  		List eElements = binding.getExtensibilityElements();
  		Iterator iterator = eElements.iterator();
  		while (iterator.hasNext()) {
  			Object o = iterator.next();
  			if (o instanceof MyEISBinding) {
  				/*
  				 * To create the connection factory, the default behaviour is to assume that the J2EE Connector is running
  				 * in a managed mode (i.e. deployed on an Application Server with a JNDI name). Hence the first attempt is done
  				 * by retrieving the connection factory using a JNDI lookup name.
  				 */
  				String res_ref_name = WSIFUtils_JCA.getJNDILookupName(service, port);
  				connectionFactory = WSIFUtils_JCA.lookupConnectionFactory(res_ref_name, "javax.resource.cci.ConnectionFactory");
  				
  				try {
  					ExtensibilityElement portExtension = (ExtensibilityElement) port.getExtensibilityElements().get(0);
  
  					if (portExtension == null) {
  						return jcaPort;
  					}
  					MyEISAddress address = (MyEISAddress) portExtension;
  					if (connectionFactory == null) {
  						/*
  						 * The JNDI lookup must have failed, so we fall back to a non-managed mode. (i.e. we manually create
  						 * the managed connection factory and a connection.
  						 */
  						MyEISManagedConnectionFactory managedConnectionFactory = new MyEISManagedConnectionFactory();
  						managedConnectionFactory.setRepositoryLocation(address.getRepositoryLocation());
  						connectionFactory = (ConnectionFactory) managedConnectionFactory.createConnectionFactory();
  					}
  					connection = connectionFactory.getConnection();
  				}
  				catch(Throwable exn){
  					return jcaPort;
  				}
  				jcaPort = new WSIFPort_JCA(definition, service, port, connection, this, typeMap);
  				return jcaPort;
  				
  			}
  		}
  		return jcaPort;
  	}
  
  
  	public WSIFMessage createInputMessage(Definition definition, Binding binding, String operationName, String inputName, String outputName){return null;}
  	public WSIFMessage createOutputMessage(Definition definition, Binding binding, String operationName, String inputName, String outputName){return null;}
  	public WSIFMessage createFaultMessage(Definition definition, Binding binding, String operationName, String inputName, String outputName){return null;}
  
  	public String[] getBindingNamespaceURIs(){
  		return namespaces;
  	}	
  
  	public String[] getAddressNamespaceURIs(){
  		return namespaces;
  	}
  	public void updateOutputMessage(WSIFMessage output, Binding aBinding, String aOperationName, String aInputName, String aOutputName, InteractionSpec aInteractionSpec) {
  		// Not supported in this sample
  	}
  	public void updateInteractionSpec(WSIFMessage input, Binding aBinding, String aOperationName, String aInputName, String aOutputName, InteractionSpec aInteractionSpec) {
  		// Not supported in this sample
  	}
  	
  	
  	/**
  	 * @see org.apache.wsif.providers.jca.WSIFProviderJCAExtensions#createConnection(WSIFMessage, Definition, Service, Port, WSIFDynamicTypeMap, Binding, String, String, String)
  	 */
  	public Connection createConnection(
  		WSIFMessage input,
  		Definition definition,
  		Service service,
  		Port port,
  		WSIFDynamicTypeMap typeMap,
  		Binding aBinding,
  		String aOperationName,
  		String aInputName,
  		String aOutputName)
  		throws WSIFException {
  		return null;
  	}
  
  	/**
  	 * @see org.apache.wsif.providers.jca.WSIFProviderJCAExtensions#createOperation(Definition, Service, Port, String, String, String, WSIFDynamicTypeMap, WSIFPort_JCA, Connection)
  	 */
  	public WSIFOperation createOperation(
  		Definition aDefinition,
  		Service aService,
  		Port aPort,
  		String aOperationName,
  		String aInputName,
  		String aOutputName,
  		WSIFDynamicTypeMap typeMap,
  		WSIFPort_JCA jcaPort,
  		Connection aConnection)
  		throws WSIFException {
  		WSIFOperation_JCA operation = null;
  
  		try {
  			BindingOperation bindingOperationModel = aPort.getBinding().getBindingOperation(aOperationName, aInputName, aOutputName);
  
  			ExtensibilityElement bindingOperationModelExtension = (ExtensibilityElement) bindingOperationModel.getExtensibilityElements().get(0);
  			if (bindingOperationModelExtension == null) {
  				throw new WSIFException("missing bindingOperation extension");
  			}
  			if (!(bindingOperationModelExtension instanceof MyEISOperation)) {
  				throw new WSIFException("invalid extensibility element");
  			}
  
  			MyEISOperation operationModelExtension = (MyEISOperation) bindingOperationModelExtension;
  
  			MyEISInteractionSpec interactionSpec = new MyEISInteractionSpec();
  			interactionSpec.setFunctionName(operationModelExtension.getFunctionName());
  
  			operation = new WSIFOperation_JCA(aDefinition, aService, aPort, aOperationName, aInputName, aOutputName, typeMap, jcaPort, this, aConnection, interactionSpec);
  		}
  		catch (Exception e) {
  			e.printStackTrace();
  		}
  
  		return operation;
  	}
  
  }
  
  

Mime
View raw message