Author: rineholt
Date: Tue Mar 21 16:50:00 2006
New Revision: 387682

URL: http://svn.apache.org/viewcvs?rev=387682&view=rev
Log:
Move pure Axis example to axis 2.0 .95

Removed:
    
incubator/tuscany/java/samples/helloworld/helloworldaxis2/src/main/java/org/apache/tuscany/samples/helloworldaxis/HelloWorldServiceImplCallbackHandler.java
    
incubator/tuscany/java/samples/helloworld/helloworldaxis2/src/main/java/org/apache/tuscany/samples/helloworldaxis/HelloWorldServiceImplMessageReceiver.java
Modified:
    incubator/tuscany/java/samples/helloworld/helloworldaxis2/pom.xml
    incubator/tuscany/java/samples/helloworld/helloworldaxis2/readme.htm
    
incubator/tuscany/java/samples/helloworld/helloworldaxis2/src/main/java/org/apache/tuscany/samples/helloworldaxis/GetGreetings.java
    
incubator/tuscany/java/samples/helloworld/helloworldaxis2/src/main/java/org/apache/tuscany/samples/helloworldaxis/GetGreetingsResponse.java
    
incubator/tuscany/java/samples/helloworld/helloworldaxis2/src/main/java/org/apache/tuscany/samples/helloworldaxis/HelloWorldServiceImplSkeleton.java
    
incubator/tuscany/java/samples/helloworld/helloworldaxis2/src/main/java/org/apache/tuscany/samples/helloworldaxis/HelloWorldServiceImplStub.java
    incubator/tuscany/java/testing/tomcat/helloworldaxis2/pom.xml
    
incubator/tuscany/java/testing/tomcat/helloworldaxis2/src/test/java/org/apache/tuscany/samples/helloworldws/TestHelloWorldAxisTestCase.java

Modified: incubator/tuscany/java/samples/helloworld/helloworldaxis2/pom.xml
URL: 
http://svn.apache.org/viewcvs/incubator/tuscany/java/samples/helloworld/helloworldaxis2/pom.xml?rev=387682&r1=387681&r2=387682&view=diff
==============================================================================
--- incubator/tuscany/java/samples/helloworld/helloworldaxis2/pom.xml (original)
+++ incubator/tuscany/java/samples/helloworld/helloworldaxis2/pom.xml Tue Mar 
21 16:50:00 2006
@@ -43,13 +43,31 @@
                <dependency>
                        <groupId>axis2</groupId>
                        <artifactId>axis2-core</artifactId>
-                       <version>0.94</version>
+                       <version>0.95-SNAPSHOT</version>
                </dependency>
                <dependency>
                        <groupId>axis2</groupId>
                        <artifactId>axis2-adb</artifactId>
-                       <version>0.94</version>
+                       <version>0.95-SNAPSHOT</version>
                </dependency>
+
+                <dependency>
+                    <groupId>axis2</groupId>
+                    <artifactId>axis2-wsdl</artifactId>
+                    <version>0.95-SNAPSHOT</version>
+                    <scope>compile</scope>
+                </dependency>
+                <dependency>
+                    <groupId>axis2</groupId>
+                    <artifactId>axis2-common</artifactId>
+                    <version>0.95-SNAPSHOT</version>
+                    <scope>runtime</scope>
+                </dependency>
+                <dependency>
+                    <groupId>ws-commons</groupId>
+                    <artifactId>axiom</artifactId>
+                    <version>1.0-SNAPSHOT</version>
+                </dependency>
                <dependency>
                        <groupId>commons-logging</groupId>
                        <artifactId>commons-logging</artifactId>
@@ -81,15 +99,23 @@
                        <version>1.0</version>
                </dependency>
                <dependency>
-                       <groupId>axis</groupId>
-                       <artifactId>axis-wsdl4j</artifactId>
-                       <version>1.2</version>
+                       <groupId>ws-commons</groupId>
+                       <artifactId>policy</artifactId>
+                       <version>0.92-SNAPSHOT</version>
+                    <scope>runtime</scope>
                </dependency>
                <dependency>
-                       <groupId>ws-commons</groupId>
-                       <artifactId>ws-policy</artifactId>
-                       <version>SNAPSHOT</version>
+                       <groupId>axis</groupId>
+                       <artifactId>axis-wsdl4j</artifactId>
+                       <version>1.5.1</version>
+                    <scope>runtime</scope>
                </dependency>
+                <dependency>
+                    <groupId>ws-commons</groupId>
+                    <artifactId>XmlSchema</artifactId>
+                    <version>1.0-SNAPSHOT</version>
+                    <scope>runtime</scope>
+                </dependency>
                <dependency>
                        <groupId>junit</groupId>
                        <artifactId>junit</artifactId>

Modified: incubator/tuscany/java/samples/helloworld/helloworldaxis2/readme.htm
URL: 
http://svn.apache.org/viewcvs/incubator/tuscany/java/samples/helloworld/helloworldaxis2/readme.htm?rev=387682&r1=387681&r2=387682&view=diff
==============================================================================
--- incubator/tuscany/java/samples/helloworld/helloworldaxis2/readme.htm 
(original)
+++ incubator/tuscany/java/samples/helloworld/helloworldaxis2/readme.htm Tue 
Mar 21 16:50:00 2006
@@ -40,7 +40,11 @@
     a&nbsp;Java source using Axis's
     java2wsdl to create a document literal WSDL. &nbsp;And then using
     that WSDL in wsdl2java to create all the Axis service and client
-    artifacts. Details on this can be found reviewing the Axis
+    artifacts.
+    <pre>
+      wsdl2java  -uri helloworld.wsdl -o generated -s -ss -sd -g -p 
org.apache.tuscany.samples.helloworldaxis
+    </pre>
+    Details on this can be found reviewing the Axis
     documentation.</p>
 
 <p>The original Java code to generate is simply:</p>

Modified: 
incubator/tuscany/java/samples/helloworld/helloworldaxis2/src/main/java/org/apache/tuscany/samples/helloworldaxis/GetGreetings.java
URL: 
http://svn.apache.org/viewcvs/incubator/tuscany/java/samples/helloworld/helloworldaxis2/src/main/java/org/apache/tuscany/samples/helloworldaxis/GetGreetings.java?rev=387682&r1=387681&r2=387682&view=diff
==============================================================================
--- 
incubator/tuscany/java/samples/helloworld/helloworldaxis2/src/main/java/org/apache/tuscany/samples/helloworldaxis/GetGreetings.java
 (original)
+++ 
incubator/tuscany/java/samples/helloworld/helloworldaxis2/src/main/java/org/apache/tuscany/samples/helloworldaxis/GetGreetings.java
 Tue Mar 21 16:50:00 2006
@@ -1,94 +1,125 @@
-/**
- * GetGreetings.java This file was auto-generated from WSDL by the Apache Axis2
- * version: #axisVersion# #today#
- */
-package org.apache.tuscany.samples.helloworldaxis;
-
-/**
- * GetGreetings bean class
- */
-public class GetGreetings implements org.apache.axis2.databinding.ADBBean {
-    public static final javax.xml.namespace.QName MY_QNAME = new 
javax.xml.namespace.QName("http://helloworldaxis.samples.tuscany.apache.org";,
-            "getGreetings", "ns1");
 
-    /** field for In0 */
-    private java.lang.String localIn0;
+            /**
+            * GetGreetings.java
+            *
+            * This file was auto-generated from WSDL
+            * by the Apache Axis2 version: #axisVersion# #today#
+            */
+
+            package org.apache.tuscany.samples.helloworldaxis;
+            /**
+            *  GetGreetings bean class
+            */
+        
+        public  class GetGreetings
+        implements org.apache.axis2.databinding.ADBBean{
+        
+                public static final javax.xml.namespace.QName MY_QNAME = new 
javax.xml.namespace.QName(
+                "http://helloworldaxis.samples.tuscany.apache.org";,
+                "getGreetings",
+                "ns1");
+
+            
+
+
+            /**
+            * field for In0
+            */
+
+            protected java.lang.String localIn0 ;
+           
+           
+
+           /**
+           * Auto generated getter method
+           * @return java.lang.String
+           */
+           public  java.lang.String getIn0(){
+               return localIn0;
+           }
+
+           
+            
+                    /**
+                   * Auto generated setter method
+                   * @param param In0
+                   */
+                   public void setIn0(java.lang.String param){
+                    
+                   this.localIn0=param;
+                   }
+                
+
+        /**
+        * databinding method to get an XML representation of this object
+        *
+        */
+        public javax.xml.stream.XMLStreamReader 
getPullParser(javax.xml.namespace.QName qName){
+
+
+        
+                 java.util.ArrayList elementList = new java.util.ArrayList();
+                 java.util.ArrayList attribList = new java.util.ArrayList();
+
+                
+                             elementList.add(new 
javax.xml.namespace.QName("http://helloworldaxis.samples.tuscany.apache.org";,
+                                                                      "in0"));
+                            
+                                elementList.add(
+                                   
org.apache.axis2.databinding.utils.ConverterUtil.convertToString(localIn0));
+                                
+
+                return 
org.apache.axis2.databinding.utils.ADBPullParser.createPullParser(qName, 
elementList.toArray(), attribList.toArray());
+            
+            
 
-    /**
-     * Auto generated getter method
-     *
-     * @return java.lang.String
-     */
-    public java.lang.String getIn0() {
-        return localIn0;
-    }
+        }
 
-    /**
-     * Auto generated setter method
-     *
-     * @param param In0
-     */
-    public void setIn0(java.lang.String param) {
-        this.localIn0 = param;
-    }
+        /**
+        * utility method to http://www.w3.org/2001/XMLSchema-instance
+        */
 
     /**
-     * databinding method to get an XML representation of this object
-     */
-    public javax.xml.stream.XMLStreamReader getPullParser(
-        javax.xml.namespace.QName qName) {
-        java.util.ArrayList elementList = new java.util.ArrayList();
-        java.util.ArrayList attribList = new java.util.ArrayList();
-
-        elementList.add(new javax.xml.namespace.QName(
-                "http://helloworldaxis.samples.tuscany.apache.org";, "in0"));
-        
elementList.add(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(
-                localIn0));
-
-        return 
org.apache.axis2.databinding.utils.ADBPullParser.createPullParser(qName,
-            elementList.toArray(), attribList.toArray());
-    }
-
-    /**
-     * static method to create the object Note -  This is not complete
-     */
-    public static GetGreetings parse(javax.xml.stream.XMLStreamReader reader)
-        throws java.lang.Exception {
+      *  Factory class that keeps the parse method
+      */
+    public static class Factory{
+        /**
+        * static method to create the object
+        */
+        public static GetGreetings parse(javax.xml.stream.XMLStreamReader 
reader) throws java.lang.Exception{
         GetGreetings object = new GetGreetings();
-
         try {
-            int event = reader.getEventType();
-            int count = 0;
-            int argumentCount = 1;
-            boolean done = false;
-
-            //event better be a START_ELEMENT. if not we should go up to the 
start element here
-            while (!reader.isStartElement()) {
-                event = reader.next();
-            }
-
-            while (!done) {
-                if (javax.xml.stream.XMLStreamConstants.START_ELEMENT == 
event) {
-                    if ("in0".equals(reader.getLocalName())) {
-                        String content = reader.getElementText();
-                        
object.setIn0(org.apache.axis2.databinding.utils.ConverterUtil.convertTostring(
-                                content));
-                        count++;
-                    }
-                }
-
-                if (argumentCount == count) {
-                    done = true;
-                }
-
-                if (!done) {
-                    event = reader.next();
-                }
-            }
+        int event = reader.getEventType();
+
+       //event better be a START_ELEMENT. if not we should go up to the start 
element here
+        while (event!= javax.xml.stream.XMLStreamReader.START_ELEMENT) {
+            event = reader.next();
+        }
+
+        
+        if (!MY_QNAME.equals(reader.getName())){
+                    throw new Exception("Wrong QName");
+        }
+        
+                
org.apache.axis2.databinding.utils.SimpleElementReaderStateMachine stateMachine1
+                  = new 
org.apache.axis2.databinding.utils.SimpleElementReaderStateMachine();
+                javax.xml.namespace.QName startQname1 = new 
javax.xml.namespace.QName(
+                                     
"http://helloworldaxis.samples.tuscany.apache.org";,
+                                    "in0");
+                stateMachine1.setElementNameToTest(startQname1);
+                stateMachine1.read(reader);
+                object.setIn0(
+                  
+                     
org.apache.axis2.databinding.utils.ConverterUtil.convertTostring(
+                           stateMachine1.getText()));
+                      
         } catch (javax.xml.stream.XMLStreamException e) {
-            throw new java.lang.Exception(e);
+             throw new java.lang.Exception(e);
         }
 
         return object;
-    }
-}
+        }
+        }//end of factory class
+
+        }
+    
\ No newline at end of file

Modified: 
incubator/tuscany/java/samples/helloworld/helloworldaxis2/src/main/java/org/apache/tuscany/samples/helloworldaxis/GetGreetingsResponse.java
URL: 
http://svn.apache.org/viewcvs/incubator/tuscany/java/samples/helloworld/helloworldaxis2/src/main/java/org/apache/tuscany/samples/helloworldaxis/GetGreetingsResponse.java?rev=387682&r1=387681&r2=387682&view=diff
==============================================================================
--- 
incubator/tuscany/java/samples/helloworld/helloworldaxis2/src/main/java/org/apache/tuscany/samples/helloworldaxis/GetGreetingsResponse.java
 (original)
+++ 
incubator/tuscany/java/samples/helloworld/helloworldaxis2/src/main/java/org/apache/tuscany/samples/helloworldaxis/GetGreetingsResponse.java
 Tue Mar 21 16:50:00 2006
@@ -1,96 +1,125 @@
-/**
- * GetGreetingsResponse.java This file was auto-generated from WSDL by the
- * Apache Axis2 version: #axisVersion# #today#
- */
-package org.apache.tuscany.samples.helloworldaxis;
-
-/**
- * GetGreetingsResponse bean class
- */
-public class GetGreetingsResponse
-    implements org.apache.axis2.databinding.ADBBean {
-    public static final javax.xml.namespace.QName MY_QNAME = new 
javax.xml.namespace.QName("http://helloworldaxis.samples.tuscany.apache.org";,
-            "getGreetingsResponse", "ns1");
 
-    /** field for GetGreetingsReturn */
-    private java.lang.String localGetGreetingsReturn;
+            /**
+            * GetGreetingsResponse.java
+            *
+            * This file was auto-generated from WSDL
+            * by the Apache Axis2 version: #axisVersion# #today#
+            */
+
+            package org.apache.tuscany.samples.helloworldaxis;
+            /**
+            *  GetGreetingsResponse bean class
+            */
+        
+        public  class GetGreetingsResponse
+        implements org.apache.axis2.databinding.ADBBean{
+        
+                public static final javax.xml.namespace.QName MY_QNAME = new 
javax.xml.namespace.QName(
+                "http://helloworldaxis.samples.tuscany.apache.org";,
+                "getGreetingsResponse",
+                "ns1");
 
-    /**
-     * Auto generated getter method
-     *
-     * @return java.lang.String
-     */
-    public java.lang.String getGetGreetingsReturn() {
-        return localGetGreetingsReturn;
-    }
+            
 
-    /**
-     * Auto generated setter method
-     *
-     * @param param GetGreetingsReturn
-     */
-    public void setGetGreetingsReturn(java.lang.String param) {
-        this.localGetGreetingsReturn = param;
-    }
 
-    /**
-     * databinding method to get an XML representation of this object
-     */
-    public javax.xml.stream.XMLStreamReader getPullParser(
-        javax.xml.namespace.QName qName) {
-        java.util.ArrayList elementList = new java.util.ArrayList();
-        java.util.ArrayList attribList = new java.util.ArrayList();
+            /**
+            * field for GetGreetingsReturn
+            */
+
+            protected java.lang.String localGetGreetingsReturn ;
+           
+           
+
+           /**
+           * Auto generated getter method
+           * @return java.lang.String
+           */
+           public  java.lang.String getGetGreetingsReturn(){
+               return localGetGreetingsReturn;
+           }
+
+           
+            
+                    /**
+                   * Auto generated setter method
+                   * @param param GetGreetingsReturn
+                   */
+                   public void setGetGreetingsReturn(java.lang.String param){
+                    
+                   this.localGetGreetingsReturn=param;
+                   }
+                
+
+        /**
+        * databinding method to get an XML representation of this object
+        *
+        */
+        public javax.xml.stream.XMLStreamReader 
getPullParser(javax.xml.namespace.QName qName){
+
+
+        
+                 java.util.ArrayList elementList = new java.util.ArrayList();
+                 java.util.ArrayList attribList = new java.util.ArrayList();
+
+                
+                             elementList.add(new 
javax.xml.namespace.QName("http://helloworldaxis.samples.tuscany.apache.org";,
+                                                                      
"getGreetingsReturn"));
+                            
+                                elementList.add(
+                                   
org.apache.axis2.databinding.utils.ConverterUtil.convertToString(localGetGreetingsReturn));
+                                
+
+                return 
org.apache.axis2.databinding.utils.ADBPullParser.createPullParser(qName, 
elementList.toArray(), attribList.toArray());
+            
+            
 
-        elementList.add(new javax.xml.namespace.QName(
-                "http://helloworldaxis.samples.tuscany.apache.org";,
-                "getGreetingsReturn"));
-        
elementList.add(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(
-                localGetGreetingsReturn));
-
-        return 
org.apache.axis2.databinding.utils.ADBPullParser.createPullParser(qName,
-            elementList.toArray(), attribList.toArray());
-    }
+        }
+
+        /**
+        * utility method to http://www.w3.org/2001/XMLSchema-instance
+        */
 
     /**
-     * static method to create the object Note -  This is not complete
-     */
-    public static GetGreetingsResponse parse(
-        javax.xml.stream.XMLStreamReader reader) throws java.lang.Exception {
+      *  Factory class that keeps the parse method
+      */
+    public static class Factory{
+        /**
+        * static method to create the object
+        */
+        public static GetGreetingsResponse 
parse(javax.xml.stream.XMLStreamReader reader) throws java.lang.Exception{
         GetGreetingsResponse object = new GetGreetingsResponse();
-
         try {
-            int event = reader.getEventType();
-            int count = 0;
-            int argumentCount = 1;
-            boolean done = false;
-
-            //event better be a START_ELEMENT. if not we should go up to the 
start element here
-            while (!reader.isStartElement()) {
-                event = reader.next();
-            }
-
-            while (!done) {
-                if (javax.xml.stream.XMLStreamConstants.START_ELEMENT == 
event) {
-                    if ("getGreetingsReturn".equals(reader.getLocalName())) {
-                        String content = reader.getElementText();
-                        
object.setGetGreetingsReturn(org.apache.axis2.databinding.utils.ConverterUtil.convertTostring(
-                                content));
-                        count++;
-                    }
-                }
-
-                if (argumentCount == count) {
-                    done = true;
-                }
-
-                if (!done) {
-                    event = reader.next();
-                }
-            }
+        int event = reader.getEventType();
+
+       //event better be a START_ELEMENT. if not we should go up to the start 
element here
+        while (event!= javax.xml.stream.XMLStreamReader.START_ELEMENT) {
+            event = reader.next();
+        }
+
+        
+        if (!MY_QNAME.equals(reader.getName())){
+                    throw new Exception("Wrong QName");
+        }
+        
+                
org.apache.axis2.databinding.utils.SimpleElementReaderStateMachine stateMachine1
+                  = new 
org.apache.axis2.databinding.utils.SimpleElementReaderStateMachine();
+                javax.xml.namespace.QName startQname1 = new 
javax.xml.namespace.QName(
+                                     
"http://helloworldaxis.samples.tuscany.apache.org";,
+                                    "getGreetingsReturn");
+                stateMachine1.setElementNameToTest(startQname1);
+                stateMachine1.read(reader);
+                object.setGetGreetingsReturn(
+                  
+                     
org.apache.axis2.databinding.utils.ConverterUtil.convertTostring(
+                           stateMachine1.getText()));
+                      
         } catch (javax.xml.stream.XMLStreamException e) {
-            throw new java.lang.Exception(e);
+             throw new java.lang.Exception(e);
         }
 
         return object;
-    }
-}
+        }
+        }//end of factory class
+
+        }
+    
\ No newline at end of file

Modified: 
incubator/tuscany/java/samples/helloworld/helloworldaxis2/src/main/java/org/apache/tuscany/samples/helloworldaxis/HelloWorldServiceImplSkeleton.java
URL: 
http://svn.apache.org/viewcvs/incubator/tuscany/java/samples/helloworld/helloworldaxis2/src/main/java/org/apache/tuscany/samples/helloworldaxis/HelloWorldServiceImplSkeleton.java?rev=387682&r1=387681&r2=387682&view=diff
==============================================================================
--- 
incubator/tuscany/java/samples/helloworld/helloworldaxis2/src/main/java/org/apache/tuscany/samples/helloworldaxis/HelloWorldServiceImplSkeleton.java
 (original)
+++ 
incubator/tuscany/java/samples/helloworld/helloworldaxis2/src/main/java/org/apache/tuscany/samples/helloworldaxis/HelloWorldServiceImplSkeleton.java
 Tue Mar 21 16:50:00 2006
@@ -1,24 +1,31 @@
-/**
- * HelloWorldServiceImplSkeleton.java This file was auto-generated from WSDL by
- * the Apache Axis2 version: 0.94-SNAPSHOT Jan 10, 2006 (10:21:58 LKT)
- */
-package org.apache.tuscany.samples.helloworldaxis;
 
-/**
- * HelloWorldServiceImplSkeleton java skeleton for the axisService
- */
-public class HelloWorldServiceImplSkeleton
-{
     /**
-     * Auto generated method signature
+     * HelloWorldServiceImplSkeleton.java
      *
-     * @param greetings
+     * This file was auto-generated from WSDL
+     * by the Apache Axis2 version: 0.95-SNAPSHOT Mar 21, 2006 (05:13:26 EST)
      */
-    public org.apache.tuscany.samples.helloworldaxis.GetGreetingsResponse 
getGreetings(
-                                                                               
        org.apache.tuscany.samples.helloworldaxis.GetGreetings greetings )
-    {
-        GetGreetingsResponse response = new GetGreetingsResponse();
+    package org.apache.tuscany.samples.helloworldaxis;
+    /**
+     *  HelloWorldServiceImplSkeleton java skeleton for the axisService
+     */
+    public class HelloWorldServiceImplSkeleton {
+     
+                
+        /**
+         * Auto generated method signature
+         
+          * @param param0
+         
+         */
+        public  org.apache.tuscany.samples.helloworldaxis.GetGreetingsResponse 
getGreetings
+                  (org.apache.tuscany.samples.helloworldaxis.GetGreetings 
greetings ) throws Exception {
+                
+               
+         GetGreetingsResponse response = new GetGreetingsResponse();
         response.setGetGreetingsReturn( "Greeting: " + greetings.getIn0() );
         return response;
+        }
+     
     }
-}
+    
\ No newline at end of file

Modified: 
incubator/tuscany/java/samples/helloworld/helloworldaxis2/src/main/java/org/apache/tuscany/samples/helloworldaxis/HelloWorldServiceImplStub.java
URL: 
http://svn.apache.org/viewcvs/incubator/tuscany/java/samples/helloworld/helloworldaxis2/src/main/java/org/apache/tuscany/samples/helloworldaxis/HelloWorldServiceImplStub.java?rev=387682&r1=387681&r2=387682&view=diff
==============================================================================
--- 
incubator/tuscany/java/samples/helloworld/helloworldaxis2/src/main/java/org/apache/tuscany/samples/helloworldaxis/HelloWorldServiceImplStub.java
 (original)
+++ 
incubator/tuscany/java/samples/helloworld/helloworldaxis2/src/main/java/org/apache/tuscany/samples/helloworldaxis/HelloWorldServiceImplStub.java
 Tue Mar 21 16:50:00 2006
@@ -1,269 +1,234 @@
-/**
- * HelloWorldServiceImplStub.java This file was auto-generated from WSDL by the
- * Apache Axis2 version: 0.94-SNAPSHOT Jan 10, 2006 (10:21:58 LKT)
- */
-package org.apache.tuscany.samples.helloworldaxis;
-
-/*
- *  HelloWorldServiceImplStub java implementation
- */
-public class HelloWorldServiceImplStub
-    extends org.apache.axis2.client.Stub
-{
-    //default axis home being null forces the system to pick up the mars from 
the axis2 library
-    public static final String AXIS2_HOME = null;
 
-    protected static org.apache.axis2.description.AxisOperation[] _operations;
+        /**
+        * HelloWorldServiceImplStub.java
+        *
+        * This file was auto-generated from WSDL
+        * by the Apache Axis2 version: 0.95-SNAPSHOT Mar 21, 2006 (05:13:26 
EST)
+        */
+        package org.apache.tuscany.samples.helloworldaxis;
+
+import org.apache.ws.commons.om.impl.llom.builder.StAXOMBuilder;
+
+        
+
+        /*
+        *  HelloWorldServiceImplStub java implementation
+        */
+
+        public class HelloWorldServiceImplStub extends 
org.apache.axis2.client.Stub
+        {
+        //default axis home being null forces the system to pick up the mars 
from the axis2 library
+        public static final java.lang.String AXIS2_HOME = null;
+        protected static org.apache.axis2.description.AxisOperation[] 
_operations;
+       
+       private void populateAxisService(){
 
-    static
-    {
         //creating the Service
-        _service = new org.apache.axis2.description.AxisService( 
"HelloWorldServiceImpl" );
+        _service = new 
org.apache.axis2.description.AxisService("HelloWorldServiceImpl");
+       
 
         //creating the operations
         org.apache.axis2.description.AxisOperation __operation;
-        _operations = new org.apache.axis2.description.OutInAxisOperation[1];
+       
+
+
+        _operations = new org.apache.axis2.description.AxisOperation[1];
+        
+                   __operation = new 
org.apache.axis2.description.OutInAxisOperation();
+                
+
+            __operation.setName(new 
javax.xml.namespace.QName("http://helloworldaxis.samples.tuscany.apache.org";, 
"getGreetings"));
+
+           
+
+            _operations[0]=__operation;
+            _service.addOperation(__operation);
+        
+        }
+
 
-        __operation = new org.apache.axis2.description.OutInAxisOperation();
-        __operation.setName( new javax.xml.namespace.QName( 
"http://helloworldaxis.samples.tuscany.apache.org";,
-                                                            "getGreetings" ) );
-        _operations[0] = __operation;
-        _service.addOperation( __operation );
-    }
 
-    public HelloWorldServiceImplStub( 
org.apache.axis2.context.ConfigurationContext configurationContext,
-                                     String targetEndpoint )
-        throws java.lang.Exception
-    {
-        _serviceClient = new org.apache.axis2.client.ServiceClient( 
configurationContext, _service );
-        _serviceClient.getOptions().setTo( new 
org.apache.axis2.addressing.EndpointReference( targetEndpoint ) );
+     public 
HelloWorldServiceImplStub(org.apache.axis2.context.ConfigurationContext 
configurationContext,
+        java.lang.String targetEndpoint)
+        throws java.lang.Exception {
+       //To populate AxisService
+       populateAxisService();
+       
+       
+        _serviceClient = new 
org.apache.axis2.client.ServiceClient(configurationContext,_service);
+        _serviceClient.getOptions().setTo(new 
org.apache.axis2.addressing.EndpointReference(
+                targetEndpoint));
+        
     }
 
     /**
      * Default Constructor
      */
-    public HelloWorldServiceImplStub()
-        throws java.lang.Exception
-    {
-        this( 
"http://localhost:8080/axis2/services/HelloWorldServiceImplService"; );
+    public HelloWorldServiceImplStub() throws java.lang.Exception {
+        
+                    
this("http://localhost:8080/helloworldws-SNAPSHOT/services/HelloWorldService"; );
+                
     }
 
     /**
      * Constructor taking the traget endpoint
      */
-    public HelloWorldServiceImplStub( String targetEndpoint )
-        throws java.lang.Exception
-    {
-        this( new org.apache.axis2.context.ConfigurationContextFactory()
-            .createConfigurationContextFromFileSystem( AXIS2_HOME ), 
targetEndpoint );
+    public HelloWorldServiceImplStub(java.lang.String targetEndpoint) throws 
java.lang.Exception {
+        
this(org.apache.axis2.context.ConfigurationContextFactory.createConfigurationContextFromFileSystem(AXIS2_HOME,null),
+                targetEndpoint);
     }
 
-    /**
-     * Auto generated method signature
-     *
-     * @param param10
-     *
-     * @see 
org.apache.tuscany.samples.helloworldaxis.HelloWorldServiceImpl#getGreetings
-     */
-    public org.apache.tuscany.samples.helloworldaxis.GetGreetingsResponse 
getGreetings(
-                                                                               
        org.apache.tuscany.samples.helloworldaxis.GetGreetings param10 )
-        throws java.rmi.RemoteException
-    {
-        org.apache.axis2.client.OperationClient _operationClient = 
_serviceClient.createClient( _operations[0]
-            .getName() );
-        _operationClient.getOptions().setSoapAction( "" );
-        _operationClient.getOptions().setExceptionToBeThrownOnSOAPFault( true 
);
 
-        // create SOAP envelope with that payload
-        org.apache.axis2.soap.SOAPEnvelope env = null;
 
-        //Style is Doc.
-        env = toEnvelope( getFactory( _options.getSoapVersionURI() ), param10 
);
+        
+                    /**
+                    * Auto generated method signature
+                    * @see 
org.apache.tuscany.samples.helloworldaxis.HelloWorldServiceImpl#getGreetings
+                        * @param param10
+                    
+                    */
+                    public 
org.apache.tuscany.samples.helloworldaxis.GetGreetingsResponse getGreetings(
+                    org.apache.tuscany.samples.helloworldaxis.GetGreetings 
param10) throws java.rmi.RemoteException{
+
+               org.apache.axis2.client.OperationClient _operationClient = 
_serviceClient.createClient(_operations[0].getName());
+              _operationClient.getOptions().setAction("");
+              
_operationClient.getOptions().setExceptionToBeThrownOnSOAPFault(true);
+
+              
+
+              // create SOAP envelope with that payload
+              org.apache.ws.commons.soap.SOAPEnvelope env = null;
+                    
+                                    //Style is Doc.
+                                    
+                                    
+                                                 env = 
toEnvelope(getFactory(_operationClient.getOptions().getSoapVersionURI()), 
param10, optimizeContent(new 
javax.xml.namespace.QName("http://helloworldaxis.samples.tuscany.apache.org";, 
"getGreetings")));
+                                            
 
         // create message context with that soap envelope
-        org.apache.axis2.context.MessageContext _messageContext = new 
org.apache.axis2.context.MessageContext();
-        _messageContext.setEnvelope( env );
+        org.apache.axis2.context.MessageContext _messageContext = new 
org.apache.axis2.context.MessageContext() ;
+        _messageContext.setEnvelope(env);
 
         // add the message contxt to the operation client
-        _operationClient.addMessageContext( _messageContext );
-
-        //set the options hierarchy
-        _options.setParent( _operationClient.getOptions() );
-        _operationClient.setOptions( _options );
+        _operationClient.addMessageContext(_messageContext);
 
         //execute the operation client
-        _operationClient.execute( true );
-
-        org.apache.axis2.context.MessageContext _returnMessageContext = 
_operationClient
-            .getMessageContext( 
org.apache.wsdl.WSDLConstants.MESSAGE_LABEL_IN_VALUE );
-        org.apache.axis2.soap.SOAPEnvelope _returnEnv = 
_returnMessageContext.getEnvelope();
-
-        java.lang.Object object = fromOM( getElement( _returnEnv, "doc" ),
-                                          
org.apache.tuscany.samples.helloworldaxis.GetGreetingsResponse.class );
-
-        return 
(org.apache.tuscany.samples.helloworldaxis.GetGreetingsResponse) object;
-    }
-
-    /**
-     * Auto generated method signature for Asynchronous Invocations
-     *
-     * @param param10
-     *
-     * @see 
org.apache.tuscany.samples.helloworldaxis.HelloWorldServiceImpl#startgetGreetings
-     */
-    public void startgetGreetings(
-                                  
org.apache.tuscany.samples.helloworldaxis.GetGreetings param10,
-                                  final 
org.apache.tuscany.samples.helloworldaxis.HelloWorldServiceImplCallbackHandler 
callback )
-        throws java.rmi.RemoteException
-    {
-        org.apache.axis2.client.OperationClient _operationClient = 
_serviceClient.createClient( _operations[0]
-            .getName() );
-        _operationClient.getOptions().setSoapAction( "" );
-        _operationClient.getOptions().setExceptionToBeThrownOnSOAPFault( true 
);
-
-        // create SOAP envelope with that payload
-        org.apache.axis2.soap.SOAPEnvelope env;
-
-        //Style is Doc.
-        env = toEnvelope( getFactory( _options.getSoapVersionURI() ), param10 
);
-
-        // create message context with that soap envelope
-        org.apache.axis2.context.MessageContext _messageContext = new 
org.apache.axis2.context.MessageContext();
-        _messageContext.setEnvelope( env );
-
-        // add the message contxt to the operation client
-        _operationClient.addMessageContext( _messageContext );
+        _operationClient.execute(true);
 
-        //set the options hierarchy
-        _options.setParent( _operationClient.getOptions() );
-        _operationClient.setOptions( _options );
+         
+               org.apache.axis2.context.MessageContext _returnMessageContext = 
_operationClient.getMessageContext(
+                                           
org.apache.wsdl.WSDLConstants.MESSAGE_LABEL_IN_VALUE);
+                org.apache.ws.commons.soap.SOAPEnvelope _returnEnv = 
_returnMessageContext.getEnvelope();
+                
+                
+                           java.lang.Object object = 
fromOM(getElement(_returnEnv,"doc"),org.apache.tuscany.samples.helloworldaxis.GetGreetingsResponse.class);
+                           return 
(org.apache.tuscany.samples.helloworldaxis.GetGreetingsResponse)object;
+                    
+
+                    }
+            
+       
+    private javax.xml.namespace.QName[] opNameArray = null;
+       private boolean optimizeContent(javax.xml.namespace.QName opName) {
+        
+
+        if (opNameArray == null) {
+                       return false;
+               }
+               for (int i = 0; i < opNameArray.length; i++) {
+                       if (opName.equals(opNameArray[i])) {
+                               return true;   
+                       }
+               }
+               return false;
+       }
+    //http://localhost:8080/helloworldws-SNAPSHOT/services/HelloWorldService
+                    private  org.apache.ws.commons.om.OMElement  
toOM(org.apache.tuscany.samples.helloworldaxis.GetGreetings param){
+                        if (param instanceof 
org.apache.axis2.databinding.ADBBean){
+                            StAXOMBuilder builder = new StAXOMBuilder
+                            
(org.apache.ws.commons.om.OMAbstractFactory.getOMFactory(), 
param.getPullParser(org.apache.tuscany.samples.helloworldaxis.GetGreetings.MY_QNAME));
+                            org.apache.ws.commons.om.OMElement documentElement 
= builder.getDocumentElement();
+                            ((org.apache.ws.commons.om.impl.OMNodeEx) 
documentElement).setParent(null); // remove the parent link
+                            return documentElement;
+                        }else{
+                           
+                           //todo finish this onece the bean serializer has 
the necessary methods
+                            return null;
+                        }
+                    }
+
+                    private  org.apache.ws.commons.soap.SOAPEnvelope 
toEnvelope(org.apache.ws.commons.soap.SOAPFactory factory, 
org.apache.tuscany.samples.helloworldaxis.GetGreetings param, boolean 
optimizeContent){
+                        if (param instanceof 
org.apache.axis2.databinding.ADBBean){
+                            org.apache.axis2.databinding.ADBSOAPModelBuilder 
builder = new
+                                    
org.apache.axis2.databinding.ADBSOAPModelBuilder(param.getPullParser(org.apache.tuscany.samples.helloworldaxis.GetGreetings.MY_QNAME),
+                                                                               
      factory);
+                            return builder.getEnvelope();
+                        }else{
+                           
+                           //todo finish this onece the bean serializer has 
the necessary methods
+                            return null;
+                        }
+                    }
+                
+                    private  org.apache.ws.commons.om.OMElement  
toOM(org.apache.tuscany.samples.helloworldaxis.GetGreetingsResponse param){
+                        if (param instanceof 
org.apache.axis2.databinding.ADBBean){
+                            StAXOMBuilder builder = new StAXOMBuilder
+                            
(org.apache.ws.commons.om.OMAbstractFactory.getOMFactory(), 
param.getPullParser(org.apache.tuscany.samples.helloworldaxis.GetGreetingsResponse.MY_QNAME));
+                            org.apache.ws.commons.om.OMElement documentElement 
= builder.getDocumentElement();
+                            ((org.apache.ws.commons.om.impl.OMNodeEx) 
documentElement).setParent(null); // remove the parent link
+                            return documentElement;
+                        }else{
+                           
+                           //todo finish this onece the bean serializer has 
the necessary methods
+                            return null;
+                        }
+                    }
+
+                    private  org.apache.ws.commons.soap.SOAPEnvelope 
toEnvelope(org.apache.ws.commons.soap.SOAPFactory factory, 
org.apache.tuscany.samples.helloworldaxis.GetGreetingsResponse param, boolean 
optimizeContent){
+                        if (param instanceof 
org.apache.axis2.databinding.ADBBean){
+                            org.apache.axis2.databinding.ADBSOAPModelBuilder 
builder = new
+                                    
org.apache.axis2.databinding.ADBSOAPModelBuilder(param.getPullParser(org.apache.tuscany.samples.helloworldaxis.GetGreetingsResponse.MY_QNAME),
+                                                                               
      factory);
+                            return builder.getEnvelope();
+                        }else{
+                           
+                           //todo finish this onece the bean serializer has 
the necessary methods
+                            return null;
+                        }
+                    }
+                
+
+           /**
+           *  get the default envelope
+           */
+           private org.apache.ws.commons.soap.SOAPEnvelope 
toEnvelope(org.apache.ws.commons.soap.SOAPFactory factory){
+                return factory.getDefaultEnvelope();
+           }
+
+
+            private  java.lang.Object 
fromOM(org.apache.ws.commons.om.OMElement param,
+            java.lang.Class type){
+
+                try {
+                       
+                      if 
(org.apache.tuscany.samples.helloworldaxis.GetGreetings.class.equals(type)){
+                           return 
org.apache.tuscany.samples.helloworldaxis.GetGreetings.Factory.parse(param.getXMLStreamReaderWithoutCaching());
+                      }
+                              
+                      if 
(org.apache.tuscany.samples.helloworldaxis.GetGreetingsResponse.class.equals(type)){
+                           return 
org.apache.tuscany.samples.helloworldaxis.GetGreetingsResponse.Factory.parse(param.getXMLStreamReaderWithoutCaching());
+                      }
+                              
+                } catch (Exception e) {
+                     throw new RuntimeException(e);
+                }
 
-        _operationClient.setCallback( new 
org.apache.axis2.client.async.Callback()
-        {
-            public void onComplete( org.apache.axis2.client.async.AsyncResult 
result )
-            {
-                java.lang.Object object = fromOM( getElement( 
result.getResponseEnvelope(), "doc" ),
-                                                  
org.apache.tuscany.samples.helloworldaxis.GetGreetingsResponse.class );
-                callback
-                    .receiveResultgetGreetings( 
(org.apache.tuscany.samples.helloworldaxis.GetGreetingsResponse) object );
-            }
-
-            public void onError( java.lang.Exception e )
-            {
-                callback.receiveErrorgetGreetings( e );
+                return null;
             }
-        } );
-
-        //execute the operation client
-        _operationClient.execute( true );
-    }
-
-    //http://localhost:8080/axis2/services/HelloWorldServiceImplService
-    private org.apache.axis2.om.OMElement toOM( 
org.apache.tuscany.samples.helloworldaxis.GetGreetings param )
-    {
-        if ( param instanceof org.apache.axis2.databinding.ADBBean )
-        {
-            org.apache.axis2.om.impl.llom.builder.StAXOMBuilder builder = new 
org.apache.axis2.om.impl.llom.builder.StAXOMBuilder(
-                                                                               
                                                    
org.apache.axis2.om.OMAbstractFactory
-                                                                               
                                                        .getOMFactory(),
-                                                                               
                                                    param
-                                                                               
                                                        .getPullParser( 
org.apache.tuscany.samples.helloworldaxis.GetGreetings.MY_QNAME ) );
-            org.apache.axis2.om.OMElement documentElement = 
builder.getDocumentElement();
-            ( (org.apache.axis2.om.impl.OMNodeEx) documentElement ).setParent( 
null ); // remove the parent link
 
-            return documentElement;
-        }
-        else
-        {
-            //todo finish this onece the bean serializer has the necessary 
methods
-            return null;
-        }
-    }
-
-    private org.apache.axis2.soap.SOAPEnvelope toEnvelope( 
org.apache.axis2.soap.SOAPFactory factory,
-                                                          
org.apache.tuscany.samples.helloworldaxis.GetGreetings param )
-    {
-        if ( param instanceof org.apache.axis2.databinding.ADBBean )
-        {
-            org.apache.axis2.databinding.ADBSOAPModelBuilder builder = new 
org.apache.axis2.databinding.ADBSOAPModelBuilder(
-                                                                               
                                              param
-                                                                               
                                                  .getPullParser( 
org.apache.tuscany.samples.helloworldaxis.GetGreetings.MY_QNAME ),
-                                                                               
                                              factory );
-
-            return builder.getEnvelope();
-        }
-        else
-        {
-            //todo finish this onece the bean serializer has the necessary 
methods
-            return null;
-        }
-    }
-
-    private org.apache.axis2.om.OMElement toOM( 
org.apache.tuscany.samples.helloworldaxis.GetGreetingsResponse param )
-    {
-        if ( param instanceof org.apache.axis2.databinding.ADBBean )
-        {
-            org.apache.axis2.om.impl.llom.builder.StAXOMBuilder builder = new 
org.apache.axis2.om.impl.llom.builder.StAXOMBuilder(
-                                                                               
                                                    
org.apache.axis2.om.OMAbstractFactory
-                                                                               
                                                        .getOMFactory(),
-                                                                               
                                                    param
-                                                                               
                                                        .getPullParser( 
org.apache.tuscany.samples.helloworldaxis.GetGreetingsResponse.MY_QNAME ) );
-            org.apache.axis2.om.OMElement documentElement = 
builder.getDocumentElement();
-            ( (org.apache.axis2.om.impl.OMNodeEx) documentElement ).setParent( 
null ); // remove the parent link
-
-            return documentElement;
-        }
-        else
-        {
-            //todo finish this onece the bean serializer has the necessary 
methods
-            return null;
-        }
-    }
-
-    private org.apache.axis2.soap.SOAPEnvelope toEnvelope(
-                                                          
org.apache.axis2.soap.SOAPFactory factory,
-                                                          
org.apache.tuscany.samples.helloworldaxis.GetGreetingsResponse param )
-    {
-        if ( param instanceof org.apache.axis2.databinding.ADBBean )
-        {
-            org.apache.axis2.databinding.ADBSOAPModelBuilder builder = new 
org.apache.axis2.databinding.ADBSOAPModelBuilder(
-                                                                               
                                              param
-                                                                               
                                                  .getPullParser( 
org.apache.tuscany.samples.helloworldaxis.GetGreetingsResponse.MY_QNAME ),
-                                                                               
                                              factory );
-
-            return builder.getEnvelope();
-        }
-        else
-        {
-            //todo finish this onece the bean serializer has the necessary 
methods
-            return null;
-        }
-    }
+        
+   }
 
-    private java.lang.Object fromOM( org.apache.axis2.om.OMElement param, 
java.lang.Class type )
-    {
-        Object obj;
 
-        try
-        {
-            java.lang.reflect.Method parseMethod = type
-                .getMethod( "parse", new Class[] { 
javax.xml.stream.XMLStreamReader.class } );
-            obj = null;
-
-            if ( parseMethod != null )
-            {
-                obj = parseMethod.invoke( null, new Object[] { 
param.getXMLStreamReaderWithoutCaching() } );
-            }
-            else
-            {
-                //oops! we don't know how to deal with this. Perhaps the 
reflective one is a good choice here
-            }
-        }
-        catch ( Exception e )
-        {
-            throw new RuntimeException( e );
-        }
 
-        return obj;
-    }
-}
+    
\ No newline at end of file

Modified: incubator/tuscany/java/testing/tomcat/helloworldaxis2/pom.xml
URL: 
http://svn.apache.org/viewcvs/incubator/tuscany/java/testing/tomcat/helloworldaxis2/pom.xml?rev=387682&r1=387681&r2=387682&view=diff
==============================================================================
--- incubator/tuscany/java/testing/tomcat/helloworldaxis2/pom.xml (original)
+++ incubator/tuscany/java/testing/tomcat/helloworldaxis2/pom.xml Tue Mar 21 
16:50:00 2006
@@ -35,6 +35,12 @@
             <version>${pom.version}</version>
             <scope>compile</scope> 
         </dependency>
+                <dependency>
+                    <groupId>axis2</groupId>
+                    <artifactId>axis2-common</artifactId>
+                    <version>0.95-SNAPSHOT</version>
+                    <scope>runtime</scope>
+                </dependency>
         <dependency>
             <groupId>junit</groupId>
             <artifactId>junit</artifactId>

Modified: 
incubator/tuscany/java/testing/tomcat/helloworldaxis2/src/test/java/org/apache/tuscany/samples/helloworldws/TestHelloWorldAxisTestCase.java
URL: 
http://svn.apache.org/viewcvs/incubator/tuscany/java/testing/tomcat/helloworldaxis2/src/test/java/org/apache/tuscany/samples/helloworldws/TestHelloWorldAxisTestCase.java?rev=387682&r1=387681&r2=387682&view=diff
==============================================================================
--- 
incubator/tuscany/java/testing/tomcat/helloworldaxis2/src/test/java/org/apache/tuscany/samples/helloworldws/TestHelloWorldAxisTestCase.java
 (original)
+++ 
incubator/tuscany/java/testing/tomcat/helloworldaxis2/src/test/java/org/apache/tuscany/samples/helloworldws/TestHelloWorldAxisTestCase.java
 Tue Mar 21 16:50:00 2006
@@ -43,7 +43,7 @@
 
 
        public void testHelloWorldDefault() throws Exception {
-        System.setProperty(Constants.HOME_AXIS2,System.getProperty("basedir"));
+        System.setProperty(Constants.AXIS2_HOME,System.getProperty("basedir"));
                final String name= "World";
                String greeting= getGreetings(urlstrTuscanyService, name);
                assertEquals(greeting, "Hello " + name);


Reply via email to