You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by he...@apache.org on 2004/11/18 12:16:07 UTC

svn commit: r76227 - in webservices/axis/trunk/java/dev/scratch/prototype1: . src src/conf src/docs src/java src/java/org src/java/org/apache src/java/org/apache/axis src/java/org/apache/axis/client src/java/org/apache/axis/constants src/java/org/apache/axis/encoding src/java/org/apache/axis/encoding/push src/java/org/apache/axis/engine src/java/org/apache/axis/engine/addressing src/java/org/apache/axis/engine/async src/java/org/apache/axis/engine/context src/java/org/apache/axis/engine/exec src/java/org/apache/axis/engine/registry src/java/org/apache/axis/handlers src/java/org/apache/axis/i18n src/java/org/apache/axis/om src/java/org/apache/axis/om/impl src/java/org/apache/axis/om/impl/util src/java/org/apache/axis/om/mime src/java/org/apache/axis/om/soap src/java/org/apache/axis/providers src/java/org/apache/axis/transport src/java/org/apache/axis/transport/http src/java/org/apache/axis/utils src/samples src/samples/echo src/samples/soap src/schema src/test src/test-resources src/test/org src/test/org/apache src/test/org/apache/axis src/test/org/apache/axis/engine src/test/org/apache/axis/engine/registry src/test/org/apache/axis/om src/test/org/apache/axis/om/soap

Author: hemapani
Date: Thu Nov 18 03:16:05 2004
New Revision: 76227

Added:
   webservices/axis/trunk/java/dev/scratch/prototype1/
   webservices/axis/trunk/java/dev/scratch/prototype1/.classpath
   webservices/axis/trunk/java/dev/scratch/prototype1/.project
   webservices/axis/trunk/java/dev/scratch/prototype1/project.properties
   webservices/axis/trunk/java/dev/scratch/prototype1/project.xml
   webservices/axis/trunk/java/dev/scratch/prototype1/src/
   webservices/axis/trunk/java/dev/scratch/prototype1/src/conf/
   webservices/axis/trunk/java/dev/scratch/prototype1/src/conf/log4j.properties
   webservices/axis/trunk/java/dev/scratch/prototype1/src/conf/simplelog.properties
   webservices/axis/trunk/java/dev/scratch/prototype1/src/docs/
   webservices/axis/trunk/java/dev/scratch/prototype1/src/docs/RFC.txt
   webservices/axis/trunk/java/dev/scratch/prototype1/src/docs/TODO.txt
   webservices/axis/trunk/java/dev/scratch/prototype1/src/docs/architecture-doc.html
   webservices/axis/trunk/java/dev/scratch/prototype1/src/java/
   webservices/axis/trunk/java/dev/scratch/prototype1/src/java/org/
   webservices/axis/trunk/java/dev/scratch/prototype1/src/java/org/apache/
   webservices/axis/trunk/java/dev/scratch/prototype1/src/java/org/apache/axis/
   webservices/axis/trunk/java/dev/scratch/prototype1/src/java/org/apache/axis/client/
   webservices/axis/trunk/java/dev/scratch/prototype1/src/java/org/apache/axis/client/Call.java
   webservices/axis/trunk/java/dev/scratch/prototype1/src/java/org/apache/axis/constants/
   webservices/axis/trunk/java/dev/scratch/prototype1/src/java/org/apache/axis/constants/SOAP11Constants.java
   webservices/axis/trunk/java/dev/scratch/prototype1/src/java/org/apache/axis/constants/SOAP12Constants.java
   webservices/axis/trunk/java/dev/scratch/prototype1/src/java/org/apache/axis/constants/SOAPConstants.java
   webservices/axis/trunk/java/dev/scratch/prototype1/src/java/org/apache/axis/constants/SchemaVersion.java
   webservices/axis/trunk/java/dev/scratch/prototype1/src/java/org/apache/axis/constants/SchemaVersion1999.java
   webservices/axis/trunk/java/dev/scratch/prototype1/src/java/org/apache/axis/constants/SchemaVersion2000.java
   webservices/axis/trunk/java/dev/scratch/prototype1/src/java/org/apache/axis/constants/SchemaVersion2001.java
   webservices/axis/trunk/java/dev/scratch/prototype1/src/java/org/apache/axis/encoding/
   webservices/axis/trunk/java/dev/scratch/prototype1/src/java/org/apache/axis/encoding/Base64.java
   webservices/axis/trunk/java/dev/scratch/prototype1/src/java/org/apache/axis/encoding/DataBinder.java
   webservices/axis/trunk/java/dev/scratch/prototype1/src/java/org/apache/axis/encoding/push/
   webservices/axis/trunk/java/dev/scratch/prototype1/src/java/org/apache/axis/encoding/push/Pusher.java
   webservices/axis/trunk/java/dev/scratch/prototype1/src/java/org/apache/axis/engine/
   webservices/axis/trunk/java/dev/scratch/prototype1/src/java/org/apache/axis/engine/AbstractContainer.java
   webservices/axis/trunk/java/dev/scratch/prototype1/src/java/org/apache/axis/engine/AxisEngine.java
   webservices/axis/trunk/java/dev/scratch/prototype1/src/java/org/apache/axis/engine/AxisFault.java
   webservices/axis/trunk/java/dev/scratch/prototype1/src/java/org/apache/axis/engine/Constants.java
   webservices/axis/trunk/java/dev/scratch/prototype1/src/java/org/apache/axis/engine/EngineUtils.java
   webservices/axis/trunk/java/dev/scratch/prototype1/src/java/org/apache/axis/engine/Global.java
   webservices/axis/trunk/java/dev/scratch/prototype1/src/java/org/apache/axis/engine/Handler.java
   webservices/axis/trunk/java/dev/scratch/prototype1/src/java/org/apache/axis/engine/Operation.java
   webservices/axis/trunk/java/dev/scratch/prototype1/src/java/org/apache/axis/engine/Provider.java
   webservices/axis/trunk/java/dev/scratch/prototype1/src/java/org/apache/axis/engine/Sender.java
   webservices/axis/trunk/java/dev/scratch/prototype1/src/java/org/apache/axis/engine/Service.java
   webservices/axis/trunk/java/dev/scratch/prototype1/src/java/org/apache/axis/engine/SimpleGlobal.java
   webservices/axis/trunk/java/dev/scratch/prototype1/src/java/org/apache/axis/engine/SimpleModule.java
   webservices/axis/trunk/java/dev/scratch/prototype1/src/java/org/apache/axis/engine/SimpleOperation.java
   webservices/axis/trunk/java/dev/scratch/prototype1/src/java/org/apache/axis/engine/SimpleService.java
   webservices/axis/trunk/java/dev/scratch/prototype1/src/java/org/apache/axis/engine/SimpleTransport.java
   webservices/axis/trunk/java/dev/scratch/prototype1/src/java/org/apache/axis/engine/Transport.java
   webservices/axis/trunk/java/dev/scratch/prototype1/src/java/org/apache/axis/engine/addressing/
   webservices/axis/trunk/java/dev/scratch/prototype1/src/java/org/apache/axis/engine/addressing/SOAPNodeAddress.java
   webservices/axis/trunk/java/dev/scratch/prototype1/src/java/org/apache/axis/engine/addressing/SoapAddressingContext.java
   webservices/axis/trunk/java/dev/scratch/prototype1/src/java/org/apache/axis/engine/async/
   webservices/axis/trunk/java/dev/scratch/prototype1/src/java/org/apache/axis/engine/async/Dispatcher.java
   webservices/axis/trunk/java/dev/scratch/prototype1/src/java/org/apache/axis/engine/async/MessageQueue.java
   webservices/axis/trunk/java/dev/scratch/prototype1/src/java/org/apache/axis/engine/context/
   webservices/axis/trunk/java/dev/scratch/prototype1/src/java/org/apache/axis/engine/context/GlobalContext.java
   webservices/axis/trunk/java/dev/scratch/prototype1/src/java/org/apache/axis/engine/context/MessageContext.java
   webservices/axis/trunk/java/dev/scratch/prototype1/src/java/org/apache/axis/engine/context/SessionContext.java
   webservices/axis/trunk/java/dev/scratch/prototype1/src/java/org/apache/axis/engine/context/SimpleSessionContext.java
   webservices/axis/trunk/java/dev/scratch/prototype1/src/java/org/apache/axis/engine/exec/
   webservices/axis/trunk/java/dev/scratch/prototype1/src/java/org/apache/axis/engine/exec/Constants.java
   webservices/axis/trunk/java/dev/scratch/prototype1/src/java/org/apache/axis/engine/exec/ExecutionChain.java
   webservices/axis/trunk/java/dev/scratch/prototype1/src/java/org/apache/axis/engine/exec/Phase.java
   webservices/axis/trunk/java/dev/scratch/prototype1/src/java/org/apache/axis/engine/registry/
   webservices/axis/trunk/java/dev/scratch/prototype1/src/java/org/apache/axis/engine/registry/AbstractEngineElement.java
   webservices/axis/trunk/java/dev/scratch/prototype1/src/java/org/apache/axis/engine/registry/ConcreateFlow.java
   webservices/axis/trunk/java/dev/scratch/prototype1/src/java/org/apache/axis/engine/registry/ConcreateFlowInclude.java
   webservices/axis/trunk/java/dev/scratch/prototype1/src/java/org/apache/axis/engine/registry/ConcreateModuleInclude.java
   webservices/axis/trunk/java/dev/scratch/prototype1/src/java/org/apache/axis/engine/registry/ConcreateParameter.java
   webservices/axis/trunk/java/dev/scratch/prototype1/src/java/org/apache/axis/engine/registry/ConcreateTypeMappingInclude.java
   webservices/axis/trunk/java/dev/scratch/prototype1/src/java/org/apache/axis/engine/registry/EngineElement.java
   webservices/axis/trunk/java/dev/scratch/prototype1/src/java/org/apache/axis/engine/registry/EngineRegistry.java
   webservices/axis/trunk/java/dev/scratch/prototype1/src/java/org/apache/axis/engine/registry/Flow.java
   webservices/axis/trunk/java/dev/scratch/prototype1/src/java/org/apache/axis/engine/registry/FlowInclude.java
   webservices/axis/trunk/java/dev/scratch/prototype1/src/java/org/apache/axis/engine/registry/Module.java
   webservices/axis/trunk/java/dev/scratch/prototype1/src/java/org/apache/axis/engine/registry/ModuleInclude.java
   webservices/axis/trunk/java/dev/scratch/prototype1/src/java/org/apache/axis/engine/registry/NamedEngineElement.java
   webservices/axis/trunk/java/dev/scratch/prototype1/src/java/org/apache/axis/engine/registry/Parameter.java
   webservices/axis/trunk/java/dev/scratch/prototype1/src/java/org/apache/axis/engine/registry/SimpleEngineRegistry.java
   webservices/axis/trunk/java/dev/scratch/prototype1/src/java/org/apache/axis/engine/registry/TypeMapping.java
   webservices/axis/trunk/java/dev/scratch/prototype1/src/java/org/apache/axis/engine/registry/TypeMappingInclude.java
   webservices/axis/trunk/java/dev/scratch/prototype1/src/java/org/apache/axis/handlers/
   webservices/axis/trunk/java/dev/scratch/prototype1/src/java/org/apache/axis/handlers/AbstractHandler.java
   webservices/axis/trunk/java/dev/scratch/prototype1/src/java/org/apache/axis/handlers/DocLitOpNameFinder.java
   webservices/axis/trunk/java/dev/scratch/prototype1/src/java/org/apache/axis/handlers/RPCOpNameFinder.java
   webservices/axis/trunk/java/dev/scratch/prototype1/src/java/org/apache/axis/i18n/
   webservices/axis/trunk/java/dev/scratch/prototype1/src/java/org/apache/axis/i18n/MessageBundle.java
   webservices/axis/trunk/java/dev/scratch/prototype1/src/java/org/apache/axis/i18n/Messages.java
   webservices/axis/trunk/java/dev/scratch/prototype1/src/java/org/apache/axis/i18n/MessagesConstants.java
   webservices/axis/trunk/java/dev/scratch/prototype1/src/java/org/apache/axis/i18n/ProjectResourceBundle.java
   webservices/axis/trunk/java/dev/scratch/prototype1/src/java/org/apache/axis/i18n/RB.java
   webservices/axis/trunk/java/dev/scratch/prototype1/src/java/org/apache/axis/i18n/resource.properties
   webservices/axis/trunk/java/dev/scratch/prototype1/src/java/org/apache/axis/om/
   webservices/axis/trunk/java/dev/scratch/prototype1/src/java/org/apache/axis/om/OMAttribute.java
   webservices/axis/trunk/java/dev/scratch/prototype1/src/java/org/apache/axis/om/OMElement.java
   webservices/axis/trunk/java/dev/scratch/prototype1/src/java/org/apache/axis/om/OMException.java
   webservices/axis/trunk/java/dev/scratch/prototype1/src/java/org/apache/axis/om/OMFactory.java
   webservices/axis/trunk/java/dev/scratch/prototype1/src/java/org/apache/axis/om/OMNamedNode.java
   webservices/axis/trunk/java/dev/scratch/prototype1/src/java/org/apache/axis/om/OMNamespace.java
   webservices/axis/trunk/java/dev/scratch/prototype1/src/java/org/apache/axis/om/OMNode.java
   webservices/axis/trunk/java/dev/scratch/prototype1/src/java/org/apache/axis/om/OMText.java
   webservices/axis/trunk/java/dev/scratch/prototype1/src/java/org/apache/axis/om/OMXMLParserWrapper.java
   webservices/axis/trunk/java/dev/scratch/prototype1/src/java/org/apache/axis/om/Printable.java
   webservices/axis/trunk/java/dev/scratch/prototype1/src/java/org/apache/axis/om/impl/
   webservices/axis/trunk/java/dev/scratch/prototype1/src/java/org/apache/axis/om/impl/OMAttributeImpl.java
   webservices/axis/trunk/java/dev/scratch/prototype1/src/java/org/apache/axis/om/impl/OMElementImpl.java
   webservices/axis/trunk/java/dev/scratch/prototype1/src/java/org/apache/axis/om/impl/OMLinkedListImplFactory.java
   webservices/axis/trunk/java/dev/scratch/prototype1/src/java/org/apache/axis/om/impl/OMNamedNodeImpl.java
   webservices/axis/trunk/java/dev/scratch/prototype1/src/java/org/apache/axis/om/impl/OMNamespaceImpl.java
   webservices/axis/trunk/java/dev/scratch/prototype1/src/java/org/apache/axis/om/impl/OMNavigator.java
   webservices/axis/trunk/java/dev/scratch/prototype1/src/java/org/apache/axis/om/impl/OMNodeImpl.java
   webservices/axis/trunk/java/dev/scratch/prototype1/src/java/org/apache/axis/om/impl/OMTextImpl.java
   webservices/axis/trunk/java/dev/scratch/prototype1/src/java/org/apache/axis/om/impl/OMXMLPullParserWrapper.java
   webservices/axis/trunk/java/dev/scratch/prototype1/src/java/org/apache/axis/om/impl/SOAPBodyElementImpl.java
   webservices/axis/trunk/java/dev/scratch/prototype1/src/java/org/apache/axis/om/impl/SOAPBodyImpl.java
   webservices/axis/trunk/java/dev/scratch/prototype1/src/java/org/apache/axis/om/impl/SOAPEnvelopeImpl.java
   webservices/axis/trunk/java/dev/scratch/prototype1/src/java/org/apache/axis/om/impl/SOAPHeaderElementImpl.java
   webservices/axis/trunk/java/dev/scratch/prototype1/src/java/org/apache/axis/om/impl/SOAPHeaderImpl.java
   webservices/axis/trunk/java/dev/scratch/prototype1/src/java/org/apache/axis/om/impl/SOAPMessageImpl.java
   webservices/axis/trunk/java/dev/scratch/prototype1/src/java/org/apache/axis/om/impl/util/
   webservices/axis/trunk/java/dev/scratch/prototype1/src/java/org/apache/axis/om/impl/util/OMChildrenIterator.java
   webservices/axis/trunk/java/dev/scratch/prototype1/src/java/org/apache/axis/om/impl/util/OMChildrenQNameIterator.java
   webservices/axis/trunk/java/dev/scratch/prototype1/src/java/org/apache/axis/om/impl/util/SOAPConstants.java
   webservices/axis/trunk/java/dev/scratch/prototype1/src/java/org/apache/axis/om/mime/
   webservices/axis/trunk/java/dev/scratch/prototype1/src/java/org/apache/axis/om/mime/MimeHeader.java
   webservices/axis/trunk/java/dev/scratch/prototype1/src/java/org/apache/axis/om/mime/MimeHeaders.java
   webservices/axis/trunk/java/dev/scratch/prototype1/src/java/org/apache/axis/om/soap/
   webservices/axis/trunk/java/dev/scratch/prototype1/src/java/org/apache/axis/om/soap/SOAPBody.java
   webservices/axis/trunk/java/dev/scratch/prototype1/src/java/org/apache/axis/om/soap/SOAPBodyElement.java
   webservices/axis/trunk/java/dev/scratch/prototype1/src/java/org/apache/axis/om/soap/SOAPEnvelope.java
   webservices/axis/trunk/java/dev/scratch/prototype1/src/java/org/apache/axis/om/soap/SOAPFault.java
   webservices/axis/trunk/java/dev/scratch/prototype1/src/java/org/apache/axis/om/soap/SOAPHeader.java
   webservices/axis/trunk/java/dev/scratch/prototype1/src/java/org/apache/axis/om/soap/SOAPHeaderElement.java
   webservices/axis/trunk/java/dev/scratch/prototype1/src/java/org/apache/axis/om/soap/SOAPMessage.java
   webservices/axis/trunk/java/dev/scratch/prototype1/src/java/org/apache/axis/providers/
   webservices/axis/trunk/java/dev/scratch/prototype1/src/java/org/apache/axis/providers/ASyncProvider.java
   webservices/axis/trunk/java/dev/scratch/prototype1/src/java/org/apache/axis/providers/AbstractProvider.java
   webservices/axis/trunk/java/dev/scratch/prototype1/src/java/org/apache/axis/providers/SimpleJavaProvider.java
   webservices/axis/trunk/java/dev/scratch/prototype1/src/java/org/apache/axis/providers/SyncProvider.java
   webservices/axis/trunk/java/dev/scratch/prototype1/src/java/org/apache/axis/transport/
   webservices/axis/trunk/java/dev/scratch/prototype1/src/java/org/apache/axis/transport/TransportSender.java
   webservices/axis/trunk/java/dev/scratch/prototype1/src/java/org/apache/axis/transport/http/
   webservices/axis/trunk/java/dev/scratch/prototype1/src/java/org/apache/axis/transport/http/HTTPConstants.java
   webservices/axis/trunk/java/dev/scratch/prototype1/src/java/org/apache/axis/transport/http/NonBlockingBufferedInputStream.java
   webservices/axis/trunk/java/dev/scratch/prototype1/src/java/org/apache/axis/transport/http/SimpleAxisServer.java
   webservices/axis/trunk/java/dev/scratch/prototype1/src/java/org/apache/axis/transport/http/SimpleAxisWorker.java
   webservices/axis/trunk/java/dev/scratch/prototype1/src/java/org/apache/axis/utils/
   webservices/axis/trunk/java/dev/scratch/prototype1/src/java/org/apache/axis/utils/HashedBaundle.java
   webservices/axis/trunk/java/dev/scratch/prototype1/src/java/org/apache/axis/utils/Messages.java
   webservices/axis/trunk/java/dev/scratch/prototype1/src/samples/
   webservices/axis/trunk/java/dev/scratch/prototype1/src/samples/echo/
   webservices/axis/trunk/java/dev/scratch/prototype1/src/samples/soap/
   webservices/axis/trunk/java/dev/scratch/prototype1/src/samples/soap/sample1.txt
   webservices/axis/trunk/java/dev/scratch/prototype1/src/samples/soap/sample1.xml
   webservices/axis/trunk/java/dev/scratch/prototype1/src/schema/
   webservices/axis/trunk/java/dev/scratch/prototype1/src/test/
   webservices/axis/trunk/java/dev/scratch/prototype1/src/test-resources/
   webservices/axis/trunk/java/dev/scratch/prototype1/src/test-resources/soapmessage.xml
   webservices/axis/trunk/java/dev/scratch/prototype1/src/test/org/
   webservices/axis/trunk/java/dev/scratch/prototype1/src/test/org/apache/
   webservices/axis/trunk/java/dev/scratch/prototype1/src/test/org/apache/axis/
   webservices/axis/trunk/java/dev/scratch/prototype1/src/test/org/apache/axis/AbstractTestCase.java
   webservices/axis/trunk/java/dev/scratch/prototype1/src/test/org/apache/axis/engine/
   webservices/axis/trunk/java/dev/scratch/prototype1/src/test/org/apache/axis/engine/EchoTest.java
   webservices/axis/trunk/java/dev/scratch/prototype1/src/test/org/apache/axis/engine/EngineTest.java
   webservices/axis/trunk/java/dev/scratch/prototype1/src/test/org/apache/axis/engine/Utils.java
   webservices/axis/trunk/java/dev/scratch/prototype1/src/test/org/apache/axis/engine/registry/
   webservices/axis/trunk/java/dev/scratch/prototype1/src/test/org/apache/axis/engine/registry/EchoService.java
   webservices/axis/trunk/java/dev/scratch/prototype1/src/test/org/apache/axis/engine/registry/MockFlow.java
   webservices/axis/trunk/java/dev/scratch/prototype1/src/test/org/apache/axis/engine/registry/SpeakingHandler.java
   webservices/axis/trunk/java/dev/scratch/prototype1/src/test/org/apache/axis/engine/registry/SpeakingProvider.java
   webservices/axis/trunk/java/dev/scratch/prototype1/src/test/org/apache/axis/om/
   webservices/axis/trunk/java/dev/scratch/prototype1/src/test/org/apache/axis/om/OMTest.java
   webservices/axis/trunk/java/dev/scratch/prototype1/src/test/org/apache/axis/om/OMTestCase.java   (contents, props changed)
   webservices/axis/trunk/java/dev/scratch/prototype1/src/test/org/apache/axis/om/soap/
   webservices/axis/trunk/java/dev/scratch/prototype1/src/test/org/apache/axis/om/soap/SOAPBodyTest.java   (contents, props changed)
   webservices/axis/trunk/java/dev/scratch/prototype1/src/test/org/apache/axis/om/soap/SOAPEnvelopeTest.java   (contents, props changed)
   webservices/axis/trunk/java/dev/scratch/prototype1/src/test/org/apache/axis/om/soap/SOAPHeaderElementTest.java   (contents, props changed)
   webservices/axis/trunk/java/dev/scratch/prototype1/src/test/org/apache/axis/om/soap/SOAPHeaderTest.java   (contents, props changed)
Log:
initial check in- integerate the work of om and engine to create prototype one .. deployment is yet to come in

Added: webservices/axis/trunk/java/dev/scratch/prototype1/.classpath
==============================================================================
--- (empty file)
+++ webservices/axis/trunk/java/dev/scratch/prototype1/.classpath	Thu Nov 18 03:16:05 2004
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+	<classpathentry kind="src" path="src/java"/>
+	<classpathentry kind="src" path="src/test"/>
+	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
+	<classpathentry kind="lib" path="/home/hemapani/.maven/repository/axis/jars/commons-logging-SNAPSHOT.jar"/>
+	<classpathentry kind="lib" path="/home/hemapani/.maven/repository/axis/jars/jaxrpc-SNAPSHOT.jar"/>
+	<classpathentry kind="lib" path="/home/hemapani/.maven/repository/xpp3/jars/xpp3-1.1.3.3.jar"/>
+	<classpathentry kind="lib" path="/home/hemapani/.maven/repository/axis/jars/saaj-SNAPSHOT.jar"/>
+	<classpathentry kind="lib" path="/home/hemapani/.maven/repository/junit/jars/junit-3.8.1.jar"/>
+	<classpathentry kind="output" path="bin"/>
+</classpath>

Added: webservices/axis/trunk/java/dev/scratch/prototype1/.project
==============================================================================
--- (empty file)
+++ webservices/axis/trunk/java/dev/scratch/prototype1/.project	Thu Nov 18 03:16:05 2004
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+	<name>axis2-int</name>
+	<comment></comment>
+	<projects>
+	</projects>
+	<buildSpec>
+		<buildCommand>
+			<name>org.eclipse.jdt.core.javabuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+	</buildSpec>
+	<natures>
+		<nature>org.eclipse.jdt.core.javanature</nature>
+	</natures>
+</projectDescription>

Added: webservices/axis/trunk/java/dev/scratch/prototype1/project.properties
==============================================================================
--- (empty file)
+++ webservices/axis/trunk/java/dev/scratch/prototype1/project.properties	Thu Nov 18 03:16:05 2004
@@ -0,0 +1,9 @@
+##
+## $Revision: 1.3 $ $Date: 2004/07/28 15:21:22 $
+##
+
+maven.repo.remote=http://ws.apache.org/~dims/maven, http://www.ibiblio.org/maven, http://ws.apache.org/~hemapani/maven
+maven.xdoc.date=left
+maven.xdoc.version=${pom.currentVersion}
+
+maven.jar.excludes=**/jndi.properties

Added: webservices/axis/trunk/java/dev/scratch/prototype1/project.xml
==============================================================================
--- (empty file)
+++ webservices/axis/trunk/java/dev/scratch/prototype1/project.xml	Thu Nov 18 03:16:05 2004
@@ -0,0 +1,152 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<project>
+  <!-- a unique name for this project -->
+  <id>axis2</id>
+  
+  <!-- a short but descriptive name for the project -->
+  <name>Axis2.0</name>
+  
+  <!-- The version of the project under development, e.g.
+       1.1, 1.2, 2.0-SNAPSHOT -->
+  <currentVersion>1.0</currentVersion>
+  
+  <!-- details about the organization that 'owns' the project -->
+  <organization>
+    <name>Apache Software Foundation</name>
+    <url>http://www.apache.org/</url>
+    <logo>http://ws.apache.org/images/jakarta-logo-blue.gif</logo>
+  </organization>
+  
+  <!-- the year the project started -->
+  <inceptionYear>2003</inceptionYear>
+  <package>org.apache.axis</package>
+  <logo>http://maven.apache.org/images/maven.jpg</logo>
+  <description>Next Generation of Apache Axis 2.0</description>
+  <!-- a short description of what the project does -->
+  <shortDescription>Axis 2.0</shortDescription>
+
+  <!-- the project home page -->
+  <url>http://ws.apache.org/axis2/</url>
+  <issueTrackingUrl>http://nagoya.apache.org/scarab/servlet/scarab/</issueTrackingUrl>
+  <siteAddress>ws.apache.org</siteAddress>
+  <siteDirectory>/www/ews.ws.apache.org/</siteDirectory>
+  <distributionDirectory>/www/ws.apache.org/builds/</distributionDirectory>
+
+  <!-- the version control repository and http url for online access
+       the connection element has the form:
+       scm:<system>:<system specific connection string> -->
+<!--
+  <repository>
+    <connection>scm:cvs:pserver:anoncvs@cvs.apache.org:/home/cvspublic:ws-axis/contrib/ews</connection>
+    <url>http://cvs.apache.org/viewcvs/ws-axis/contrib/ews/</url>
+  </repository>
+-->
+  <!-- any mailing lists for the project -->
+  <mailingLists>
+    <mailingList>
+      <name>Axis Developer List</name>
+      <subscribe>axis-dev-subscribe@ws.apache.org</subscribe>
+      <unsubscribe>axis-dev-unsubscribe@ws.apache.org</unsubscribe>
+    </mailingList>
+  </mailingLists>
+
+  <!-- ========== -->
+  <!-- Developers -->
+  <!-- ========== -->
+  
+  <developers>
+	<!-- e.g.
+    <developer>
+      <name>Davanum Srinivas</name>
+      <id>dims</id>
+      <email>dims@apache.org</email>
+      <organization></organization>
+    </developer>
+    -->
+  </developers>
+
+  
+  
+  <!-- build information for the project -->
+  <build>
+    <nagEmailAddress>axis-dev@ws.apache.org</nagEmailAddress>
+    <sourceDirectory>src/java</sourceDirectory>
+    <unitTestSourceDirectory>src/test</unitTestSourceDirectory>
+
+    <unitTest>
+      <includes>
+        <include>**/*Test.java</include>
+      </includes>
+     <resources>
+         <resource>
+             <directory>${basedir}/src/test-resources</directory>
+          </resource>
+      </resources>
+
+    </unitTest>
+
+    <resources>
+      <resource>
+        <directory>conf</directory>
+        <includes>
+          <include>**/*Provider</include>
+          <include>**/*.properties</include>
+        </includes>
+      </resource>
+      <resource>
+        <directory>src/java</directory>
+        <includes>
+          <include>**/*Provider</include>
+          <include>**/*.properties</include>
+        </includes>
+      </resource>
+      <resource>
+        <directory>schema</directory>
+        <includes>
+              <include>*.dtd</include>
+		  <include>*.xsd</include>
+        </includes>
+      </resource>
+    </resources>
+  </build>
+
+    <!-- ============ -->
+    <!-- Dependencies -->
+    <!-- ============ -->
+
+    <dependencies>
+        <dependency>
+            <groupId>axis</groupId>
+            <artifactId>commons-logging</artifactId>
+            <version>SNAPSHOT</version>
+            <properties>
+                <module>true</module>
+            </properties>
+        </dependency>
+        <dependency>
+            <groupId>axis</groupId>
+            <artifactId>jaxrpc</artifactId>
+            <version>SNAPSHOT</version>
+            <properties>
+                <module>true</module>
+            </properties>
+        </dependency>
+        <dependency>
+            <groupId>axis</groupId>
+            <artifactId>saaj</artifactId>
+            <version>SNAPSHOT</version>
+            <properties>
+                <module>true</module>
+            </properties>
+        </dependency>
+        <dependency>
+            <groupId>xpp3</groupId>
+            <artifactId>xpp3</artifactId>
+            <version>1.1.3.3</version>
+            <properties>
+                <module>true</module>
+            </properties>
+        </dependency>
+    </dependencies>
+</project>
+

Added: webservices/axis/trunk/java/dev/scratch/prototype1/src/conf/log4j.properties
==============================================================================
--- (empty file)
+++ webservices/axis/trunk/java/dev/scratch/prototype1/src/conf/log4j.properties	Thu Nov 18 03:16:05 2004
@@ -0,0 +1,21 @@
+# Set root category priority to INFO and its only appender to CONSOLE.
+#log4j.rootCategory=INFO, CONSOLE
+log4j.rootCategory=FATAL, CONSOLE, LOGFILE
+
+# Set the enterprise logger category to FATAL and its only appender to CONSOLE.
+log4j.logger.org.apache.axis.enterprise=FATAL, CONSOLE,LOGFILE
+
+# CONSOLE is set to be a ConsoleAppender using a PatternLayout.
+log4j.appender.CONSOLE=org.apache.log4j.ConsoleAppender
+log4j.appender.CONSOLE.Threshold=FATAL
+#log4j.appender.CONSOLE.Threshold=INFO
+log4j.appender.CONSOLE.layout=org.apache.log4j.PatternLayout
+log4j.appender.CONSOLE.layout.ConversionPattern=- %m%n
+
+# LOGFILE is set to be a File appender using a PatternLayout.
+log4j.appender.LOGFILE=org.apache.log4j.FileAppender
+log4j.appender.LOGFILE.File=axis.log
+log4j.appender.LOGFILE.Append=true
+log4j.appender.LOGFILE.Threshold=FATAL
+log4j.appender.LOGFILE.layout=org.apache.log4j.PatternLayout
+log4j.appender.LOGFILE.layout.ConversionPattern=%-4r [%t] %-5p %c %x - %m%n

Added: webservices/axis/trunk/java/dev/scratch/prototype1/src/conf/simplelog.properties
==============================================================================
--- (empty file)
+++ webservices/axis/trunk/java/dev/scratch/prototype1/src/conf/simplelog.properties	Thu Nov 18 03:16:05 2004
@@ -0,0 +1,2 @@
+org.apache.commons.logging.simplelog.defaultlog=fatal
+

Added: webservices/axis/trunk/java/dev/scratch/prototype1/src/docs/RFC.txt
==============================================================================

Added: webservices/axis/trunk/java/dev/scratch/prototype1/src/docs/TODO.txt
==============================================================================
--- (empty file)
+++ webservices/axis/trunk/java/dev/scratch/prototype1/src/docs/TODO.txt	Thu Nov 18 03:16:05 2004
@@ -0,0 +1,3 @@
+how the DD are parsed
+
+getNSURI() for OMElement
\ No newline at end of file

Added: webservices/axis/trunk/java/dev/scratch/prototype1/src/docs/architecture-doc.html
==============================================================================
--- (empty file)
+++ webservices/axis/trunk/java/dev/scratch/prototype1/src/docs/architecture-doc.html	Thu Nov 18 03:16:05 2004
@@ -0,0 +1,20 @@
+<html>
+<head>
+	<title>Archtecture Guide</title>
+</head>
+<body>
+	<p>The Documents are Kept at the WIKI till
+	they take shape</p>
+	<h1>Architecture Document</h1>
+	<a href="http://wiki.apache.org/ws/FrontPage/Architecture">http://wiki.apache.org/ws/FrontPage/Architecture</a>
+	<h1>Modules</h1>
+	<ol>
+		<li><a href="http://wiki.apache.org/ws/FrontPage/Architecture/Engine">Engine</a></li>
+		<li><a href="http://wiki.apache.org/ws/FrontPage/Architecture/Encoding">Encoding</a></li>
+		<li><a href="http://wiki.apache.org/ws/FrontPage/Architecture/OM">OM</a></li>
+		<li><a href="http://wiki.apache.org/ws/FrontPage/Architecture/Deployment">Deployment</a></li>
+		<li><a href="http://wiki.apache.org/ws/FrontPage/Architecture/WSDL">WSDL</a></li>		
+		<li><a href="http://wiki.apache.org/ws/FrontPage/Architecture/Build">Build</a></li>
+	</ol>
+</body>
+</html>
\ No newline at end of file

Added: webservices/axis/trunk/java/dev/scratch/prototype1/src/java/org/apache/axis/client/Call.java
==============================================================================
--- (empty file)
+++ webservices/axis/trunk/java/dev/scratch/prototype1/src/java/org/apache/axis/client/Call.java	Thu Nov 18 03:16:05 2004
@@ -0,0 +1,28 @@
+/*
+ * Copyright 2003,2004 The Apache Software Foundation.
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.axis.client;
+
+/**
+ * This is conveneice API for the User who do not need to see the complexity of the 
+ * Engine.  
+ * @author Srinath Perera (hemapani@opensource.lk)
+ */
+public class Call {
+    public Object[] invoke(Object[] obj){
+           return null;
+    }
+
+}

Added: webservices/axis/trunk/java/dev/scratch/prototype1/src/java/org/apache/axis/constants/SOAP11Constants.java
==============================================================================
--- (empty file)
+++ webservices/axis/trunk/java/dev/scratch/prototype1/src/java/org/apache/axis/constants/SOAP11Constants.java	Thu Nov 18 03:16:05 2004
@@ -0,0 +1,113 @@
+/*
+ * Copyright 2002-2004 The Apache Software Foundation.
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.axis.constants;
+
+import javax.xml.namespace.QName;
+
+import org.apache.axis.engine.Constants;
+
+/**
+ * SOAP 1.1 constants
+ *
+ * @author Glen Daniels (gdaniels@apache.org)
+ * @author Andras Avar (andras.avar@nokia.com)
+ */
+public class SOAP11Constants implements SOAPConstants {
+    private static QName headerQName = new QName(Constants.URI_SOAP11_ENV,
+                                                 Constants.ELEM_HEADER);
+    private static QName bodyQName = new QName(Constants.URI_SOAP11_ENV,
+                                               Constants.ELEM_BODY);
+    private static QName faultQName = new QName(Constants.URI_SOAP11_ENV,
+                                                Constants.ELEM_FAULT);
+    private static QName roleQName = new QName(Constants.URI_SOAP11_ENV,
+                                                Constants.ATTR_ACTOR);
+
+    public String getEnvelopeURI() {
+        return Constants.URI_SOAP11_ENV;
+    }
+
+    public String getEncodingURI() {
+        return Constants.URI_SOAP11_ENC;
+    }
+
+    public QName getHeaderQName() {
+        return headerQName;
+    }
+
+    public QName getBodyQName() {
+        return bodyQName;
+    }
+
+    public QName getFaultQName() {
+        return faultQName;
+    }
+
+    /**
+     * Obtain the QName for the role attribute (actor/role)
+     */
+    public QName getRoleAttributeQName() {
+        return roleQName;
+    }
+
+    /**
+     * Obtain the MIME content type
+     */
+    public String getContentType() {
+        return "text/xml";
+    }
+
+    /**
+     * Obtain the "next" role/actor URI
+     */
+    public String getNextRoleURI() {
+        return Constants.URI_SOAP11_NEXT_ACTOR;
+    }
+
+    /**
+     * Obtain the ref attribute name
+     */
+    public String getAttrHref() {
+        return Constants.ATTR_HREF;
+    }
+
+    /**
+     * Obtain the item type name of an array
+     */
+    public String getAttrItemType() {
+        return Constants.ATTR_ARRAY_TYPE;
+    }
+
+    /**
+     * Obtain the Qname of VersionMismatch fault code
+     */
+    public QName getVerMismatchFaultCodeQName() {
+        return Constants.FAULT_VERSIONMISMATCH;
+    }
+
+    /**
+     * Obtain the Qname of Mustunderstand fault code
+     */
+    public QName getMustunderstandFaultQName() {
+        return Constants.FAULT_MUSTUNDERSTAND;
+    }
+
+    /**
+     * Obtain the QName of the SOAP array type
+     */
+    public QName getArrayType() {
+        return Constants.SOAP_ARRAY;
+    }
+}

Added: webservices/axis/trunk/java/dev/scratch/prototype1/src/java/org/apache/axis/constants/SOAP12Constants.java
==============================================================================
--- (empty file)
+++ webservices/axis/trunk/java/dev/scratch/prototype1/src/java/org/apache/axis/constants/SOAP12Constants.java	Thu Nov 18 03:16:05 2004
@@ -0,0 +1,118 @@
+/*
+ * Copyright 2002-2004 The Apache Software Foundation.
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.axis.constants;
+
+import org.apache.axis.engine.Constants;
+
+import javax.xml.namespace.QName;
+
+/**
+ * SOAP 1.2 constants
+ *
+ * @author Glen Daniels (gdaniels@apache.org)
+ * @author Andras Avar (andras.avar@nokia.com)
+ */
+public class SOAP12Constants implements SOAPConstants {
+    private static QName headerQName = new QName(Constants.URI_SOAP12_ENV,
+                                                 Constants.ELEM_HEADER);
+    private static QName bodyQName = new QName(Constants.URI_SOAP12_ENV,
+                                               Constants.ELEM_BODY);
+    private static QName faultQName = new QName(Constants.URI_SOAP12_ENV,
+                                                Constants.ELEM_FAULT);
+    private static QName roleQName = new QName(Constants.URI_SOAP12_ENV,
+                                                Constants.ATTR_ROLE);
+    
+    // Public constants for SOAP 1.2
+    
+    /** MessageContext property name for webmethod */
+    public static final String PROP_WEBMETHOD = "soap12.webmethod";
+
+    public String getEnvelopeURI() {
+        return Constants.URI_SOAP12_ENV;
+    }
+
+    public String getEncodingURI() {
+        return Constants.URI_SOAP12_ENC;
+    }
+
+    public QName getHeaderQName() {
+        return headerQName;
+    }
+
+    public QName getBodyQName() {
+        return bodyQName;
+    }
+
+    public QName getFaultQName() {
+        return faultQName;
+    }
+
+    /**
+     * Obtain the QName for the role attribute (actor/role)
+     */
+    public QName getRoleAttributeQName() {
+        return roleQName;
+    }
+
+    /**
+     * Obtain the MIME content type
+     */
+    public String getContentType() {
+        return "application/soap+xml";
+    }
+
+    /**
+     * Obtain the "next" role/actor URI
+     */
+    public String getNextRoleURI() {
+        return Constants.URI_SOAP12_NEXT_ROLE;
+    }
+
+    /**
+     * Obtain the ref attribute name
+     */
+    public String getAttrHref() {
+        return Constants.ATTR_REF;
+    }
+
+    /**
+     * Obtain the item type name of an array
+     */
+    public String getAttrItemType() {
+        return Constants.ATTR_ITEM_TYPE;
+    }
+
+    /**
+     * Obtain the Qname of VersionMismatch fault code
+     */
+    public QName getVerMismatchFaultCodeQName() {
+        return Constants.FAULT_SOAP12_VERSIONMISMATCH;
+    }
+
+    /**
+     * Obtain the Qname of Mustunderstand fault code
+     */
+    public QName getMustunderstandFaultQName() {
+        return Constants.FAULT_SOAP12_MUSTUNDERSTAND;
+    }
+
+    /**
+     * Obtain the QName of the SOAP array type
+     */
+    public QName getArrayType() {
+        return Constants.SOAP_ARRAY12;
+    }
+}

Added: webservices/axis/trunk/java/dev/scratch/prototype1/src/java/org/apache/axis/constants/SOAPConstants.java
==============================================================================
--- (empty file)
+++ webservices/axis/trunk/java/dev/scratch/prototype1/src/java/org/apache/axis/constants/SOAPConstants.java	Thu Nov 18 03:16:05 2004
@@ -0,0 +1,103 @@
+/*
+ * Copyright 2002-2004 The Apache Software Foundation.
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.axis.constants;
+
+import javax.xml.namespace.QName;
+import java.io.Serializable;
+
+/**
+ * An interface definining SOAP constants.  This allows various parts of the
+ * engine to avoid hardcoding dependence on a particular SOAP version and its
+ * associated URIs, etc.
+ *
+ * This might be fleshed out later to encapsulate factories for behavioral
+ * objects which act differently depending on the SOAP version, but for now
+ * it just supplies common namespaces + QNames.
+ *
+ * @author Glen Daniels (gdaniels@apache.org)
+ * @author Andras Avar (andras.avar@nokia.com)
+ */
+public interface SOAPConstants extends Serializable {
+    /** SOAP 1.1 constants - thread-safe and shared */
+    public SOAP11Constants SOAP11_CONSTANTS = new SOAP11Constants();
+    /** SOAP 1.2 constants - thread-safe and shared */
+    public SOAP12Constants SOAP12_CONSTANTS = new SOAP12Constants();
+
+    /**
+     * Obtain the envelope namespace for this version of SOAP
+     */
+    public String getEnvelopeURI();
+
+    /**
+     * Obtain the encoding namespace for this version of SOAP
+     */
+    public String getEncodingURI();
+
+    /**
+     * Obtain the QName for the Fault element
+     */
+    public QName getFaultQName();
+
+    /**
+     * Obtain the QName for the Header element
+     */
+    public QName getHeaderQName();
+
+    /**
+     * Obtain the QName for the Body element
+     */
+    public QName getBodyQName();
+
+    /**
+     * Obtain the QName for the role attribute (actor/role)
+     */
+    public QName getRoleAttributeQName();
+
+    /**
+     * Obtain the MIME content type
+     */
+    public String getContentType();
+    
+    /**
+     * Obtain the "next" role/actor URI
+     */ 
+    public String getNextRoleURI();
+
+    /**
+     * Obtain the href attribute name
+     */
+    public String getAttrHref();
+
+    /**
+     * Obtain the item type name of an array
+     */
+    public String getAttrItemType();
+
+    /**
+     * Obtain the Qname of VersionMismatch fault code
+     */
+    public QName getVerMismatchFaultCodeQName();
+
+    /**
+     * Obtain the Qname of Mustunderstand fault code
+     */
+    public QName getMustunderstandFaultQName();
+
+    /**
+     * Obtain the QName of the SOAP array type
+     */ 
+    QName getArrayType();
+}

Added: webservices/axis/trunk/java/dev/scratch/prototype1/src/java/org/apache/axis/constants/SchemaVersion.java
==============================================================================
--- (empty file)
+++ webservices/axis/trunk/java/dev/scratch/prototype1/src/java/org/apache/axis/constants/SchemaVersion.java	Thu Nov 18 03:16:05 2004
@@ -0,0 +1,54 @@
+/*
+ * Copyright 2001-2004 The Apache Software Foundation.
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.axis.constants;
+
+
+
+import javax.xml.namespace.QName;
+import java.io.Serializable;
+
+/**
+ * The SchemaVersion interface allows us to abstract out the differences
+ * between the 1999, 2000, and 2001 versions of XML Schema.
+ *
+ * @author Glen Daniels (gdaniels@apache.org)
+ */
+public interface SchemaVersion extends Serializable {
+    public static SchemaVersion SCHEMA_1999 = new SchemaVersion1999();
+    public static SchemaVersion SCHEMA_2000 = new SchemaVersion2000();
+    public static SchemaVersion SCHEMA_2001 = new SchemaVersion2001();
+
+    /**
+     * Get the appropriate QName for the "null"/"nil" attribute for this
+     * Schema version.
+     * @return the appropriate "null"/"nil" QName
+     */
+    public QName getNilQName();
+
+    /**
+     * The XSI URI
+     * @return the XSI URI
+     */
+    public String getXsiURI();
+
+    /**
+     * The XSD URI
+     * @return the XSD URI
+     */
+    public String getXsdURI();
+    
+}

Added: webservices/axis/trunk/java/dev/scratch/prototype1/src/java/org/apache/axis/constants/SchemaVersion1999.java
==============================================================================
--- (empty file)
+++ webservices/axis/trunk/java/dev/scratch/prototype1/src/java/org/apache/axis/constants/SchemaVersion1999.java	Thu Nov 18 03:16:05 2004
@@ -0,0 +1,63 @@
+/*
+ * Copyright 2001-2004 The Apache Software Foundation.
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.axis.constants;
+
+import org.apache.axis.engine.Constants;
+
+import javax.xml.namespace.QName;
+
+/**
+ * 1999 Schema characteristics.
+ *
+ * @author Glen Daniels (gdaniels@apache.org)
+ */
+public class SchemaVersion1999 implements SchemaVersion {
+    public static QName QNAME_NIL = new QName(Constants.URI_1999_SCHEMA_XSI,
+                                              "null");
+
+    /**
+     * Package-access constructor - access this through SchemaVersion
+     * constants.
+     */
+    SchemaVersion1999() {
+    }
+
+    /**
+     * Get the appropriate QName for the "null"/"nil" attribute for this
+     * Schema version.
+     * @return {http://www.w3.org/1999/XMLSchema-instance}null
+     */
+    public QName getNilQName() {
+        return QNAME_NIL;
+    }
+
+    /**
+     * The XSI URI
+     * @return the XSI URI
+     */
+    public String getXsiURI() {
+        return Constants.URI_1999_SCHEMA_XSI;
+    }
+
+    /**
+     * The XSD URI
+     * @return the XSD URI
+     */
+    public String getXsdURI() {
+        return Constants.URI_1999_SCHEMA_XSD;
+    }
+}

Added: webservices/axis/trunk/java/dev/scratch/prototype1/src/java/org/apache/axis/constants/SchemaVersion2000.java
==============================================================================
--- (empty file)
+++ webservices/axis/trunk/java/dev/scratch/prototype1/src/java/org/apache/axis/constants/SchemaVersion2000.java	Thu Nov 18 03:16:05 2004
@@ -0,0 +1,62 @@
+/*
+ * Copyright 2001-2004 The Apache Software Foundation.
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.axis.constants;
+
+import org.apache.axis.engine.Constants;
+
+import javax.xml.namespace.QName;
+
+/**
+ * 2000 Schema characteristics.
+ *
+ * @author Glen Daniels (gdaniels@apache.org)
+ */
+public class SchemaVersion2000 implements SchemaVersion {
+    public static QName QNAME_NIL = new QName(Constants.URI_2000_SCHEMA_XSI,
+                                              "null");
+    /**
+     * Package-access constructor - access this through SchemaVersion
+     * constants.
+     */
+    SchemaVersion2000() {
+    }
+
+    /**
+     * Get the appropriate QName for the "null"/"nil" attribute for this
+     * Schema version.
+     * @return {http://www.w3.org/2000/10/XMLSchema-instance}null
+     */
+    public QName getNilQName() {
+        return QNAME_NIL;
+    }
+
+    /**
+     * The XSI URI
+     * @return the XSI URI
+     */
+    public String getXsiURI() {
+        return Constants.URI_2000_SCHEMA_XSI;
+    }
+
+    /**
+     * The XSD URI
+     * @return the XSD URI
+     */
+    public String getXsdURI() {
+        return Constants.URI_2000_SCHEMA_XSD;
+    }
+}

Added: webservices/axis/trunk/java/dev/scratch/prototype1/src/java/org/apache/axis/constants/SchemaVersion2001.java
==============================================================================
--- (empty file)
+++ webservices/axis/trunk/java/dev/scratch/prototype1/src/java/org/apache/axis/constants/SchemaVersion2001.java	Thu Nov 18 03:16:05 2004
@@ -0,0 +1,63 @@
+/*
+ * Copyright 2001-2004 The Apache Software Foundation.
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.axis.constants;
+
+import org.apache.axis.engine.Constants;
+
+import javax.xml.namespace.QName;
+
+/**
+ * 2001 Schema characteristics.
+ *
+ * @author Glen Daniels (gdaniels@apache.org)
+ */
+public class SchemaVersion2001 implements SchemaVersion {
+    public static QName QNAME_NIL = new QName(Constants.URI_2001_SCHEMA_XSI,
+                                              "nil");
+
+    /**
+     * Package-access constructor - access this through SchemaVersion
+     * constants.
+     */
+    SchemaVersion2001() {
+    }
+
+    /**
+     * Get the appropriate QName for the "null"/"nil" attribute for this
+     * Schema version.
+     * @return {http://www.w3.org/2001/XMLSchema-instance}nil
+     */
+    public QName getNilQName() {
+        return QNAME_NIL;
+    }
+
+    /**
+     * The XSI URI
+     * @return the XSI URI
+     */
+    public String getXsiURI() {
+        return Constants.URI_2001_SCHEMA_XSI;
+    }
+
+    /**
+     * The XSD URI
+     * @return the XSD URI
+     */
+    public String getXsdURI() {
+        return Constants.URI_2001_SCHEMA_XSD;
+    }
+}

Added: webservices/axis/trunk/java/dev/scratch/prototype1/src/java/org/apache/axis/encoding/Base64.java
==============================================================================
--- (empty file)
+++ webservices/axis/trunk/java/dev/scratch/prototype1/src/java/org/apache/axis/encoding/Base64.java	Thu Nov 18 03:16:05 2004
@@ -0,0 +1,287 @@
+/*
+ * Copyright 2001-2004 The Apache Software Foundation.
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.axis.encoding ;
+
+import java.io.IOException;
+import java.io.OutputStream;
+import java.io.Writer;
+
+import org.apache.axis.utils.Messages;
+
+/**
+ *
+ * @author TAMURA Kent &lt;kent@trl.ibm.co.jp&gt;
+ */
+public class Base64 {
+    private static final char[] S_BASE64CHAR = {
+        'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 
+        'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 
+        'U', 'V', 'W', 'X', 'Y', 'Z', 'a', 'b', 'c', 'd', 
+        'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 
+        'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 
+        'y', 'z', '0', '1', '2', '3', '4', '5', '6', '7', 
+        '8', '9', '+', '/'
+    };
+    private static final char S_BASE64PAD = '=';
+    private static final byte[] S_DECODETABLE = new byte[128];
+    static {
+        for (int i = 0;  i < S_DECODETABLE.length;  i ++)
+            S_DECODETABLE[i] = Byte.MAX_VALUE;  // 127
+        for (int i = 0;  i < S_BASE64CHAR.length;  i ++) // 0 to 63
+            S_DECODETABLE[S_BASE64CHAR[i]] = (byte)i;
+    }
+
+    private static int decode0(char[] ibuf, byte[] obuf, int wp) {
+        int outlen = 3;
+        if (ibuf[3] == S_BASE64PAD)  outlen = 2;
+        if (ibuf[2] == S_BASE64PAD)  outlen = 1;
+        int b0 = S_DECODETABLE[ibuf[0]];
+        int b1 = S_DECODETABLE[ibuf[1]];
+        int b2 = S_DECODETABLE[ibuf[2]];
+        int b3 = S_DECODETABLE[ibuf[3]];
+        switch (outlen) {
+        case 1:
+            obuf[wp] = (byte)(b0 << 2 & 0xfc | b1 >> 4 & 0x3);
+            return 1;
+        case 2:
+            obuf[wp++] = (byte)(b0 << 2 & 0xfc | b1 >> 4 & 0x3);
+            obuf[wp] = (byte)(b1 << 4 & 0xf0 | b2 >> 2 & 0xf);
+            return 2;
+        case 3:
+            obuf[wp++] = (byte)(b0 << 2 & 0xfc | b1 >> 4 & 0x3);
+            obuf[wp++] = (byte)(b1 << 4 & 0xf0 | b2 >> 2 & 0xf);
+            obuf[wp] = (byte)(b2 << 6 & 0xc0 | b3 & 0x3f);
+            return 3;
+        default:
+            throw new RuntimeException(Messages.getMessage("internalError00"));
+        }
+    }
+
+    /**
+     *
+     */
+    public static byte[] decode(char[] data, int off, int len) {
+        char[] ibuf = new char[4];
+        int ibufcount = 0;
+        byte[] obuf = new byte[len/4*3+3];
+        int obufcount = 0;
+        for (int i = off;  i < off+len;  i ++) {
+            char ch = data[i];
+            if (ch == S_BASE64PAD
+                || ch < S_DECODETABLE.length && S_DECODETABLE[ch] != Byte.MAX_VALUE) {
+                ibuf[ibufcount++] = ch;
+                if (ibufcount == ibuf.length) {
+                    ibufcount = 0;
+                    obufcount += decode0(ibuf, obuf, obufcount);
+                }
+            }
+        }
+        if (obufcount == obuf.length)
+            return obuf;
+        byte[] ret = new byte[obufcount];
+        System.arraycopy(obuf, 0, ret, 0, obufcount);
+        return ret;
+    }
+
+    /**
+     *
+     */
+    public static byte[] decode(String data) {
+        char[] ibuf = new char[4];
+        int ibufcount = 0;
+        byte[] obuf = new byte[data.length()/4*3+3];
+        int obufcount = 0;
+        for (int i = 0;  i < data.length();  i ++) {
+            char ch = data.charAt(i);
+            if (ch == S_BASE64PAD
+                || ch < S_DECODETABLE.length && S_DECODETABLE[ch] != Byte.MAX_VALUE) {
+                ibuf[ibufcount++] = ch;
+                if (ibufcount == ibuf.length) {
+                    ibufcount = 0;
+                    obufcount += decode0(ibuf, obuf, obufcount);
+                }
+            }
+        }
+        if (obufcount == obuf.length)
+            return obuf;
+        byte[] ret = new byte[obufcount];
+        System.arraycopy(obuf, 0, ret, 0, obufcount);
+        return ret;
+    }
+
+    /**
+     *
+     */
+    public static void decode(char[] data, int off, int len, OutputStream ostream) throws IOException {
+        char[] ibuf = new char[4];
+        int ibufcount = 0;
+        byte[] obuf = new byte[3];
+        for (int i = off;  i < off+len;  i ++) {
+            char ch = data[i];
+            if (ch == S_BASE64PAD
+                || ch < S_DECODETABLE.length && S_DECODETABLE[ch] != Byte.MAX_VALUE) {
+                ibuf[ibufcount++] = ch;
+                if (ibufcount == ibuf.length) {
+                    ibufcount = 0;
+                    int obufcount = decode0(ibuf, obuf, 0);
+                    ostream.write(obuf, 0, obufcount);
+                }
+            }
+        }
+    }
+
+    /**
+     *
+     */
+    public static void decode(String data, OutputStream ostream) throws IOException {
+        char[] ibuf = new char[4];
+        int ibufcount = 0;
+        byte[] obuf = new byte[3];
+        for (int i = 0;  i < data.length();  i ++) {
+            char ch = data.charAt(i);
+            if (ch == S_BASE64PAD
+                || ch < S_DECODETABLE.length && S_DECODETABLE[ch] != Byte.MAX_VALUE) {
+                ibuf[ibufcount++] = ch;
+                if (ibufcount == ibuf.length) {
+                    ibufcount = 0;
+                    int obufcount = decode0(ibuf, obuf, 0);
+                    ostream.write(obuf, 0, obufcount);
+                }
+            }
+        }
+    }
+
+    /**
+     * Returns base64 representation of specified byte array.
+     */
+    public static String encode(byte[] data) {
+        return encode(data, 0, data.length);
+    }
+
+    /**
+     * Returns base64 representation of specified byte array.
+     */
+    public static String encode(byte[] data, int off, int len) {
+        if (len <= 0)  return "";
+        char[] out = new char[len/3*4+4];
+        int rindex = off;
+        int windex = 0;
+        int rest = len-off;
+        while (rest >= 3) {
+            int i = ((data[rindex]&0xff)<<16)
+                    +((data[rindex+1]&0xff)<<8)
+                    +(data[rindex+2]&0xff);
+            out[windex++] = S_BASE64CHAR[i>>18];
+            out[windex++] = S_BASE64CHAR[(i>>12)&0x3f];
+            out[windex++] = S_BASE64CHAR[(i>>6)&0x3f];
+            out[windex++] = S_BASE64CHAR[i&0x3f];
+            rindex += 3;
+            rest -= 3;
+        }
+        if (rest == 1) {
+            int i = data[rindex]&0xff;
+            out[windex++] = S_BASE64CHAR[i>>2];
+            out[windex++] = S_BASE64CHAR[(i<<4)&0x3f];
+            out[windex++] = S_BASE64PAD;
+            out[windex++] = S_BASE64PAD;
+        } else if (rest == 2) {
+            int i = ((data[rindex]&0xff)<<8)+(data[rindex+1]&0xff);
+            out[windex++] = S_BASE64CHAR[i>>10];
+            out[windex++] = S_BASE64CHAR[(i>>4)&0x3f];
+            out[windex++] = S_BASE64CHAR[(i<<2)&0x3f];
+            out[windex++] = S_BASE64PAD;
+        }
+        return new String(out, 0, windex);
+    }
+
+    /**
+     * Outputs base64 representation of the specified byte array to a byte stream.
+     */
+    public static void encode(byte[] data, int off, int len, OutputStream ostream) throws IOException {
+        if (len <= 0)  return;
+        byte[] out = new byte[4];
+        int rindex = off;
+        int rest = len-off;
+        while (rest >= 3) {
+            int i = ((data[rindex]&0xff)<<16)
+                    +((data[rindex+1]&0xff)<<8)
+                    +(data[rindex+2]&0xff);
+            out[0] = (byte)S_BASE64CHAR[i>>18];
+            out[1] = (byte)S_BASE64CHAR[(i>>12)&0x3f];
+            out[2] = (byte)S_BASE64CHAR[(i>>6)&0x3f];
+            out[3] = (byte)S_BASE64CHAR[i&0x3f];
+            ostream.write(out, 0, 4);
+            rindex += 3;
+            rest -= 3;
+        }
+        if (rest == 1) {
+            int i = data[rindex]&0xff;
+            out[0] = (byte)S_BASE64CHAR[i>>2];
+            out[1] = (byte)S_BASE64CHAR[(i<<4)&0x3f];
+            out[2] = (byte)S_BASE64PAD;
+            out[3] = (byte)S_BASE64PAD;
+            ostream.write(out, 0, 4);
+        } else if (rest == 2) {
+            int i = ((data[rindex]&0xff)<<8)+(data[rindex+1]&0xff);
+            out[0] = (byte)S_BASE64CHAR[i>>10];
+            out[1] = (byte)S_BASE64CHAR[(i>>4)&0x3f];
+            out[2] = (byte)S_BASE64CHAR[(i<<2)&0x3f];
+            out[3] = (byte)S_BASE64PAD;
+            ostream.write(out, 0, 4);
+        }
+    }
+
+    /**
+     * Outputs base64 representation of the specified byte array to a character stream.
+     */
+    public static void encode(byte[] data, int off, int len, Writer writer) throws IOException {
+        if (len <= 0)  return;
+        char[] out = new char[4];
+        int rindex = off;
+        int rest = len-off;
+        int output = 0;
+        while (rest >= 3) {
+            int i = ((data[rindex]&0xff)<<16)
+                    +((data[rindex+1]&0xff)<<8)
+                    +(data[rindex+2]&0xff);
+            out[0] = S_BASE64CHAR[i>>18];
+            out[1] = S_BASE64CHAR[(i>>12)&0x3f];
+            out[2] = S_BASE64CHAR[(i>>6)&0x3f];
+            out[3] = S_BASE64CHAR[i&0x3f];
+            writer.write(out, 0, 4);
+            rindex += 3;
+            rest -= 3;
+            output += 4;
+            if (output % 76 == 0)
+                writer.write("\n");
+        }
+        if (rest == 1) {
+            int i = data[rindex]&0xff;
+            out[0] = S_BASE64CHAR[i>>2];
+            out[1] = S_BASE64CHAR[(i<<4)&0x3f];
+            out[2] = S_BASE64PAD;
+            out[3] = S_BASE64PAD;
+            writer.write(out, 0, 4);
+        } else if (rest == 2) {
+            int i = ((data[rindex]&0xff)<<8)+(data[rindex+1]&0xff);
+            out[0] = S_BASE64CHAR[i>>10];
+            out[1] = S_BASE64CHAR[(i>>4)&0x3f];
+            out[2] = S_BASE64CHAR[(i<<2)&0x3f];
+            out[3] = S_BASE64PAD;
+            writer.write(out, 0, 4);
+        }
+    }
+}

Added: webservices/axis/trunk/java/dev/scratch/prototype1/src/java/org/apache/axis/encoding/DataBinder.java
==============================================================================
--- (empty file)
+++ webservices/axis/trunk/java/dev/scratch/prototype1/src/java/org/apache/axis/encoding/DataBinder.java	Thu Nov 18 03:16:05 2004
@@ -0,0 +1,34 @@
+/*
+ * Copyright 2001-2004 The Apache Software Foundation.
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.axis.encoding;
+
+/**
+ * This interface hides the Data Binding stuff. Engine always talks with the Data Binding
+ * throuh this interface. The Imples of this interface may use 
+ *  XMLBeans , JAXB, our own ones, what not   
+ * @author Srinath Perera (hemapani@opensource.lk)
+ */
+public interface DataBinder {
+//    public Object deserialize(QName xmlName,XMLPullParser parser);
+//    public int deserializeInt(XMLPullParser parser);
+//    public double deserializeDouble(XMLPullParser parser);
+//    public long deserializeLong(XMLPullParser parser);
+//    public float deserializeFloat(XMLPullParser parser);
+//    public boolean deserializeBoolean(XMLPullParser parser);
+//    public byte deserializeByte(XMLPullParser parser);
+//    public char deserializeChar(XMLPullParser parser);
+//    public short deserializeShort(XMLPullParser parser);
+}

Added: webservices/axis/trunk/java/dev/scratch/prototype1/src/java/org/apache/axis/encoding/push/Pusher.java
==============================================================================
--- (empty file)
+++ webservices/axis/trunk/java/dev/scratch/prototype1/src/java/org/apache/axis/encoding/push/Pusher.java	Thu Nov 18 03:16:05 2004
@@ -0,0 +1,24 @@
+/*
+ * Copyright 2003,2004 The Apache Software Foundation.
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.axis.encoding.push;
+
+/**
+ * @author Srinath Perera (hemapani@opensource.lk)
+ */
+
+public interface Pusher {
+    public void push();
+}

Added: webservices/axis/trunk/java/dev/scratch/prototype1/src/java/org/apache/axis/engine/AbstractContainer.java
==============================================================================
--- (empty file)
+++ webservices/axis/trunk/java/dev/scratch/prototype1/src/java/org/apache/axis/engine/AbstractContainer.java	Thu Nov 18 03:16:05 2004
@@ -0,0 +1,158 @@
+/*
+ * Copyright 2001-2004 The Apache Software Foundation.
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.axis.engine;
+
+import javax.xml.namespace.QName;
+
+import org.apache.axis.engine.registry.AbstractEngineElement;
+import org.apache.axis.engine.registry.ConcreateFlowInclude;
+import org.apache.axis.engine.registry.ConcreateModuleInclude;
+import org.apache.axis.engine.registry.ConcreateTypeMappingInclude;
+import org.apache.axis.engine.registry.EngineElement;
+import org.apache.axis.engine.registry.Flow;
+import org.apache.axis.engine.registry.FlowInclude;
+import org.apache.axis.engine.registry.Module;
+import org.apache.axis.engine.registry.ModuleInclude;
+import org.apache.axis.engine.registry.TypeMapping;
+import org.apache.axis.engine.registry.TypeMappingInclude;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+
+/**
+ * This class use delegeation to give the multiple inheritance effect 
+ * which is prefered over the generalization. 
+ * @author (Srinath Perera)hemapani@opensource.lk
+ */
+public abstract class AbstractContainer 
+            extends AbstractEngineElement 
+            implements FlowInclude,EngineElement,
+                TypeMappingInclude,ModuleInclude {
+    private Log log = LogFactory.getLog(getClass());                    
+
+    
+    //the work is delegated to ConcreateXXInclude classes                       
+    protected FlowInclude flowInclude;
+    protected ModuleInclude modules;
+    protected TypeMappingInclude typemappings;
+
+    public AbstractContainer(){
+        flowInclude = new ConcreateFlowInclude();
+        modules = new ConcreateModuleInclude();
+        typemappings = new ConcreateTypeMappingInclude();
+    }
+    /**
+     * @return
+     */
+    public Flow getFaultFlow() {
+        return flowInclude.getFaultFlow();
+    }
+
+    /**
+     * @return
+     */
+    public Flow getInFlow() {
+        return flowInclude.getInFlow();
+    }
+
+    /**
+     * @return
+     */
+    public Flow getOutFlow() {
+        return flowInclude.getOutFlow();
+    }
+
+    /**
+     * @param flow
+     */
+    public void setFaultFlow(Flow flow) {
+        flowInclude.setFaultFlow(flow);
+    }
+
+    /**
+     * @param flow
+     */
+    public void setInFlow(Flow flow) {
+        flowInclude.setInFlow(flow);
+    }
+
+    /**
+     * @param flow
+     */
+    public void setOutFlow(Flow flow) {
+        flowInclude.setOutFlow(flow);
+    }
+
+    /**
+     * @param typeMapping
+     */
+    public void addTypeMapping(TypeMapping typeMapping) {
+        typemappings.addTypeMapping(typeMapping);
+    }
+
+    /**
+     * @param javaType
+     * @return
+     */
+    public TypeMapping getTypeMapping(Class javaType) {
+        return typemappings.getTypeMapping(javaType);
+    }
+
+    /**
+     * @param index
+     * @return
+     */
+    public TypeMapping getTypeMapping(int index) {
+        return typemappings.getTypeMapping(index);
+    }
+
+    /**
+     * @param xmlType
+     * @return
+     */
+    public TypeMapping getTypeMapping(QName xmlType) {
+        return typemappings.getTypeMapping(xmlType);
+    }
+
+    /**
+     * @return
+     */
+    public int getTypeMappingCount() {
+        return typemappings.getTypeMappingCount();
+    }
+
+    /**
+     * @param module
+     */
+    public void addModule(Module module) {
+        modules.addModule(module);
+    }
+
+    /**
+     * @param index
+     * @return
+     */
+    public Module getModule(int index) {
+        return modules.getModule(index);
+    }
+
+    /**
+     * @return
+     */
+    public int getModuleCount() {
+        return modules.getModuleCount();
+    }
+}

Added: webservices/axis/trunk/java/dev/scratch/prototype1/src/java/org/apache/axis/engine/AxisEngine.java
==============================================================================
--- (empty file)
+++ webservices/axis/trunk/java/dev/scratch/prototype1/src/java/org/apache/axis/engine/AxisEngine.java	Thu Nov 18 03:16:05 2004
@@ -0,0 +1,99 @@
+/*
+ * Copyright 2001-2004 The Apache Software Foundation.
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.axis.engine;
+
+import javax.xml.namespace.QName;
+
+import org.apache.axis.engine.context.MessageContext;
+import org.apache.axis.engine.exec.ExecutionChain;
+import org.apache.axis.engine.registry.EngineRegistry;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+
+/**
+ *  There is one engine for the Server and the Client. the send() and recive() 
+ *  Methods are the basic operations the Sync, Async messageing are build on top.
+ *  Two methods will find and execute the <code>CommonExecuter</code>'s Transport,
+ *  Global,Service.  
+ */
+public class AxisEngine {
+    private Log log = LogFactory.getLog(getClass());
+    private EngineRegistry registry;
+    public AxisEngine(EngineRegistry registry){
+        log.info("Axis Engine Started");        
+        this.registry = registry;
+    }
+
+    public void send(MessageContext mc)throws AxisFault{
+        QName currentServiceName = null;
+        Service service = null;
+        //dispatch the service Name
+        currentServiceName = mc.getCurrentService();
+        service = registry.getService(currentServiceName);
+        try{
+            ExecutionChain exeChain = service.getOutputExecutionChain();
+            exeChain.invoke(mc);
+        }catch(AxisFault e){
+            if(mc.isProcessingFault()){
+                //TODO log and exit
+                log.debug("Error in fault flow",e);
+            }else{
+                log.debug("send failed",e);
+                mc.setProcessingFault(true);
+                ExecutionChain faultExeChain = service.getFaultExecutionChain();
+                faultExeChain.invoke(mc);
+            }
+        }
+        log.info("end the send()");
+    }
+    
+    public void recive(MessageContext mc)throws AxisFault{
+        QName currentServiceName = null;
+        Service service = null;
+
+        currentServiceName = mc.getCurrentService();
+        service = registry.getService(currentServiceName);
+
+        try{
+            ExecutionChain exeChain = service.getInputExecutionChain();
+            exeChain.invoke(mc);
+        }catch(AxisFault e){
+            if(mc.isProcessingFault()){
+                //TODO log and exit
+                log.debug("Error in fault flow",e);
+            }else{
+                log.debug("recive failed",e);
+                mc.setProcessingFault(true);
+                ExecutionChain faultExeChain = service.getFaultExecutionChain();
+                faultExeChain.invoke(mc);
+            }
+        }
+        log.info("end the recive()");
+    }    
+	/**
+	 * @return Returns the registry.
+	 */
+	public EngineRegistry getRegistry() {
+		return registry;
+	}
+	/**
+	 * @param registry The registry to set.
+	 */
+	public void setRegistry(EngineRegistry registry) {
+		this.registry = registry;
+	}
+}

Added: webservices/axis/trunk/java/dev/scratch/prototype1/src/java/org/apache/axis/engine/AxisFault.java
==============================================================================
--- (empty file)
+++ webservices/axis/trunk/java/dev/scratch/prototype1/src/java/org/apache/axis/engine/AxisFault.java	Thu Nov 18 03:16:05 2004
@@ -0,0 +1,90 @@
+/*
+ * Copyright 2001-2004 The Apache Software Foundation.
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.axis.engine;
+
+import java.lang.reflect.InvocationTargetException;
+
+
+/**
+ * An exception which maps cleanly to a SOAP fault.
+ * This is a base class for exceptions which are mapped to faults.
+ * SOAP faults contain
+ * <ol>
+ * <li>A fault string
+ * <li>A fault code
+ * <li>A fault actor
+ * <li>Fault details; an xml tree of fault specific stuff
+ * </ol>
+ * @author Doug Davis (dug@us.ibm.com)
+ * @author James Snell (jasnell@us.ibm.com)
+ * @author Steve Loughran
+ */
+
+public class AxisFault extends java.rmi.RemoteException {
+    /**
+     * 
+     */
+    public AxisFault() {
+        super();
+        // TODO Auto-generated constructor stub
+    }
+
+    /**
+     * @param arg0
+     */
+    public AxisFault(String arg0) {
+        super(arg0);
+        // TODO Auto-generated constructor stub
+    }
+
+    /**
+     * @param arg0
+     * @param arg1
+     */
+    public AxisFault(String arg0, Throwable arg1) {
+        super(arg0, arg1);
+        // TODO Auto-generated constructor stub
+    }
+    
+    /**
+    * Make an AxisFault based on a passed Exception.  If the Exception is
+    * already an AxisFault, simply use that.  Otherwise, wrap it in an
+    * AxisFault.  If the Exception is an InvocationTargetException (which
+    * already wraps another Exception), get the wrapped Exception out from
+    * there and use that instead of the passed one.
+    *
+    * @param e the <code>Exception</code> to build a fault for
+    * @return  an <code>AxisFault</code> representing <code>e</code>
+    */
+   public static AxisFault makeFault(Exception e)
+   {
+       if (e instanceof InvocationTargetException) {
+           Throwable t = ((InvocationTargetException)e).getTargetException();
+           if (t instanceof Exception) {
+               e = (Exception)t;
+           }
+       }
+
+       if (e instanceof AxisFault) {
+           return (AxisFault)e;
+       }
+
+       return new AxisFault(e.getMessage(),e);
+   }
+
+
+}

Added: webservices/axis/trunk/java/dev/scratch/prototype1/src/java/org/apache/axis/engine/Constants.java
==============================================================================
--- (empty file)
+++ webservices/axis/trunk/java/dev/scratch/prototype1/src/java/org/apache/axis/engine/Constants.java	Thu Nov 18 03:16:05 2004
@@ -0,0 +1,751 @@
+/*
+ * Copyright 2003,2004 The Apache Software Foundation.
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.axis.engine;
+
+import javax.xml.namespace.QName;
+
+import org.apache.axis.constants.SOAPConstants;
+import org.apache.axis.constants.SchemaVersion1999;
+import org.apache.axis.constants.SchemaVersion2000;
+import org.apache.axis.constants.SchemaVersion2001;
+import org.xml.sax.Attributes;
+
+/**
+ * @author Srinath Perera(hemapani@opensource.lk)
+ */
+public class Constants {
+    public static final int SOAP_STYLE_RPC_ENCODED = 1000;
+    public static final int SOAP_STYLE_RPC_LITERAL = 1001;
+    public static final int SOAP_STYLE_DOC_LITRAL_WRAPPED = 1002;
+    public static final int SOAP_STYLE_DOC_LITRAL_UNWRAPPED = 1003;
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    public static final String APPLICATION_SCOPE = "application";
+    public static final String SESSION_SCOPE = "session";
+    public static final String GLOBAL_SCOPE = "global";
+    
+    // Some common Constants that should be used in local handler options
+    // (Not all implementations will have these concepts - for example
+    //  not all Engines will have notion of registries but defining these
+    //  here should allow people to ask if they exist)
+    //////////////////////////////////////////////////////////////////////////
+
+    // Namespace Prefix Constants
+    //////////////////////////////////////////////////////////////////////////
+    public static final String NS_PREFIX_SOAP_ENV   = "soapenv";
+    public static final String NS_PREFIX_SOAP_ENC   = "soapenc";
+    public static final String NS_PREFIX_SCHEMA_XSI = "xsi" ;
+    public static final String NS_PREFIX_SCHEMA_XSD = "xsd" ;
+    public static final String NS_PREFIX_WSDL       = "wsdl" ;
+    public static final String NS_PREFIX_WSDL_SOAP  = "wsdlsoap";
+    public static final String NS_PREFIX_XMLSOAP    = "apachesoap";
+    public static final String NS_PREFIX_XML        = "xml";
+
+    // Axis Namespaces
+    public static final String NS_URI_AXIS = "http://xml.apache.org/axis/";
+    public static final String NS_URI_XMLSOAP = "http://xml.apache.org/xml-soap";
+
+    // Special namespace URI to indicate an "automatically" serialized Java
+    // type.  This allows us to use types without needing explicit mappings,
+    // such that Java classes like "org.foo.Bar" map to QNames like
+    // {http://xml.apache.org/axis/java}org.foo.Bar
+    public static final String NS_URI_JAVA = "http://xml.apache.org/axis/java";
+
+    //
+    // Default SOAP version
+    //
+    public static final SOAPConstants DEFAULT_SOAP_VERSION =
+        SOAPConstants.SOAP11_CONSTANTS;
+
+    //
+    // SOAP-ENV Namespaces
+    //
+    public static final String URI_SOAP11_ENV =
+                                "http://schemas.xmlsoap.org/soap/envelope/" ;
+    public static final String URI_SOAP12_ENV =
+                                   "http://www.w3.org/2003/05/soap-envelope";
+    public static final String URI_DEFAULT_SOAP_ENV =
+        DEFAULT_SOAP_VERSION.getEnvelopeURI();
+
+    // fixme: this is unsafe - a client can (accidentaly or on purpose)
+    //  over-write the elemnts of this array. This pattern is used throughout
+    //  this file.
+    public static final String[] URIS_SOAP_ENV = {
+        URI_SOAP11_ENV,
+        URI_SOAP12_ENV,
+    };
+
+    // Constant name of the enterprise-style logging category.
+    // The enterprise category is for stuff that an enterprise product might
+    // want to track, but in a simple environment (like the AXIS build) would
+    // be nothing more than a nuisance.
+    public static final String ENTERPRISE_LOG_CATEGORY = "org.apache.axis.enterprise";
+
+    /**
+     * time logged stuff.
+     */
+    public static final String TIME_LOG_CATEGORY = "org.apache.axis.TIME";
+
+    /**
+     * Servlet exceptions. Axis faults are logged at debug level here.
+     */
+    public static final String EXCEPTION_LOG_CATEGORY = "org.apache.axis.EXCEPTIONS";
+
+    /** The name of the field which accepts xsd:any content in Beans. */
+    public static final String ANYCONTENT = "_any";
+    /**
+     * The size of the buffer size for.
+     */
+    public static final int HTTP_TXR_BUFFER_SIZE = 8 * 1024;
+
+    /**
+     * Returns true if the string is the SOAP_ENV Namespace.
+     *
+     * @param s  the string representation of a URI
+     * @return <code>true</code> if s represents any of the supported soap
+     *              envelope URI strings
+     */
+    public static boolean isSOAP_ENV(String s) {
+        for (int i=0; i<URIS_SOAP_ENV.length; i++) {
+            if (URIS_SOAP_ENV[i].equals(s)) {
+                return true;
+            }
+        }
+        return false;
+    }
+
+
+    public static final String URI_LITERAL_ENC = "";
+
+    //
+    // SOAP-ENC Namespaces
+    //
+    public static final String URI_SOAP11_ENC =
+                                "http://schemas.xmlsoap.org/soap/encoding/" ;
+    public static final String URI_SOAP12_ENC =
+                                   "http://www.w3.org/2003/05/soap-encoding";
+    public static final String URI_SOAP12_NOENC =
+                     "http://www.w3.org/2003/05/soap-envelope/encoding/none";
+    public static final String URI_DEFAULT_SOAP_ENC =
+        DEFAULT_SOAP_VERSION.getEncodingURI();
+
+    public static final String[] URIS_SOAP_ENC = {
+        URI_SOAP12_ENC,
+        URI_SOAP11_ENC,
+    };
+
+    /**
+     * Returns true if SOAP_ENC Namespace.
+     *
+     * @param s  a string representing the URI to check
+     * @return true if <code>s</code> matches a SOAP ENCODING namespace URI,
+     *              false otherwise
+     */
+    public static boolean isSOAP_ENC(String s) {
+        for (int i=0; i<URIS_SOAP_ENC.length; i++) {
+            if (URIS_SOAP_ENC[i].equals(s)) {
+                return true;
+            }
+        }
+        return false;
+    }
+
+    /**
+     * This utility routine returns the value of an attribute which might
+     * be in one of several namespaces.
+     *
+     * @param attributes the attributes to search
+     * @param search an array of namespace URI strings to search
+     * @param localPart is the local part of the attribute name
+     * @return the value of the attribute or null
+     */
+    public static String getValue(Attributes attributes,
+                                  String [] search,
+                                  String localPart) {
+        if (attributes == null || attributes.getLength() == 0 || search == null || localPart == null)
+            return null;
+
+        int len = attributes.getLength();
+
+        for (int i=0; i < len; i++) {
+            if (attributes.getLocalName(i).equals(localPart)) {
+                String uri = attributes.getURI(i);
+                for (int j=0; j<search.length; j++) {
+                    if (search[j].equals(uri)) return attributes.getValue(i);
+                }
+            }
+        }
+
+        return null;
+    }
+
+    /**
+     * Search an attribute collection for a list of QNames, returning
+     * the value of the first one found, or null if none were found.
+     *
+     * @param attributes
+     * @param search
+     * @return the value of the attribute
+     */
+    public static String getValue(Attributes attributes,
+                                  QName [] search) {
+        if (attributes == null || search == null)
+            return null;
+
+        if (attributes.getLength() == 0) return null;
+
+        String value = null;
+        for (int i=0; (value == null) && (i < search.length); i++) {
+            value = attributes.getValue(search[i].getNamespaceURI(),
+                                        search[i].getLocalPart());
+        }
+
+        return value;
+    }
+
+    /**
+     * equals
+     * The first QName is the current version of the name.  The second qname is compared
+     * with the first considering all namespace uri versions.
+     * @param first Currently supported QName
+     * @param second any qname
+     * @return true if the qnames represent the same qname (paster namespace uri versions considered
+     */
+    public static boolean equals(QName first, QName second) {
+        if (first == second) {
+            return true;
+        }
+        if (first==null || second==null) {
+            return false;
+        }
+        if (first.equals(second)) {
+            return true;
+        }
+        if (!first.getLocalPart().equals(second.getLocalPart())) {
+            return false;
+        }
+
+        String namespaceURI = first.getNamespaceURI();
+        String[] search = null;
+        if (namespaceURI.equals(URI_DEFAULT_SOAP_ENC))
+            search = URIS_SOAP_ENC;
+        else if (namespaceURI.equals(URI_DEFAULT_SOAP_ENV))
+            search = URIS_SOAP_ENV;
+        else if (namespaceURI.equals(URI_DEFAULT_SCHEMA_XSD))
+            search = URIS_SCHEMA_XSD;
+        else if (namespaceURI.equals(URI_DEFAULT_SCHEMA_XSI))
+            search = URIS_SCHEMA_XSI;
+        else
+            search = new String[] {namespaceURI};
+
+        for (int i=0; i < search.length; i++) {
+            if (search[i].equals(second.getNamespaceURI())) {
+                return true;
+            }
+        }
+        return false;
+    }
+
+    // Misc SOAP Namespaces / URIs
+    public static final String URI_SOAP11_NEXT_ACTOR =
+                                     "http://schemas.xmlsoap.org/soap/actor/next" ;
+    public static final String URI_SOAP12_NEXT_ROLE =
+                                     "http://www.w3.org/2003/05/soap-envelope/role/next";
+    /** @deprecated use URI_SOAP12_NEXT_ROLE */
+    public static final String URI_SOAP12_NEXT_ACTOR = URI_SOAP12_NEXT_ROLE;
+
+    public static final String URI_SOAP12_RPC =
+                                     "http://www.w3.org/2003/05/soap-rpc";
+
+    public static final String URI_SOAP12_NONE_ROLE =
+                         "http://www.w3.org/2003/05/soap-envelope/role/none";
+    public static final String URI_SOAP12_ULTIMATE_ROLE =
+             "http://www.w3.org/2003/05/soap-envelope/role/ultimateReceiver";
+
+    public static final String URI_SOAP11_HTTP =
+                                     "http://schemas.xmlsoap.org/soap/http";
+    public static final String URI_SOAP12_HTTP =
+                                    "http://www.w3.org/2003/05/http";
+
+    public static final String NS_URI_XMLNS =
+                                       "http://www.w3.org/2000/xmlns/";
+
+    public static final String NS_URI_XML =
+                                       "http://www.w3.org/XML/1998/namespace";
+
+    //
+    // Schema XSD Namespaces
+    //
+    public static final String URI_1999_SCHEMA_XSD =
+                                          "http://www.w3.org/1999/XMLSchema";
+    public static final String URI_2000_SCHEMA_XSD =
+                                       "http://www.w3.org/2000/10/XMLSchema";
+    public static final String URI_2001_SCHEMA_XSD =
+                                          "http://www.w3.org/2001/XMLSchema";
+
+    public static final String URI_DEFAULT_SCHEMA_XSD = URI_2001_SCHEMA_XSD;
+
+    public static final String[] URIS_SCHEMA_XSD = {
+        URI_1999_SCHEMA_XSD,
+        URI_2000_SCHEMA_XSD,
+        URI_2001_SCHEMA_XSD
+    };
+    public static final QName [] QNAMES_NIL = {
+        SchemaVersion2001.QNAME_NIL,
+        SchemaVersion2000.QNAME_NIL,
+        SchemaVersion1999.QNAME_NIL
+    };
+
+    /**
+     * Returns true if SchemaXSD Namespace.
+     *
+     * @param s  the string representing the URI to check
+     * @return true if s represents the Schema XSD namespace, false otherwise
+     */
+    public static boolean isSchemaXSD(String s) {
+        for (int i=0; i<URIS_SCHEMA_XSD.length; i++) {
+            if (URIS_SCHEMA_XSD[i].equals(s)) {
+                return true;
+            }
+        }
+        return false;
+    }
+
+    //
+    // Schema XSI Namespaces
+    //
+    public static final String URI_1999_SCHEMA_XSI =
+                                 "http://www.w3.org/1999/XMLSchema-instance";
+    public static final String URI_2000_SCHEMA_XSI =
+                              "http://www.w3.org/2000/10/XMLSchema-instance";
+    public static final String URI_2001_SCHEMA_XSI =
+                                 "http://www.w3.org/2001/XMLSchema-instance";
+    public static final String URI_DEFAULT_SCHEMA_XSI = URI_2001_SCHEMA_XSI;
+
+    public static final String[] URIS_SCHEMA_XSI = {
+        URI_1999_SCHEMA_XSI,
+        URI_2000_SCHEMA_XSI,
+        URI_2001_SCHEMA_XSI,
+    };
+
+    /**
+     * Returns true if SchemaXSI Namespace.
+     *
+     * @param s  the string of the URI to check
+     * @return   true if <code>s</code> is a Schema XSI URI, false otherwise
+     */
+    public static boolean isSchemaXSI(String s) {
+        for (int i=0; i<URIS_SCHEMA_XSI.length; i++) {
+            if (URIS_SCHEMA_XSI[i].equals(s)) {
+                return true;
+            }
+        }
+        return false;
+    }
+
+    /**
+     * WSDL Namespace.
+     */
+    public static final String NS_URI_WSDL11 =
+                                 "http://schemas.xmlsoap.org/wsdl/";
+
+    public static final String[] NS_URIS_WSDL = {
+        NS_URI_WSDL11,
+    };
+
+    /**
+     * Returns true if this is a WSDL Namespace.
+     *
+     * @param s  a string of a URI to check
+     * @return   true if <code>s</code> is a WSDL namespace URI, false otherwise
+     */
+    public static boolean isWSDL(String s) {
+        for (int i=0; i<NS_URIS_WSDL.length; i++) {
+            if (NS_URIS_WSDL[i].equals(s)) {
+                return true;
+            }
+        }
+        return false;
+    }
+
+    //
+    // WSDL extensions for SOAP in DIME
+    // (http://gotdotnet.com/team/xml_wsspecs/dime/WSDL-Extension-for-DIME.htm)
+    //
+    public static final String URI_DIME_WSDL =
+                                 "http://schemas.xmlsoap.org/ws/2002/04/dime/wsdl/";
+
+    public static final String URI_DIME_CONTENT =
+                                 "http://schemas.xmlsoap.org/ws/2002/04/content-type/";
+
+    public static final String URI_DIME_REFERENCE=
+                                 "http://schemas.xmlsoap.org/ws/2002/04/reference/";
+
+    public static final String URI_DIME_CLOSED_LAYOUT=
+                                 "http://schemas.xmlsoap.org/ws/2002/04/dime/closed-layout";
+
+    public static final String URI_DIME_OPEN_LAYOUT=
+                                 "http://schemas.xmlsoap.org/ws/2002/04/dime/open-layout";
+
+    //
+    // WSDL SOAP Namespace
+    //
+    public static final String URI_WSDL11_SOAP =
+                                 "http://schemas.xmlsoap.org/wsdl/soap/";
+    public static final String URI_WSDL12_SOAP =
+                                 "http://schemas.xmlsoap.org/wsdl/soap12/";
+
+    public static final String[] NS_URIS_WSDL_SOAP = {
+        URI_WSDL11_SOAP,
+        URI_WSDL12_SOAP
+    };
+
+    /**
+     * Returns true if s is a WSDL SOAP Namespace.
+     *
+     * @param s  a string of a URI to check
+     * @return   true if <code>s</code> matches any of the WSDL SOAP namepace
+     *              URIs, false otherwise
+     */
+    public static boolean isWSDLSOAP(String s) {
+        for (int i=0; i<NS_URIS_WSDL_SOAP.length; i++) {
+            if (NS_URIS_WSDL_SOAP[i].equals(s)) {
+                return true;
+            }
+        }
+        return false;
+    }
+
+    // Axis Mechanism Type
+    public static final String AXIS_SAX = "Axis SAX Mechanism";
+
+    public static final String ELEM_ENVELOPE = "Envelope" ;
+    public static final String ELEM_HEADER   = "Header" ;
+    public static final String ELEM_BODY     = "Body" ;
+    public static final String ELEM_FAULT    = "Fault" ;
+
+    public static final String ELEM_NOTUNDERSTOOD = "NotUnderstood";
+    public static final String ELEM_UPGRADE           = "Upgrade";
+    public static final String ELEM_SUPPORTEDENVELOPE = "SupportedEnvelope";
+
+    public static final String ELEM_FAULT_CODE   = "faultcode" ;
+    public static final String ELEM_FAULT_STRING = "faultstring" ;
+    public static final String ELEM_FAULT_DETAIL = "detail" ;
+    public static final String ELEM_FAULT_ACTOR  = "faultactor" ;
+
+    public static final String ELEM_FAULT_CODE_SOAP12 = "Code" ;
+    public static final String ELEM_FAULT_VALUE_SOAP12 = "Value" ;
+    public static final String ELEM_FAULT_SUBCODE_SOAP12 = "Subcode" ;
+    public static final String ELEM_FAULT_REASON_SOAP12 = "Reason" ;
+    public static final String ELEM_FAULT_NODE_SOAP12 = "Node" ;
+    public static final String ELEM_FAULT_ROLE_SOAP12 = "Role" ;
+    public static final String ELEM_FAULT_DETAIL_SOAP12 = "Detail" ;
+    public static final String ELEM_TEXT_SOAP12 = "Text" ;
+
+    public static final String ATTR_MUST_UNDERSTAND = "mustUnderstand" ;
+    public static final String ATTR_ENCODING_STYLE  = "encodingStyle" ;
+    public static final String ATTR_ACTOR           = "actor" ;
+    public static final String ATTR_ROLE            = "role" ;
+    public static final String ATTR_RELAY           = "relay" ;
+    public static final String ATTR_ROOT            = "root" ;
+    public static final String ATTR_ID              = "id" ;
+    public static final String ATTR_HREF            = "href" ;
+    public static final String ATTR_REF             = "ref" ;
+    public static final String ATTR_QNAME           = "qname";
+    public static final String ATTR_ARRAY_TYPE      = "arrayType";
+    public static final String ATTR_ITEM_TYPE       = "itemType";
+    public static final String ATTR_ARRAY_SIZE      = "arraySize";
+    public static final String ATTR_OFFSET          = "offset";
+    public static final String ATTR_POSITION        = "position";
+    public static final String ATTR_TYPE            = "type";
+    public static final String ATTR_HANDLERINFOCHAIN = "handlerInfoChain";
+
+    // Fault Codes
+    //////////////////////////////////////////////////////////////////////////
+    public static final String FAULT_CLIENT = "Client";
+
+    public static final String FAULT_SERVER_GENERAL =
+                                                   "Server.generalException";
+
+    public static final String FAULT_SERVER_USER =
+                                                   "Server.userException";
+
+    public static final QName FAULT_VERSIONMISMATCH =
+                                  new QName(URI_SOAP11_ENV, "VersionMismatch");
+
+    public static final QName FAULT_MUSTUNDERSTAND =
+                                  new QName(URI_SOAP11_ENV, "MustUnderstand");
+
+
+    public static final QName FAULT_SOAP12_MUSTUNDERSTAND =
+                                  new QName(URI_SOAP12_ENV, "MustUnderstand");
+
+    public static final QName FAULT_SOAP12_VERSIONMISMATCH =
+                                  new QName(URI_SOAP12_ENV, "VersionMismatch");
+
+    public static final QName FAULT_SOAP12_DATAENCODINGUNKNOWN =
+                                  new QName(URI_SOAP12_ENV, "DataEncodingUnknown");
+
+    public static final QName FAULT_SOAP12_SENDER =
+                                  new QName(URI_SOAP12_ENV, "Sender");
+
+    public static final QName FAULT_SOAP12_RECEIVER =
+                                  new QName(URI_SOAP12_ENV, "Receiver");
+
+    // SOAP 1.2 Fault subcodes
+    public static final QName FAULT_SUBCODE_BADARGS =
+            new QName(URI_SOAP12_RPC, "BadArguments");
+    public static final QName FAULT_SUBCODE_PROC_NOT_PRESENT =
+            new QName(URI_SOAP12_RPC, "ProcedureNotPresent");
+
+    // QNames
+    //////////////////////////////////////////////////////////////////////////
+    public static final QName QNAME_FAULTCODE =
+                                         new QName("", ELEM_FAULT_CODE);
+    public static final QName QNAME_FAULTSTRING =
+                                       new QName("", ELEM_FAULT_STRING);
+    public static final QName QNAME_FAULTACTOR =
+                                        new QName("", ELEM_FAULT_ACTOR);
+    public static final QName QNAME_FAULTDETAILS =
+                                         new QName("", ELEM_FAULT_DETAIL);
+
+    public static final QName QNAME_FAULTCODE_SOAP12 =
+                                         new QName(URI_SOAP12_ENV, ELEM_FAULT_CODE_SOAP12);
+    public static final QName QNAME_FAULTVALUE_SOAP12 =
+                                         new QName(URI_SOAP12_ENV, ELEM_FAULT_VALUE_SOAP12);
+    public static final QName QNAME_FAULTSUBCODE_SOAP12 =
+                                         new QName(URI_SOAP12_ENV, ELEM_FAULT_SUBCODE_SOAP12);
+    public static final QName QNAME_FAULTREASON_SOAP12 =
+                                         new QName(URI_SOAP12_ENV, ELEM_FAULT_REASON_SOAP12);
+    public static final QName QNAME_TEXT_SOAP12 =
+                                         new QName(URI_SOAP12_ENV, ELEM_TEXT_SOAP12);
+
+    public static final QName QNAME_FAULTNODE_SOAP12 =
+                                         new QName(URI_SOAP12_ENV, ELEM_FAULT_NODE_SOAP12);
+    public static final QName QNAME_FAULTROLE_SOAP12 =
+                                         new QName(URI_SOAP12_ENV, ELEM_FAULT_ROLE_SOAP12);
+    public static final QName QNAME_FAULTDETAIL_SOAP12 =
+                                         new QName(URI_SOAP12_ENV, ELEM_FAULT_DETAIL_SOAP12);
+    public static final QName QNAME_NOTUNDERSTOOD =
+                                         new QName(URI_SOAP12_ENV, ELEM_NOTUNDERSTOOD);
+
+    // Define qnames for the all of the XSD and SOAP-ENC encodings
+    public static final QName XSD_STRING = new QName(URI_DEFAULT_SCHEMA_XSD, "string");
+    public static final QName XSD_BOOLEAN = new QName(URI_DEFAULT_SCHEMA_XSD, "boolean");
+    public static final QName XSD_DOUBLE = new QName(URI_DEFAULT_SCHEMA_XSD, "double");
+    public static final QName XSD_FLOAT = new QName(URI_DEFAULT_SCHEMA_XSD, "float");
+    public static final QName XSD_INT = new QName(URI_DEFAULT_SCHEMA_XSD, "int");
+    public static final QName XSD_INTEGER = new QName(URI_DEFAULT_SCHEMA_XSD, "integer");
+    public static final QName XSD_LONG = new QName(URI_DEFAULT_SCHEMA_XSD, "long");
+    public static final QName XSD_SHORT = new QName(URI_DEFAULT_SCHEMA_XSD, "short");
+    public static final QName XSD_BYTE = new QName(URI_DEFAULT_SCHEMA_XSD, "byte");
+    public static final QName XSD_DECIMAL = new QName(URI_DEFAULT_SCHEMA_XSD, "decimal");
+    public static final QName XSD_BASE64 = new QName(URI_DEFAULT_SCHEMA_XSD, "base64Binary");
+    public static final QName XSD_HEXBIN = new QName(URI_DEFAULT_SCHEMA_XSD, "hexBinary");
+    public static final QName XSD_ANYSIMPLETYPE = new QName(URI_DEFAULT_SCHEMA_XSD, "anySimpleType");
+    public static final QName XSD_ANYTYPE = new QName(URI_DEFAULT_SCHEMA_XSD, "anyType");
+    public static final QName XSD_ANY = new QName(URI_DEFAULT_SCHEMA_XSD, "any");
+    public static final QName XSD_QNAME = new QName(URI_DEFAULT_SCHEMA_XSD, "QName");
+    public static final QName XSD_DATETIME = new QName(URI_DEFAULT_SCHEMA_XSD, "dateTime");
+    public static final QName XSD_DATE = new QName(URI_DEFAULT_SCHEMA_XSD, "date");
+    public static final QName XSD_TIME = new QName(URI_DEFAULT_SCHEMA_XSD, "time");
+    public static final QName XSD_TIMEINSTANT1999 = new QName(URI_1999_SCHEMA_XSD, "timeInstant");
+    public static final QName XSD_TIMEINSTANT2000 = new QName(URI_2000_SCHEMA_XSD, "timeInstant");
+
+    public static final QName XSD_NORMALIZEDSTRING = new QName(URI_2001_SCHEMA_XSD, "normalizedString");
+    public static final QName XSD_TOKEN = new QName(URI_2001_SCHEMA_XSD, "token");
+
+    public static final QName XSD_UNSIGNEDLONG = new QName(URI_2001_SCHEMA_XSD, "unsignedLong");
+    public static final QName XSD_UNSIGNEDINT = new QName(URI_2001_SCHEMA_XSD, "unsignedInt");
+    public static final QName XSD_UNSIGNEDSHORT = new QName(URI_2001_SCHEMA_XSD, "unsignedShort");
+    public static final QName XSD_UNSIGNEDBYTE = new QName(URI_2001_SCHEMA_XSD, "unsignedByte");
+    public static final QName XSD_POSITIVEINTEGER = new QName(URI_2001_SCHEMA_XSD, "positiveInteger");
+    public static final QName XSD_NEGATIVEINTEGER = new QName(URI_2001_SCHEMA_XSD, "negativeInteger");
+    public static final QName XSD_NONNEGATIVEINTEGER = new QName(URI_2001_SCHEMA_XSD, "nonNegativeInteger");
+    public static final QName XSD_NONPOSITIVEINTEGER = new QName(URI_2001_SCHEMA_XSD, "nonPositiveInteger");
+
+    public static final QName XSD_YEARMONTH = new QName(URI_2001_SCHEMA_XSD, "gYearMonth");
+    public static final QName XSD_MONTHDAY = new QName(URI_2001_SCHEMA_XSD, "gMonthDay");
+    public static final QName XSD_YEAR = new QName(URI_2001_SCHEMA_XSD, "gYear");
+    public static final QName XSD_MONTH = new QName(URI_2001_SCHEMA_XSD, "gMonth");
+    public static final QName XSD_DAY = new QName(URI_2001_SCHEMA_XSD, "gDay");
+    public static final QName XSD_DURATION = new QName(URI_2001_SCHEMA_XSD, "duration");
+
+    public static final QName XSD_NAME = new QName(URI_2001_SCHEMA_XSD, "Name");
+    public static final QName XSD_NCNAME = new QName(URI_2001_SCHEMA_XSD, "NCName");
+    public static final QName XSD_NMTOKEN = new QName(URI_2001_SCHEMA_XSD, "NMTOKEN");
+    public static final QName XSD_NMTOKENS = new QName(URI_2001_SCHEMA_XSD, "NMTOKENS");
+    public static final QName XSD_NOTATION = new QName(URI_2001_SCHEMA_XSD, "NOTATION");
+    public static final QName XSD_ENTITY = new QName(URI_2001_SCHEMA_XSD, "ENTITY");
+    public static final QName XSD_ENTITIES = new QName(URI_2001_SCHEMA_XSD, "ENTITIES");
+    public static final QName XSD_IDREF = new QName(URI_2001_SCHEMA_XSD, "IDREF");
+    public static final QName XSD_IDREFS = new QName(URI_2001_SCHEMA_XSD, "IDREFS");
+    public static final QName XSD_ANYURI = new QName(URI_2001_SCHEMA_XSD, "anyURI");
+    public static final QName XSD_LANGUAGE = new QName(URI_2001_SCHEMA_XSD, "language");
+    public static final QName XSD_ID = new QName(URI_2001_SCHEMA_XSD, "ID");
+    public static final QName XSD_SCHEMA = new QName(URI_2001_SCHEMA_XSD, "schema");
+
+    public static final QName XML_LANG = new QName(NS_URI_XML, "lang");
+
+    public static final QName SOAP_BASE64 = new QName(URI_DEFAULT_SOAP_ENC, "base64");
+    public static final QName SOAP_BASE64BINARY = new QName(URI_DEFAULT_SOAP_ENC, "base64Binary");
+    public static final QName SOAP_STRING = new QName(URI_DEFAULT_SOAP_ENC, "string");
+    public static final QName SOAP_BOOLEAN = new QName(URI_DEFAULT_SOAP_ENC, "boolean");
+    public static final QName SOAP_DOUBLE = new QName(URI_DEFAULT_SOAP_ENC, "double");
+    public static final QName SOAP_FLOAT = new QName(URI_DEFAULT_SOAP_ENC, "float");
+    public static final QName SOAP_INT = new QName(URI_DEFAULT_SOAP_ENC, "int");
+    public static final QName SOAP_LONG = new QName(URI_DEFAULT_SOAP_ENC, "long");
+    public static final QName SOAP_SHORT = new QName(URI_DEFAULT_SOAP_ENC, "short");
+    public static final QName SOAP_BYTE = new QName(URI_DEFAULT_SOAP_ENC, "byte");
+    public static final QName SOAP_INTEGER = new QName(URI_DEFAULT_SOAP_ENC, "integer");
+    public static final QName SOAP_DECIMAL = new QName(URI_DEFAULT_SOAP_ENC, "decimal");
+    public static final QName SOAP_ARRAY = new QName(URI_DEFAULT_SOAP_ENC, "Array");
+    public static final QName SOAP_COMMON_ATTRS11 = new QName(URI_SOAP11_ENC, "commonAttributes");
+    public static final QName SOAP_COMMON_ATTRS12 = new QName(URI_SOAP12_ENC, "commonAttributes");
+    public static final QName SOAP_ARRAY_ATTRS11 = new QName(URI_SOAP11_ENC, "arrayAttributes");
+    public static final QName SOAP_ARRAY_ATTRS12 = new QName(URI_SOAP12_ENC, "arrayAttributes");
+    public static final QName SOAP_ARRAY12 = new QName(URI_SOAP12_ENC, "Array");
+
+    public static final QName SOAP_MAP = new QName(NS_URI_XMLSOAP, "Map");
+    public static final QName SOAP_ELEMENT = new QName(NS_URI_XMLSOAP, "Element");
+    public static final QName SOAP_DOCUMENT = new QName(NS_URI_XMLSOAP, "Document");
+    public static final QName SOAP_VECTOR = new QName(NS_URI_XMLSOAP, "Vector");
+    public static final QName MIME_IMAGE = new QName(NS_URI_XMLSOAP, "Image");
+    public static final QName MIME_PLAINTEXT = new QName(NS_URI_XMLSOAP, "PlainText");
+    public static final QName MIME_MULTIPART = new QName(NS_URI_XMLSOAP, "Multipart");
+    public static final QName MIME_SOURCE = new QName(NS_URI_XMLSOAP, "Source");
+    public static final QName MIME_OCTETSTREAM = new QName(NS_URI_XMLSOAP, "octet-stream");
+    public static final QName MIME_DATA_HANDLER = new QName(NS_URI_XMLSOAP, "DataHandler");
+
+
+    public static final QName QNAME_LITERAL_ITEM = new QName(URI_LITERAL_ENC,"item");
+    public static final QName QNAME_RPC_RESULT = new QName(URI_SOAP12_RPC,"result");
+
+    /**
+     * QName of stack trace element in an axis fault detail.
+     */
+    public static final QName QNAME_FAULTDETAIL_STACKTRACE = new QName(NS_URI_AXIS,"stackTrace");
+
+    /**
+     * QName of exception Name element in an axis fault detail.
+     * Do not use - this is for pre-1.0 server->client exceptions.
+     */
+    public static final QName QNAME_FAULTDETAIL_EXCEPTIONNAME = new QName(NS_URI_AXIS, "exceptionName");
+
+    /**
+     * QName of stack trace element in an axis fault detail.
+     */
+    public static final QName QNAME_FAULTDETAIL_RUNTIMEEXCEPTION = new QName(NS_URI_AXIS, "isRuntimeException");
+
+    /**
+     * QName of stack trace element in an axis fault detail.
+     */
+    public static final QName QNAME_FAULTDETAIL_HTTPERRORCODE = new QName(NS_URI_AXIS, "HttpErrorCode");
+
+    /**
+     * QName of a nested fault in an axis fault detail.
+     */
+    public static final QName QNAME_FAULTDETAIL_NESTEDFAULT = new QName(NS_URI_AXIS, "nestedFault");
+
+    /**
+     * QName of a hostname in an axis fault detail.
+     */
+    public static final QName QNAME_FAULTDETAIL_HOSTNAME = new QName(NS_URI_AXIS, "hostname");
+
+    //QNames of well known faults
+    /**
+     * The no-service fault value.
+     */
+    public static final QName QNAME_NO_SERVICE_FAULT_CODE
+            = new QName(NS_URI_AXIS, "Server.NoService");
+
+    // Misc Strings
+    //////////////////////////////////////////////////////////////////////////
+
+    // Where to put those pesky JWS classes
+    public static final String MC_JWS_CLASSDIR = "jws.classDir" ;
+    // Where we're rooted
+    public static final String MC_HOME_DIR = "home.dir";
+
+    // Relative path of the request URL (ie. http://.../axis/a.jws = /a.jws
+    public static final String MC_RELATIVE_PATH = "path";
+
+    // MessageContext param for the engine's path
+    public static final String MC_REALPATH = "realpath";
+    // MessageContext param for the location of config files
+    public static final String MC_CONFIGPATH = "configPath";
+    // MessageContext param for the IP of the calling client
+    public static final String MC_REMOTE_ADDR = "remoteaddr";
+    // When invoked from a servlet, per JAX-RPC, we need  a
+    // ServletEndpointContext object.  This is where it lives.
+    public static final String MC_SERVLET_ENDPOINT_CONTEXT = "servletEndpointContext";
+
+    // If we're SOAP 1.2, the default behavior in org.apache.axis.message.BodyBuilder
+    // is to throw a ProcedureNotPresent fault if we can't dispatch to an
+    // OperationDesc during deserialization.  Set this property to any non-null
+    // value to prevent this behavior (only used by test.soap12.
+    public static final String MC_NO_OPERATION_OK = "NoOperationOK";
+
+    // This property indicates we're supporting only a single SOAP version.
+    // If set (by the service or engine), we'll only accept envelopes of the
+    // specified version.  Value should be an org.apache.axis.soap.SOAPConstants
+    public static final String MC_SINGLE_SOAP_VERSION = "SingleSOAPVersion";
+
+    /**
+     * What the extension of JWS files is. If changing this, note that
+     * AxisServlet has an xdoclet declaration in the class javadocs that
+     * also needs updating.
+     */
+    public static final String JWS_DEFAULT_FILE_EXTENSION = ".jws";
+
+    /**
+     * The default timeout for messages.
+     * 
+     * @since Axis1.2
+     */
+    public static final int DEFAULT_MESSAGE_TIMEOUT=60*1000*10;
+
+    /**
+     * MIME Content Types
+     * 
+     * @since Axis1.2
+     */
+    public static final String MIME_CT_APPLICATION_OCTETSTREAM     = "application/octet-stream";
+    public static final String MIME_CT_TEXT_PLAIN         = "text/plain";
+    public static final String MIME_CT_IMAGE_JPEG        = "image/jpeg";
+    public static final String MIME_CT_IMAGE_GIF        = "image/gif";
+    public static final String MIME_CT_TEXT_XML            = "text/xml";
+    public static final String MIME_CT_APPLICATION_XML        = "application/xml";
+    public static final String MIME_CT_MULTIPART_PREFIX        = "multipart/";
+    /**
+     * @return Returns the sOAP_STYLE_RPC_ENCODED.
+     */
+    public static int getSOAP_STYLE_RPC_ENCODED() {
+        return SOAP_STYLE_RPC_ENCODED;
+    }
+}

Added: webservices/axis/trunk/java/dev/scratch/prototype1/src/java/org/apache/axis/engine/EngineUtils.java
==============================================================================
--- (empty file)
+++ webservices/axis/trunk/java/dev/scratch/prototype1/src/java/org/apache/axis/engine/EngineUtils.java	Thu Nov 18 03:16:05 2004
@@ -0,0 +1,31 @@
+/*
+ * Copyright 2003,2004 The Apache Software Foundation.
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.axis.engine;
+
+import org.apache.axis.engine.exec.ExecutionChain;
+import org.apache.axis.engine.registry.Flow;
+
+/**
+ * @author Srinath Perera (hemapani@opensource.lk)
+ */
+public class EngineUtils {
+    public static void addHandlers(Flow flow,ExecutionChain exeChain,String phaseName) throws AxisFault{
+        int handlerCount = flow.getHandlerCount();
+        for(int i = 0;i<handlerCount;i++){
+            exeChain.addHandler(phaseName,flow.getHandler(i));
+        }
+    }
+}

Added: webservices/axis/trunk/java/dev/scratch/prototype1/src/java/org/apache/axis/engine/Global.java
==============================================================================
--- (empty file)
+++ webservices/axis/trunk/java/dev/scratch/prototype1/src/java/org/apache/axis/engine/Global.java	Thu Nov 18 03:16:05 2004
@@ -0,0 +1,32 @@
+/*
+ * Copyright 2001-2004 The Apache Software Foundation.
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.axis.engine;
+
+import org.apache.axis.engine.registry.EngineElement;
+import org.apache.axis.engine.registry.FlowInclude;
+import org.apache.axis.engine.registry.Module;
+import org.apache.axis.engine.registry.ModuleInclude;
+import org.apache.axis.engine.registry.TypeMappingInclude;
+/**
+ * Executes the Handlers that should be executed  for every web Service and
+ * Contians the all global elements.   
+ */
+public interface Global extends FlowInclude,EngineElement,
+    TypeMappingInclude,ModuleInclude{
+    public int getModuleCount();
+    public Module getModule(int index);
+}

Added: webservices/axis/trunk/java/dev/scratch/prototype1/src/java/org/apache/axis/engine/Handler.java
==============================================================================
--- (empty file)
+++ webservices/axis/trunk/java/dev/scratch/prototype1/src/java/org/apache/axis/engine/Handler.java	Thu Nov 18 03:16:05 2004
@@ -0,0 +1,52 @@
+/*
+ * Copyright 2001-2004 The Apache Software Foundation.
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.axis.engine;
+
+import java.io.Serializable;
+
+import javax.xml.namespace.QName;
+
+import org.apache.axis.engine.context.MessageContext;
+import org.apache.axis.engine.registry.NamedEngineElement;
+
+public interface Handler extends Serializable,NamedEngineElement {
+    /**
+     * Invoke is called to do the actual work of the Handler object.
+     * If there is a fault during the processing of this method it is
+     * invoke's job to catch the exception and undo any partial work
+     * that has been completed.  Once we leave 'invoke' if a fault
+     * is thrown, this classes 'onFault' method will be called.
+     * Invoke should rethrow any exceptions it catches, wrapped in
+     * an AxisFault.
+     *
+     * @param msgContext    the <code>MessageContext</code> to process with this
+     *              <code>Handler</code>.
+     * @throws AxisFault if the handler encounters an error
+     */
+    public void invoke(MessageContext msgContext) throws AxisFault ;
+
+    /**
+     * Called when a subsequent handler throws a fault.
+     *
+     * @param msgContext    the <code>MessageContext</code> to process the fault
+     *              to
+     */
+    public void revoke(MessageContext msgContext);
+
+    public void setName(QName name);
+    public QName getName();
+};

Added: webservices/axis/trunk/java/dev/scratch/prototype1/src/java/org/apache/axis/engine/Operation.java
==============================================================================
--- (empty file)
+++ webservices/axis/trunk/java/dev/scratch/prototype1/src/java/org/apache/axis/engine/Operation.java	Thu Nov 18 03:16:05 2004
@@ -0,0 +1,25 @@
+/*
+ * Copyright 2001-2004 The Apache Software Foundation.
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.axis.engine;
+
+import org.apache.axis.engine.registry.FlowInclude;
+import org.apache.axis.engine.registry.NamedEngineElement;
+/**
+ * Runtime representation of the WSDL Operation
+ */
+public interface Operation extends FlowInclude,NamedEngineElement{
+}

Added: webservices/axis/trunk/java/dev/scratch/prototype1/src/java/org/apache/axis/engine/Provider.java
==============================================================================
--- (empty file)
+++ webservices/axis/trunk/java/dev/scratch/prototype1/src/java/org/apache/axis/engine/Provider.java	Thu Nov 18 03:16:05 2004
@@ -0,0 +1,25 @@
+/*
+ * Copyright 2003,2004 The Apache Software Foundation.
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.axis.engine;
+
+
+/**
+ * This Provider is the workhorse who locate the implementation of the Web Service and 
+ * invoke the Web Service. 
+ * @author Srinath Perera(hemapani@opensource.lk)
+ */
+public interface Provider extends Handler{
+}    
\ No newline at end of file

Added: webservices/axis/trunk/java/dev/scratch/prototype1/src/java/org/apache/axis/engine/Sender.java
==============================================================================
--- (empty file)
+++ webservices/axis/trunk/java/dev/scratch/prototype1/src/java/org/apache/axis/engine/Sender.java	Thu Nov 18 03:16:05 2004
@@ -0,0 +1,28 @@
+/*
+ * Copyright 2003,2004 The Apache Software Foundation.
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.axis.engine;
+
+import org.apache.axis.engine.context.MessageContext;
+
+/**
+ * @author Srinath Perera (hemapani@opensource.lk)
+ */
+public class Sender {
+    public void send(MessageContext msgCtx) throws AxisFault{
+        AxisEngine engine = new AxisEngine(msgCtx.getGlobalContext().getRegistry());
+        engine.send(msgCtx);
+    }
+}

Added: webservices/axis/trunk/java/dev/scratch/prototype1/src/java/org/apache/axis/engine/Service.java
==============================================================================
--- (empty file)
+++ webservices/axis/trunk/java/dev/scratch/prototype1/src/java/org/apache/axis/engine/Service.java	Thu Nov 18 03:16:05 2004
@@ -0,0 +1,54 @@
+/*
+ * Copyright 2001-2004 The Apache Software Foundation.
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.axis.engine;
+
+import javax.xml.namespace.QName;
+
+import org.apache.axis.engine.exec.ExecutionChain;
+import org.apache.axis.engine.registry.FlowInclude;
+import org.apache.axis.engine.registry.ModuleInclude;
+import org.apache.axis.engine.registry.NamedEngineElement;
+import org.apache.axis.engine.registry.TypeMappingInclude;
+
+/**
+ * Runtime representation of the WSDL Service
+ */
+
+public interface Service extends FlowInclude,NamedEngineElement,
+    TypeMappingInclude,ModuleInclude{
+    public Operation getOperation(QName index);
+    public void addOperation(Operation op);
+    public Handler getProvider();
+    public Handler getSender();
+    public void setProvider(Handler handler);    
+    public ClassLoader getClassLoader();
+    public void setClassLoader(ClassLoader cl); 
+    /**
+     * ExecutionChain gives all the Handlers (including the Global,  Transport, Service Handlers
+     * This is resolved by the Deployment sub system at the deployment time)
+     * @return ordered set of Handlers and Phases
+     */
+    public ExecutionChain getInputExecutionChain();
+    public void setInputExecutionChain(ExecutionChain execChain);
+    
+    public ExecutionChain getOutputExecutionChain();
+    public void setOutExecutionChain(ExecutionChain execChain);
+
+    public ExecutionChain getFaultExecutionChain();
+    public void setFaultExecutionChain(ExecutionChain execChain);
+
+}

Added: webservices/axis/trunk/java/dev/scratch/prototype1/src/java/org/apache/axis/engine/SimpleGlobal.java
==============================================================================
--- (empty file)
+++ webservices/axis/trunk/java/dev/scratch/prototype1/src/java/org/apache/axis/engine/SimpleGlobal.java	Thu Nov 18 03:16:05 2004
@@ -0,0 +1,25 @@
+/*
+ * Copyright 2001-2004 The Apache Software Foundation.
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.axis.engine;
+
+
+
+public class SimpleGlobal extends AbstractContainer implements Global{
+    public SimpleGlobal() {
+    }
+
+}

Added: webservices/axis/trunk/java/dev/scratch/prototype1/src/java/org/apache/axis/engine/SimpleModule.java
==============================================================================
--- (empty file)
+++ webservices/axis/trunk/java/dev/scratch/prototype1/src/java/org/apache/axis/engine/SimpleModule.java	Thu Nov 18 03:16:05 2004
@@ -0,0 +1,104 @@
+/*
+ * Copyright 2001-2004 The Apache Software Foundation.
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.axis.engine;
+
+import javax.xml.namespace.QName;
+
+import org.apache.axis.engine.registry.AbstractEngineElement;
+import org.apache.axis.engine.registry.Flow;
+import org.apache.axis.engine.registry.Module;
+import org.apache.axis.engine.registry.TypeMapping;
+
+public class SimpleModule extends AbstractEngineElement implements Module{
+    private Flow in;
+    private Flow out;
+    private Flow fault;
+    private QName name;
+    
+    public SimpleModule(QName name){
+        this.name = name;
+    }
+    public Flow getFaultFlow() {
+        return fault;
+    }
+
+    public Flow getInFlow() {
+        return in;
+    }
+
+    public Flow getOutFlow() {
+        return out;
+    }
+
+    public void setFaultFlow(Flow flow) {
+        this.fault = flow;
+    }
+
+    public void setInFlow(Flow flow) {
+        this.in = flow;
+    }
+
+    public void setOutFlow(Flow flow) {
+        this.out = flow;
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.axis.registry.TypeMappingInclude#addTypeMapping(org.apache.axis.registry.TypeMapping)
+     */
+    public void addTypeMapping(TypeMapping typeMapping) {
+        // TODO Auto-generated method stub
+
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.axis.registry.TypeMappingInclude#getTypeMapping(java.lang.Class)
+     */
+    public TypeMapping getTypeMapping(Class javaType) {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.axis.registry.TypeMappingInclude#getTypeMapping(int)
+     */
+    public TypeMapping getTypeMapping(int index) {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.axis.registry.TypeMappingInclude#getTypeMapping(javax.xml.namespace.QName)
+     */
+    public TypeMapping getTypeMapping(QName xmlType) {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.axis.registry.TypeMappingInclude#getTypeMappingCount()
+     */
+    public int getTypeMappingCount() {
+        // TODO Auto-generated method stub
+        return 0;
+    }
+    
+    public QName getName() {
+        return name;
+    }
+
+
+}

Added: webservices/axis/trunk/java/dev/scratch/prototype1/src/java/org/apache/axis/engine/SimpleOperation.java
==============================================================================
--- (empty file)
+++ webservices/axis/trunk/java/dev/scratch/prototype1/src/java/org/apache/axis/engine/SimpleOperation.java	Thu Nov 18 03:16:05 2004
@@ -0,0 +1,42 @@
+/*
+ * Copyright 2001-2004 The Apache Software Foundation.
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.axis.engine;
+
+import javax.xml.namespace.QName;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+
+public class SimpleOperation extends AbstractContainer implements Operation{
+    private Log log = LogFactory.getLog(getClass());   
+    private QName name;
+    private Service service;
+    
+    /**
+     * Each Operatrion must have a associated Service. The  service need to be specified 
+     * at the initialization of the Operation.  
+     * @param name
+     * @param service
+     */
+    public SimpleOperation(QName name,Service service){
+        this.name = name;
+        this.service = service;
+    }
+    public QName getName() {
+        return name;
+    }
+}

Added: webservices/axis/trunk/java/dev/scratch/prototype1/src/java/org/apache/axis/engine/SimpleService.java
==============================================================================
--- (empty file)
+++ webservices/axis/trunk/java/dev/scratch/prototype1/src/java/org/apache/axis/engine/SimpleService.java	Thu Nov 18 03:16:05 2004
@@ -0,0 +1,113 @@
+/*
+ * Copyright 2001-2004 The Apache Software Foundation.
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.axis.engine;
+
+import java.util.HashMap;
+
+import javax.xml.namespace.QName;
+
+import org.apache.axis.engine.exec.ExecutionChain;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+
+public class SimpleService extends AbstractContainer implements Service{
+    private ExecutionChain inExecChain;
+    private ExecutionChain outexecChain;
+    private ExecutionChain faultExecChain;
+    
+    public ExecutionChain getFaultExecutionChain() {
+        return faultExecChain;
+    }
+    public ExecutionChain getOutputExecutionChain() {
+        return outexecChain;
+    }
+    public void setFaultExecutionChain(ExecutionChain faultExecChain) {
+        this.faultExecChain = faultExecChain;
+    }
+
+    public void setOutExecutionChain(ExecutionChain outexecChain) {
+        this.outexecChain = outexecChain;
+    }
+
+    
+    public ExecutionChain getInputExecutionChain() {
+        return inExecChain;
+    }
+    public void setInputExecutionChain(ExecutionChain execChain) {
+        this.inExecChain = execChain;
+
+    }
+    private Log log = LogFactory.getLog(getClass());     
+    private HashMap operations = new HashMap();
+    private QName name;
+    private Handler provider;
+    private Handler sender;    
+    private ClassLoader classLoader;
+    
+    public SimpleService(QName name){
+        this.name = name;
+    } 
+    public ClassLoader getClassLoader() {
+        return Thread.currentThread().getContextClassLoader();
+    }
+
+    public Operation getOperation(QName index) {
+        return (Operation)operations.get(index);
+    }
+
+    public int getOperationCount() {
+        return operations.size();
+    }
+
+
+    public QName getName() {
+        return name;
+    }
+
+    public void addOperation(Operation op) {
+        operations.put(op.getName(),op);
+    }
+
+    public Handler getProvider() {
+        return provider;
+    }
+
+    public void setProvider(Handler provider) {
+        this.provider = provider;
+
+    }
+
+    public void setClassLoader(ClassLoader cl) {
+        this.classLoader = cl;
+
+    }
+
+    /**
+     * @return
+     */
+    public Handler getSender() {
+        return sender;
+    }
+
+    /**
+     * @param handler
+     */
+    public void setSender(Handler handler) {
+        sender = handler;
+    }
+
+}

Added: webservices/axis/trunk/java/dev/scratch/prototype1/src/java/org/apache/axis/engine/SimpleTransport.java
==============================================================================
--- (empty file)
+++ webservices/axis/trunk/java/dev/scratch/prototype1/src/java/org/apache/axis/engine/SimpleTransport.java	Thu Nov 18 03:16:05 2004
@@ -0,0 +1,32 @@
+/*
+ * Copyright 2001-2004 The Apache Software Foundation.
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.axis.engine;
+
+import javax.xml.namespace.QName;
+
+public class SimpleTransport extends AbstractContainer implements Transport{
+    private QName name;
+    
+    public SimpleTransport(QName name){
+        this.name = name;
+    }
+
+    public QName getName() {
+        return name;
+    }
+
+}

Added: webservices/axis/trunk/java/dev/scratch/prototype1/src/java/org/apache/axis/engine/Transport.java
==============================================================================
--- (empty file)
+++ webservices/axis/trunk/java/dev/scratch/prototype1/src/java/org/apache/axis/engine/Transport.java	Thu Nov 18 03:16:05 2004
@@ -0,0 +1,28 @@
+/*
+ * Copyright 2001-2004 The Apache Software Foundation.
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.axis.engine;
+
+import org.apache.axis.engine.registry.FlowInclude;
+import org.apache.axis.engine.registry.ModuleInclude;
+import org.apache.axis.engine.registry.NamedEngineElement;
+
+/**
+ * Runtime representation of the possible transport used. e.g. HTTP/SMTP
+ */
+
+public interface Transport extends FlowInclude,NamedEngineElement,ModuleInclude{
+}

Added: webservices/axis/trunk/java/dev/scratch/prototype1/src/java/org/apache/axis/engine/addressing/SOAPNodeAddress.java
==============================================================================
--- (empty file)
+++ webservices/axis/trunk/java/dev/scratch/prototype1/src/java/org/apache/axis/engine/addressing/SOAPNodeAddress.java	Thu Nov 18 03:16:05 2004
@@ -0,0 +1,24 @@
+/*
+ * Copyright 2003,2004 The Apache Software Foundation.
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.axis.engine.addressing;
+
+/**
+ * <p>represnts a address of a SOAP Node</a>
+ * @author Srinath Perera (hemapani@opensource.lk)
+ */
+public class SOAPNodeAddress {
+
+}

Added: webservices/axis/trunk/java/dev/scratch/prototype1/src/java/org/apache/axis/engine/addressing/SoapAddressingContext.java
==============================================================================
--- (empty file)
+++ webservices/axis/trunk/java/dev/scratch/prototype1/src/java/org/apache/axis/engine/addressing/SoapAddressingContext.java	Thu Nov 18 03:16:05 2004
@@ -0,0 +1,26 @@
+/*
+ * Copyright 2003,2004 The Apache Software Foundation.
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.axis.engine.addressing;
+
+/**
+ * <p>This holds the Addressing information. It is initiated by the tranport layer and the 
+ * Handlers may chage them. depend on the it's value the Transport senders choose to change the 
+ * Transport.</p>
+ * @author Srinath Perera (hemapani@opensource.lk)
+ */
+public class SoapAddressingContext {
+
+}

Added: webservices/axis/trunk/java/dev/scratch/prototype1/src/java/org/apache/axis/engine/async/Dispatcher.java
==============================================================================
--- (empty file)
+++ webservices/axis/trunk/java/dev/scratch/prototype1/src/java/org/apache/axis/engine/async/Dispatcher.java	Thu Nov 18 03:16:05 2004
@@ -0,0 +1,31 @@
+/*
+ * Copyright 2003,2004 The Apache Software Foundation.
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.axis.engine.async;
+
+/**
+ * <P>This is the code that do the Dispatching from the Mesage Quaue. But 
+ * this dispatacher is a convience purpose only and do not cover all the cases. e.g. If we need a Web Service 
+ * that put the results in to a Data base and after one or more message recived some event would generate the 
+ * response to the incoming Mesages then the data base stand at the palce of the Dispatcher. 
+ * 
+ * For async case in the server side the engine thinks it is one way and the generation of the second message back
+ * is resposnibility of the Service developer. The Dispatcher makes his work easier yet it can not hamdle all the senario's.  
+ *  
+ * @author Srinath Perera (hemapani@opensource.lk)
+ */
+public class Dispatcher {
+
+}

Added: webservices/axis/trunk/java/dev/scratch/prototype1/src/java/org/apache/axis/engine/async/MessageQueue.java
==============================================================================
--- (empty file)
+++ webservices/axis/trunk/java/dev/scratch/prototype1/src/java/org/apache/axis/engine/async/MessageQueue.java	Thu Nov 18 03:16:05 2004
@@ -0,0 +1,28 @@
+/*
+ * Copyright 2003,2004 The Apache Software Foundation.
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.axis.engine.async;
+
+import org.apache.axis.engine.context.MessageContext;
+
+/**
+ * @author Srinath Perera (hemapani@opensource.lk)
+ */
+public interface MessageQueue {
+    public void submitAJob(MessageContext msgctx);
+    public boolean hasAJob();
+    public MessageContext getNextJob();
+    
+}

Added: webservices/axis/trunk/java/dev/scratch/prototype1/src/java/org/apache/axis/engine/context/GlobalContext.java
==============================================================================
--- (empty file)
+++ webservices/axis/trunk/java/dev/scratch/prototype1/src/java/org/apache/axis/engine/context/GlobalContext.java	Thu Nov 18 03:16:05 2004
@@ -0,0 +1,75 @@
+/*
+ * Copyright 2003,2004 The Apache Software Foundation.
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.axis.engine.context;
+
+
+import java.util.HashMap;
+
+import org.apache.axis.engine.async.MessageQueue;
+import org.apache.axis.engine.registry.EngineRegistry;
+
+/**
+ * All the engine componets are stateless accross the executions and all the states should be kept in the 
+ * Contexts, there are three context Global, Session and Message  
+ * @author Srinath Perera(hemapani@opensource.lk)
+ */
+public class GlobalContext {
+    
+    private EngineRegistry registry;
+    private HashMap map = new HashMap();
+    private MessageQueue queue;
+    
+    
+    /**
+     * @return Returns the queue.
+     */
+    public MessageQueue getQueue() {
+        return queue;
+    }
+    /**
+     * @param queue The queue to set.
+     */
+    public void setQueue(MessageQueue queue) {
+        this.queue = queue;
+    }
+    public GlobalContext(EngineRegistry er){
+        this.registry = er;
+    }
+
+    public Object get(Object key) {
+        return map.get(key);
+    }
+
+    public void put(String key, Object obj) {
+        map.put(key,obj);
+
+    }
+
+    /**
+     * @return
+     */
+    public EngineRegistry getRegistry() {
+        return registry;
+    }
+
+    /**
+     * @param registry
+     */
+    public void setRegistry(EngineRegistry registry) {
+        this.registry = registry;
+    }
+
+}

Added: webservices/axis/trunk/java/dev/scratch/prototype1/src/java/org/apache/axis/engine/context/MessageContext.java
==============================================================================
--- (empty file)
+++ webservices/axis/trunk/java/dev/scratch/prototype1/src/java/org/apache/axis/engine/context/MessageContext.java	Thu Nov 18 03:16:05 2004
@@ -0,0 +1,222 @@
+/*
+ * Copyright 2001-2004 The Apache Software Foundation.
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.axis.engine.context;
+
+import java.util.HashMap;
+
+import javax.xml.namespace.QName;
+
+import org.apache.axis.engine.Constants;
+import org.apache.axis.engine.registry.EngineRegistry;
+import org.apache.axis.om.soap.SOAPMessage;
+import org.apache.axis.transport.TransportSender;
+/**
+ *  The palce where all the service specific states are kept. 
+ *  All the Global states kept in the <code>EngineRegistry</code> and all the 
+ *  Service states kept in the <code>MessageContext</code>. Other runtime
+ *  artifacts does not keep states foward from the execution.  
+ */
+public class MessageContext {
+    private int messageStyle = Constants.SOAP_STYLE_RPC_ENCODED;
+    private HashMap messages = new HashMap();
+	public static String USER_NAME = "USER";
+	public static String PASSWARD = "PASSWD";
+	
+	
+    public MessageContext(EngineRegistry er){
+        globalContext = new GlobalContext(er);
+        sessionContext = new SimpleSessionContext();
+    }
+    
+    private boolean processingFault = false;
+    private QName currentTansport = null; 
+    private QName currentService = null;
+    private QName currentOperation = null;
+    private HashMap properties = new HashMap();
+    private boolean useSOAPAction = true;
+    private String soapAction = "";   
+    private SOAPMessage inMessage;
+    private SOAPMessage outMessage;
+    private TransportSender transportSender;
+    
+    /**
+     * @return Returns the transportSender.
+     */
+    public TransportSender getTransportSender() {
+        return transportSender;
+    }
+    /**
+     * @param transportSender The transportSender to set.
+     */
+    public void setTransportSender(TransportSender transportSender) {
+        this.transportSender = transportSender;
+    }
+	/**
+	 * @return Returns the soapAction.
+	 */
+	public String getSoapAction() {
+		return soapAction;
+	}
+	/**
+	 * @param soapAction The soapAction to set.
+	 */
+	public void setSoapAction(String soapAction) {
+		this.soapAction = soapAction;
+	}
+	/**
+	 * @return Returns the useSOAPAction.
+	 */
+	public boolean isUseSOAPAction() {
+		return useSOAPAction;
+	}
+	/**
+	 * @param useSOAPAction The useSOAPAction to set.
+	 */
+	public void setUseSOAPAction(boolean useSOAPAction) {
+		this.useSOAPAction = useSOAPAction;
+	}
+    private SessionContext sessionContext;
+    private GlobalContext globalContext;
+    
+    
+    public boolean isProcessingFault(){
+        return processingFault;
+    }
+    public void setProcessingFault(boolean processingFault){
+        this.processingFault = processingFault;
+    }
+    
+    public void setProperty(String key,String value){
+    	properties.put(key,value);
+    }
+    
+    public String getProperty(String key){
+    	return (String)properties.get(key);
+    }
+    /**
+     * @return
+     */
+    public QName getCurrentTansport() {
+        return currentTansport;
+    }
+
+   
+    /**
+     * @param name
+     */
+    public void setCurrentTansport(QName name) {
+        currentTansport = name;
+    }
+
+    /**
+     * @return
+     */
+    public QName getCurrentOperation() {
+        return currentOperation;
+    }
+
+
+    /**
+     * @param name
+     */
+    public void setCurrentOperation(QName name) {
+        currentOperation = name;
+    }
+
+    /**
+     * @param name
+     */
+    public void setCurrentService(QName name) {
+        currentService = name;
+    }
+
+    /**
+     * @return
+     */
+    public QName getCurrentService() {
+        return currentService;
+    }
+
+    /**
+     * @return
+     */
+    public GlobalContext getGlobalContext() {
+        return globalContext;
+    }
+
+    /**
+     * @return
+     */
+    public SessionContext getSessionContext() {
+        return sessionContext;
+    }
+
+    /**
+     * @param context
+     */
+    public void setGlobalContext(GlobalContext context) {
+        globalContext = context;
+    }
+
+    /**
+     * @param context
+     */
+    public void setSessionContext(SessionContext context) {
+        sessionContext = context;
+    }
+
+	/**
+	 * @return Returns the inMessage.
+	 */
+	public SOAPMessage getInMessage() {
+		return inMessage;
+	}
+	/**
+	 * @param inMessage The inMessage to set.
+	 */
+	public void setInMessage(SOAPMessage inMessage) {
+		this.inMessage = inMessage;
+	}
+	/**
+	 * @return Returns the outMessage.
+	 */
+	public SOAPMessage getOutMessage() {
+		return outMessage;
+	}
+	/**
+	 * @param outMessage The outMessage to set.
+	 */
+	public void setOutMessage(SOAPMessage outMessage) {
+		this.outMessage = outMessage;
+	}
+    /**
+     * @return Returns the messageStyle.
+     */
+    public int getMessageStyle() {
+        return messageStyle;
+    }
+    /**
+     * @param messageStyle The messageStyle to set.
+     */
+    public void setMessageStyle(int messageStyle) {
+        this.messageStyle = messageStyle;
+    }
+    
+   public void addRelatedMessageContext(String key,MessageContext msgctx){
+       messages.put(key,msgctx);
+   }
+}

Added: webservices/axis/trunk/java/dev/scratch/prototype1/src/java/org/apache/axis/engine/context/SessionContext.java
==============================================================================
--- (empty file)
+++ webservices/axis/trunk/java/dev/scratch/prototype1/src/java/org/apache/axis/engine/context/SessionContext.java	Thu Nov 18 03:16:05 2004
@@ -0,0 +1,25 @@
+/*
+ * Copyright 2003,2004 The Apache Software Foundation.
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.axis.engine.context;
+/**
+ * All the engine componets are stateless accross the executions and all the states should be kept in the 
+ * Contexts, there are three context Global, Session and Message  
+ * @author Srinath Perera(hemapani@opensource.lk)
+ */
+public interface SessionContext {
+    public Object get(Object key);
+    public void put(Object key,Object obj);
+}

Added: webservices/axis/trunk/java/dev/scratch/prototype1/src/java/org/apache/axis/engine/context/SimpleSessionContext.java
==============================================================================
--- (empty file)
+++ webservices/axis/trunk/java/dev/scratch/prototype1/src/java/org/apache/axis/engine/context/SimpleSessionContext.java	Thu Nov 18 03:16:05 2004
@@ -0,0 +1,33 @@
+/*
+ * Copyright 2003,2004 The Apache Software Foundation.
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.axis.engine.context;
+
+import java.util.HashMap;
+
+/**
+ * @author Srinath Perera(hemapani@opensource.lk)
+ */
+public class SimpleSessionContext implements SessionContext {
+    private HashMap map = new HashMap();
+    public Object get(Object key) {
+        return map.get(key);
+    }
+
+    public void put(Object key, Object obj) {
+        map.put(key,obj);
+
+    }
+}

Added: webservices/axis/trunk/java/dev/scratch/prototype1/src/java/org/apache/axis/engine/exec/Constants.java
==============================================================================
--- (empty file)
+++ webservices/axis/trunk/java/dev/scratch/prototype1/src/java/org/apache/axis/engine/exec/Constants.java	Thu Nov 18 03:16:05 2004
@@ -0,0 +1,25 @@
+/*
+ * Copyright 2003,2004 The Apache Software Foundation.
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.axis.engine.exec;
+
+/**
+ * @author Srinath Perera (hemapani@opensource.lk)
+ */
+public class Constants {
+    public static final String PHASE_SERVICE = "service";
+    public static final String PHASE_TRANSPORT = "transport";
+    public static final String PHASE_GLOBAL = "global";
+}

Added: webservices/axis/trunk/java/dev/scratch/prototype1/src/java/org/apache/axis/engine/exec/ExecutionChain.java
==============================================================================
--- (empty file)
+++ webservices/axis/trunk/java/dev/scratch/prototype1/src/java/org/apache/axis/engine/exec/ExecutionChain.java	Thu Nov 18 03:16:05 2004
@@ -0,0 +1,88 @@
+/*
+ * Copyright 2003,2004 The Apache Software Foundation.
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.axis.engine.exec;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.Stack;
+
+import org.apache.axis.engine.AxisFault;
+import org.apache.axis.engine.Handler;
+import org.apache.axis.engine.context.MessageContext;
+
+/**
+ * <p>This is the ordered Collection of Phases as specified by the Server.xml file.</p> 
+ * @author Srinath Perera (hemapani@opensource.lk)
+ */
+public class ExecutionChain {
+    private HashMap phases;
+    private ArrayList executionList;
+    
+    public ExecutionChain(){
+        phases = new HashMap();
+        executionList = new ArrayList();
+    }
+    
+    public void addPhase(Phase phase){
+        phases.put(phase.getPhaseName(),phase);
+        executionList.add(phase);
+    }
+    
+    public void addHandlerDirectly(Handler directHandler,int index){
+        phases.put(directHandler.getName(),directHandler);
+        executionList.add(index,directHandler);
+    }
+
+    public void addHandler(String phaseName,Handler handler,int index){
+        Phase phase = (Phase)phases.get(phaseName);
+        phase.addHandler(handler,index);
+    }
+
+    
+    public void addHandler(String phaseName,Handler handler) throws AxisFault{
+        Phase phase = (Phase)phases.get(phaseName);
+        if(phase == null)
+            throw new AxisFault("Can't find the Phase "+phaseName);
+        phase.addHandler(handler);
+    }
+    
+    public void invoke(MessageContext msgctx)throws AxisFault{
+        Stack executionStack = new Stack();
+        try{
+            for(int i = 0;i<executionList.size();i++){
+                Handler phase = (Handler)executionList.get(i);
+                if(phase != null){
+                    executionStack.push(phase);
+                    phase.invoke(msgctx);
+                }
+            }
+        }catch(Exception e){
+            while(executionStack.isEmpty()){
+                Handler handler  = (Handler)executionStack.pop();
+                handler.revoke(msgctx);
+            }
+            throw AxisFault.makeFault(e);
+        }    
+    }
+    public void revoke(MessageContext msgctx)throws AxisFault{
+        for(int i = executionList.size()-1;i > -1;i--){
+            Phase phase = (Phase)executionList.get(i);
+            if(phase != null){
+                phase.revoke(msgctx);
+            }
+        }
+    }
+}

Added: webservices/axis/trunk/java/dev/scratch/prototype1/src/java/org/apache/axis/engine/exec/Phase.java
==============================================================================
--- (empty file)
+++ webservices/axis/trunk/java/dev/scratch/prototype1/src/java/org/apache/axis/engine/exec/Phase.java	Thu Nov 18 03:16:05 2004
@@ -0,0 +1,97 @@
+/*
+ * Copyright 2003,2004 The Apache Software Foundation.
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.axis.engine.exec;
+
+import java.util.ArrayList;
+import java.util.Stack;
+
+import org.apache.axis.engine.AxisFault;
+import org.apache.axis.engine.Handler;
+import org.apache.axis.engine.context.MessageContext;
+import org.apache.axis.handlers.AbstractHandler;
+
+/**
+ * <p>This is Phase, a orderd collection of Handlers. 
+ * seems this is Handler Chain with order.</p> 
+ * Should this exttends Hanlders?
+ * 
+ * @author Srinath Perera (hemapani@opensource.lk)
+ */
+public class Phase extends AbstractHandler implements Handler{
+    private String phaseName;
+    private ArrayList handlers;
+    
+    public Phase(String phaseName){
+        handlers = new ArrayList();
+        this.phaseName = phaseName;
+    }
+    
+    public void addHandler(Handler handler, int index){
+        handlers.add(index,handler);
+    }
+    /**
+     * add to next empty handler
+     * @param handler
+     */
+    public void addHandler(Handler handler){
+        handlers.add(handler);
+    }
+    
+    /**
+     * If need to see how this works look at the stack!
+     * @param msgctx
+     * @throws AxisFault
+     */
+    
+    public void invoke(MessageContext msgctx)throws AxisFault{
+        Stack executionStack = new Stack();
+        try{
+            for(int i = 0;i<handlers.size();i++){
+                Handler handler = (Handler)handlers.get(i);
+                if(handler != null){
+                    executionStack.push(handler);
+                    handler.invoke(msgctx);
+                }
+            }
+        }catch(Exception e){
+            while(executionStack.isEmpty()){
+                Handler handler  = (Handler)executionStack.pop();
+                handler.revoke(msgctx);
+            }
+            throw AxisFault.makeFault(e);
+        }    
+    }
+    public void revoke(MessageContext msgctx){
+        for(int i = handlers.size()-1;i > -1;i--){
+            Handler handler = (Handler)handlers.get(i);
+            if(handler != null){
+                handler.revoke(msgctx);
+            }
+        }
+    }
+    /**
+     * @return Returns the name.
+     */
+    public String getPhaseName() {
+        return phaseName;
+    }
+    /**
+     * @param name The name to set.
+     */
+    public void setName(String phaseName) {
+        this.phaseName = phaseName;
+    }
+}

Added: webservices/axis/trunk/java/dev/scratch/prototype1/src/java/org/apache/axis/engine/registry/AbstractEngineElement.java
==============================================================================
--- (empty file)
+++ webservices/axis/trunk/java/dev/scratch/prototype1/src/java/org/apache/axis/engine/registry/AbstractEngineElement.java	Thu Nov 18 03:16:05 2004
@@ -0,0 +1,40 @@
+/*
+ * Copyright 2001-2004 The Apache Software Foundation.
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.axis.engine.registry;
+
+import java.util.HashMap;
+
+import org.apache.axis.engine.AxisFault;
+/**
+ * This is not a abstract class so the users can wrapped it.
+ * @author Srinath Perera(hemapani@opensource.lk)* 
+ */
+public class AbstractEngineElement implements EngineElement{
+    private HashMap parameterMap;
+    public AbstractEngineElement() {
+        parameterMap = new HashMap();
+    }
+    public void cleanup()throws AxisFault {}
+    public void init()throws AxisFault {}
+    public void addParameter(Parameter param) {
+        parameterMap.put(param.getName(),param);
+
+    }
+    public Parameter getParameter(String key) {
+        return (Parameter)parameterMap.get(key);
+    }
+}

Added: webservices/axis/trunk/java/dev/scratch/prototype1/src/java/org/apache/axis/engine/registry/ConcreateFlow.java
==============================================================================
--- (empty file)
+++ webservices/axis/trunk/java/dev/scratch/prototype1/src/java/org/apache/axis/engine/registry/ConcreateFlow.java	Thu Nov 18 03:16:05 2004
@@ -0,0 +1,40 @@
+/*
+ * Copyright 2001-2004 The Apache Software Foundation.
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.axis.engine.registry;
+
+import java.util.Vector;
+
+import org.apache.axis.engine.Handler;
+
+/**
+ * @author hemapani@opensource.lk
+ */
+public class ConcreateFlow implements Flow {
+   protected Vector list = null; 
+   public ConcreateFlow(){
+        list = new Vector();
+   }
+   public void addHandler(Handler handler) {
+       list.add(handler);
+   }
+   public Handler getHandler(int index) {
+       return (Handler)list.get(index);
+   }
+   public int getHandlerCount() {
+       return list.size();
+   }
+}

Added: webservices/axis/trunk/java/dev/scratch/prototype1/src/java/org/apache/axis/engine/registry/ConcreateFlowInclude.java
==============================================================================
--- (empty file)
+++ webservices/axis/trunk/java/dev/scratch/prototype1/src/java/org/apache/axis/engine/registry/ConcreateFlowInclude.java	Thu Nov 18 03:16:05 2004
@@ -0,0 +1,49 @@
+/*
+ * Copyright 2001-2004 The Apache Software Foundation.
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.axis.engine.registry;
+
+/**
+ * @author hemapani@opensource.lk
+ */
+public class ConcreateFlowInclude implements FlowInclude {
+    private Flow in;
+    private Flow out;
+    private Flow fault;
+    public Flow getFaultFlow() {
+        return fault;
+    }
+
+    public Flow getInFlow() {
+        return in;
+    }
+
+    public Flow getOutFlow() {
+        return out;
+    }
+
+    public void setFaultFlow(Flow flow) {
+        this.fault = flow;
+    }
+
+    public void setInFlow(Flow flow) {
+        this.in = flow;
+    }
+
+    public void setOutFlow(Flow flow) {
+        this.out = flow;
+    }
+}

Added: webservices/axis/trunk/java/dev/scratch/prototype1/src/java/org/apache/axis/engine/registry/ConcreateModuleInclude.java
==============================================================================
--- (empty file)
+++ webservices/axis/trunk/java/dev/scratch/prototype1/src/java/org/apache/axis/engine/registry/ConcreateModuleInclude.java	Thu Nov 18 03:16:05 2004
@@ -0,0 +1,39 @@
+/*
+ * Copyright 2001-2004 The Apache Software Foundation.
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.axis.engine.registry;
+
+import java.util.Vector;
+
+/**
+ * @author hemapani@opensource.lk
+ */
+public class ConcreateModuleInclude implements ModuleInclude {
+    private Vector modules;
+
+    public ConcreateModuleInclude(){
+        this.modules = new Vector();
+    }
+    public Module getModule(int index) {
+        return (Module)modules.get(index);
+    }
+    public int getModuleCount() {
+       return modules.size();
+    }
+    public void addModule(Module module) {
+        modules.add(module);
+    }
+}

Added: webservices/axis/trunk/java/dev/scratch/prototype1/src/java/org/apache/axis/engine/registry/ConcreateParameter.java
==============================================================================
--- (empty file)
+++ webservices/axis/trunk/java/dev/scratch/prototype1/src/java/org/apache/axis/engine/registry/ConcreateParameter.java	Thu Nov 18 03:16:05 2004
@@ -0,0 +1,43 @@
+/*
+ * Copyright 2003,2004 The Apache Software Foundation.
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.axis.engine.registry;
+
+
+/**
+ * @author Srinath Perera(hemapani@opensource.lk)
+ */
+public class ConcreateParameter implements Parameter  {
+    private String name;
+    private String value;
+    private int type = TEXT_PARAMETER;
+    
+    public ConcreateParameter(String name,String value) {
+        this.name = name;
+        this.value = value;
+    }
+
+    public String getName() {
+        return name;
+    }
+
+    public Object getValue() {
+        return value;
+    }
+    public int getParameterType() {
+        return type;
+    }
+
+}

Added: webservices/axis/trunk/java/dev/scratch/prototype1/src/java/org/apache/axis/engine/registry/ConcreateTypeMappingInclude.java
==============================================================================
--- (empty file)
+++ webservices/axis/trunk/java/dev/scratch/prototype1/src/java/org/apache/axis/engine/registry/ConcreateTypeMappingInclude.java	Thu Nov 18 03:16:05 2004
@@ -0,0 +1,61 @@
+/*
+ * Copyright 2001-2004 The Apache Software Foundation.
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.axis.engine.registry;
+
+import java.util.HashMap;
+import java.util.Vector;
+
+import javax.xml.namespace.QName;
+
+/**
+ * @author hemapani@opensource.lk
+ */
+public class ConcreateTypeMappingInclude implements TypeMappingInclude{
+    private HashMap javamapping;
+    private HashMap xmlmapping;
+    private Vector mappingValues;
+    
+    public ConcreateTypeMappingInclude(){
+        javamapping = new HashMap();
+        xmlmapping = new HashMap();
+        mappingValues = new Vector();
+    }
+    
+    public void addTypeMapping(TypeMapping typeMapping) {
+        mappingValues.add(typeMapping); 
+        javamapping.put(typeMapping.getJavaType().getName(),typeMapping); 
+        xmlmapping.put(typeMapping.getXMLType(),typeMapping);
+
+    }
+
+    public TypeMapping getTypeMapping(Class javaType) {
+        return (TypeMapping)javamapping.get(javaType);
+    }
+
+    public TypeMapping getTypeMapping(int index) {
+        return (TypeMapping)mappingValues.get(index);
+    }
+
+    public TypeMapping getTypeMapping(QName xmlType) {
+        return (TypeMapping)xmlmapping.get(xmlType);
+    }
+
+    public int getTypeMappingCount() {
+        return mappingValues.size();
+    }
+
+}

Added: webservices/axis/trunk/java/dev/scratch/prototype1/src/java/org/apache/axis/engine/registry/EngineElement.java
==============================================================================
--- (empty file)
+++ webservices/axis/trunk/java/dev/scratch/prototype1/src/java/org/apache/axis/engine/registry/EngineElement.java	Thu Nov 18 03:16:05 2004
@@ -0,0 +1,28 @@
+/*
+ * Copyright 2001-2004 The Apache Software Foundation.
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.axis.engine.registry;
+
+import org.apache.axis.engine.AxisFault;
+/**
+ * This is the base class of all the elements in the Engine Registry Object Model. 
+ */
+public interface EngineElement {
+    public void init()throws AxisFault;
+    public void cleanup()throws AxisFault;
+    public Parameter getParameter(String key);
+    public void addParameter(Parameter param);
+}

Added: webservices/axis/trunk/java/dev/scratch/prototype1/src/java/org/apache/axis/engine/registry/EngineRegistry.java
==============================================================================
--- (empty file)
+++ webservices/axis/trunk/java/dev/scratch/prototype1/src/java/org/apache/axis/engine/registry/EngineRegistry.java	Thu Nov 18 03:16:05 2004
@@ -0,0 +1,52 @@
+/*
+ * Copyright 2001-2004 The Apache Software Foundation.
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.axis.engine.registry;
+
+import javax.xml.namespace.QName;
+
+import org.apache.axis.engine.AxisFault;
+import org.apache.axis.engine.Global;
+import org.apache.axis.engine.Service;
+import org.apache.axis.engine.Transport;
+
+/**
+ *  The palce where all the Globel states of Axis is kept. 
+ *  All the Global states kept in the <code>EngineRegistry</code> and all the 
+ *  Service states kept in the <code>MessageContext</code>. Other runtime
+ *  artifacts does not keep states foward from the execution.  
+ */
+
+public interface EngineRegistry {
+    public Global getGlobal()throws AxisFault;
+    
+    public int getTransportCount()throws AxisFault;
+    public Transport getTransPort(QName name)throws AxisFault;
+    public Transport getTransPort(int index)throws AxisFault;
+    public void addTransport(Transport transport)throws AxisFault;
+    public void removeTransport(QName name)throws AxisFault;
+    
+    public int getServiceCount()throws AxisFault;
+    public Service getService(QName name)throws AxisFault;
+    public Service getService(int index)throws AxisFault;
+    public void addService(Service service)throws AxisFault;
+    public void removeService(QName name)throws AxisFault;
+    
+    public int getModuleCount()throws AxisFault;
+    public Module getModule(QName name)throws AxisFault;
+    public Module getModule(int index)throws AxisFault;
+    public void addMdoule(Module module)throws AxisFault;
+}

Added: webservices/axis/trunk/java/dev/scratch/prototype1/src/java/org/apache/axis/engine/registry/Flow.java
==============================================================================
--- (empty file)
+++ webservices/axis/trunk/java/dev/scratch/prototype1/src/java/org/apache/axis/engine/registry/Flow.java	Thu Nov 18 03:16:05 2004
@@ -0,0 +1,28 @@
+/*
+ * Copyright 2001-2004 The Apache Software Foundation.
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.axis.engine.registry;
+
+import org.apache.axis.engine.Handler;
+/**
+ * Represents logical collection of handlers. The order of Handlers do not have 
+ * any symantics.
+ */
+public interface Flow{
+    public int getHandlerCount();
+    public Handler getHandler(int index);
+    public void addHandler(Handler handler);
+}

Added: webservices/axis/trunk/java/dev/scratch/prototype1/src/java/org/apache/axis/engine/registry/FlowInclude.java
==============================================================================
--- (empty file)
+++ webservices/axis/trunk/java/dev/scratch/prototype1/src/java/org/apache/axis/engine/registry/FlowInclude.java	Thu Nov 18 03:16:05 2004
@@ -0,0 +1,30 @@
+/*
+ * Copyright 2001-2004 The Apache Software Foundation.
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.axis.engine.registry;
+/**
+ * Logical Bag of Flows, a inflow, outflow,faultflow  
+ */
+public interface FlowInclude{
+    public Flow getInFlow();
+    public Flow getOutFlow();
+    public Flow getFaultFlow();
+    
+    public void setInFlow(Flow flow);
+    public void setOutFlow(Flow flow);
+    public void setFaultFlow(Flow flow);
+
+}

Added: webservices/axis/trunk/java/dev/scratch/prototype1/src/java/org/apache/axis/engine/registry/Module.java
==============================================================================
--- (empty file)
+++ webservices/axis/trunk/java/dev/scratch/prototype1/src/java/org/apache/axis/engine/registry/Module.java	Thu Nov 18 03:16:05 2004
@@ -0,0 +1,25 @@
+/*
+ * Copyright 2001-2004 The Apache Software Foundation.
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.axis.engine.registry;
+
+/**
+ * Logical agrigation of TypeMapping,Handlers 
+ */
+
+public interface Module extends FlowInclude,NamedEngineElement,TypeMappingInclude{
+    
+}

Added: webservices/axis/trunk/java/dev/scratch/prototype1/src/java/org/apache/axis/engine/registry/ModuleInclude.java
==============================================================================
--- (empty file)
+++ webservices/axis/trunk/java/dev/scratch/prototype1/src/java/org/apache/axis/engine/registry/ModuleInclude.java	Thu Nov 18 03:16:05 2004
@@ -0,0 +1,26 @@
+/*
+ * Copyright 2001-2004 The Apache Software Foundation.
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.axis.engine.registry;
+/**
+ * Logical Bag of Modules, a inflow, outflow,faultflow  
+ */
+public interface ModuleInclude {
+    public int getModuleCount();
+    public Module getModule(int index);
+    public void addModule(Module module);
+
+}

Added: webservices/axis/trunk/java/dev/scratch/prototype1/src/java/org/apache/axis/engine/registry/NamedEngineElement.java
==============================================================================
--- (empty file)
+++ webservices/axis/trunk/java/dev/scratch/prototype1/src/java/org/apache/axis/engine/registry/NamedEngineElement.java	Thu Nov 18 03:16:05 2004
@@ -0,0 +1,25 @@
+/*
+ * Copyright 2001-2004 The Apache Software Foundation.
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.axis.engine.registry;
+
+import javax.xml.namespace.QName;
+/**
+ * Engine element which has a name. 
+ */
+public interface NamedEngineElement extends EngineElement{
+    public QName getName();
+}

Added: webservices/axis/trunk/java/dev/scratch/prototype1/src/java/org/apache/axis/engine/registry/Parameter.java
==============================================================================
--- (empty file)
+++ webservices/axis/trunk/java/dev/scratch/prototype1/src/java/org/apache/axis/engine/registry/Parameter.java	Thu Nov 18 03:16:05 2004
@@ -0,0 +1,26 @@
+/*
+ * Copyright 2001-2004 The Apache Software Foundation.
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.axis.engine.registry;
+
+public interface Parameter {
+    public static int TEXT_PARAMETER = 0;
+    public static int DOM_PARAMETER = 1; 
+    
+    public String getName();
+    public Object getValue();
+    public int getParameterType();
+}

Added: webservices/axis/trunk/java/dev/scratch/prototype1/src/java/org/apache/axis/engine/registry/SimpleEngineRegistry.java
==============================================================================
--- (empty file)
+++ webservices/axis/trunk/java/dev/scratch/prototype1/src/java/org/apache/axis/engine/registry/SimpleEngineRegistry.java	Thu Nov 18 03:16:05 2004
@@ -0,0 +1,108 @@
+/*
+ * Copyright 2001-2004 The Apache Software Foundation.
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.axis.engine.registry;
+
+import java.util.ArrayList;
+
+import javax.xml.namespace.QName;
+
+import org.apache.axis.engine.AxisFault;
+import org.apache.axis.engine.Global;
+import org.apache.axis.engine.Service;
+import org.apache.axis.engine.Transport;
+import org.apache.axis.utils.HashedBaundle;
+
+public class SimpleEngineRegistry implements EngineRegistry{
+    private HashedBaundle modules;
+    private HashedBaundle transports;
+    private HashedBaundle services;
+    private Global global;
+    
+    public SimpleEngineRegistry(Global global){
+        this.modules = new HashedBaundle();
+        this.transports = new HashedBaundle();
+        this.services = new HashedBaundle();
+        this.global = global;
+    
+    }
+    public Global getGlobal() throws AxisFault {
+        return global;
+    }
+
+    public Module getModule(int index) throws AxisFault {
+        return (Module)modules.get(index);
+    }
+
+    public Module getModule(QName name) throws AxisFault {
+        return (Module)modules.get(name);
+    }
+
+    public int getModuleCount() throws AxisFault {
+        return modules.getCount();
+    }
+
+    public ArrayList getPahsesInOrder() throws AxisFault {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    public Service getService(int index) throws AxisFault {
+        return (Service)services.get(index);
+    }
+
+    public Service getService(QName name) throws AxisFault {
+        return (Service)services.get(name);
+    }
+
+    public int getServiceCount() throws AxisFault {
+        return services.getCount();
+    }
+
+    public Transport getTransPort(int index) throws AxisFault {
+        return (Transport)transports.get(index);
+    }
+
+    public Transport getTransPort(QName name) throws AxisFault {
+        return (Transport)transports.get(name);
+    }
+
+    public int getTransportCount() throws AxisFault {
+        return transports.getCount();
+    }
+
+    public void addMdoule(Module module) throws AxisFault {
+        modules.add(module.getName(),module);
+    }
+
+    public void addService(Service service) throws AxisFault {
+        services.add(service.getName(),service);
+
+    }
+
+    public void addTransport(Transport transport) throws AxisFault {
+        transports.add(transport.getName(),transport);
+    }
+
+    public void removeService(QName name) throws AxisFault {
+        services.remove(name);
+    }
+
+    public void removeTransport(QName name) throws AxisFault {
+        transports.remove(name);
+    }
+
+}

Added: webservices/axis/trunk/java/dev/scratch/prototype1/src/java/org/apache/axis/engine/registry/TypeMapping.java
==============================================================================
--- (empty file)
+++ webservices/axis/trunk/java/dev/scratch/prototype1/src/java/org/apache/axis/engine/registry/TypeMapping.java	Thu Nov 18 03:16:05 2004
@@ -0,0 +1,33 @@
+/*
+ * Copyright 2001-2004 The Apache Software Foundation.
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.axis.engine.registry;
+
+import javax.xml.namespace.QName;
+
+/**
+ * @author hemapani@opensource.lk
+ */
+public interface TypeMapping {
+    public QName getXMLType();
+    public Class getJavaType();
+    /**
+     * @param style say it is litral or encoding 
+     * @return
+     */
+    public Class getSerializer4Type(String style);
+    public Class getDeserailizer4Type(String style);
+}

Added: webservices/axis/trunk/java/dev/scratch/prototype1/src/java/org/apache/axis/engine/registry/TypeMappingInclude.java
==============================================================================
--- (empty file)
+++ webservices/axis/trunk/java/dev/scratch/prototype1/src/java/org/apache/axis/engine/registry/TypeMappingInclude.java	Thu Nov 18 03:16:05 2004
@@ -0,0 +1,27 @@
+/*
+ * Copyright 2001-2004 The Apache Software Foundation.
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.axis.engine.registry;
+
+import javax.xml.namespace.QName;
+
+public interface TypeMappingInclude {
+    public int getTypeMappingCount();
+    public TypeMapping getTypeMapping(int index);
+    public TypeMapping getTypeMapping(QName xmlType);
+    public TypeMapping getTypeMapping(Class javaType);
+    public void addTypeMapping(TypeMapping typeMapping);
+}

Added: webservices/axis/trunk/java/dev/scratch/prototype1/src/java/org/apache/axis/handlers/AbstractHandler.java
==============================================================================
--- (empty file)
+++ webservices/axis/trunk/java/dev/scratch/prototype1/src/java/org/apache/axis/handlers/AbstractHandler.java	Thu Nov 18 03:16:05 2004
@@ -0,0 +1,51 @@
+/*
+ * Copyright 2003,2004 The Apache Software Foundation.
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.axis.handlers;
+
+import javax.xml.namespace.QName;
+
+import org.apache.axis.engine.AxisFault;
+import org.apache.axis.engine.Handler;
+import org.apache.axis.engine.context.MessageContext;
+import org.apache.axis.engine.registry.Parameter;
+
+/**
+ * @author Srinath Perera (hemapani@opensource.lk)
+ */
+public abstract class AbstractHandler implements Handler{
+    private QName name;
+    public QName getName() {
+        return name;
+    }
+    public void invoke(MessageContext msgContext) throws AxisFault {
+    }
+    public void revoke(MessageContext msgContext){
+    }
+    public void setName(QName name) {
+        this.name = name;
+    }
+    public void addParameter(Parameter param) {
+            //TODO
+    }
+    public void cleanup() throws AxisFault {
+    }
+    public Parameter getParameter(String key) {
+        //TODO
+        return null;
+    }
+    public void init() throws AxisFault {
+    }
+}

Added: webservices/axis/trunk/java/dev/scratch/prototype1/src/java/org/apache/axis/handlers/DocLitOpNameFinder.java
==============================================================================
--- (empty file)
+++ webservices/axis/trunk/java/dev/scratch/prototype1/src/java/org/apache/axis/handlers/DocLitOpNameFinder.java	Thu Nov 18 03:16:05 2004
@@ -0,0 +1,23 @@
+/*
+ * Copyright 2003,2004 The Apache Software Foundation.
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.axis.handlers;
+
+/**
+ * @author Srinath Perera (hemapani@opensource.lk)
+ */
+public class DocLitOpNameFinder {
+
+}

Added: webservices/axis/trunk/java/dev/scratch/prototype1/src/java/org/apache/axis/handlers/RPCOpNameFinder.java
==============================================================================
--- (empty file)
+++ webservices/axis/trunk/java/dev/scratch/prototype1/src/java/org/apache/axis/handlers/RPCOpNameFinder.java	Thu Nov 18 03:16:05 2004
@@ -0,0 +1,70 @@
+/*
+ * Copyright 2003,2004 The Apache Software Foundation.
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.axis.handlers;
+
+import java.util.Iterator;
+
+import javax.xml.namespace.QName;
+
+import org.apache.axis.engine.AxisFault;
+import org.apache.axis.engine.Constants;
+import org.apache.axis.engine.context.MessageContext;
+import org.apache.axis.om.OMElement;
+import org.apache.axis.om.OMNamespace;
+import org.apache.axis.om.OMNode;
+import org.apache.axis.om.soap.SOAPMessage;
+
+/**
+ * @author Srinath Perera (hemapani@opensource.lk)
+ */
+public class RPCOpNameFinder extends AbstractHandler{
+    public void invoke(MessageContext msgContext) throws AxisFault {
+        int style = msgContext.getMessageStyle();
+        if(Constants.SOAP_STYLE_RPC_ENCODED == style || style == Constants.SOAP_STYLE_RPC_LITERAL){
+            SOAPMessage message = msgContext.getInMessage();
+            OMNode node = null;
+            OMElement element = message.getEnvelope().getBody();
+            if(Constants.ELEM_BODY.equals(element.getLocalName())){
+                Iterator bodychilderen = element.getChildren();
+                while(bodychilderen.hasNext()){
+                    node = (OMNode)bodychilderen.next();
+                    
+                    //TODO
+                    if(node == null){
+                        System.out.println("Why the some nodes are null :( :( :(");
+                        continue; 
+                    }
+                    
+                    if(node.getType() == OMNode.ELEMENT_NODE){
+                        OMElement bodyChild  = (OMElement)node;
+                    
+                        OMNamespace omns = bodyChild.getNamespace();
+    
+                        if(omns != null){
+                            String ns = omns.getValue();
+                            if(ns != null){
+                                msgContext.setCurrentOperation(new QName(ns,bodyChild.getLocalName())); 
+                            }
+                        }else{
+                            throw new AxisFault("SOAP Body must be NS Qualified");                            
+                        }
+                
+                    }    
+                }
+            }
+        }
+    }
+}

Added: webservices/axis/trunk/java/dev/scratch/prototype1/src/java/org/apache/axis/i18n/MessageBundle.java
==============================================================================
--- (empty file)
+++ webservices/axis/trunk/java/dev/scratch/prototype1/src/java/org/apache/axis/i18n/MessageBundle.java	Thu Nov 18 03:16:05 2004
@@ -0,0 +1,205 @@
+/*
+ * Copyright 2001-2004 The Apache Software Foundation.
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.axis.i18n;
+
+import java.text.MessageFormat;
+import java.util.Locale;
+import java.util.MissingResourceException;
+import java.util.ResourceBundle;
+
+/**
+ * Accept parameters for ProjectResourceBundle,
+ * but defer object instantiation (and therefore
+ * resource bundle loading) until required.
+ * 
+ * @author Richard A. Sitze (rsitze@us.ibm.com)
+ * @author Karl Moss (kmoss@macromedia.com)
+ * @author Glen Daniels (gdaniels@apache.org)
+ */
+public class MessageBundle {
+    private boolean loaded = false;
+    
+    private ProjectResourceBundle _resourceBundle = null;
+
+    private final String projectName;
+    private final String packageName;
+    private final String resourceName;
+    private final Locale locale;
+    private final ClassLoader classLoader;
+    private final ResourceBundle parent;
+
+
+    public final ProjectResourceBundle getResourceBundle() {
+        if (!loaded) {
+            _resourceBundle = ProjectResourceBundle.getBundle(projectName,
+                                                              packageName,
+                                                              resourceName,
+                                                              locale,
+                                                              classLoader,
+                                                              parent);
+            loaded = true;
+        }
+        return _resourceBundle;
+    }
+
+    /**
+     * Construct a new ExtendMessages
+     */
+    public MessageBundle(String projectName,
+                             String packageName,
+                             String resourceName,
+                             Locale locale,
+                             ClassLoader classLoader,
+                             ResourceBundle parent)
+        throws MissingResourceException
+    {
+        this.projectName = projectName;
+        this.packageName = packageName;
+        this.resourceName = resourceName;
+        this.locale = locale;
+        this.classLoader = classLoader;
+        this.parent = parent;
+    }
+
+    /**
+      * Gets a string message from the resource bundle for the given key
+      * @param key The resource key
+      * @return The message
+      */
+    public String getMessage(String key) throws MissingResourceException
+    {
+        return getMessage(key, (String[]) null);
+    }
+
+    /**
+      * <p>Gets a string message from the resource bundle for the given key. The
+      * message may contain variables that will be substituted with the given
+      * arguments. Variables have the format:</p>
+      * <dir>
+      * This message has two variables: {0} and {1}
+      * </dir>
+      * @param key The resource key
+      * @param arg0 The argument to place in variable {0}
+      * @return The message
+      */
+    public String getMessage(String key, String arg0) throws MissingResourceException
+    {
+        return getMessage(key, new String[] { arg0 });
+    }
+
+    /**
+      * <p>Gets a string message from the resource bundle for the given key. The
+      * message may contain variables that will be substituted with the given
+      * arguments. Variables have the format:</p>
+      * <dir>
+      * This message has two variables: {0} and {1}
+      * </dir>
+      * @param key The resource key
+      * @param arg0 The argument to place in variable {0}
+      * @param arg1 The argument to place in variable {1}
+      * @return The message
+      */
+    public String getMessage(String key, String arg0, String arg1) throws MissingResourceException
+    {
+        return getMessage(key, new String[] { arg0, arg1 });
+    }
+
+    /**
+      * <p>Gets a string message from the resource bundle for the given key. The
+      * message may contain variables that will be substituted with the given
+      * arguments. Variables have the format:</p>
+      * <dir>
+      * This message has two variables: {0} and {1}
+      * </dir>
+      * @param key The resource key
+      * @param arg0 The argument to place in variable {0}
+      * @param arg1 The argument to place in variable {1}
+      * @param arg2 The argument to place in variable {2}
+      * @return The message
+      */
+    public String getMessage(String key, String arg0, String arg1, String arg2) throws MissingResourceException
+    {
+        return getMessage(key, new String[] { arg0, arg1, arg2 });
+    }
+
+    /**
+      * <p>Gets a string message from the resource bundle for the given key. The
+      * message may contain variables that will be substituted with the given
+      * arguments. Variables have the format:</p>
+      * <dir>
+      * This message has two variables: {0} and {1}
+      * </dir>
+      * @param key The resource key
+      * @param arg0 The argument to place in variable {0}
+      * @param arg1 The argument to place in variable {1}
+      * @param arg2 The argument to place in variable {2}
+      * @param arg3 The argument to place in variable {3}
+      * @return The message
+      */
+    public String getMessage(String key, String arg0, String arg1, String arg2, String arg3) throws MissingResourceException
+    {
+        return getMessage(key, new String[] { arg0, arg1, arg2, arg3 });
+    }
+
+    /**
+      * <p>Gets a string message from the resource bundle for the given key. The
+      * message may contain variables that will be substituted with the given
+      * arguments. Variables have the format:</p>
+      * <dir>
+      * This message has two variables: {0} and {1}
+      * </dir>
+      * @param key The resource key
+      * @param arg0 The argument to place in variable {0}
+      * @param arg1 The argument to place in variable {1}
+      * @param arg2 The argument to place in variable {2}
+      * @param arg3 The argument to place in variable {3}
+      * @param arg4 The argument to place in variable {4}
+      * @return The message
+      */
+    public String getMessage(String key, String arg0, String arg1, String arg2, String arg3, String arg4) throws MissingResourceException
+    {
+        return getMessage(key, new String[] { arg0, arg1, arg2, arg3, arg4 });
+    }
+
+    /**
+      * <p>Gets a string message from the resource bundle for the given key. The
+      * message may contain variables that will be substituted with the given
+      * arguments. Variables have the format:</p>
+      * <dir>
+      * This message has two variables: {0} and {1}
+      * </dir>
+      * @param key The resource key
+      * @param array An array of objects to place in corresponding variables
+      * @return The message
+      */
+    public String getMessage(String key, String[] array) throws MissingResourceException
+    {
+        String msg = null;
+        if (getResourceBundle() != null) {
+            msg = getResourceBundle().getString(key);
+        }
+
+        if (msg == null) {
+            throw new MissingResourceException("Cannot find resource key \"" + key +
+                                               "\" in base name " +
+                                               getResourceBundle().getResourceName(),
+                                               getResourceBundle().getResourceName(), key);
+        }
+
+        return MessageFormat.format(msg, array);
+    }
+}

Added: webservices/axis/trunk/java/dev/scratch/prototype1/src/java/org/apache/axis/i18n/Messages.java
==============================================================================
--- (empty file)
+++ webservices/axis/trunk/java/dev/scratch/prototype1/src/java/org/apache/axis/i18n/Messages.java	Thu Nov 18 03:16:05 2004
@@ -0,0 +1,168 @@
+/*
+ * Copyright 2001-2004 The Apache Software Foundation.
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.axis.i18n;
+
+import java.util.Locale;
+import java.util.MissingResourceException;
+import java.util.ResourceBundle;
+
+
+/**
+ * @see org.apache.axis.i18n.Messages
+ * 
+ * FUNCTIONAL TEMPLATE for Messages classes.
+ * 
+ * Copy this template to your package.
+ * 
+ * For subpackages of org.apache.axis.*, the internal constants
+ * are set appropriately.  To adapt this scheme to an extension project
+ * (package prefix differs from org.apache.axis.*), edit the projectName
+ * attribute.  The others shouldn't need to be changed unless this is
+ * being adapted to a non-AXIS related project..
+ * 
+ * @author Richard A. Sitze (rsitze@us.ibm.com)
+ * @author Karl Moss (kmoss@macromedia.com)
+ * @author Glen Daniels (gdaniels@apache.org)
+ */
+public class Messages {
+    private static final Class  thisClass = Messages.class;
+
+    private static final String projectName = MessagesConstants.projectName;
+
+    private static final String resourceName = MessagesConstants.resourceName;
+    private static final Locale locale = MessagesConstants.locale;
+
+    private static final String packageName = getPackage(thisClass.getName());
+    private static final ClassLoader classLoader = thisClass.getClassLoader();
+
+    private static final ResourceBundle parent =
+        (MessagesConstants.rootPackageName == packageName)
+        ? null
+        : MessagesConstants.rootBundle;
+
+
+    /***** NO NEED TO CHANGE ANYTHING BELOW *****/
+
+    private static final MessageBundle messageBundle =
+        new MessageBundle(projectName, packageName, resourceName,
+                                     locale, classLoader, parent);
+
+    /**
+      * Get a message from resource.properties from the package of the given object.
+      * @param key The resource key
+      * @return The formatted message
+      */
+    public static String getMessage(String key)
+        throws MissingResourceException
+    {
+        return messageBundle.getMessage(key);
+    }
+
+    /**
+      * Get a message from resource.properties from the package of the given object.
+      * @param key The resource key
+      * @param arg0 The argument to place in variable {0}
+      * @return The formatted message
+      */
+    public static String getMessage(String key, String arg0)
+        throws MissingResourceException
+    {
+        return messageBundle.getMessage(key, arg0);
+    }
+
+    /**
+      * Get a message from resource.properties from the package of the given object.
+      * @param key The resource key
+      * @param arg0 The argument to place in variable {0}
+      * @param arg1 The argument to place in variable {1}
+      * @return The formatted message
+      */
+    public static String getMessage(String key, String arg0, String arg1)
+        throws MissingResourceException
+    {
+        return messageBundle.getMessage(key, arg0, arg1);
+    }
+
+    /**
+      * Get a message from resource.properties from the package of the given object.
+      * @param key The resource key
+      * @param arg0 The argument to place in variable {0}
+      * @param arg1 The argument to place in variable {1}
+      * @param arg2 The argument to place in variable {2}
+      * @return The formatted message
+      */
+    public static String getMessage(String key, String arg0, String arg1, String arg2)
+        throws MissingResourceException
+    {
+        return messageBundle.getMessage(key, arg0, arg1, arg2);
+    }
+
+    /**
+      * Get a message from resource.properties from the package of the given object.
+      * @param key The resource key
+      * @param arg0 The argument to place in variable {0}
+      * @param arg1 The argument to place in variable {1}
+      * @param arg2 The argument to place in variable {2}
+      * @param arg3 The argument to place in variable {3}
+      * @return The formatted message
+      */
+    public static String getMessage(String key, String arg0, String arg1, String arg2, String arg3)
+        throws MissingResourceException
+    {
+        return messageBundle.getMessage(key, arg0, arg1, arg2, arg3);
+    }
+
+    /**
+      * Get a message from resource.properties from the package of the given object.
+      * @param key The resource key
+      * @param arg0 The argument to place in variable {0}
+      * @param arg1 The argument to place in variable {1}
+      * @param arg2 The argument to place in variable {2}
+      * @param arg3 The argument to place in variable {3}
+      * @param arg4 The argument to place in variable {4}
+      * @return The formatted message
+      */
+    public static String getMessage(String key, String arg0, String arg1, String arg2, String arg3, String arg4)
+        throws MissingResourceException
+    {
+        return messageBundle.getMessage(key, arg0, arg1, arg2, arg3, arg4);
+    }
+
+    /**
+      * Get a message from resource.properties from the package of the given object.
+      * @param key The resource key
+      * @param args An array of objects to place in corresponding variables
+      * @return The formatted message
+      */
+    public static String getMessage(String key, String[] args)
+        throws MissingResourceException
+    {
+        return messageBundle.getMessage(key, args);
+    }
+    
+    public static ResourceBundle getResourceBundle() {
+        return messageBundle.getResourceBundle();
+    }
+    
+    public static MessageBundle getMessageBundle() {
+        return messageBundle;
+    }
+
+    private static final String getPackage(String name) {
+        return name.substring(0, name.lastIndexOf('.')).intern();
+    }
+}

Added: webservices/axis/trunk/java/dev/scratch/prototype1/src/java/org/apache/axis/i18n/MessagesConstants.java
==============================================================================
--- (empty file)
+++ webservices/axis/trunk/java/dev/scratch/prototype1/src/java/org/apache/axis/i18n/MessagesConstants.java	Thu Nov 18 03:16:05 2004
@@ -0,0 +1,39 @@
+/*
+ * Copyright 2001-2004 The Apache Software Foundation.
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.axis.i18n;
+
+import java.util.Locale;
+import java.util.ResourceBundle;
+
+/**
+ * @author Richard A. Sitze (rsitze@us.ibm.com)
+ */
+public class MessagesConstants {
+    public static final String projectName = "org.apache.axis".intern();
+    public static final String resourceName = "resource".intern();
+    public static final Locale locale = null;
+
+    public static final String rootPackageName = "org.apache.axis.i18n".intern();
+
+    public static final ResourceBundle rootBundle =
+        ProjectResourceBundle.getBundle(projectName,
+                                        rootPackageName,
+                                        resourceName,
+                                        locale,
+                                        MessagesConstants.class.getClassLoader(),
+                                        null);
+}

Added: webservices/axis/trunk/java/dev/scratch/prototype1/src/java/org/apache/axis/i18n/ProjectResourceBundle.java
==============================================================================
--- (empty file)
+++ webservices/axis/trunk/java/dev/scratch/prototype1/src/java/org/apache/axis/i18n/ProjectResourceBundle.java	Thu Nov 18 03:16:05 2004
@@ -0,0 +1,471 @@
+/*
+ * Copyright 2001-2004 The Apache Software Foundation.
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.axis.i18n;
+
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+
+import java.util.Enumeration;
+import java.util.HashSet;
+import java.util.Hashtable;
+import java.util.Iterator;
+import java.util.Locale;
+import java.util.MissingResourceException;
+import java.util.ResourceBundle;
+
+/**
+ * <p>Wrapper class for resource bundles. Property files are used to store
+ * resource strings, which are the only types of resources available.
+ * Property files can inherit properties from other files so that
+ * a base property file can be used and a small number of properties
+ * can be over-ridden by another property file. For example you may
+ * create an english version of a resource file named "resource.properties".
+ * You then decide that the British English version of all of the properties
+ * except one are the same, so there is no need to redefine all of the
+ * properties in "resource_en_GB", just the one that is different.</p>
+ * <p>The basename is the name of the property file without the ".properties"
+ * extension.</p>
+ * <p>Properties will be cached for performance.<p>
+ * <p>Property values stored in the property files can also contain dynamic
+ * variables. Any dynamic variable defined in PropertiesUtil.getVariableValue()
+ * can be used (such as {date}), as well as arguments in the form {0}, {1}, etc.
+ * Argument values are specified in the various overloaded getString() methods.</p>
+ * 
+ * @author Richard A. Sitze (rsitze@us.ibm.com)
+ * @author Karl Moss (kmoss@macromedia.com)
+ * @author Glen Daniels (gdaniels@apache.org)
+ */
+public class ProjectResourceBundle extends ResourceBundle {
+    protected static Log log =
+        LogFactory.getLog(ProjectResourceBundle.class.getName());
+
+
+    // The static cache of ResourceBundles.
+    // The key is the 'basename + locale + default locale'
+    // The element is a ResourceBundle object
+    private static final Hashtable bundleCache = new Hashtable();
+
+    private static final Locale defaultLocale = Locale.getDefault();
+
+    private final ResourceBundle resourceBundle;
+    private final String resourceName;
+
+    
+    protected Object handleGetObject(String key)
+        throws MissingResourceException
+    {
+        if (log.isDebugEnabled()) {
+            log.debug(this.toString() + "::handleGetObject(" + key + ")");
+        }
+//            return resourceBundle.handleGetObject(key);
+        Object obj;
+        try {
+            obj = resourceBundle.getObject(key);
+        } catch (MissingResourceException e) {
+            /* catch missing resource, ignore, & return null
+             * if this method doesn't return null, then parents
+             * are not searched
+             */
+            obj = null;
+        }
+        return obj;
+    }
+    
+    public Enumeration getKeys() {
+        Enumeration myKeys = resourceBundle.getKeys();
+        if (parent == null) {
+            return myKeys;
+        } else {
+            final HashSet set = new HashSet();
+            while (myKeys.hasMoreElements()) {
+                set.add(myKeys.nextElement());
+            }
+            
+            Enumeration pKeys = parent.getKeys();
+            while (pKeys.hasMoreElements()) {
+                set.add(pKeys.nextElement());
+            }
+            
+            return new Enumeration() {
+                    private Iterator it = set.iterator();
+                    public boolean hasMoreElements() { return it.hasNext(); }
+                    public Object nextElement() { return it.next(); }
+                };
+        }
+    }
+    
+
+    /**
+     * Construct a new ProjectResourceBundle
+     * 
+     * @param projectName The name of the project to which the class belongs.
+     *        It must be a proper prefix of the caller's package.
+     * 
+     * @param caller The calling class.
+     *        This is used to get the package name to further construct
+     *        the basename as well as to get the proper ClassLoader.
+     * 
+     * @param resourceName The name of the resource without the
+     *        ".properties" extension
+     * 
+     * @throws MissingResourceException if projectName is not a prefix of
+     *         the caller's package name, or if the resource could not be
+     *         found/loaded.
+     */
+    public static ProjectResourceBundle getBundle(String projectName,
+                                                  String packageName,
+                                                  String resourceName)
+        throws MissingResourceException
+    {
+        return getBundle(projectName, packageName, resourceName, null, null, null);
+    }
+
+    /**
+     * Construct a new ProjectResourceBundle
+     * 
+     * @param projectName The name of the project to which the class belongs.
+     *        It must be a proper prefix of the caller's package.
+     * 
+     * @param caller The calling class.
+     *        This is used to get the package name to further construct
+     *        the basename as well as to get the proper ClassLoader.
+     * 
+     * @param resourceName The name of the resource without the
+     *        ".properties" extension
+     * 
+     * @throws MissingResourceException if projectName is not a prefix of
+     *         the caller's package name, or if the resource could not be
+     *         found/loaded.
+     */
+    public static ProjectResourceBundle getBundle(String projectName,
+                                                  Class  caller,
+                                                  String resourceName,
+                                                  Locale locale)
+        throws MissingResourceException
+    {
+        return getBundle(projectName,
+                         caller,
+                         resourceName,
+                         locale,
+                         null);
+    }
+
+    /**
+     * Construct a new ProjectResourceBundle
+     * 
+     * @param projectName The name of the project to which the class belongs.
+     *        It must be a proper prefix of the caller's package.
+     * 
+     * @param caller The calling class.
+     *        This is used to get the package name to further construct
+     *        the basename as well as to get the proper ClassLoader.
+     * 
+     * @param resourceName The name of the resource without the
+     *        ".properties" extension
+     * 
+     * @param locale The locale
+     * 
+     * @throws MissingResourceException if projectName is not a prefix of
+     *         the caller's package name, or if the resource could not be
+     *         found/loaded.
+     */
+    public static ProjectResourceBundle getBundle(String projectName,
+                                                  String packageName,
+                                                  String resourceName,
+                                                  Locale locale,
+                                                  ClassLoader loader)
+        throws MissingResourceException
+    {
+        return getBundle(projectName, packageName, resourceName, locale, loader, null);
+    }
+
+    /**
+     * Construct a new ProjectResourceBundle
+     * 
+     * @param projectName The name of the project to which the class belongs.
+     *        It must be a proper prefix of the caller's package.
+     * 
+     * @param caller The calling class.
+     *        This is used to get the package name to further construct
+     *        the basename as well as to get the proper ClassLoader.
+     * 
+     * @param resourceName The name of the resource without the
+     *        ".properties" extension
+     * 
+     * @param locale The locale
+     * 
+     * @param extendsBundle If non-null, then this ExtendMessages will
+     *         default to extendsBundle.
+     * 
+     * @throws MissingResourceException if projectName is not a prefix of
+     *         the caller's package name, or if the resource could not be
+     *         found/loaded.
+     */
+    public static ProjectResourceBundle getBundle(String projectName,
+                                                  Class  caller,
+                                                  String resourceName,
+                                                  Locale locale,
+                                                  ResourceBundle extendsBundle)
+        throws MissingResourceException
+    {
+        return getBundle(projectName,
+                         getPackage(caller.getClass().getName()),
+                         resourceName,
+                         locale,
+                         caller.getClass().getClassLoader(),
+                         extendsBundle);
+    }
+
+    /**
+     * Construct a new ProjectResourceBundle
+     * 
+     * @param projectName The name of the project to which the class belongs.
+     *        It must be a proper prefix of the caller's package.
+     * 
+     * @param caller The calling class.
+     *        This is used to get the package name to further construct
+     *        the basename as well as to get the proper ClassLoader.
+     * 
+     * @param resourceName The name of the resource without the
+     *        ".properties" extension
+     * 
+     * @param locale The locale
+     * 
+     * @param extendsBundle If non-null, then this ExtendMessages will
+     *         default to extendsBundle.
+     * 
+     * @throws MissingResourceException if projectName is not a prefix of
+     *         the caller's package name, or if the resource could not be
+     *         found/loaded.
+     */
+    public static ProjectResourceBundle getBundle(String projectName,
+                                                  String packageName,
+                                                  String resourceName,
+                                                  Locale locale,
+                                                  ClassLoader loader,
+                                                  ResourceBundle extendsBundle)
+        throws MissingResourceException
+    {
+        if (log.isDebugEnabled()) {
+            log.debug("getBundle(" + projectName + ","
+                                   + packageName + ","
+                                   + resourceName + ","
+                                   + String.valueOf(locale) + ",...)");
+        }
+        
+        Context context = new Context();
+        context.setLocale(locale);
+        context.setLoader(loader);
+        context.setProjectName(projectName);
+        context.setResourceName(resourceName);
+        context.setParentBundle(extendsBundle);
+
+        packageName = context.validate(packageName);
+
+        ProjectResourceBundle bundle = null;
+        try {
+            bundle = getBundle(context, packageName);
+        } catch (RuntimeException e) {
+            log.debug("Exception: ", e);
+            throw e;
+        }
+        
+        if (bundle == null) {
+            throw new MissingResourceException("Cannot find resource '" +
+                                               packageName + '.' + resourceName + "'",
+                                               resourceName, "");
+        }
+        
+        return bundle;
+    }
+
+    /**
+     * get bundle...
+     * - check cache
+     * - try up hierarchy
+     * - if at top of hierarchy, use (link to) context.getParentBundle()
+     */
+    private static synchronized ProjectResourceBundle getBundle(Context context, String packageName)
+        throws MissingResourceException
+    {
+        String cacheKey = context.getCacheKey(packageName);
+        
+        ProjectResourceBundle prb = (ProjectResourceBundle)bundleCache.get(cacheKey);
+
+        if (prb == null) {
+            String name = packageName + '.' + context.getResourceName();
+            ResourceBundle rb = context.loadBundle(packageName);
+            ResourceBundle parent = context.getParentBundle(packageName);
+            
+            if (rb != null) {
+                prb = new ProjectResourceBundle(name, rb);
+                prb.setParent(parent);
+                if (log.isDebugEnabled()) {
+                    log.debug("Created " + prb + ", linked to parent " + String.valueOf(parent));
+                }
+            } else {
+                if (parent != null) {
+                    if (parent instanceof ProjectResourceBundle) {
+                        prb = (ProjectResourceBundle)parent;
+                    } else {
+                        prb = new ProjectResourceBundle(name, parent);
+                    }
+                    if (log.isDebugEnabled()) {
+                        log.debug("Root package not found, cross link to " + parent);
+                    }
+                }
+            }
+
+            if (prb != null) {
+                // Cache the resource
+                bundleCache.put(cacheKey, prb);
+            }
+        }
+
+        return prb;
+    }
+
+    private static final String getPackage(String name) {
+        return name.substring(0, name.lastIndexOf('.')).intern();
+    }
+    
+    /**
+      * Construct a new ProjectResourceBundle
+      */
+    private ProjectResourceBundle(String name, ResourceBundle bundle)
+        throws MissingResourceException
+    {
+        this.resourceBundle = bundle;
+        this.resourceName = name;
+    }
+    
+    public String getResourceName() {
+        return resourceName;
+    }
+
+    /**
+     * Clears the internal cache
+     */
+    public static void clearCache()
+    {
+        bundleCache.clear();
+    }
+    
+    public String toString() {
+        return resourceName;
+    }
+
+
+    private static class Context {
+        private Locale _locale;
+        private ClassLoader _loader;
+        private String _projectName;
+        private String _resourceName;
+        private ResourceBundle _parent;
+        
+        void setLocale(Locale l) {
+            /* 1. Docs indicate that if locale is not specified,
+             *    then the default local is used in it's place.
+             * 2. A null value for locale is invalid.
+             * 
+             * Therefore, default...
+             */
+            _locale = (l == null) ? defaultLocale : l;
+        }
+
+        void setLoader(ClassLoader l) {
+            _loader = (l != null) ? l : this.getClass().getClassLoader();
+            // START FIX: http://nagoya.apache.org/bugzilla/show_bug.cgi?id=16868
+            if (_loader == null) {
+                _loader = ClassLoader.getSystemClassLoader();
+            }
+            // END FIX: http://nagoya.apache.org/bugzilla/show_bug.cgi?id=16868
+        }
+        
+        void setProjectName(String name) { _projectName = name.intern(); }
+        void setResourceName(String name) { _resourceName = name.intern(); }
+        void setParentBundle(ResourceBundle b) { _parent = b; }
+        
+        Locale getLocale() { return _locale; }
+        ClassLoader getLoader() { return _loader; }
+        String getProjectName() { return _projectName; }
+        String getResourceName() { return _resourceName; }
+        ResourceBundle getParentBundle() { return _parent; }
+    
+        String getCacheKey(String packageName)
+        {
+            String loaderName = (_loader == null) ? "" : (":" + _loader.hashCode());
+            return packageName + "." + _resourceName + ":" + _locale + ":" + defaultLocale + loaderName;
+        }
+
+        ResourceBundle loadBundle(String packageName)
+        {
+            try {
+                return ResourceBundle.getBundle(packageName + '.' + _resourceName,
+                                                _locale,
+                                                _loader);
+            } catch (MissingResourceException e) {
+                // Deliberately surpressing print stack.. just the string for info.
+                log.debug("loadBundle: Ignoring MissingResourceException: " + e.getMessage());
+            }
+            return null;
+        }
+    
+        ResourceBundle getParentBundle(String packageName)
+        {
+            ResourceBundle p;
+            if (packageName != _projectName) {
+                p = getBundle(this, getPackage(packageName));
+            } else {
+                p = _parent;
+                _parent = null;
+            }
+            return p;
+        }
+        
+        String validate(String packageName)
+            throws MissingResourceException
+        {
+            if (_projectName == null  ||  _projectName.length() == 0) {
+                log.debug("Project name not specified");
+                throw new MissingResourceException("Project name not specified",
+                                                   "", "");
+            }
+
+            if (packageName == null  ||  packageName.length() == 0) {
+                log.debug("Package name not specified");
+                throw new MissingResourceException("Package not specified",
+                                                   packageName, "");
+            }
+            packageName = packageName.intern();
+    
+            /* Ensure that project is a proper prefix of class.
+             * Terminate project name with '.' to ensure proper match.
+             */
+            if (packageName != _projectName  &&  !packageName.startsWith(_projectName + '.')) {
+                log.debug("Project not a prefix of Package");
+                throw new MissingResourceException("Project '" + _projectName
+                                 + "' must be a prefix of Package '"
+                                 + packageName + "'",
+                                 packageName + '.' + _resourceName, "");
+            }
+                
+            return packageName;
+        }
+    }
+}

Added: webservices/axis/trunk/java/dev/scratch/prototype1/src/java/org/apache/axis/i18n/RB.java
==============================================================================
--- (empty file)
+++ webservices/axis/trunk/java/dev/scratch/prototype1/src/java/org/apache/axis/i18n/RB.java	Thu Nov 18 03:16:05 2004
@@ -0,0 +1,737 @@
+/*
+ * Copyright 2001-2004 The Apache Software Foundation.
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.axis.i18n;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.text.MessageFormat;
+import java.util.Enumeration;
+import java.util.Hashtable;
+import java.util.Locale;
+import java.util.MissingResourceException;
+import java.util.Properties;
+
+/**
+ * CURRENTLY NOT USED
+ * KEEPING FOR REFERENCE  9/19/2002
+ * 
+ * <p>Wrapper class for resource bundles. Property files are used to store
+ * resource strings, which are the only types of resources available.
+ * Property files can inherit properties from other files so that
+ * a base property file can be used and a small number of properties
+ * can be over-ridden by another property file. For example you may
+ * create an english version of a resource file named "resource.properties".
+ * You then decide that the British English version of all of the properties
+ * except one are the same, so there is no need to redefine all of the
+ * properties in "resource_en_GB", just the one that is different.</p>
+ * <p>The property file lookup searches for classes with various suffixes
+ * on the basis if the desired local and the current default local
+ * (as returned by Local.getDefault()). As property files are found the
+ * property values are merged so that inheritance is preserved.</p>
+ * <p>The order of searching is:</p>
+ * <dir>
+ * basename + "_" + langage + "_" + country + "_" + variant
+ * basename + "_" + langage + "_" + country
+ * basename + "_" + langage
+ * basename + "_" + defaultLanguage + "_" + defaultCountry + "_" + defaultVariant
+ * basename + "_" + defaultLanguage + "_" + defaultCountry
+ * basename + "_" + defaultLanguage
+ * basename
+ * </dir>
+ * <p>The basename is the name of the property file without the ".properties"
+ * extension.</p>
+ * <p>Properties will be cached for performance.<p>
+ * <p>Property values stored in the property files can also contain dynamic
+ * variables. Any dynamic variable defined in PropertiesUtil.getVariableValue()
+ * can be used (such as {date}), as well as arguments in the form {0}, {1}, etc.
+ * Argument values are specified in the various overloaded getString() methods.</p>
+ * 
+ * @author Karl Moss (kmoss@macromedia.com)
+ * @author Glen Daniels (gdaniels@apache.org)
+ */
+public class RB {
+    // The static cache of properties. The key is the basename + the local +
+    // the default local and the element is the Properties object containing
+    // the resources
+    static Hashtable propertyCache = new Hashtable();
+
+    // The default base name
+    public static final String BASE_NAME = "resource";
+
+    // The property file extension
+    public static final String PROPERTY_EXT = ".properties";
+
+    // The name of the current base property file (with extension)
+    protected String basePropertyFileName;
+
+    // The properties for the current resource bundle
+    protected Properties resourceProperties;
+
+    /**
+      * Construct a new RB
+      * @param name The name of the property file without the ".properties" extension
+      */
+    public RB(String name) throws MissingResourceException
+    {
+        this(null, name, null);
+    }
+
+    /**
+      * Construct a new RB
+      * @param caller The calling object. This is used to get the package name
+      * to further construct the basename as well as to get the proper ClassLoader
+      * @param name The name of the property file without the ".properties" extension
+      */
+    public RB(Object caller, String name) throws MissingResourceException
+    {
+        this(caller, name, null);
+    }
+
+    /**
+      * Construct a new RB
+      * @param caller The calling object. This is used to get the package name
+      * to further construct the basename as well as to get the proper ClassLoader
+      * @param name The name of the property file without the ".properties" extension
+      * @param local The local
+      */
+    public RB(Object caller, String name, Locale locale) throws MissingResourceException
+    {
+        ClassLoader cl = null;
+
+        if (caller != null) {
+
+            Class c;
+            if (caller instanceof Class) {
+                c = (Class) caller;
+            }
+            else {
+                c = caller.getClass();
+            }
+
+            // Get the appropriate class loader
+            cl = c.getClassLoader();
+
+            if (name.indexOf("/") == -1) {
+
+                // Create the full basename only if not given
+                String fullName = c.getName();
+
+                int pos = fullName.lastIndexOf(".");
+                if (pos > 0) {
+                    name = fullName.substring(0, pos + 1).replace('.', '/') + name;
+                }
+            }
+        } else {
+            // Try the shared default properties file...
+            if (name.indexOf("/") == -1) {
+                name = "org/apache/axis/default-resource";
+            }
+        }
+
+        Locale defaultLocale = Locale.getDefault();
+
+        // If the locale given is the same as the default locale, ignore it
+        if (locale != null) {
+            if (locale.equals(defaultLocale)) {
+                locale = null;
+            }
+        }
+
+        // Load the properties. If no property files exist then a
+        // MissingResourceException will be thrown
+        loadProperties(name, cl, locale, defaultLocale);
+    }
+
+    /**
+      * Gets a string message from the resource bundle for the given key
+      * @param key The resource key
+      * @return The message
+      */
+    public String getString(String key) throws MissingResourceException
+    {
+        return getString(key, (Object[]) null);
+    }
+
+    /**
+      * <p>Gets a string message from the resource bundle for the given key. The
+      * message may contain variables that will be substituted with the given
+      * arguments. Variables have the format:</p>
+      * <dir>
+      * This message has two variables: {0} and {1}
+      * </dir>
+      * @param key The resource key
+      * @param arg0 The argument to place in variable {0}
+      * @return The message
+      */
+    public String getString(String key, Object arg0) throws MissingResourceException
+    {
+        Object[] o = new Object[1];
+        o[0] = arg0;
+        return getString(key, o);
+    }
+
+    /**
+      * <p>Gets a string message from the resource bundle for the given key. The
+      * message may contain variables that will be substituted with the given
+      * arguments. Variables have the format:</p>
+      * <dir>
+      * This message has two variables: {0} and {1}
+      * </dir>
+      * @param key The resource key
+      * @param arg0 The argument to place in variable {0}
+      * @param arg1 The argument to place in variable {1}
+      * @return The message
+      */
+    public String getString(String key, Object arg0, Object arg1) throws MissingResourceException
+    {
+        Object[] o = new Object[2];
+        o[0] = arg0;
+        o[1] = arg1;
+        return getString(key, o);
+    }
+
+    /**
+      * <p>Gets a string message from the resource bundle for the given key. The
+      * message may contain variables that will be substituted with the given
+      * arguments. Variables have the format:</p>
+      * <dir>
+      * This message has two variables: {0} and {1}
+      * </dir>
+      * @param key The resource key
+      * @param arg0 The argument to place in variable {0}
+      * @param arg1 The argument to place in variable {1}
+      * @param arg2 The argument to place in variable {1}
+      * @return The message
+      */
+    public String getString(String key, Object arg0, Object arg1, Object arg2) throws MissingResourceException
+    {
+        Object[] o = new Object[3];
+        o[0] = arg0;
+        o[1] = arg1;
+        o[2] = arg2;
+        return getString(key, o);
+    }
+
+    /**
+      * <p>Gets a string message from the resource bundle for the given key. The
+      * message may contain variables that will be substituted with the given
+      * arguments. Variables have the format:</p>
+      * <dir>
+      * This message has two variables: {0} and {1}
+      * </dir>
+      * @param key The resource key
+      * @param array An array of objects to place in corresponding variables
+      * @return The message
+      */
+    public String getString(String key, Object[] array) throws MissingResourceException
+    {
+        String msg = null;
+        if (resourceProperties != null) {
+            msg = resourceProperties.getProperty(key);
+        }
+
+        if (msg == null) {
+            throw new MissingResourceException("Cannot find resource key \"" + key +
+                                               "\" in base name " + basePropertyFileName,
+                                               basePropertyFileName, key);
+        }
+
+        msg = MessageFormat.format(msg, array);
+        return msg;
+    }
+
+    protected void loadProperties(String basename, ClassLoader loader, Locale locale,
+                                  Locale defaultLocale)
+        throws MissingResourceException
+    {
+        // Check the cache first
+        String loaderName = "";
+        if (loader != null) {
+            loaderName = ":" + loader.hashCode();
+        }
+        String cacheKey = basename + ":" + locale + ":" + defaultLocale + loaderName;
+        Properties p = (Properties) propertyCache.get(cacheKey);
+        basePropertyFileName = basename + PROPERTY_EXT;
+
+        if (p == null) {
+            // The properties were not found in the cache. Search the given locale
+            // first
+            if (locale != null) {
+                p = loadProperties(basename, loader, locale, p);
+            }
+
+            // Search the default locale
+            if (defaultLocale != null) {
+                p = loadProperties(basename, loader, defaultLocale, p);
+            }
+
+            // Search for the basename
+            p = merge(p, loadProperties(basePropertyFileName, loader));
+
+            if (p == null) {
+                throw new MissingResourceException("Cannot find resource for base name " +
+                                                   basePropertyFileName, basePropertyFileName, "");
+            }
+
+            // Cache the properties
+            propertyCache.put(cacheKey, p);
+
+        }
+
+        resourceProperties = p;
+    }
+
+    protected Properties loadProperties(String basename, ClassLoader loader, Locale locale,
+                                        Properties props)
+    {
+
+        String language = locale.getLanguage();
+        String country = locale.getCountry();
+        String variant = locale.getVariant();
+        if (variant != null) {
+            if (variant.trim().length() == 0) {
+                variant = null;
+            }
+        }
+
+        if (language != null) {
+
+            if (country != null) {
+
+                if (variant != null) {
+                    props = merge(props, loadProperties(basename + "_" + language +"_" + country + "_" + variant +
+                                                        PROPERTY_EXT, loader));
+                }
+                props = merge(props, loadProperties(basename + "_" + language +"_" + country +
+                                                    PROPERTY_EXT, loader));
+            }
+            props = merge(props, loadProperties(basename + "_" + language + PROPERTY_EXT, loader));
+        }
+        return props;
+    }
+
+    protected Properties loadProperties(String resname, ClassLoader loader)
+    {
+        Properties props = null;
+
+        // Attempt to open and load the properties
+        InputStream in = null;
+        try {
+            if (loader != null) {
+                in = loader.getResourceAsStream(resname);
+            }
+
+            // Either we're using the system class loader or we didn't find the
+            // resource using the given class loader
+            if (in == null) {
+                in = ClassLoader.getSystemResourceAsStream(resname);
+            }
+            if (in != null) {
+                props = new Properties();
+                try {
+                    props.load(in);
+                }
+                catch (IOException ex) {
+                    // On error, clear the props
+                    props = null;
+                }
+            }
+        }
+        finally {
+            if (in != null) {
+                try {
+                    in.close();
+                }
+                catch (Exception ex) {
+                    // Ignore error on close
+                }
+            }
+        }
+        return props;
+    }
+
+    /**
+      * Merge two Properties objects
+      */
+    protected Properties merge(Properties p1, Properties p2)
+    {
+        if ((p1 == null) &&
+            (p2 == null)) {
+            return null;
+        }
+        else if (p1 == null) {
+            return p2;
+        }
+        else if (p2 == null) {
+            return p1;
+        }
+
+        // Now merge. p1 takes precedence
+        Enumeration enumeration = p2.keys();
+        while (enumeration.hasMoreElements()) {
+            String key = (String) enumeration.nextElement();
+            if (p1.getProperty(key) == null) {
+                p1.put(key, p2.getProperty(key));
+            }
+        }
+
+        return p1;
+    }
+
+    /**
+      * Get the underlying properties
+      */
+    public Properties getProperties()
+    {
+        return resourceProperties;
+    }
+
+    // STATIC ACCESSORS
+
+    /**
+      * Get a message from resource.properties from the package of the given object.
+      * @param caller The calling object, used to get the package name and class loader
+      * @param key The resource key
+      * @return The formatted message
+      */
+    public static String getString(Object caller, String key)
+        throws MissingResourceException
+    {
+        return getMessage(caller, BASE_NAME, null, key, null);
+    }
+
+    /**
+      * Get a message from resource.properties from the package of the given object.
+      * @param caller The calling object, used to get the package name and class loader
+      * @param key The resource key
+      * @param arg0 The argument to place in variable {0}
+      * @return The formatted message
+      */
+    public static String getString(Object caller, String key, Object arg0)
+        throws MissingResourceException
+    {
+        Object[] o = new Object[1];
+        o[0] = arg0;
+        return getMessage(caller, BASE_NAME, null, key, o);
+    }
+
+    /**
+      * Get a message from resource.properties from the package of the given object.
+      * @param caller The calling object, used to get the package name and class loader
+      * @param key The resource key
+      * @param arg0 The argument to place in variable {0}
+      * @param arg1 The argument to place in variable {1}
+      * @return The formatted message
+      */
+    public static String getString(Object caller, String key, Object arg0, Object arg1)
+        throws MissingResourceException
+    {
+        Object[] o = new Object[2];
+        o[0] = arg0;
+        o[1] = arg1;
+        return getMessage(caller, BASE_NAME, null, key, o);
+    }
+
+    /**
+      * Get a message from resource.properties from the package of the given object.
+      * @param caller The calling object, used to get the package name and class loader
+      * @param key The resource key
+      * @param arg0 The argument to place in variable {0}
+      * @param arg1 The argument to place in variable {1}
+      * @param arg2 The argument to place in variable {2}
+      * @return The formatted message
+      */
+    public static String getString(Object caller, String key, Object arg0, Object arg1, Object arg2)
+        throws MissingResourceException
+    {
+        Object[] o = new Object[3];
+        o[0] = arg0;
+        o[1] = arg1;
+        o[2] = arg2;
+        return getMessage(caller, BASE_NAME, null, key, o);
+    }
+
+    /**
+      * Get a message from resource.properties from the package of the given object.
+      * @param caller The calling object, used to get the package name and class loader
+      * @param key The resource key
+      * @param arg0 The argument to place in variable {0}
+      * @param arg1 The argument to place in variable {1}
+      * @param arg2 The argument to place in variable {2}
+      * @param arg3 The argument to place in variable {3}
+      * @return The formatted message
+      */
+    public static String getString(Object caller, String key, Object arg0, Object arg1, Object arg2, Object arg3)
+        throws MissingResourceException
+    {
+        Object[] o = new Object[4];
+        o[0] = arg0;
+        o[1] = arg1;
+        o[2] = arg2;
+        o[3] = arg3;
+        return getMessage(caller, BASE_NAME, null, key, o);
+    }
+
+
+    /**
+      * Get a message from resource.properties from the package of the given object.
+      * @param caller The calling object, used to get the package name and class loader
+      * @param key The resource key
+      * @param arg0 The argument to place in variable {0}
+      * @param arg1 The argument to place in variable {1}
+      * @param arg2 The argument to place in variable {2}
+      * @param arg3 The argument to place in variable {3}
+      * @param arg4 The argument to place in variable {4}
+      * @return The formatted message
+      */
+    public static String getString(Object caller, String key, Object arg0, Object arg1, Object arg2, Object arg3, Object arg4)
+        throws MissingResourceException
+    {
+        Object[] o = new Object[5];
+        o[0] = arg0;
+        o[1] = arg1;
+        o[2] = arg2;
+        o[3] = arg3;
+        o[4] = arg4;
+        return getMessage(caller, BASE_NAME, null, key, o);
+    }
+
+
+    /**
+      * Get a message from resource.properties from the package of the given object.
+      * @param caller The calling object, used to get the package name and class loader
+      * @param key The resource key
+      * @param array An array of objects to place in corresponding variables
+      * @return The formatted message
+      */
+    public static String getString(Object caller, String key, Object[] args)
+        throws MissingResourceException
+    {
+        return getMessage(caller, BASE_NAME, null, key, args);
+    }
+
+
+    /**
+      * Get a message from resource.properties from the package of the given object.
+      * @param caller The calling object, used to get the package name and class loader
+      * @param locale The locale
+      * @param key The resource key
+      * @return The formatted message
+      */
+    public static String getString(Object caller, Locale locale, String key)
+        throws MissingResourceException
+    {
+        return getMessage(caller, BASE_NAME, locale, key, null);
+    }
+
+    /**
+      * Get a message from resource.properties from the package of the given object.
+      * @param caller The calling object, used to get the package name and class loader
+      * @param locale The locale
+      * @param key The resource key
+      * @param arg0 The argument to place in variable {0}
+      * @return The formatted message
+      */
+    public static String getString(Object caller, Locale locale, String key, Object arg0)
+        throws MissingResourceException
+    {
+        Object[] o = new Object[1];
+        o[0] = arg0;
+        return getMessage(caller, BASE_NAME, locale, key, o);
+    }
+
+    /**
+      * Get a message from resource.properties from the package of the given object.
+      * @param caller The calling object, used to get the package name and class loader
+      * @param locale The locale
+      * @param key The resource key
+      * @param arg0 The argument to place in variable {0}
+      * @param arg1 The argument to place in variable {1}
+      * @return The formatted message
+      */
+    public static String getString(Object caller, Locale locale, String key, Object arg0, Object arg1)
+        throws MissingResourceException
+    {
+        Object[] o = new Object[2];
+        o[0] = arg0;
+        o[1] = arg1;
+        return getMessage(caller, BASE_NAME, locale, key, o);
+    }
+
+    /**
+      * Get a message from resource.properties from the package of the given object.
+      * @param caller The calling object, used to get the package name and class loader
+      * @param locale The locale
+      * @param key The resource key
+      * @param arg0 The argument to place in variable {0}
+      * @param arg1 The argument to place in variable {1}
+      * @param arg2 The argument to place in variable {2}
+      * @return The formatted message
+      */
+    public static String getString(Object caller, Locale locale, String key, Object arg0, Object arg1, Object arg2)
+        throws MissingResourceException
+    {
+        Object[] o = new Object[3];
+        o[0] = arg0;
+        o[1] = arg1;
+        o[2] = arg2;
+        return getMessage(caller, BASE_NAME, locale, key, o);
+    }
+
+    /**
+      * Get a message from resource.properties from the package of the given object.
+      * @param caller The calling object, used to get the package name and class loader
+      * @param locale The locale
+      * @param key The resource key
+      * @param arg0 The argument to place in variable {0}
+      * @param arg1 The argument to place in variable {1}
+      * @param arg2 The argument to place in variable {2}
+      * @param arg3 The argument to place in variable {3}
+      * @return The formatted message
+      */
+    public static String getString(Object caller, Locale locale, String key, Object arg0, Object arg1, Object arg2, Object arg3)
+        throws MissingResourceException
+    {
+        Object[] o = new Object[4];
+        o[0] = arg0;
+        o[1] = arg1;
+        o[2] = arg2;
+        o[3] = arg3;
+        return getMessage(caller, BASE_NAME, locale, key, o);
+    }
+
+    /**
+      * Get a message from resource.properties from the package of the given object.
+      * @param caller The calling object, used to get the package name and class loader
+      * @param locale The locale
+      * @param key The resource key
+      * @param arg0 The argument to place in variable {0}
+      * @param arg1 The argument to place in variable {1}
+      * @param arg2 The argument to place in variable {2}
+      * @param arg3 The argument to place in variable {3}
+      * @return The formatted message
+      */
+    public static String getString(Object caller, Locale locale, String key, Object arg0, Object arg1, Object arg2, Object arg3, Object arg4)
+        throws MissingResourceException
+    {
+        Object[] o = new Object[5];
+        o[0] = arg0;
+        o[1] = arg1;
+        o[2] = arg2;
+        o[3] = arg3;
+        o[4] = arg4;
+        return getMessage(caller, BASE_NAME, locale, key, o);
+    }
+
+    /**
+      * Get a message from resource.properties from the package of the given object.
+      * @param caller The calling object, used to get the package name and class loader
+      * @param locale The locale
+      * @param key The resource key
+      * @param array An array of objects to place in corresponding variables
+      * @return The formatted message
+      */
+    public static String getString(Object caller, Locale locale, String key, Object[] args)
+        throws MissingResourceException
+    {
+        return getMessage(caller, BASE_NAME, locale, key, args);
+    }
+
+    // Workhorse that does the resource loading and key lookup
+    public static String getMessage(Object caller, String basename, Locale locale, String key,
+                                       Object[] args)
+        throws MissingResourceException
+    {
+        String msg = null;
+        MissingResourceException firstEx = null;
+        String fullName = null;
+        Class curClass = null;
+        boolean didNull = false;
+        
+        if (caller != null) {
+            if(caller instanceof Class)
+                curClass = (Class) caller;
+            else
+                curClass = caller.getClass();
+        }
+
+        while (msg == null) {
+
+            // Get the full name of the resource
+            if (curClass != null) {
+
+                // Create the full basename
+                String pkgName = curClass.getName();
+
+                int pos = pkgName.lastIndexOf(".");
+                if (pos > 0) {
+                    fullName = pkgName.substring(0, pos + 1).replace('.', '/') + basename;
+                }
+                else {
+                    fullName = basename;
+                }
+            }
+            else {
+                fullName = basename;
+            }
+
+            try {
+                RB rb = new RB(caller, fullName, locale);
+                msg = rb.getString(key, args);
+            }
+            catch (MissingResourceException ex) {
+                if (curClass == null) {
+                    throw ex;
+                }
+
+                // Save the first exception
+                if (firstEx == null) {
+                    firstEx = ex;
+                }
+
+                // Get the superclass
+                curClass = curClass.getSuperclass();
+                if (curClass == null) {
+                    if (didNull)
+                        throw firstEx;
+                    didNull = true;
+                    caller = null;
+                } else {
+                    String cname = curClass.getName();
+                    if (cname.startsWith("java.") ||
+                        cname.startsWith("javax.")) {
+                        if (didNull)
+                            throw firstEx;
+                        didNull = true;
+                        caller = null;
+                        curClass = null;
+                    }
+                }
+            }
+
+        }
+        return msg;
+    }
+
+    /**
+      * Clears the internal cache
+      */
+    public static void clearCache()
+    {
+        propertyCache.clear();
+    }
+}

Added: webservices/axis/trunk/java/dev/scratch/prototype1/src/java/org/apache/axis/i18n/resource.properties
==============================================================================
--- (empty file)
+++ webservices/axis/trunk/java/dev/scratch/prototype1/src/java/org/apache/axis/i18n/resource.properties	Thu Nov 18 03:16:05 2004
@@ -0,0 +1,1246 @@
+# Translation instructions.
+# 1.  Each message line is of the form key=value.
+#     Translate the value, DO NOT translate the key.
+# 2.  The messages may contain arguments that will be filled in
+#     by the runtime.  These are of the form: {0}, {1}, etc.
+#     These must appear as is in the message, though the order
+#     may be changed to support proper language syntax.
+# 3.  If a single quote character is to appear in the resulting
+#     message, it must appear in this file as two consecutive
+#     single quote characters.
+# 4.  Lines beginning with "#" (like this one) are comment lines
+#     and may contain translation instructions.  They need not be
+#     translated unless your translated file, rather than this file,
+#     will serve as a base for other translators.
+
+addAfterInvoke00={0}:  the chain has already been invoked
+addBody00=Adding body element to message...
+addHeader00=Adding header to message...
+addTrailer00=Adding trailer to message...
+adminServiceDeny=Denying service admin request from {0}
+adminServiceLoad=Current load = {0}
+adminServiceStart=Starting service in response to admin request from {0}
+adminServiceStop=Stopping service in response to admin request from {0}
+adminServiceSuspend=Starting {0} service in response to admin request from {1}
+adminServiceResume=Stopping {0} service in response to admin request from {1}
+auth00=User ''{0}'' authenticated to server
+auth01=User ''{0}'' authorized to ''{1}''
+
+# NOTE:  in axisService00, do not translate "AXIS"
+axisService00=Hi there, this is an AXIS service!
+
+# NOTE:  in badArrayType00, do not translate "arrayTypeValue"
+badArrayType00=Malformed arrayTypeValue ''{0}''
+badArraySize00=Malformed arraySizeValue ''{0}''
+
+# NOTE:  in badAuth00, do not translate ""Basic""
+badAuth00=Bad authentication type (I can only handle "Basic").
+
+badBool00=Invalid boolean
+
+# NOTE:  in badCall00, do not translate "Call"
+badCall00=Cannot update the Call object
+badCall01=Failure trying to get the Call object
+badCall02=Invocation of Call.getOutputParams failed
+
+badChars00=Unexpected characters
+badChars01=Bad character or insufficient number of characters in hex string
+badCompile00=Error while compiling:  {0}
+badDate00=Invalid date
+badDateTime00=Invalid date/time
+badElem00=Invalid element in {0} - {1}
+badHandlerClass00=Class ''{0}'' is not a Handler (can't be used in HandlerProvider)!
+badHolder00=Holder of wrong type.
+badInteger00=Explicit array length is not a valid integer ''{0}''.
+
+# NOTE:  in badMsgCtx00, do not translate "--messageContext", "--skeleton"
+badMsgCtx00=Error: --messageContext switch only valid with --skeleton
+
+badNameAttr00=No ''name'' attribute was specified in an undeployment element
+badNamespace00=Bad envelope namespace:  {0}
+badNameType00=Invalid Name
+badNCNameType00=Invalid NCName
+badnegInt00=Invalid negativeInteger
+badNmtoken00=Invalid Nmtoken
+badNonNegInt00=Invalid nonNegativeInteger
+badNonPosInt00=Invalid nonPositiveInteger
+badOffset00=Malformed offset attribute ''{0}''.
+badpackage00=Error: --NStoPKG and --package switch can''t be used together
+# NOTE:  in badParmMode00, do not translate "Parameter".
+badParmMode00=Invalid Parameter mode {0}.
+badPosition00=Malformed position attribute ''{0}''.
+badProxy00=Proxy port number, "{0}", incorrectly formatted
+badPort00=portName should not be null
+badposInt00=Invalid positiveInteger
+
+# NOTE:  in badRequest00, do not translate "GET", "POST"
+badRequest00=Cannot handle non-GET, non-POST request
+
+# NOTE:  in badRootElem00, do not translate "clientdeploy", "deploy", "undeploy", "list", "passwd", "quit"
+badRootElem00=Root element must be ''clientdeploy'', ''deploy'', ''undeploy'', ''list'', ''passwd'', or ''quit''
+
+badScope00=Unrecognized scope:  {0}.  Ignoring it.
+badTag00=Bad envelope tag:  {0}
+badTime00=Invalid time
+badTimezone00=Invalid timezone
+badTypeNamespace00=Found languageSpecificType namespace ''{0}'', expected ''{1}''
+badUnsignedByte00=Invalid unsigned byte
+badUnsignedShort00=Invalid unsigned short
+badUnsignedInt00=Invalid unsigned int
+badUnsignedLong00=Invalid unsigned long
+badWSDDElem00=Invalid WSDD Element
+beanSerConfigFail00=Exception configuring bean serialization for {0}
+bodyElementParent=Warning: SOAPBodyElement.setParentElement should take a SOAPBody parameter instead of a SOAPEnvelope (but need not be called after SOAPBody.addBodyElement)
+bodyHeaderParent=Warning: SOAPHeaderElement.setParentElement should take a SOAPHeader parameter instead of a SOAPEnvelope (but need not be called after SOAPHeader.addHeaderElement)
+bodyElems00=There are {0} body elements.
+bodyIs00=body is {0}
+bodyPresent=Body already present
+buildChain00={0} building chain ''{1}''
+cantAuth00=User ''{0}'' not authenticated (unknown user)
+cantAuth01=User ''{0}'' not authenticated
+cantAuth02=User ''{0}'' not authorized to ''{1}''
+
+# NOTE:  in the cantConvertXX messages, do not translate "bytes", "String", "bean", "int"
+cantConvert00=Cannot convert {0} to bytes
+cantConvert01=Cannot convert form {0} to String
+cantConvert02=Could not convert {0} to bean field ''{1}'', type {2}
+cantConvert03=Could not convert value to int
+cantConvert04=Could not set Class {0} Field {1} to value {2} - Exception {3}  
+
+cantDoNullArray00=Cannot serialize null arrays just yet...
+
+# NOTE:  in cantDoURL00, do not translate "getURL", "URL"
+cantDoURL00=getURL failed to correctly process URL; protocol not supported
+
+cantHandle00={0} encountered a child element, which is NOT expected, in something it was trying to deserialize.
+
+# NOTE:  in cantInvoke00, do not translate "Call" or "URI"
+cantInvoke00=Cannot invoke Call with null namespace URI for method {0}
+
+cantResolve00=Cannot resolve chain
+
+# NOTE:  in cantSerialize00, do not translate "ArraySerializer"
+cantSerialize00=Cannot serialize a {0} with the ArraySerializer!
+
+# NOTE:  in cantSerialize01, do not translate "Elements" and "ElementSerializer"
+cantSerialize01=Cannot serialize non-Elements with an ElementSerializer!
+
+cantSerialize02=Cannot serialize a raw object
+cantSetURI00=Cannot set location URI:  {0}
+cantTunnel00=Unable to tunnel through {0}:{1}.  Proxy returns "{2}"
+
+#castor messages which are followed by getLocalizedMessage() of the real exception
+castorMarshalException00=Unable to marshall between XML and Castor Objects :
+castorValidationException00=Message doesn''t comply with the associated XML schema :
+
+
+changePwd00=Changing admin password
+childPresent=MessageElement.setObjectValue called when a child element is present
+compiling00=Compiling:  {0}
+ctor00=Constructor
+convert00=Trying to convert {0} to {1}
+copy00=copy {0} {1}
+couldntCall00=Could not get a call
+couldntConstructProvider00=Service couldn''t construct provider!
+
+# NOTE:  in createdHTTP entries, do not translate "HTTP"
+createdHTTP00=Created an insecure HTTP connection
+createdHTTP01=Created an insecure HTTP connection using proxy {0}, port {1}
+
+# NOTE:  in createdSSL00, do not translate "SSL"
+createdSSL00=Created an SSL connection
+
+connectionClosed00=Connection closed.
+
+debugLevel00=Setting debug level to:  {0}
+
+# NOTE:  in defaultLogic00, do not translate "AxisServer"
+defaultLogic00=Calling default logic in AxisServer
+
+deployChain00=Deploying chain:  {0}
+deployHandler00=Deploying handler:  {0}
+deployService00=Deploying service ''{0}'' into {1}
+deployService01=Deploying service:  {0}
+deployTransport00=Deploying transport:  {0}
+
+# NOTE:  in deserFact00, do not translate "DeserializerFactory"
+deserFact00=DeserializerFactory class is {0}
+
+disabled00=functionality disabled.
+dispatching00=Dispatching to a body namespace ''{0}''
+doList00=Doing a list
+done00=Done processing
+doQuit00=Doing a quit
+
+dupConfigProvider00=Attempt to set configProvider for already-configured Service!
+duplicateFile00=Duplicate file name: {0}.  \nHint: you may have mapped two namespaces with elements of the same name to the same package name.
+duplicateClass00=Duplicate class name: {0}.  \nHint: you may have mapped two namespaces with elements of the same name to the same package name.
+
+elapsed00=Elapsed: {0} milliseconds
+
+# NOTE:  in emitFail00, do not translate "parameterOrder"
+emitFail00=Emitter failure.  All input parts must be listed in the parameterOrder attribute of {0}
+
+# NOTE:  in emitFail01, do not translate "portType", "binding"
+emitFail01=Emitter failure.  Cannot find portType operation parameters for binding {0}
+
+# NOTE:  in emitFail02 and emitFail03, do not translate "port", "service"
+emitFail02=Emitter failure.  Cannot find endpoint address in port {0} in service {1}
+emitFail03=Emitter failure.  Invalid endpoint address in port {0} in service {1}:  {2}
+
+# NOTE do not translate "binding", "port", "service", or "portType"
+emitFailNoBinding01=Emitter failure.  No binding found for port {0}
+emitFailNoBindingEntry01=Emitter failure. No binding entry found for {0}
+emitFailNoPortType01=Emitter failure.  No portType entry found for {0}
+emitFailNoMatchingBindOperation01=Emitter failure. The operation ({0}) from portType ({1}) in the WSDL document has no corresponding binding operation.\nHint: make sure that the binding has the same number of operations as its portType.
+emitFailtUndefinedBinding01=Emitter failure.  There is an undefined binding ({0}) in the WSDL document.\nHint: make sure <port binding=\"..\"> is fully qualified.
+emitFailtUndefinedBinding02=Emitter failure.  There is an undefined binding ({0}) in the WSDL document {1}.\nHint: make sure <port binding=\"..\"> is fully qualified.
+emitFailtUndefinedMessage01=Emitter failure.  There is an undefined message ({0}) in the WSDL document.\nHint: make sure <input message=\"..\"> and <output message=".."> are fully qualified.
+emitFailtUndefinedPort01=Emitter failure.  There is an undefined portType ({0}) in the WSDL document.\nHint: make sure <binding type=\"..\"> is fully qualified.
+emitFailtUndefinedPort02=Emitter failure.  There is an undefined portType ({0}) in the WSDL document {1}.\nHint: make sure <binding type=\"..\"> is fully qualified.
+
+emitter00=emitter
+empty00=empty
+
+# NOTE:  in enableTransport00, do not translate "SOAPService"
+enableTransport00=SOAPService({0}) enabling transport {1}
+
+end00=end
+endDoc00=End document
+endDoc01=Done with document
+endElem00=End element {0}
+endPrefix00=End prefix mapping ''{0}''
+enter00=Enter:  {0}
+
+#NOTE:  in error00, do not translate "AXIS"
+error00=AXIS error
+
+error01=Error:  {0}
+errorInvoking00=Error invoking operation:  {0}
+errorProcess00=Error processing ''{0}''
+exit00=Exit:  {0}
+exit01=Exit:  {0} no-argument constructor
+exit02=Exit:  {0} - {1} is null
+fault00=Fault occurred
+fileExistError00=Error determining if {0} already exists.  Will not generate this file.
+filename00=File name is:  {0}
+filename01={0}:  request file name = ''{1}''
+fromFile00=From file:  ''{0}'':''{1}''
+from00=From {0}
+genDeploy00=Generating deployment document
+genDeployFail00=Failed to write deployment document
+genFault00=Generating fault class
+genHolder00=Generating type implementation holder
+
+# NOTE:  in genIFace00, do not translate "portType"
+genIface00=Generating portType interface
+genIface01=Generating server-side portType interface
+
+genImpl00=Generating server-side implementation template
+
+# NOTE:  in genService00, do not translate "service"
+genService00=Generating service class
+
+genSkel00=Generating server-side skeleton
+genStub00=Generating client-side stub
+genTest00=Generating service test case
+genType00=Generating type implementation
+genHelper00=Generating helper implementation
+genUndeploy00=Generating undeployment document
+genUndeployFail00=Failed to write undeployment document
+getProxy00=Use to get a proxy class for {0}
+got00=Got {0}
+gotForID00=Got {0} for ID {1} (class = {2})
+gotPrincipal00=Got principal:  {0}
+gotResponse00=Got response message
+gotType00={0} got type {1}
+gotValue00={0} got value {1}
+handlerRegistryConfig=Service does not support configuration of a HandlerRegistry
+headers00=headers
+headerPresent=Header already present
+
+# NOTE:  in httpPassword00, do not translate HTTP
+httpPassword00=HTTP password:  {0}
+
+# NOTE:  in httpPassword00, do not translate HTTP
+httpUser00=HTTP user id:  {0}
+
+inMsg00=In message: {0}
+internalError00=Internal error
+internalError01=Internal server error
+
+invalidConfigFilePath=Configuration file directory ''{0}'' is not readable.
+
+invalidWSDD00=Invalid WSDD element ''{0}'' (wanted ''{1}'')
+
+invalidXmlCharacter00=The char ''0x{0}'' in ''{1}'' is not a valid XML character.
+
+# NOTE:  in invokeGet00, do no translate "GET"
+invokeGet00=invoking via GET
+
+invokeRequest00=Invoking request chain
+invokeResponse00=Invoking response chain
+invokeService00=Invoking service/pivot
+isNull00=is {0} null?  {1}
+
+lookup00=Looking up method {0} in class {1}
+makeEnvFail00=Could not make envelope
+match00={0} match:  host:  {1}, pattern:  {2}
+mustBeIface00=Only interfaces may be used for the proxy class argument
+mustExtendRemote00=Only interfaces which extend java.rmi.Remote may be used for the proxy class argument
+namesDontMatch00=Method names do not match\nBody method name = {0}\nService method names = {1}
+namesDontMatch01=Method names do not match\nBody name = {0}\nService name = {1}\nService nameList = {2}
+needPwd00=Must specify a password!
+needService00=No target service to authorize for!
+needUser00=Need to specify a user for authorization!
+never00={0}:  this should never happen!  {1}
+
+# NOTE:  in newElem00, do not translate "MessageElement"
+newElem00=New MessageElement ({0}) named {1}
+
+no00=no {0}
+noAdminAccess00=Remote administrator access is not allowed!
+noAdminAccess01=Rejected remote access from host {0}
+noArrayArray00=Arrays of arrays are not supported ''{0}''.
+
+# NOTE:  in noArrayType00, do no translate "arrayType"
+noArrayType00=No arrayType attribute for array!
+
+# NOTE:  in noBeanHome00, do not translate "EJBProvider"
+noBeanHome00=EJBProvider cannot get Bean Home
+
+# NOTE:  in noBody00, do not translate "Body"
+noBody00=Body not found.
+
+noChains00=Services must use targeted chains
+noClass00=Could not create class {0}
+
+# NOTE:  in noClassname00, do not translate "classname"
+noClassname00=No classname attribute in type mapping
+
+noComponent00=No deserializer defined for array type {0}
+noConfig00=No engine configuration file - aborting!
+
+# NOTE:  in noContext00, do not translate "MessageElement.getValueAsType()"
+noContext00=No deserialization context to use in MessageElement.getValueAsType()!
+
+# NOTE:  in noContext01, do not translate "EJBProvider", "Context"
+noContext01=EJBProvider cannot get Context
+
+# NOTE:  in noCustomElems00, do not translate "<body>"
+noCustomElems00=No custom elements allowed at top level until after the <body> tag
+noData00=No data
+noDeploy00=Could not generate deployment list!
+noDeser00=No deserializer for {0}
+
+# NOTE:  in noDeserFact00, do not translate "DeserializerFactory"
+noDeserFact00=Could not load DeserializerFactory {0}
+
+noDeser01=Deserializing parameter ''{0}'':  could not find deserializer for type {1}
+noDoc00=Could not get DOM document: XML was "{0}"
+
+# NOTE:  in noEngine00, do not translate "AXIS"
+noEngine00=Could not find AXIS engine!
+
+# NOTE:  in noEngineConfig00, do not translate "engineConfig"
+noEngineConfig00=Wanted ''engineConfig'' element, got ''{0}''
+
+# NOTE:  in engineConfigWrongClass??, do not translate "EngineConfiguration"
+engineConfigWrongClass00=Expected instance of ''EngineConfiguration'' in environment
+engineConfigWrongClass01=Expected instance of ''{0}'' to be of type ''EngineConfiguration''
+
+# NOTE:  in engineConfigNoClass00, do not translate "EngineConfiguration"
+engineConfigNoClass00=''EngineConfiguration'' class not found: ''{0}''
+
+engineConfigNoInstance00=''{0}'' class cannot be instantiated
+engineConfigIllegalAccess00=Illegal access while instantiating class ''{0}''
+encodingDisappeared00=XML Encoding runtime error: Previously supported encoding {0} disappeared.
+
+jndiNotFound00=JNDI InitialContext() returned null, default to non-JNDI behavior (DefaultAxisServerFactory)
+
+# NOTE:  in servletContextWrongClass00, do not translate "ServletContext"
+servletContextWrongClass00=Expected instance of ''ServletContext'' in environment
+
+noEngineWSDD=Engine configuration is not present or not WSDD!
+
+noHandler00=Cannot locate handler:  {0}
+
+# NOTE:  in noHandler01, do not translate "QName"
+noHandler01=No handler for QName {0}
+
+noHandler02=Could not find registered handler ''{0}''
+
+noHandlerClass00=No HandlerProvider ''handlerClass'' option was specified!
+
+noHandlersInChain00=No handlers in {0} ''{1}''
+
+noHeader00=no {0} header!
+
+# NOTE:  in noInstructions00, do not translate "SOAP"
+noInstructions00=Processing instructions are not allowed within SOAP messages
+
+# NOTE:  in noJSSE00, do not translate "SSL", JSSE", "classpath"
+noJSSE00=SSL feature disallowed:  JSSE files not installed or present in classpath
+
+noMap00={0}:  {1} is not a map
+
+noMatchingProvider00=No provider type matches QName ''{0}''
+
+noMethod00=Method not found\nMethod name = {0}\nService name = {1}
+noMethod01=No method!
+noMultiArray00=Multidimensional arrays are not supported ''{0}''.
+noOperation00=No operation name specified!
+noOperation01=Cannot find operation:  {0} - none defined
+noOperation02=Cannot find operation:  {0}
+noOption00=No ''{0}'' option was configured for the service ''{1}''
+
+# NOTE:  in noParent00, do not translate "SOAPTypeMappingRegistry"
+noParent00=no SOAPTypeMappingRegistry parent
+
+noPart00={0} not found as an input part OR an output part!
+noPivot00=No pivot handler ''{0}'' found!
+noPivot01=Can''t deploy a Service with no provider (pivot)!
+
+# NOTE:  in noPort00, do not translate "port"
+noPort00=Cannot find port:  {0}
+
+# NOTE:  in noPortType00, do not translate "portType"
+noPortType00=Cannot find portType:  {0}
+
+noPrefix00={0} did not find prefix:  {1}
+noPrincipal00=No principal!
+noProviderAttr00=No provider specified for service ''{0}''
+noProviderElem00=The required provider element is missing
+noRecorder00=No event recorder inside element
+
+# NOTE:  in noRequest00, do not translate "MessageContext"
+noRequest00=No request message in MessageContext?
+
+noRequest01=No request chain
+noResponse00=No response chain
+noResponse01=No response message!
+noRoles00=No roles specified for target service, allowing.
+noRoles01=No roles specified for target service, disallowing.
+noSerializer00=No serializer found for class {0} in registry {1}
+noSerializer01=Could not load serializer class {0}
+noService00=Cannot find service:  {0}
+noService01=No service has been defined
+noService02=This service is not available at this endpoint ({0}).
+noService03=No service/pivot
+noService04=No service object defined for this Call object.
+
+#NOTE:  in noService04, do not translate "AXIS", "targetService"
+noService05=The AXIS engine could not find a target service to invoke!  targetService is {0}
+
+
+noService06=No service is available at this URL
+# NOTE:  in noService07, do not translate "JWS"
+#UNUSED
+noService07=There may be a JWS service here. 
+# NOTE:  in noService08, do not translate "WSDL"
+#UNUSED
+noService08=Click here to look for the WSDL description
+
+# NOTE:  in noSecurity00, do not translate "MessageContext"
+noSecurity00=No security provider in MessageContext!
+
+# NOTE:  in noSOAPAction00, do not translate "HTTP", "SOAPAction"
+noSOAPAction00=No HTTP SOAPAction property in context
+
+noTransport00=No client transport named ''{0}'' found!
+noTransport01=No transport mapping for protocol:  {0}
+noType00=No mapped schema type for {0}
+
+# NOTE:  in noType01, do not translate "vector"
+noType01=No type attribute for vector!
+
+noTypeAttr00=Must include type attribute for Handler deployment!
+
+noTypeQName00=No type QName for mapping!
+
+notAuth00=User ''{0}'' not authorized to ''{1}''
+notImplemented00={0} is not implemented!
+
+noTypeOnGlobalConfig00=GlobalConfiguration does not allow the ''type'' attribute!
+
+# NOTE:  in noUnderstand00, do not translate "MustUnderstand"
+noUnderstand00=Did not understand "MustUnderstand" header(s):{0}
+
+versionMissmatch00=Version Mismatch
+
+# NOTE:  in noValue00, do not translate "value", "RPCParam"
+noValue00=No value field for RPCParam to use?!? {0}
+
+# NOTE:  in noWSDL00, do not translate "WSDL"
+noWSDL00=Could not generate WSDL!
+# NOTE:  in noWSDL01, do not translate "SOAP"
+noWSDL01=There is no SOAP service at this location
+# NOTE:  in noWSDL02, do not translate "WSDL"
+noWSDL02=There is a service at this location, but Axis did not generate the WSDL for it. Perhaps it is is misconfigured. 
+
+null00={0} is null
+
+# NOTE:  in nullCall00, do not translate "AdminClient" or "''call''"
+nullCall00=AdminClient did not initialize correctly: ''call'' is null!
+
+# NOTE:  in nullEJBUser00, do not translate "EJBProvider"
+nullEJBUser00=Null user in EJBProvider
+
+nullHandler00={0}:  Null handler;
+nullNamespaceURI=Null namespace URI specified.
+nullParent00=null parent!
+
+nullProvider00=Null provider type passed to WSDDProvider!
+
+nullResponse00=Null response message!
+oddDigits00=Odd number of digits in hex string
+ok00=OK
+
+# NOTE:  in the only1Body00, do not translate "Body"
+only1Body00=Only one Body element allowed!
+
+# NOTE:  in the only1Header00, do not translate "Header"
+only1Header00=Only one Header element allowed!
+
+optionAll00=generate code for all elements, even unreferenced ones
+optionHelp00=print this message and exit
+
+# NOTE:  in optionImport00, do not translate "WSDL"
+optionImport00=only generate code for the immediate WSDL document
+
+# NOTE:  in optionMsgCtx00, do not translate "MessageContext"
+optionMsgCtx00=emit a MessageContext parameter to skeleton methods
+
+# NOTE:  in optionFileNStoPkg00, do not translate "NStoPkg.properties"
+optionFileNStoPkg00=file of NStoPkg mappings (default NStoPkg.properties)
+
+# NOTE:  in optionNStoPkg00, do not translate "namespace", "package"
+optionNStoPkg00=mapping of namespace to package
+
+optionOutput00=output directory for emitted files
+optionPackage00=override all namespace to package mappings, use this package name instead
+optionTimeout00=timeout in seconds (default is 45, specify -1 to disable)
+options00=Options:
+
+# NOTE:  in optionScope00, do not translate "Application", "Request", "Session"
+optionScope00=add scope to deploy.wsdd: "Application", "Request", "Session"
+
+optionSkel00=emit server-side bindings for web service
+
+# NOTE:  in optionTest00, do not translate "junit"
+optionTest00=emit junit testcase class for web service
+
+optionBuildFile00=emit Ant Buildfile for web service
+
+optionVerbose00=print informational messages
+
+
+outMsg00=Out message: {0}
+params00=Parameters are:  {0}
+parent00=parent
+
+# NOTE: in parmMismatch00, do not translate "IN/INOUT", "addParameter()"
+parmMismatch00=Number of parameters passed in ({0}) doesn''t match the number of IN/INOUT parameters ({1}) from the addParameter() calls
+
+# NOTE:  in parsing00, do not translate "XML"
+parsing00=Parsing XML file:  {0}
+
+parseError00=Error in parsing:  {0}
+password00=Password:  {0}
+perhaps00=Perhaps there will be a form for invoking the service here...
+popHandler00=Popping handler {0}
+process00=Processing ''{0}''
+processFile00=Processing file {0}
+
+# NOTE:  in pushHandler00, we are pushing a handler onto a stack
+pushHandler00=Pushing handler {0}
+quit00={0} quitting.
+quitRequest00=Administration service requested to quit, quitting.
+
+# NOTE:  in reachedServer00, do not translate "SimpleAxisServer"
+reachedServer00=You have reached the SimpleAxisServer.
+unableToStartServer00=Unable to bind to port {0}. Did not start SimpleAxisServer.
+
+# NOTE:  in reachedServlet00, do not translate "AXIS HTTP Servlet", "URL", "SOAP"
+reachedServlet00=Hi, you have reached the AXIS HTTP Servlet.  Normally you would be hitting this URL with a SOAP client rather than a browser.
+
+readOnlyConfigFile=Configuration file read-only so engine configuration changes will not be saved.
+
+register00=register ''{0}'' - ''{1}''
+registerTypeMap00=Registering type mapping {0} -> {1}
+registryAdd00=Registry {0} adding ''{1}'' ({2})
+result00=Got result:  {0}
+removeBody00=Removing body element from message...
+removeHeader00=Removing header from message...
+removeTrailer00=Removing trailer from message...
+return00={0} returning new instance of {1}
+return01=return code:  {0}\n{1}
+return02={0} returned:  {1}
+returnChain00={0} returning chain ''{1}''
+saveConfigFail00=Could not write engine config!
+registerTypeMappingFor01=Please register a typemapping/beanmapping for ''{0}''
+
+unsupportedEncoding00=Encoding {0} not supported.
+unsupportedDefaultEncoding00=Failed to initialize default encoding. Ensure your VM supports at least {0} encoding.
+
+# NOTE:  in semanticCheck00, do not translate "SOAP"
+semanticCheck00=Doing SOAP semantic checks...
+
+# NOTE:  in sendingXML00, do not translate "XML"
+sendingXML00={0} sending XML:
+
+serializer00=Serializer class is {0}
+serverDisabled00=This Axis server is not currently accepting requests.
+
+# NOTE:  in serverFault00, do not translate "HTTP"
+serverFault00=HTTP server fault
+
+serverRun00=Server is running
+serverStop00=Server is stopped
+
+servletEngineWebInfError00=Problem with servlet engine /WEB-INF directory
+servletEngineWebInfError01=Problem with servlet engine config file: {0}
+servletEngineWebInfWarn00=Unable to load/create servlet engine config file, attempting internal default (from jar).
+servletEngineWebInfError02=Problem with servlet engine config file (loading from jar)
+
+setCurrMsg00=Setting current message form to: {0} (current message is now {1})
+setProp00=Setting {0} property in {1}
+
+# NOTE:  in setupTunnel00, do not translate "SSL"
+setupTunnel00=Set up SSL tunnelling through {0}:{1}
+
+setValueInTarget00=Set value {0} in target {1}
+somethingWrong00=Sorry, something seems to have gone wrong... here are the details:
+start00={0} starting up on port {1}.
+startElem00=Start element {0}
+startPrefix00=Start prefix mapping ''{0}'' -> ''{1}''
+stackFrame00=Stack frame marker
+test00=...
+test01=.{0}.
+test02={0}, {1}.
+test03=.{2}, {0}, {1}.
+test04=.{0} {1} {2} ... {3} {2} {4} {5}.
+timeout00=Session id {0} timed out.
+transport00=Transport is {0}
+transport01={0}:  Transport = ''{1}''
+
+# NOTE:  in transportName00, do not translate "AXIS"
+transportName00=In case you are interested, my AXIS transport name appears to be ''{0}''
+
+tryingLoad00=Trying to load class:  {0}
+
+# NOTE:  in typeFromAttr00, do not translate "Type"
+typeFromAttr00=Type from attributes is:  {0}
+
+# NOTE:  in typeFromParms00, do not translate "Type"
+typeFromParms00=Type from default parameters is:  {0}
+
+# NOTE:  in typeNotSet00, do not translate "Part"
+typeNotSet00=Type attribute on Part ''{0}'' is not set
+
+types00=Types:
+
+# NOTE:  in typeSetNotAllowed00, do not translate "Type"
+typeSetNotAllowed00={0} disallows setting of Type
+unauth00=Unauthorized
+undeploy00=Undeploying {0}
+unexpectedDesc00=Unexpected {0} descriptor
+unexpectedEOS00=Unexpected end of stream
+unexpectedUnknown00=Unexpected unknown element
+unknownHost00=Unknown host - could not verify admininistrator access
+unknownType00=Unknown type:  {0}
+unknownType01=Unknown type to {0}
+
+# NOTE: in unlikely00, do not translate "URL", "WSDL2Java"
+unlikely00=unlikely as URL was validated in WSDL2Java
+
+unregistered00=Unregistered type:  {0}
+usage00=Usage:  {0}
+user00=User:  {0}
+usingServer00={0} using server {1}
+value00=value:  {0}
+warning00=Warning: {0}
+where00=Where {0} looks like:
+
+# NOTE:  in withParent00, do not translate "SOAPTypeMappingRegistry"
+withParent00=SOAPTypeMappingRegistry with parent
+wsdlError00=Error processing WSDL document: {0} {1}
+
+wsdlCreated00=WSDL created by {0}
+
+# NOTE:  in wsdlGenLine00, do not translate "WSDL"
+wsdlGenLine00=This file was auto-generated from WSDL
+
+# NOTE:  in wsdlGenLine01, do not translate "Apache Axis WSDL2Java"
+wsdlGenLine01=by the Apache Axis {0} WSDL2Java emitter.
+
+wsdlMissing00=Missing WSDL document
+
+# NOTE:  in wsdlService00, do not translate "WSDL service"
+wsdlService00=Services from {0} WSDL service
+
+# NOTE:  in xml entries, do not translate "XML"
+xmlRecd00=XML received:
+xmlSent00=XML sent:
+
+# NOTE:  in the deployXX entries, do not translate "<!--" and "-->".  These are comment indicators.  Adding or removing whitespace to make the comment indicators line up would be nice.  Also, do not translate the string "axis", or messages:  deploy03, deploy04, deploy07 deploy08.  Those messages are included so that the spaces can be lined up by the translator.
+deploy00=<!-- Use this file to deploy some handlers/chains and services      -->
+deploy01=<!-- Use this file to undeploy some handlers/chains and services    -->
+deploy02=<!-- Two ways to do this:                                           -->
+deploy03=<!--   java org.apache.axis.client.AdminClient deploy.wsdd          -->
+deploy04=<!--   java org.apache.axis.client.AdminClient undeploy.wsdd        -->
+deploy05=<!--      after the axis server is running                          -->
+deploy06=<!-- or                                                             -->
+deploy07=<!--   java org.apache.axis.utils.Admin client|server deploy.wsdd   -->
+deploy08=<!--   java org.apache.axis.utils.Admin client|server undeploy.wsdd -->
+deploy09=<!--      from the same directory that the Axis engine runs         -->
+
+alreadyExists00={0} already exists
+optionDebug00=print debug information
+symbolTable00=Symbol Table
+undefined00=Type {0} is referenced but not defined.
+
+#NOTE: in cannotFindJNDIHome00, do not translate "EJB" or "JNDI"
+cannotFindJNDIHome00=Cannot find EJB at JNDI location {0}
+cannotCreateInitialContext00=Cannot create InitialContext
+undefinedloop00= The definition of {0} results in a loop.
+deserInitPutValueDebug00=Initial put of deserialized value= {0} for id= {1}
+deserPutValueDebug00=Put of deserialized value= {0} for id= {1}
+j2wemitter00=emitter
+j2wusage00=Usage: {0}
+j2woptions00=Options:
+j2wdetails00=Details:\n   portType element name= <--portTypeName value> OR <class-of-portType name>\n   binding  element name= <--bindingName value> OR <--servicePortName value>SoapBinding\n   service  element name= <--serviceElementName value> OR <--portTypeName value>Service \n   port     element name= <--servicePortName value>\n   address location     = <--location value>
+j2wopthelp00=print this message and exit
+j2woptoutput00=output WSDL filename
+j2woptlocation00=service location url
+j2woptportTypeName00=portType name (obtained from class-of-portType if not specified)
+j2woptservicePortName00=service port name (obtained from --location if not specified)
+j2woptserviceElementName00=service element name (defaults to --servicePortName value + "Service")
+j2woptnamespace00=target namespace
+j2woptPkgtoNS00=package=namespace, name value pairs
+j2woptmethods00=space or comma separated list of methods to export
+j2woptall00=look for allowed methods in inherited class
+j2woptoutputWsdlMode00=output WSDL mode: All, Interface, Implementation
+j2woptlocationImport00=location of interface wsdl
+j2woptnamespaceImpl00=target namespace for implementation wsdl
+j2woptoutputImpl00=output Implementation WSDL filename, setting this causes --outputWsdlMode to be ignored
+j2woptfactory00=name of the Java2WSDLFactory class for extending WSDL generation functions
+j2woptimplClass00=optional class that contains implementation of methods in class-of-portType.  The debug information in the class is used to obtain the method parameter names, which are used to set the WSDL part names.
+j2werror00=Error: {0}
+j2wmodeerror=Error Unrecognized Mode: {0} Use All, Interface or Implementation. Continuing with All.
+j2woptexclude00=space or comma separated list of methods not to export
+j2woptstopClass00=space or comma separated list of class names which will stop inheritance search if --all switch is given
+j2woptImportSchema00=A file or URL to an XML Schema that should be physically imported into the generated WSDL
+
+# NOTE:  in optionSkeletonDeploy00, do not translate "--server-side".
+optionSkeletonDeploy00=deploy skeleton (true) or implementation (false) in deploy.wsdd.  Default is false.  Assumes --server-side.
+
+j2wMissingLocation00=The -l <location> option must be specified if the full wsdl or the implementation wsdl is requested.
+invalidSolResp00={0} is a solicit-response style operation and is unsupported.
+invalidNotif00={0} is a notification style operation and is unsupported.
+
+multipleBindings00=Warning: Multiple bindings use the same portType: {0}.  Only one interface is currently generated, which may not be what you want.
+triedArgs00={0} on object "{1}", method name "{2}", tried argument types:  {3}
+triedClass00=tried class:  {0}, method name:  {1}.
+
+#############################################################################
+# DO NOT TOUCH THESE PROPERTIES - THEY ARE AUTOMATICALLY UPDATED BY THE BUILD
+# PROCESS.
+axisVersion=Apache Axis version: #axisVersion#
+axisVersionRaw=#axisVersion#
+axisBuiltOnRaw=#today#
+axisUserAgent=Axis/#axisVersion#
+builtOn=Built on #today#
+#############################################################################
+
+badProp00=Bad property.  The value for {0} should be of type {1}, but it is of type {2}.
+badProp01=Bad property.  {0} should be {1}; but it is {2}.
+badProp02=Cannot set {0} property when {1} property is not {2}.
+badProp03=Null property name specified.
+badProp04=Null property value specified.
+badProp05=Property name {0} not supported.
+badGetter00=Null getter method specified.
+badAccessor00=Null accessor method specified.
+badSetter00=Null setter method specified.
+badModifier00=Null modifier method specified.
+badField00=Null public instance field specified.
+
+badJavaType=Null java class specified.
+badXmlType=Null qualified name specified.
+badSerFac=Null serializer factory specified.
+badDeserFac=Null deserializer factory specified.
+
+literalTypePart00=Error: Message part {0} of operation or fault {1} is specified as a type and the soap:body use of binding "{2}" is literal.  This WSDL is not currently supported.
+BadServiceName00=Error: Empty or missing service name
+AttrNotSimpleType00=Bean attribute {0} is of type {1}, which is not a simple type
+AttrNotSimpleType01=Error: attribute is of type {0}, which is not a simple type
+NoSerializer00=Unable to find serializer for type {0}
+
+NoJAXRPCHandler00=Unable to create handler of type {0}
+
+optionTypeMapping00=indicate 1.1 or 1.2.  The default is 1.1 (SOAP 1.1 JAX-RPC compliant.  1.2 indicates SOAP 1.1 encoded.)
+badTypeMappingOption00=The -typeMappingVersion argument must be 1.1 or 1.2
+j2wopttypeMapping00=indicate 1.1 or 1.2.  The default is 1.1 (SOAP 1.1 JAX-RPC compliant  1.2 indicates SOAP 1.1 encoded.)
+j2wBadTypeMapping00=The -typeMappingVersion argument must be 1.1 or 1.2
+
+nodisk00=No disk access, using memory only.
+
+noFactory00=!! No Factory for {0}
+noTransport02=Couldn''t find transport {0}
+
+noCompiler00=No compiler found in your classpath!  (you may need to add ''tools.jar'')
+compilerFail00=Please ensure that you have your JDK''s rt.jar listed in your classpath. Jikes needs it to operate.
+
+nullFieldDesc=Null FieldDesc specified
+exception00=Exception:
+exception01=Exception: {0}
+axisConfigurationException00=ConfigurationException:
+parserConfigurationException00=ParserConfigurationException:
+SAXException00=SAXException:
+javaNetUnknownHostException00=java.net.UnknownHostException:
+javaxMailMessagingException00=javax.mail.MessagingException:
+javaIOException00=java.io.IOException:
+javaIOException01=java.io.IOException: {0}
+illegalAccessException00=IllegalAccessException:
+illegalArgumentException00=IllegalArgumentException:
+illegalArgumentException01=IllegalArgumentException: {0}
+invocationTargetException00=InvocationTargetException:
+instantiationException00=InstantiationException:
+malformedURLException00=MalformedURLException:
+axisFault00=AxisFault:
+axisFault01=AxisFault: {0}
+toAxisFault00=Mapping Exception to AxisFault
+toAxisFault01=Mapping Exception to AxisFault: {0}
+
+# NOTE:  in badSkeleton00, do not translate "--skeletonDeploy" and "--server-side".
+badSkeleton00=Error:  --skeletonDeploy cannot be specified without --server-side.
+badStyle=Bad string for style value - was ''{0}'', should be ''rpc'', ''document'', or ''wrapped''.
+onlyOneMapping=Only a single <elementMapping> is allowed per-operation at present.
+
+timedOut=WSDL2Java emitter timed out (this often means the WSDL at the specified URL is inaccessible)!
+valuePresent=MessageElement.addChild called when an object value is present
+xmlPresent=MessageElement.setObjectValue called on an instance which was constructed using XML
+attachEnabled=Attachment support is enabled?
+attachDisabled=Unable to find required classes (javax.activation.DataHandler and javax.mail.internet.MimeMultipart). Attachment support is disabled. 
+noEndpoint=No endpoint
+headerNotNull=Header may not be null!
+headerNotEmpty=Header may not be empty!
+headerValueNotNull=Header value may not be null!
+setMsgForm=Setting current message form to: {0} (currentMessage is now {1})
+exitCurrMsg=Exit:  {0}, current message is {1}
+currForm=current form is {0}
+unsupportedAttach=Unsupported attachment type "{0}" only supporting "{1}".
+
+# NOTE:  in onlySOAPParts, do not translate "SOAPPart".
+onlySOAPParts=This attachment implementation accepts only SOAPPart objects as the root part.
+
+gotNullPart=AttachmentUtils.getActiviationDataHandler received a null parameter as a part.
+streamNo=New boundary stream number:  {0}
+streamClosed=Stream closed.
+eosBeforeMarker=End of stream encountered before final boundary marker.
+atEOS=Boundary stream number {0} is at end of stream
+readBStream="Read {0} from BoundaryDelimitedStream:  {1} "{2}"
+bStreamClosed=Boundary stream number {0} is closed
+
+# NOTE:  in badMaxCache, do not translate "maxCached".
+badMaxCached=maxCached value is bad:  {0}
+
+maxCached=ManagedMemoryDataSource.flushToDisk maximum cached {0}, total memory {1}.
+diskCache=Disk cache file name "{0}".
+resourceDeleted=Resource has been deleted.
+noResetMark=Reset and mark not supported!
+nullInput=input buffer is null
+negOffset=Offset is negative:  {0}
+length=Length:  {0}
+writeBeyond=Write beyond buffer
+reading=reading {0} bytes from disk
+
+# NOTE: do not translate openBread
+openBread=open bread = {0}
+
+flushing=flushing
+read=read {0} bytes
+readError=Error reading data stream:  {0}
+noFile=File for data handler does not exist:  {0}
+mimeErrorNoBoundary=Error in MIME data stream, start boundary not found, expected:  {0}
+mimeErrorParsing=Error in parsing mime data stream:  {0}
+noRoot=Root part containing SOAP envelope not found.  contentId = {0}
+noAttachments=No support for attachments
+noContent=No content
+targetService=Target service:  {0}
+exceptionPrinting=Exception caught while printing request message
+noConfigFile=No engine configuration file - aborting!
+noTypeSetting={0} disallows setting of Type
+noSubElements=The element "{0}" is an attachment with sub elements which is not supported.
+
+# NOTE:  in defaultCompiler, do not translate "javac"
+defaultCompiler=Using default javac compiler
+noModernCompiler=Javac connector could not find modern compiler -- falling back to classic.
+compilerClass=Javac compiler class:  {0}
+noMoreTokens=no more tokens - could not parse error message:  {0}
+cantParse=could not parse error message:  {0}
+
+noParmAndRetReq=Parameter or return type inferred from WSDL and may not be updated.
+
+# NOTE:  in sunJavac, do not translate "Sun Javac"
+sunJavac=Sun Javac Compiler
+
+# NOTE:  in ibmJikes, do not translate "IBM Jikes"
+ibmJikes=IBM Jikes Compiler
+
+typeMeta=Type metadata
+returnTypeMeta=Return type metadata object
+needStringCtor=Simple Types must have a String constructor
+needToString=Simple Types must have a toString for serializing the value
+typeMap00=All the type mapping information is registered
+typeMap01=when the first call is made.
+typeMap02=The type mapping information is actually registered in
+typeMap03=the TypeMappingRegistry of the service, which
+typeMap04=is the reason why registration is only needed for the first call.
+mustSetStyle=must set encoding style before registering serializers
+
+# NOTE:  in mustSpecifyReturnType and mustSpecifyParms, do not translate "addParameter()" and "setReturnType()"
+mustSpecifyReturnType=No returnType was specified to the Call object!  You must call setReturnType() if you have called addParameter().
+mustSpecifyParms=No parameters specified to the Call object!  You must call addParameter() for all parameters if you have called setReturnType().
+noElemOrType=Error: Message part {0} of operation {1} should have either an element or a type attribute
+badTypeNode=Error: Missing type resolution for element {2}, in WSDL message part {0} of operation {1}. Hint: Try turning off ''wrapped'' processing (--noWrapped).
+
+# NOTE:  in noUse, do no translate "soap:operation", "binding operation", "use".
+noUse=The soap:operation for binding operation {0} must have a "use" attribute.
+
+fixedTypeMapping=Default type mapping cannot be modified.
+delegatedTypeMapping=Type mapping cannot be modified via delegate.
+badTypeMapping=Invalid TypeMapping specified: wrong type or null.
+defaultTypeMappingSet=Default type mapping from secondary type mapping registry is already in use.
+getPortDoc00=For the given interface, get the stub implementation.
+getPortDoc01=If this service has no port for the given interface,
+getPortDoc02=then ServiceException is thrown.
+getPortDoc03=This service has multiple ports for a given interface;
+getPortDoc04=the proxy implementation returned may be indeterminate.
+noStub=There is no stub implementation for the interface:
+CantGetSerializer=unable to get serializer for class {0}
+unknownPortName=Cannot set Endpoint Address for Unknown Port
+setEndpointDoc00=Set the endpoint address for the specified port name.
+BadImplementation00=class {0} must implement {1}
+
+
+noVector00={0}:  {1} is not a vector
+badVector00=Circular reference in Vector 
+
+optionFactory00=name of a custom class that implements GeneratorFactory interface (for extending Java generation functions)
+optionHelper00=emits separate Helper classes for meta data
+
+badParameterMode=Invalid parameter mode byte ({0}) passed to getModeAsString().
+
+attach.bounday.mns=Marking streams not supported.
+noSuchOperation=No such operation ''{0}''
+
+optionUsername=username to access the WSDL-URI
+optionPassword=password to access the WSDL-URI
+cantGetDoc00=Unable to retrieve WSDL document: {0}
+implAlreadySet=Attempt to set implementation class on a ServiceDesc which has already been configured
+optionClasspath=additional classpath elements
+optionNSInclude=include namespace in generated code
+optionNSExclude=exclude namespace from generated code
+optionQuiet=do not print any informational or debug messages (except errors)
+implementationClassName=custom name of web service implementation
+cantCreateBean00=Unable to create JavaBean of type {0}.  Missing default constructor?  Error was: {1}.
+faultDuringCleanup=AxisEngine faulted during cleanup!
+
+j2woptsoapAction00=value of the operation''s soapAction field. Values are DEFAULT, OPERATION or NONE. OPERATION forces soapAction to the name of the operation.  DEFAULT causes the soapAction to be set according to the operation''s meta data (usually "").  NONE forces the soapAction to "".  The default is DEFAULT.
+j2wBadSoapAction00=The value of --soapAction must be DEFAULT, NONE or OPERATION.
+dispatchIAE00=Tried to invoke method {0} with arguments {1}.  The arguments do not match the signature.
+
+
+ftsf00=Creating trusting socket factory
+ftsf01=Exception creating factory
+ftsf02=SSL setup failed
+ftsf03=isClientTrusted: yes
+ftsf04=isServerTrusted: yes
+ftsf05=getAcceptedIssuers: none
+
+generating=Generating {0}
+
+j2woptStyle00=The style of binding in the WSDL, either DOCUMENT, RPC, or WRAPPED.
+j2woptBadStyle00=The value of --style must be DOCUMENT, RPC, or WRAPPED.
+
+noClassForService00=Could not find class for the service named: {0}\nHint: you may need to copy your class files/tree into the right location (which depends on the servlet system you are using).
+j2wDuplicateClass00=The <class-of-portType> has already been specified as, {0}.  It cannot be specified again as {1}.
+j2wMissingClass00=The <class-of-portType> was not specified.
+w2jDuplicateWSDLURI00=The wsdl URI has already been specified as, {0}.  It cannot be specified again as {1}.
+w2jMissingWSDLURI00=The wsdl URI was not specified.
+exclusiveQuietVerbose=--quiet and --verbose are exclusive
+exclusiveQuietDebug=--quiet and --Debug are exclusive
+
+badEnum02=Unrecognized {0}: ''{1}''
+badEnum03=Unrecognized {0}: ''{1}'', defaulting to ''{2}''
+beanCompatType00=The class {0} is not a bean class and cannot be converted into an xml schema type.  An xml schema anyType will be used to define this class in the wsdl file.
+beanCompatPkg00=The class {0} is defined in a java or javax package and cannot be converted into an xml schema type.  An xml schema anyType will be used to define this class in the wsdl file.
+beanCompatConstructor00=The class {0} does not contain a default constructor, which is a requirement for a bean class.  The class cannot be converted into an xml schema type.  An xml schema anyType will be used to define this class in the wsdl file.
+badNamespaceForOperation00=soap:body in Binding {0} / Operation {1} has an empty namespace
+missingPartsForMessage00=Message {0} has no parts
+
+unsupportedSchemaType00=The XML Schema type ''{0}'' is not currently supported.
+optionNoWrap00=turn off support for "wrapped" document/literal
+noTypeOrElement00=Error: Message part {0} of operation or fault {1} has no element or type attribute.
+
+msgContentLengthHTTPerr=Message content length {0} exceeds servlet return capacity.
+badattachmenttypeerr=The value of {0} for attachment format must be {1};
+attach.dimetypeexceedsmax=DIME Type length is {0} which exceeds maximum {0}
+attach.dimelengthexceedsmax=DIME ID length is {0} which exceeds maximum {1}.
+attach.dimeMaxChunkSize0=Max chunk size \"{0}\" needs to be greater than one.
+attach.dimeMaxChunkSize1=Max chunk size \"{0}\" exceeds 32 bits.
+attach.dimeReadFullyError=Each DIME Stream must be read fully or closed in succession.
+attach.dimeNotPaddedCorrectly=DIME stream data not padded correctly.
+attach.readLengthError=Received \"{0}\" bytes to read.
+attach.readOffsetError=Received \"{0}\" as an offset.
+attach.readArrayNullError=Array to read is null
+attach.readArrayNullError=Array to read is null
+attach.readArraySizeError=Array size of {0} to read {1} at offset {2} is too small.
+attach.DimeStreamError0=End of physical stream detected when more DIME chunks expected.
+attach.DimeStreamError1=End of physical stream detected when {0} more bytes expected.
+attach.DimeStreamError2=There are no more DIME chunks expected!
+attach.DimeStreamError3=DIME header less than {0} bytes.
+attach.DimeStreamError4=DIME version received \"{0}\" greater than current supported version \"{1}\".
+attach.DimeStreamError5=DIME option length \"{0}\" is greater stream length.
+attach.DimeStreamError6=DIME typelength length \"{0}\" is greater stream length.
+attach.DimeStreamError7=DIME stream closed during options padding.
+attach.DimeStreamError8=DIME stream closed getting ID length.
+attach.DimeStreamError9=DIME stream closed getting ID padding.
+attach.DimeStreamError10=DIME stream closed getting type.
+attach.DimeStreamError11=DIME stream closed getting type padding.
+attach.DimeStreamBadType=DIME stream received bad type \"{0}\".
+
+badOutParameter00=A holder could not be found or constructed for the OUT parameter {0} of method {1}.
+setJavaTypeErr00=Illegal argument passed to ParameterDesc.setJavaType.  The java type {0} does not match the mode {1}
+badNormalizedString00=Invalid normalizedString value
+badToken00=Invalid token value
+badPropertyDesc00=Internal Error occurred while build the property descriptors for {0}
+j2woptinput00=input WSDL filename
+j2woptbindingName00=binding name (--servicePortName value + "SOAPBinding" if not specified)
+writeSchemaProblem00=Problems encountered trying to write schema for {0}
+badClassFile00=Error looking for paramter names in bytecode: input does not appear to be a valid class file
+unexpectedEOF00=Error looking for paramter names in bytecode: unexpected end of file
+unexpectedBytes00=Error looking for paramter names in bytecode: unexpected bytes in file
+beanCompatExtends00=The class {0} extends non-bean class {1}.  An xml schema anyType will be used to define {0} in the wsdl file.
+wrongNamespace00=The XML Schema type ''{0}'' is not valid in the Schema version ''{1}''.
+
+onlyOneBodyFor12=Only one body allowed for SOAP 1.2 RPC
+noElemAfterBody12=No element allowed after SOAP 1.2 body
+noEncodingStyleAttrAppear=encodigstyle attribute must not appear in element {0} in SOAP 1.2
+noIDandHREFonSameElement=A ref attribute information item and an id attribute information item  MUST NOT appear on the same element information item in SOAP 1.2
+invalidEncodingStyle=Encoding style is invalid
+noSparseArray=Partially transmitted and sparse arrays is not supported in SOAP 1.2
+differentTypes00=Error: The input and output parameter have the same name, ''{0}'', but are defined with type ''{1}'' and also with type ''{2}''.
+
+badMsgMethodParam=Message service must take either a single Vector or a Document - method {0} takes a single {1}
+msgMethodMustHaveOneParam=Message service methods must take a single parameter.  Method {0} takes {1}
+needMessageContextArg=Full-message message service must take a single MessageContext argument.  Method {0} takes a single {1}
+onlyOneMessageOp=Message services may only have one operation - service ''{0}'' has {1}
+
+# NOTE:  in wontOverwrite, do no translate "WSDL2Java".
+wontOverwrite={0} already exists, WSDL2Java will not overwrite it.
+
+badYearMonth00=Invalid gYearMonth
+badYear00=Invalid gYear
+badMonth00=Invalid gMonth
+badDay00=Invalid gDay
+badMonthDay00=Invalid gMonthDay
+badDuration=Invalid duration: must contain a P
+
+# NOTE:  in noDataHandler, do not translate DataHandler.
+noDataHandler=Could not create a DataHandler for {0}, returning {1} instead.
+needSimpleValueSer=Serializer class {0} does not implement SimpleValueSerializer, which is necessary for attributes.
+
+# NOTE:  in needImageIO, do not translate "JIMI", "java.awt.Image", "http://java.sun.com/products/jimi/"
+needImageIO=JIMI is necessary to use java.awt.Image attachments (http://java.sun.com/products/jimi/).
+
+imageEnabled=Image attachment support is enabled?
+
+wsddServiceName00=The WSDD service name defaults to the port name.
+
+badSource=javax.xml.transform.Source implementation not supported:  {0}.
+rpcProviderOperAssert00=The OperationDesc for {0} was not found in the ServiceDesc.
+serviceDescOperSync00=The OperationDesc for {0} was not synchronized to a method of {1}.
+
+noServiceClass=No service class was found!  Are you missing a className option?
+jpegOnly=Cannot handle {0}, can only handle JPEG image types.
+
+engineFactory=Got EngineFactory: {0}
+engineConfigMissingNewFactory=Factory {0} Ignored: missing required method: {1}.
+engineConfigInvokeNewFactory=Factory {0} Ignored: invoke method failed: {1}.
+engineConfigFactoryMissing=Unable to locate a valid EngineConfigurationFactory
+engineConfigLoadFactory=Factory {0} Ignored: unable to load/resolve class.
+
+noClassNameAttr00=classname attribute is missing.
+noValidHeader=qname attribute is missing.
+
+badNonNegInt00=Invalid nonNegativeInteger
+undefinedElem00=Element {0} is referenced but not defined.
+emptyref00=Error: missing type or ref attribute for node ''{0}''
+absentRef00=Error: Cannot find referenced type ''{0}'' for type ''{1}''
+
+cannotConnectError=Unable to connect
+
+unabletoLoadMessages00=Unable to load messages!
+unabletoDeployTypemapping00=Unable to deploy typemapping: {0}
+
+badWSDDOperation=Couldn''t find a matching Java operation for WSDD operation "{0}" ({1} args)
+
+badMsgMethodStyle=Method style for message-based service wasn''t one we recognized!
+badMsgMethodParams=Method ''{0}'' does not match any of the valid signatures for message-style service methods
+
+unmatchedOp=Binding operation has no corresponding portType operation:  name = {0}, input name = {1}, output name = {2}
+noOperationForQName=Couldn''t find an appropriate operation for XML QName {0}
+noParmDesc=operation description is missing parameter description!
+noPortTypeFault=ERROR: Unable to match binding fault "{0}" from binding {2}, operation "{1}", to a PortType fault.
+unNamedFault00=ERROR: Fault is missing a name= attribute in operation "{0}", in binding {1}.
+missingSoapFault00=ERROR: Missing <soap:fault> element inFault "{0}" in operation "{0}", in binding {1}
+expectedHeaderParam=Found instance data for {0} in the soap:body instead of the soap:header.
+noReturnParam=Didn''t find specified return QName {0}!
+noMsg=No symbol table entry found for message {0}
+j2woptUse00=The use of items in the binding, either LITERAL or ENCODED
+j2woptBadUse00=The value of the use option must be LITERAL or ENCODED
+j2woptExtraClasses00=A space or comma separated list of class names to be added to the type section.
+j2woptBadClass00=Invalid class provided for --extraClasses option: {0}
+operationAlreadySet=Can''t modify settings on a Call whose OperationDesc was set by setOperation()
+
+illegalStateException00=IllegalStateException:
+unsupportedOperationException00=UnsupportedOperationException00:
+unsupportedOperationException01=UnsupportedOperationException01: {0}
+
+uuidGenFactoryCNFE00=The implementation of UUIDGen interface specified cannot be found in the classpath: {0} not found
+uuidGenFactoryException02= Exception encountered while attempting to instantiate the specified implementation of UUIDFactory: {0} message={1}
+
+badIdType00=Invalid Id
+badLanguage00=Invalid language
+
+noContainerForAnonymousType=makeTypeElement() was told to create a type "{0}", with no containing element
+cantLoadByecode=Unable to load bytecode for class "{0}"
+
+wsdlFileMissing=Unable to find WSDL file or resource {0}
+nullEngine=Null engine passed to SOAPService.setEngine()!
+servletEngineWebInfError03=Unable to find config file.  Creating new servlet engine config file: {0}
+nsToPkgFileNotFound00=ERROR: Unable to open namespace-to-package mapping file "{0}".
+nsToPkgFileLoaded00=INFO: Loaded namespace-to-package mapping file "{0}".
+nsToPkgDefaultFileLoaded00=INFO: Loaded default namespace-to-package mapping file "{0}" as java resource.
+missingPortNameException=No name defined for <port> element. Hint: add an attribute "name" to the port definition, i.e. <port name="...">
+missingBindingException=No binding defined for <port> element. Hint: add an attribute "binding" to he port definition, i.e. <port binding="...">
+twoPortsWithSameName=Two <port> elements with the same name "{0}" found. Hint: choose unique names among all port elements in a WSDL document.
+
+acUsage00=Processes a set of administration commands.
+acUsage01=
+acUsage02=The following Options are available:
+acUsage03=
+acUsage04=\t-l<url>         sets the AxisServlet URL
+acUsage05=\t-h<hostName     sets the AxisServlet host
+acUsage06=\t-p<portNumber>  sets the AxisServlet port
+acUsage07=\t-s<servletPath> sets the path to the AxisServlet
+acUsage08=\t-f<fileName>    specifies that a simple file protocol should be used
+acUsage09=\t-u<username>    sets the username
+acUsage10=\t-w<password>    sets the password
+acUsage11=\t-d              sets the debug flag (for instance, -ddd would set it to 3)
+acUsage12=\t-t<name>        sets the transport chain touse
+acUsage13=
+acUsage14=Commands:
+acUsage15=
+acUsage16=\tlist            will list the currently deployed services
+acUsage17=\tquit            will send a quit message to SimpleAxisServer
+acUsage18=\tpasswd          value changes the admin password
+acUsage19=
+acUsage20=Deployment Descriptor files:
+acUsage21=
+acUsage22=<deployment-descriptor-files> deploys or undeploys Axis components and
+acUsage23=web services described in these files
+acUsage24=
+acUsage25=If -l or -h -p -s are not set, the AdminClient will invoke
+acUsage26=http://localhost:8080/axis/servlet/AxisServlet
+
+foundJWS00=There is a Web Service here
+#NOTE in foundJWS01, do not translate WSDL
+foundJWS01=Click to see the WSDL
+
+noCharacterOrByteStream=InputSource has neither character stream nor byte stream
+couldNotReadFromCharStream=Could not read from character stream
+errorGetDocFromSOAPEnvelope=Could not get document from SOAPEnvelope
+badEjbHomeType=The home object retrieved from jndi does not have the same type as the one specified in the config file
+badEncodingStyle=Unknown encoding style
+badEncodingStyle1=Unknown encoding style : {0}
+
+badSOAPHeader00=a SOAPHeader may only have SOAPHeaderElement as its immediate children
+badSOAPBodyElement00=a SOAPBody may only have SOAPBodyElement as its immediate children
+noNamespace00=Attempted to write schema for bad QName (no namespace) : {0}
+charsInArray=Found character data inside an array element while deserializing
+
+seqHashMapConcurrentModificationException00=modification has occured in the underlying map
+seqHashMapNoSuchElementException00=there are no more elements in the iterator
+seqHashMapBadIteratorType01=bad iterator type: {0}
+seqHashMapIllegalStateException00=remove() must follow next()
+seqHashMapArrayIndexOutOfBoundsException01={0} < 0
+seqHashMapArrayIndexOutOfBoundsException02={0} >= {1}
+
+duplicateSchemaElement=Attempted to write duplicate schema element : {0}
+
+autoRegServletInit00=Auto registering WSDD files
+autoRegServletLoaded01=Loaded {0}
+autoRegServletApplyAndSaveSettings00=applyAndSaveSettings()
+autoRegServletLoadFailed01=Failed to load {0}
+
+happyClientNoAxis=Axis will not work
+happyClientNoAttachments=Attachments will not work
+happyClientNoSecurity=XML Security is not supported
+happyClientNoHTTPS=HTTPS is not available
+
+#note in happyClientNoLog4J do not translate Log4J
+happyClientNoLog4J=Logging will not use Log4J
+
+#note, in happyClientRecommendXerces do not translate xerces, or the URL
+happyClientRecommendXerces=Axis recommends Xerces2 (http://xml.apache.org/xerces2-j) as the XML Parser
+happyClientUnsupportedJVM=Axis does not support this version of Java -please upgrade
+happyClientNoParser=Could not create an XML Parser
+happyClientXMLinfo=XML Parser is {0} from {1}
+happyClientJSSEsources=jsse.jar or Java1.4 or later
+happyClientFoundDescriptionClassLocation=Found {0} ({1}) \n  at {2}
+happyClientFoundDescriptionClass=Found {0} ({1})
+happyClientWarning=Error
+happyClientError=Warning
+happyClientUnknownLocation=an unknown location
+happyClientNoResource=Warning: could not find resource {0}
+happyClientFoundResource=Found resource {0}
+happyClientHomepage=See the web page {0}
+happyClientMissingClass={0}: could not find class {1} from file {2}
+happyClientNoDependency={0} could not find a dependency of class {1} from file {2}
+happyClientTitle=Validating client configuration
+happyClientNeeded=Needed components
+happyClientOptional=Optional components
+happyClientSummary=Summary
+happyClientCorePresent=The core Axis libraries are present
+happyClientCoreMissing=Axis is missing {0} component(s)
+happyClientOptionalPresent=The optional components are present.
+happyClientOptionalMissing=Axis is missing {0} component(s)
+happyClientOptionalOK=Provided the missing functionality is not needed, the client will work
+happyClientWarningMessageCount={0} warning message(s) were printed
+
+noService10=No service named {0} is available
+
+#note, in adminServiceNoWSDD, do not translate WSDD
+adminServiceNoWSDD=Unable to process the message -was it a valid WSDD descriptor?
+failedJMSConnectorShutdown=failure in JMSConnectorShutdown
+clientNoTypemapping=There is no Java class typemapping for the fault {0}
+clientNoReturnClass=Failed to load the Java return class {0}
+noAppSession=No application session object!  Defaulting to request scope...
+
+badMUVal=''{0}'' is not a valid value for the mustUnderstand attribute on element {1}
+
+outputParamsUnavailable=output parameters are only available after invoke() has been called
+
+serviceFactoryIllegalServiceInterface=serviceInterface must not be null
+serviceFactoryServiceInterfaceRequirement={0} is required to extend javax.xml.rpc.Service
+serviceFactoryServiceImplementationNotFound={0} is not found
+serviceFactoryServiceImplementationRequirement={0} is required to extend org.apache.axis.client.Service
+serviceFactoryInvalidServiceName=Service name must not be null
+
+ignoringNonFatalException00=Ignoring non-fatal exception
+incompatibleSEI00=Incompatible service endpoint interface: {0}
+
+indexOutOfBoundsException00=IndexOutOfBoundsException:
\ No newline at end of file

Added: webservices/axis/trunk/java/dev/scratch/prototype1/src/java/org/apache/axis/om/OMAttribute.java
==============================================================================
--- (empty file)
+++ webservices/axis/trunk/java/dev/scratch/prototype1/src/java/org/apache/axis/om/OMAttribute.java	Thu Nov 18 03:16:05 2004
@@ -0,0 +1,28 @@
+package org.apache.axis.om;
+
+/**
+ * Copyright 2001-2004 The Apache Software Foundation.
+ * <p/>
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * <p/>
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * <p/>
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * <p/>
+ * User: Eran Chinthaka - Lanka Software Foundation
+ * Date: Oct 4, 2004
+ * Time: 11:49:01 AM
+ * <p/>
+ * One must implement relevant constructors for the class implementing this interface
+ * all the things like namespace, parent, value, etc., that should come in this are defined in base classes
+ */
+public interface OMAttribute extends OMNamedNode {
+
+
+}

Added: webservices/axis/trunk/java/dev/scratch/prototype1/src/java/org/apache/axis/om/OMElement.java
==============================================================================
--- (empty file)
+++ webservices/axis/trunk/java/dev/scratch/prototype1/src/java/org/apache/axis/om/OMElement.java	Thu Nov 18 03:16:05 2004
@@ -0,0 +1,98 @@
+package org.apache.axis.om;
+
+import org.apache.xml.utils.QName;
+
+import java.util.Iterator;
+
+/**
+ * Copyright 2001-2004 The Apache Software Foundation.
+ * <p/>
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * <p/>
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * <p/>
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * <p/>
+ * User: Eran Chinthaka - Lanka Software Foundation
+ * Date: Oct 4, 2004
+ * Time: 11:52:18 AM
+ * <p/>
+ * One must make sure to insert relevant constructors for the classes that are implementing this interface
+ */
+public interface OMElement extends OMNamedNode {
+
+    /**
+     * This will add child to the element. One must preserve the order of children, in this operation
+     * Tip : appending the new child is prefered
+     * @param omNode
+     */
+    public void addChild(OMNode omNode);
+
+    /**
+     * This will search for children with a given QName and will return an iterator to traverse through
+     * the OMNodes.
+     * This QName can contain any combination of prefix, localname and URI
+     * @param elementQName
+     * @return
+     * @throws OMException
+     */
+    public Iterator getChildrenWithName(QName elementQName) throws OMException;
+
+    /**
+     * This returns a collection of this element.
+     * Children can be of types OMElement, OMText.
+     */
+    public Iterator getChildren();
+
+    /**
+     * THis will create a namespace in the current element scope
+     *
+     * @param uri
+     * @param prefix
+     * @return
+     */
+    public OMNamespace createNamespace(String uri, String prefix);
+
+    /**
+     * This will find a namespace with the given uri and prefix, in the scope of the docuemnt.
+     * This will start to find from the current element and goes up in the hiararchy until this finds one.
+     * If none is found, return null
+     *
+     * @param uri
+     * @param prefix
+     * @return
+     * @throws OMException
+     */
+    public OMNamespace resolveNamespace(String uri, String prefix) throws OMException;
+
+    /**
+     * This will help to search for an attribute with a given QName within this Element
+     * @param qname
+     * @return
+     * @throws OMException
+     */
+    public Iterator getAttributeWithQName(QName qname) throws OMException;
+
+    /**
+     * This will return a List of OMAttributes
+     *
+     * @return
+     */
+    public Iterator getAttributes();
+
+    /**
+     * This will insert attribute to this element. Implementor can decide as to insert this
+     * in the front or at the end of set of attributes
+     *
+     * @param attr
+     */
+    public void insertAttribute(OMAttribute attr);
+    public void removeAttribute(OMAttribute attr);
+
+}

Added: webservices/axis/trunk/java/dev/scratch/prototype1/src/java/org/apache/axis/om/OMException.java
==============================================================================
--- (empty file)
+++ webservices/axis/trunk/java/dev/scratch/prototype1/src/java/org/apache/axis/om/OMException.java	Thu Nov 18 03:16:05 2004
@@ -0,0 +1,37 @@
+package org.apache.axis.om;
+
+/**
+ * Copyright 2001-2004 The Apache Software Foundation.
+ * <p/>
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * <p/>
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * <p/>
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * <p/>
+ * User: Eran Chinthaka - Lanka Software Foundation
+ * Date: Oct 4, 2004
+ * Time: 11:47:19 AM
+ */
+public class OMException extends RuntimeException {
+    public OMException() {
+    }
+
+    public OMException(String message) {
+        super(message);
+    }
+
+    public OMException(String message, Throwable cause) {
+        super(message, cause);
+    }
+
+    public OMException(Throwable cause) {
+        super(cause);
+    }
+}

Added: webservices/axis/trunk/java/dev/scratch/prototype1/src/java/org/apache/axis/om/OMFactory.java
==============================================================================
--- (empty file)
+++ webservices/axis/trunk/java/dev/scratch/prototype1/src/java/org/apache/axis/om/OMFactory.java	Thu Nov 18 03:16:05 2004
@@ -0,0 +1,209 @@
+package org.apache.axis.om;
+
+import org.apache.axis.om.soap.*;
+
+
+/**
+ * Copyright 2001-2004 The Apache Software Foundation.
+ * <p/>
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * <p/>
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * <p/>
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * <p/>
+ * User: Eran Chinthaka - Lanka Software Foundation
+ * Date: Nov 11, 2004
+ * Time: 10:53:06 AM
+ * <p/>
+ * This will help to create OM API object. This will ease the switching from one OM impl to another.
+ */
+public abstract class OMFactory {
+
+    // -----------------------------   OM Attribute -----------------------------------------------------------------
+    /**
+     * @param localName
+     * @param ns
+     * @param value
+     * @param parent
+     * @return
+     */
+    public abstract OMAttribute createOMAttribute(String localName, OMNamespace ns, String value, OMElement parent);
+
+    /**
+     * @param localName
+     * @param ns
+     * @param value
+     * @return
+     */
+    public abstract OMAttribute createOMAttribute(String localName, OMNamespace ns, String value);
+
+    // --------------------------------------------------------------------------------------------------------------
+
+    // -----------------------------   OM Element -----------------------------------------------------------------
+    /**
+     * @param parent
+     * @return
+     */
+    public abstract OMElement createOMElement(OMElement parent);
+
+    /**
+     * @param localName
+     * @param ns
+     * @return
+     */
+    public abstract OMElement createOMElement(String localName, OMNamespace ns);
+
+    /**
+     * @param localName
+     * @param ns
+     * @param parent
+     * @param builder
+     * @return
+     */
+    public abstract OMElement createOMElement(String localName, OMNamespace ns, OMElement parent, OMXMLParserWrapper builder);
+
+    // --------------------------------------------------------------------------------------------------------------
+
+    // -----------------------------   OM NamedNode -----------------------------------------------------------------
+
+    /**
+     * @param localName
+     * @param ns
+     * @param parent
+     * @return
+     */
+    public abstract OMNamedNode createOMNamedNode(String localName, OMNamespace ns, OMElement parent);
+
+    /**
+     * @param parent
+     * @return
+     */
+    public abstract OMNamedNode createOMNamedNode(OMElement parent);
+
+    // --------------------------------------------------------------------------------------------------------------
+    // -----------------------------   OM Namespace -----------------------------------------------------------------
+    public abstract OMNamespace createOMNamespace(String uri, String prefix);
+
+    // --------------------------------------------------------------------------------------------------------------
+    // -----------------------------   OM Node -----------------------------------------------------------------
+
+    public abstract OMNode createOMNode(OMElement parent);
+
+    // --------------------------------------------------------------------------------------------------------------
+    // -----------------------------   OM TextNode -----------------------------------------------------------------
+    /**
+     * @param parent
+     * @param text
+     * @return
+     */
+    public abstract OMText createText(OMElement parent, String text);
+
+    /**
+     * @param s
+     * @return
+     */
+    public abstract OMText createText(String s);
+
+    // --------------------------------------------------------------------------------------------------------------
+    // -----------------------------   OM TextNode -----------------------------------------------------------------
+
+    /**
+     * @param localName
+     * @param ns
+     * @param parent
+     * @param builder
+     * @return
+     */
+    public abstract SOAPBodyElement createSOAPBodyElement(String localName, OMNamespace ns, OMElement parent, OMXMLParserWrapper builder);
+
+    /**
+     * @param localName
+     * @param ns
+     * @return
+     */
+    public abstract SOAPBodyElement createSOAPBodyElement(String localName, OMNamespace ns);
+
+    // --------------------------------------------------------------------------------------------------------------
+    // -----------------------------   OM SOAPBody -----------------------------------------------------------------
+    /**
+     * @param envelope
+     * @return
+     */
+    public abstract SOAPBody createSOAPBody(SOAPEnvelope envelope);
+
+    /**
+     * @param localName
+     * @param ns
+     * @param parent
+     * @param builder
+     * @return
+     */
+    public abstract SOAPBody createSOAPBody(String localName, OMNamespace ns, OMElement parent, OMXMLParserWrapper builder);
+
+    // --------------------------------------------------------------------------------------------------------------
+    // -----------------------------   OM SOAPEnvelope -----------------------------------------------------------------
+
+    /**
+     * @param localName
+     * @param ns
+     * @param parent
+     * @param builder
+     * @return
+     */
+    public abstract SOAPEnvelope createSOAPEnvelope(String localName, OMNamespace ns, OMElement parent, OMXMLParserWrapper builder);
+
+    /**
+     * @param localName
+     * @param ns
+     */
+    public abstract SOAPEnvelope createSOAPEnvelope(String localName, OMNamespace ns);
+
+    // --------------------------------------------------------------------------------------------------------------
+    // -----------------------------   OM SOAPHeader -----------------------------------------------------------------
+    /**
+     * @param envelope
+     */
+    public abstract SOAPHeader creatHeader(SOAPEnvelope envelope);
+
+    /**
+     * @param localName
+     * @param ns
+     * @param parent
+     * @param builder
+     * @return
+     */
+    public abstract SOAPHeader creatHeader(String localName, OMNamespace ns, OMElement parent, OMXMLParserWrapper builder);
+
+
+    // --------------------------------------------------------------------------------------------------------------
+    // -----------------------------   OM SOAPHeaderElement -----------------------------------------------------------------
+    /**
+     * @param localName
+     * @param ns
+     */
+    public abstract SOAPHeaderElement createSOAPEnvelopeElement(String localName, OMNamespace ns);
+
+    /**
+     * @param localName
+     * @param ns
+     * @param parent
+     * @param builder
+     * @return
+     */
+    public abstract SOAPHeaderElement createSOAPEnvelopeElement(String localName, OMNamespace ns, OMElement parent, OMXMLParserWrapper builder);
+
+    // --------------------------------------------------------------------------------------------------------------
+    // -----------------------------   OM SOAPMessage -----------------------------------------------------------------
+    /**
+     * @param parserWrapper
+     * @return
+     */
+    public abstract SOAPMessage createSOAPMessage(OMXMLParserWrapper parserWrapper);
+}
\ No newline at end of file

Added: webservices/axis/trunk/java/dev/scratch/prototype1/src/java/org/apache/axis/om/OMNamedNode.java
==============================================================================
--- (empty file)
+++ webservices/axis/trunk/java/dev/scratch/prototype1/src/java/org/apache/axis/om/OMNamedNode.java	Thu Nov 18 03:16:05 2004
@@ -0,0 +1,33 @@
+package org.apache.axis.om;
+
+
+/**
+ * Copyright 2001-2004 The Apache Software Foundation.
+ * <p/>
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * <p/>
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * <p/>
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * <p/>
+ * User: Eran Chinthaka - Lanka Software Foundation
+ * Date: Oct 4, 2004
+ * Time: 11:39:01 AM
+ * <p/>
+ * OMElement and OMAttribute must have namespace support and those two behave in same manner as far as the namespaces are concerned.
+ * So one can implement this interface specific methods in an abstract class.
+ */
+public interface OMNamedNode extends OMNode {
+
+    public String getLocalName();
+    public void setLocalName(String localName);
+
+    public OMNamespace getNamespace() throws OMException;
+    public void setNamespace(OMNamespace namespace);
+}

Added: webservices/axis/trunk/java/dev/scratch/prototype1/src/java/org/apache/axis/om/OMNamespace.java
==============================================================================
--- (empty file)
+++ webservices/axis/trunk/java/dev/scratch/prototype1/src/java/org/apache/axis/om/OMNamespace.java	Thu Nov 18 03:16:05 2004
@@ -0,0 +1,30 @@
+package org.apache.axis.om;
+
+/**
+ * Copyright 2001-2004 The Apache Software Foundation.
+ * <p/>
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * <p/>
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * <p/>
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * <p/>
+ * User: Eran Chinthaka - Lanka Software Foundation
+ * Date: Oct 4, 2004
+ * Time: 1:24:00 PM
+ */
+public interface OMNamespace extends OMNode {
+
+    public boolean equals(OMNamespace ns);
+    public boolean equals(String uri, String prefix);
+
+    public boolean isDefaultNs();
+
+    public String getPrefix();
+}

Added: webservices/axis/trunk/java/dev/scratch/prototype1/src/java/org/apache/axis/om/OMNode.java
==============================================================================
--- (empty file)
+++ webservices/axis/trunk/java/dev/scratch/prototype1/src/java/org/apache/axis/om/OMNode.java	Thu Nov 18 03:16:05 2004
@@ -0,0 +1,132 @@
+package org.apache.axis.om;
+
+
+
+
+/**
+ * Copyright 2001-2004 The Apache Software Foundation.
+ * <p/>
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * <p/>
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * <p/>
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * <p/>
+ * User: Eran Chinthaka - Lanka Software Foundation
+ * Date: Oct 1, 2004
+ * Time: 3:36:14 PM
+ */
+public interface OMNode {
+    //==================================================================================
+
+    // Followings are the codes for node types. Extracted these from DOM API
+    /**
+     * The node is an <code>Element</code>.
+     */
+    public static final short ELEMENT_NODE = 1;
+    /**
+     * The node is an <code>Attr</code>.
+     */
+    public static final short ATTRIBUTE_NODE = 2;
+    /**
+     * The node is a <code>Text</code> node.
+     */
+    public static final short TEXT_NODE = 3;
+    /**
+     * The node is a <code>CDATASection</code>.
+     */
+    public static final short CDATA_SECTION_NODE = 4;
+
+    /**
+     * The node is a <code>Comment</code>.
+     */
+    public static final short COMMENT_NODE = 8;
+    /**
+     * The node is a <code>Document</code>.
+     */
+    public static final short DOCUMENT_NODE = 9;
+
+    //==================================================================================
+
+    /**
+     * This method should return the immediate parent of the node.
+     * Parent is always an Element
+     *
+     * @return
+     * @throws OMException
+     */
+    public OMElement getParent() throws OMException;
+
+    public void setParent(OMElement element);
+
+    /**
+     * This will give the next sibling. This can be an OMAttribute for OMAttribute or OMText or OMELement for others.
+     *
+     * @return
+     * @throws OMException
+     */
+    public OMNode getNextSibling() throws OMException;
+
+    public void setNextSibling(OMNode node);
+
+    /**
+     * This will return the literal value of the node.
+     * OMText --> the text
+     * OMElement --> local name of the element in String format
+     * OMAttribute --> the value of the attribue
+     *
+     * @return
+     * @throws OMException
+     */
+    public String getValue() throws OMException;
+
+    public void setValue(String value);
+
+    /**
+     * this will indicate whether parser has parsed this information item completely or not.
+     * If somethings info are not available in the item, one has to check this attribute to make sure that, this
+     * item has been parsed completely or not.
+     *
+     * @return
+     */
+    public boolean isComplete();
+
+    public void setComplete(boolean state);
+
+    /**
+     * This will remove this information item and its children, from the model completely
+     *
+     * @throws OMException
+     */
+    public void detach() throws OMException;
+
+    /**
+     * This will insert a sibling just after the current information item.
+     *
+     * @param sibling
+     * @throws OMException
+     */
+    public void insertSiblingAfter(OMNode sibling) throws OMException;
+
+    /**
+     * This will insert a sibling just before the current information item
+     *
+     * @param sibling
+     * @throws OMException
+     */
+    public void insertSiblingBefore(OMNode sibling) throws OMException;
+
+    /** This is to get the type of node, as this is the super class of all the nodes
+     *
+     * @return
+     * @throws OMException
+     */
+    public short getType() throws OMException;
+    public void setType(short nodeType) throws OMException;
+}

Added: webservices/axis/trunk/java/dev/scratch/prototype1/src/java/org/apache/axis/om/OMText.java
==============================================================================
--- (empty file)
+++ webservices/axis/trunk/java/dev/scratch/prototype1/src/java/org/apache/axis/om/OMText.java	Thu Nov 18 03:16:05 2004
@@ -0,0 +1,31 @@
+package org.apache.axis.om;
+
+/**
+ * Copyright 2001-2004 The Apache Software Foundation.
+ * <p/>
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * <p/>
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * <p/>
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * <p/>
+ * User: Eran Chinthaka - Lanka Software Foundation
+ * Date: Oct 4, 2004
+ * Time: 2:04:43 PM
+ */
+public interface OMText extends OMNode {
+    /**
+     * We use the OMText class to hold comments, text, characterData, CData, etc.,
+     * The codes are found in OMNode class
+     *
+     * @param type
+     */
+    public void setTextType(short type);
+    public short getTextType();
+}

Added: webservices/axis/trunk/java/dev/scratch/prototype1/src/java/org/apache/axis/om/OMXMLParserWrapper.java
==============================================================================
--- (empty file)
+++ webservices/axis/trunk/java/dev/scratch/prototype1/src/java/org/apache/axis/om/OMXMLParserWrapper.java	Thu Nov 18 03:16:05 2004
@@ -0,0 +1,56 @@
+package org.apache.axis.om;
+
+import org.apache.axis.om.soap.SOAPMessage;
+
+/**
+ * Copyright 2001-2004 The Apache Software Foundation.
+ * <p/>
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * <p/>
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * <p/>
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * <p/>
+ * User: Eran Chinthaka - Lanka Software Foundation
+ * Date: Nov 11, 2004
+ * Time: 12:54:18 PM
+ *
+ * This will wrap the underlying parser OM uses. For example this will define and interface, so that either XPP or StAX or tStAX can be used
+ *
+ *
+ */
+public interface OMXMLParserWrapper {
+
+    /**
+     * @return
+     * @throws OMException
+     */
+    public SOAPMessage getSOAPMessage() throws OMException;
+
+    /**
+     *  Proceed the parser one step and return the event value
+     * @return
+     * @throws OMException
+     */
+    public int next() throws OMException;
+
+    /**
+     *  Discard the current element
+     * This should remove the given element and its decendants.
+     * @param el
+     * @throws OMException
+     */
+    public void discard(OMElement el) throws OMException;
+
+    /**
+     * @param b
+     * @throws OMException
+     */
+    public void setCache(boolean b) throws OMException;
+}

Added: webservices/axis/trunk/java/dev/scratch/prototype1/src/java/org/apache/axis/om/Printable.java
==============================================================================
--- (empty file)
+++ webservices/axis/trunk/java/dev/scratch/prototype1/src/java/org/apache/axis/om/Printable.java	Thu Nov 18 03:16:05 2004
@@ -0,0 +1,29 @@
+package org.apache.axis.om;
+
+import java.io.PrintStream;
+
+/**
+ * Copyright 2001-2004 The Apache Software Foundation.
+ * <p/>
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * <p/>
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * <p/>
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * <p/>
+ * User: Eran Chinthaka - Lanka Software Foundation
+ * Date: Oct 6, 2004
+ * Time: 11:36:01 AM
+ * <p/>
+ * B component that implements this interface is printable to an outputstream
+ */
+public interface Printable {
+
+    public void print(PrintStream ps) throws OMException;
+}

Added: webservices/axis/trunk/java/dev/scratch/prototype1/src/java/org/apache/axis/om/impl/OMAttributeImpl.java
==============================================================================
--- (empty file)
+++ webservices/axis/trunk/java/dev/scratch/prototype1/src/java/org/apache/axis/om/impl/OMAttributeImpl.java	Thu Nov 18 03:16:05 2004
@@ -0,0 +1,78 @@
+package org.apache.axis.om.impl;
+
+import org.apache.axis.om.OMAttribute;
+import org.apache.axis.om.OMElement;
+import org.apache.axis.om.OMException;
+import org.apache.axis.om.OMNamespace;
+
+import java.io.PrintStream;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+/**
+ * Copyright 2001-2004 The Apache Software Foundation.
+ * <p/>
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * <p/>
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * <p/>
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * <p/>
+ * User: Eran Chinthaka - Lanka Software Foundation
+ * Date: Oct 6, 2004
+ * Time: 11:43:23 AM
+ */
+public class OMAttributeImpl extends OMNamedNodeImpl implements OMAttribute {
+    private static String QUOTE_ENTITY = "&quot;";
+    private static Matcher matcher = Pattern.compile("\"").matcher(null);
+
+    public OMAttributeImpl(String localName, OMNamespace ns, String value, OMElement parent) {
+        super(localName, ns, parent);
+        setValue(value);
+    }
+
+    public OMAttributeImpl(String localName, OMNamespace ns, String value) {
+        super(localName, ns, null);
+        setValue(value);
+    }
+
+    synchronized static String replaceQuoteWithEntity(String value) {
+        matcher.reset(value);
+        return matcher.replaceAll(QUOTE_ENTITY);
+    }
+
+    public void print(PrintStream s) throws OMException {
+        super.print(s);
+        s.print('=');
+        String v = value;
+        char quote = '"';
+        if (value.indexOf('"') != -1)
+            if (value.indexOf('\'') == -1)
+                quote = '\'';
+            else
+                v = replaceQuoteWithEntity(value);
+        s.print(quote);
+        s.print(v);
+        s.print(quote);
+    }
+
+    public void detach() throws OMException {
+        
+        if (parent == null)
+            throw new OMException();
+        if (getPreviousSibling() == null)
+            parent.setFirstAttribute((OMAttributeImpl) nextSibling);
+        else
+            previousSibling.setNextSibling(nextSibling);
+        if (nextSibling != null)
+            nextSibling.setPreviousSibling(previousSibling);
+    }
+
+
+}

Added: webservices/axis/trunk/java/dev/scratch/prototype1/src/java/org/apache/axis/om/impl/OMElementImpl.java
==============================================================================
--- (empty file)
+++ webservices/axis/trunk/java/dev/scratch/prototype1/src/java/org/apache/axis/om/impl/OMElementImpl.java	Thu Nov 18 03:16:05 2004
@@ -0,0 +1,289 @@
+package org.apache.axis.om.impl;
+
+import org.apache.axis.om.*;
+import org.apache.axis.om.impl.util.OMChildrenIterator;
+import org.apache.axis.om.impl.util.OMChildrenQNameIterator;
+import org.apache.xml.utils.QName;
+
+import java.io.PrintStream;
+import java.util.Iterator;
+
+/**
+ * Copyright 2001-2004 The Apache Software Foundation.
+ * <p/>
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * <p/>
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * <p/>
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * <p/>
+ * User: Eran Chinthaka - Lanka Software Foundation
+ * Date: Oct 5, 2004
+ * Time: 1:16:10 PM
+ */
+public class OMElementImpl extends OMNamedNodeImpl implements OMElement {
+    private OMNodeImpl firstChild;
+    OMXMLParserWrapper builder;
+    OMAttributeImpl firstAttribute;
+    OMNamespaceImpl firstNamespace;
+
+    public OMElementImpl(OMElement parent) {
+        super(parent);
+    }
+
+    
+
+    public OMElementImpl(String localName, OMNamespace ns) {
+        super(localName, ns, null);
+        done = true;
+    }
+
+
+    public OMElementImpl(String localName, OMNamespace ns, OMElement parent, OMXMLParserWrapper builder) {
+        super(localName, ns, parent);
+        this.builder = builder;
+
+    }
+
+    /**
+     * This will add child to the element. One can decide whether he append the child or he adds to the
+     * front of the children list
+     *
+     * @param child
+     */
+    public void addChild(OMNode child) {
+        addChild((OMNodeImpl) child);
+    }
+
+    /**
+     * This will search for children with a given QName and will return an iterator to traverse through
+     * the OMNodes.
+     * This QName can contain any combination of prefix, localname and URI
+     *
+     * @param elementQName
+     * @return
+     * @throws org.apache.axis.om.OMException
+     */
+    public Iterator getChildrenWithName(QName elementQName) throws OMException {
+        return new OMChildrenQNameIterator(getFirstChild(), elementQName);
+    }
+
+    private void addChild(OMNodeImpl child) {
+        if (firstChild == null && !done)
+            builder.next();
+        child.setPreviousSibling(null);
+        child.setNextSibling(firstChild);
+        if (firstChild != null)
+            firstChild.setPreviousSibling(child);
+        child.setParent(this);
+        child.setComplete(true);
+        firstChild = child;
+    }
+
+    /**
+     * This will give the next sibling. This can be an OMAttribute for OMAttribute or OMText or OMELement for others.
+     *
+     * @return
+     * @throws org.apache.axis.om.OMException
+     */
+    public OMNode getNextSibling() throws OMException {
+        while (!done)
+            builder.next();
+        return super.getNextSibling();
+    }
+
+    /**
+     * This returns a collection of this element.
+     * Children can be of types OMElement, OMText.
+     */
+    public Iterator getChildren() {
+        return new OMChildrenIterator(getFirstChild());
+    }
+
+    /**
+     * THis will create a namespace in the current element scope
+     *
+     * @param uri
+     * @param prefix
+     * @return
+     */
+    public OMNamespace createNamespace(String uri, String prefix) {
+        OMNamespaceImpl ns = new OMNamespaceImpl(uri, prefix);
+        ns.setNextSibling(firstNamespace);
+        firstNamespace = ns;
+        return ns;
+    }
+
+    /**
+     * This will find a namespace with the given uri and prefix, in the scope of the docuemnt.
+     * This will start to find from the current element and goes up in the hiararchy until this finds one.
+     * If none is found, return null
+     *
+     * @param uri
+     * @param prefix
+     * @return
+     * @throws org.apache.axis.om.OMException
+     */
+    public OMNamespace resolveNamespace(String uri, String prefix) throws OMException {
+        OMNamespace ns = firstNamespace;
+        while (ns != null) {
+            if (ns.equals(uri, prefix))
+                return ns;
+            ns = (OMNamespace) ns.getNextSibling();
+        }
+        if (parent != null)
+            return parent.resolveNamespace(uri, prefix);
+        return null;
+    }
+
+    /**
+     * This will help to search for an attribute with a given QName within this Element
+     *
+     * @param qname
+     * @return
+     * @throws org.apache.axis.om.OMException
+     */
+    public Iterator getAttributeWithQName(QName qname) throws OMException {
+        return new OMChildrenQNameIterator((OMNodeImpl) getFirstAttribute(), qname);
+    }
+
+    /**
+     * This will returns the first attribute of the element or null, if none is present
+     *
+     * @return
+     */
+    public OMAttribute getFirstAttribute() {
+        return firstAttribute;
+    }
+
+    /**
+     * This will return a List of OMAttributes
+     *
+     * @return
+     */
+    public Iterator getAttributes() {
+        return new OMChildrenIterator(getFirstAttribute());
+    }
+
+    /**
+     * This will insert attribute to this element. Implementor can decide as to insert this
+     * in the front or at the end of set of attributes
+     *
+     * @param attr
+     */
+    public void insertAttribute(OMAttribute attr) {
+
+        OMAttributeImpl attrImpl = (OMAttributeImpl) attr;
+        attrImpl.setPreviousSibling(null);
+        attrImpl.setNextSibling(firstAttribute);
+        if (firstAttribute != null)
+            firstAttribute.setPreviousSibling(attrImpl);
+        attrImpl.setParent(this);
+        firstAttribute = attrImpl;
+    }
+
+    public void removeAttribute(OMAttribute attr) {
+        attr.detach();
+    }
+
+    /**
+     * This will force the parser to proceed, if parser has not yet finished with the XML input
+     */
+    public void buildNext() {
+        builder.next();
+    }
+
+    public OMNodeImpl getFirstChild() {
+        if (firstChild == null && !done)
+            buildNext();
+        return firstChild;
+    }
+
+
+    public void setFirstChild(OMNodeImpl firstChild) {
+        this.firstChild = firstChild;
+    }
+
+    public void print(PrintStream s) throws OMException {
+        s.print('<');
+        super.print(s);
+
+        OMNodeImpl node = firstAttribute;
+        while (node != null) {
+            s.print(" ");
+            node.print(s);
+            node = (OMNodeImpl) node.getNextSibling();
+        }
+
+        node = firstNamespace;
+        while (node != null) {
+            s.print(" ");
+            node.print(s);
+            node = (OMNodeImpl) node.getNextSibling();
+        }
+
+        node = getFirstChild();
+        if (node != null) {
+            s.print('>');
+            while (node != null) {
+                node.print(s);
+                node = (OMNodeImpl) node.getNextSibling();
+            }
+            s.print('<');
+            s.print('/');
+            super.print(s);
+        } else
+            s.print('/');
+        s.print('>');
+    }
+
+    /**
+     * This will remove this information item and its children, from the model completely
+     *
+     * @throws org.apache.axis.om.OMException
+     */
+    public void detach() throws OMException {
+        if (done)
+            super.detach();
+        else
+            builder.discard(this);
+    }
+
+    public void setFirstAttribute(OMAttributeImpl firstAttribute) {
+        this.firstAttribute = firstAttribute;
+    }
+
+
+    public boolean isComplete() {
+        return done;
+    }
+
+    /**
+     * This will return the literal value of the node.
+     * OMText --> the text
+     * OMElement --> local name of the element in String format
+     * OMAttribute --> the value of the attribue
+     *
+     * @return
+     * @throws org.apache.axis.om.OMException
+     */
+    public String getValue() throws OMException {
+        return localName;
+    }
+
+    /**
+     * This is to get the type of node, as this is the super class of all the nodes
+     *
+     * @return
+     * @throws org.apache.axis.om.OMException
+     */
+    public short getType() throws OMException {
+        return OMNode.ELEMENT_NODE;
+    }
+}

Added: webservices/axis/trunk/java/dev/scratch/prototype1/src/java/org/apache/axis/om/impl/OMLinkedListImplFactory.java
==============================================================================
--- (empty file)
+++ webservices/axis/trunk/java/dev/scratch/prototype1/src/java/org/apache/axis/om/impl/OMLinkedListImplFactory.java	Thu Nov 18 03:16:05 2004
@@ -0,0 +1,113 @@
+package org.apache.axis.om.impl;
+
+import org.apache.axis.om.*;
+import org.apache.axis.om.soap.*;
+
+/**
+ * Copyright 2001-2004 The Apache Software Foundation.
+ * <p/>
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * <p/>
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * <p/>
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * <p/>
+ * User: Eran Chinthaka - Lanka Software Foundation
+ * Date: Nov 11, 2004
+ * Time: 2:21:13 PM
+ */
+public class OMLinkedListImplFactory extends OMFactory {
+    public OMAttribute createOMAttribute(String localName, OMNamespace ns, String value, OMElement parent) {
+        return new OMAttributeImpl(localName, ns, value, parent);
+    }
+
+    public OMAttribute createOMAttribute(String localName, OMNamespace ns, String value) {
+        return new OMAttributeImpl(localName, ns, value);
+    }
+
+    public OMElement createOMElement(OMElement parent) {
+        return new OMElementImpl(parent);
+    }
+
+    public OMElement createOMElement(String localName, OMNamespace ns) {
+        return new OMElementImpl(localName, ns);
+    }
+
+    public OMElement createOMElement(String localName, OMNamespace ns, OMElement parent, OMXMLParserWrapper builder) {
+        return new OMElementImpl(localName, ns, parent, builder);
+    }
+
+    public OMNamedNode createOMNamedNode(String localName, OMNamespace ns, OMElement parent) {
+        return new OMNamedNodeImpl(localName, ns, parent);
+    }
+
+    public OMNamedNode createOMNamedNode(OMElement parent) {
+        return new OMNamedNodeImpl(parent);
+    }
+
+    public OMNamespace createOMNamespace(String uri, String prefix) {
+        return new OMNamespaceImpl(uri, prefix);
+    }
+
+    public OMNode createOMNode(OMElement parent) {
+        return new OMNodeImpl(parent);
+    }
+
+    public OMText createText(OMElement parent, String text) {
+        return new OMTextImpl(parent, text);
+    }
+
+    public OMText createText(String s) {
+        return new OMTextImpl(s);
+    }
+
+    public SOAPBodyElement createSOAPBodyElement(String localName, OMNamespace ns, OMElement parent, OMXMLParserWrapper builder) {
+        return new SOAPBodyElementImpl(localName, ns, parent, builder);
+    }
+
+    public SOAPBodyElement createSOAPBodyElement(String localName, OMNamespace ns) {
+        return new SOAPBodyElementImpl(localName, ns);
+    }
+
+    public SOAPBody createSOAPBody(SOAPEnvelope envelope) {
+        return new SOAPBodyImpl(envelope);
+    }
+
+    public SOAPBody createSOAPBody(String localName, OMNamespace ns, OMElement parent, OMXMLParserWrapper builder) {
+        return new SOAPBodyImpl(localName, ns, parent, builder);
+    }
+
+    public SOAPEnvelope createSOAPEnvelope(String localName, OMNamespace ns, OMElement parent, OMXMLParserWrapper builder) {
+        return new SOAPEnvelopeImpl(localName, ns, parent, builder);
+    }
+
+    public SOAPEnvelope createSOAPEnvelope(String localName, OMNamespace ns) {
+        return new SOAPEnvelopeImpl(localName, ns);
+    }
+
+    public SOAPHeader creatHeader(SOAPEnvelope envelope) {
+        return new SOAPHeaderImpl(envelope);
+    }
+
+    public SOAPHeader creatHeader(String localName, OMNamespace ns, OMElement parent, OMXMLParserWrapper builder) {
+        return new SOAPHeaderImpl(localName, ns, parent, builder);
+    }
+
+    public SOAPHeaderElement createSOAPEnvelopeElement(String localName, OMNamespace ns) {
+        return new SOAPHeaderElementImpl(localName, ns);
+    }
+
+    public SOAPHeaderElement createSOAPEnvelopeElement(String localName, OMNamespace ns, OMElement parent, OMXMLParserWrapper builder) {
+        return new SOAPHeaderElementImpl(localName, ns, parent, builder);
+    }
+
+    public SOAPMessage createSOAPMessage(OMXMLParserWrapper parserWrapper) {
+        return new SOAPMessageImpl(parserWrapper);
+    }
+}

Added: webservices/axis/trunk/java/dev/scratch/prototype1/src/java/org/apache/axis/om/impl/OMNamedNodeImpl.java
==============================================================================
--- (empty file)
+++ webservices/axis/trunk/java/dev/scratch/prototype1/src/java/org/apache/axis/om/impl/OMNamedNodeImpl.java	Thu Nov 18 03:16:05 2004
@@ -0,0 +1,100 @@
+package org.apache.axis.om.impl;
+
+import org.apache.axis.om.OMElement;
+import org.apache.axis.om.OMException;
+import org.apache.axis.om.OMNamedNode;
+import org.apache.axis.om.OMNamespace;
+import org.apache.xml.utils.QName;
+
+import java.io.PrintStream;
+
+/**
+ * Copyright 2001-2004 The Apache Software Foundation.
+ * <p/>
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * <p/>
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * <p/>
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * <p/>
+ * User: Eran Chinthaka - Lanka Software Foundation
+ * Date: Oct 5, 2004
+ * Time: 1:17:37 PM
+ */
+public class OMNamedNodeImpl extends OMNodeImpl implements OMNamedNode {
+
+    OMNamespace ns;
+    String localName;
+
+    
+
+    public OMNamedNodeImpl(String localName, OMNamespace ns, OMElement parent) {
+        super(parent);
+        this.localName = localName;
+        this.ns = ns;
+    }
+
+    public OMNamedNodeImpl(OMElement parent) {
+        super(parent);
+    }
+
+    public String getLocalName() {
+        return localName;
+    }
+
+    public void setLocalName(String localName) {
+        this.localName = localName;
+    }
+
+    public OMNamespace getNamespace() throws OMException {
+        return ns;
+    }
+
+    /**
+     * @param namespace
+     */
+    public void setNamespace(OMNamespace namespace) {
+        this.ns = namespace;
+    }
+
+    public void print(PrintStream ps) throws OMException {
+        if (ns != null && !ns.isDefaultNs()) {
+            ps.print(ns.getPrefix());
+            ps.print(':');
+        }
+        ps.print(localName);
+    }
+
+    public QName getQName() {
+        QName qName = new QName(ns.getValue(), ns.getPrefix(), localName);
+        return qName;
+    }
+
+//    /**
+//     * Equals method of QName seems doesn't working the way I need in this situation.
+//     * So implementing my own !!
+//     *
+//     * @param qName
+//     * @return
+//     */
+//    public boolean isQNameEquals(QName qName) {
+//        String thatLocalName = qName.getLocalName();
+//
+//        return ((thatLocalName == null && this.localName == null) || (thatLocalName != null && thatLocalName.equalsIgnoreCase(this.localName)))
+//                && ns.equals(qName.getNamespaceURI(), qName.getPrefix());
+//    }
+//
+//    private String getStringValue(String s) {
+//        if (s == null) {
+//            return "null";
+//        }
+//
+//        return s;
+//    }
+}

Added: webservices/axis/trunk/java/dev/scratch/prototype1/src/java/org/apache/axis/om/impl/OMNamespaceImpl.java
==============================================================================
--- (empty file)
+++ webservices/axis/trunk/java/dev/scratch/prototype1/src/java/org/apache/axis/om/impl/OMNamespaceImpl.java	Thu Nov 18 03:16:05 2004
@@ -0,0 +1,75 @@
+package org.apache.axis.om.impl;
+
+import org.apache.axis.om.OMException;
+import org.apache.axis.om.OMNamespace;
+import org.apache.axis.om.OMNode;
+
+import java.io.PrintStream;
+
+/**
+ * Copyright 2001-2004 The Apache Software Foundation.
+ * <p/>
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * <p/>
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * <p/>
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * <p/>
+ * User: Eran Chinthaka - Lanka Software Foundation
+ * Date: Oct 6, 2004
+ * Time: 11:43:32 AM
+ */
+public class OMNamespaceImpl extends OMNodeImpl implements OMNamespace {
+    private String prefix;
+
+    /**
+     *
+     * @param uri
+     * @param prefix
+     */
+    public OMNamespaceImpl(String uri, String prefix) {
+        value = uri;
+        this.prefix = prefix;
+    }
+
+
+    public boolean equals(OMNamespace ns) {
+        return ((prefix == null && ns.getPrefix() == null) || (prefix != null && prefix.equals(ns.getPrefix())))
+                && value.equals(ns.getValue());
+    }
+
+    public boolean equals(String uri, String prefix) {
+        return ((prefix == null && this.prefix == null) || (prefix != null && prefix.equals(this.prefix)))
+                && value.equals(uri);
+    }
+
+    public void print(PrintStream s) {
+        s.print("xmlns");
+        if (prefix != null) {
+            s.print(':');
+            s.print(prefix);
+        }
+        s.print('=');
+        s.print('"');
+        s.print(value);
+        s.print('"');
+    }
+
+    public boolean isDefaultNs() {
+        return prefix == null;
+    }
+
+    public String getPrefix() {
+        return prefix;  
+    }
+
+    public OMNode getNextSibling() throws OMException {
+        return nextSibling;
+    }
+}

Added: webservices/axis/trunk/java/dev/scratch/prototype1/src/java/org/apache/axis/om/impl/OMNavigator.java
==============================================================================
--- (empty file)
+++ webservices/axis/trunk/java/dev/scratch/prototype1/src/java/org/apache/axis/om/impl/OMNavigator.java	Thu Nov 18 03:16:05 2004
@@ -0,0 +1,78 @@
+/*
+ * Copyright  2004 The Apache Software Foundation.
+ *
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+
+/*
+ * Created on Sep 25, 2004
+ *
+ */
+package org.apache.axis.om.impl;
+
+import org.apache.axis.om.OMElement;
+import org.apache.axis.om.OMNode;
+
+/**
+ * @author Dasarath Weeratunge
+ */
+public class OMNavigator {
+    protected OMNode node;
+    private boolean visited;
+    private OMNode next;
+    private boolean backtracked;
+
+    public OMNavigator() {
+    }
+
+    public OMNavigator(OMNode node) {
+        init(node);
+    }
+
+    public void init(OMNode node) {
+        next = node;
+        backtracked = false;
+    }
+
+    public OMNode next() {
+        if (next == null)
+            return null;
+        node = next;
+        visited = backtracked;
+        backtracked = false;
+        if (next instanceof OMElement && !visited) {
+            OMElementImpl e = (OMElementImpl) next;
+            if (e.getFirstChild() != null)
+                next = e.getFirstChild();
+            else if (e.isComplete())
+                backtracked = true;
+            else
+                next = null;
+            return node;
+        }
+        OMNodeImpl n = (OMNodeImpl) next;
+        if (n.nextSibling != null)
+            next = n.nextSibling;
+        else if (n.parent != null && n.parent.isComplete()) {
+            next = n.parent;
+            backtracked = true;
+        } else
+            next = null;
+        return node;
+    }
+
+    public boolean visited() {
+        return visited;
+    }
+}

Added: webservices/axis/trunk/java/dev/scratch/prototype1/src/java/org/apache/axis/om/impl/OMNodeImpl.java
==============================================================================
--- (empty file)
+++ webservices/axis/trunk/java/dev/scratch/prototype1/src/java/org/apache/axis/om/impl/OMNodeImpl.java	Thu Nov 18 03:16:05 2004
@@ -0,0 +1,208 @@
+package org.apache.axis.om.impl;
+
+import org.apache.axis.om.OMElement;
+import org.apache.axis.om.OMException;
+import org.apache.axis.om.OMNode;
+import org.apache.axis.om.Printable;
+
+import java.io.PrintStream;
+
+/**
+ * Copyright 2001-2004 The Apache Software Foundation.
+ * <p/>
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * <p/>
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * <p/>
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * <p/>
+ * User: Eran Chinthaka - Lanka Software Foundation
+ * Date: Oct 5, 2004
+ * Time: 12:54:08 PM
+ */
+public class OMNodeImpl implements OMNode, Printable {
+    protected OMElementImpl parent;
+    protected OMNodeImpl nextSibling;
+    protected OMNodeImpl previousSibling;
+    protected String value;
+    protected boolean done;
+
+    public OMNodeImpl() {
+    }
+
+    
+    /**
+     * For a node to exist there must be a parent
+     *
+     * @param parent
+     */
+
+
+    public OMNodeImpl(OMElement parent) {
+        if (parent instanceof OMNodeImpl)
+            this.parent = (OMElementImpl) parent;
+    }
+
+    /**
+     * This method should return the immediate parent of the node.
+     * Parent is always an Element
+     *
+     * @return
+     * @throws org.apache.axis.om.OMException
+     */
+    public OMElement getParent() throws OMException {
+        return parent;
+    }
+
+    public void setParent(OMElement element) {
+        if (element instanceof OMNodeImpl)
+            this.parent = (OMElementImpl) element;
+    }
+
+    /**
+     * This will give the next sibling. This can be an OMAttribute for OMAttribute or OMText or OMELement for others.
+     *
+     * @return
+     * @throws org.apache.axis.om.OMException
+     */
+    public OMNode getNextSibling() throws OMException {
+        if (nextSibling == null && !parent.isComplete())
+            parent.buildNext();
+        return nextSibling;
+    }
+
+    public void setNextSibling(OMNode node) {
+        this.nextSibling = (OMNodeImpl) node;
+    }
+
+    /**
+     * This will return the literal value of the node.
+     * OMText --> the text
+     * OMElement --> local name of the element in String format
+     * OMAttribute --> the value of the attribue
+     *
+     * @return
+     * @throws org.apache.axis.om.OMException
+     */
+    public String getValue() throws OMException {
+        return value;
+    }
+
+    public void setValue(String value) {
+        this.value = value;
+    }
+
+    /**
+     * this will indicate whether parser has parsed this information item completely or not.
+     * If somethings info are not available in the item, one has to check this attribute to make sure that, this
+     * item has been parsed completely or not.
+     *
+     * @return
+     */
+    public boolean isComplete() {
+        return true;
+    }
+
+    public void setComplete(boolean state) {
+        this.done = state;
+    }
+
+    /**
+     * This will remove this information item and its children, from the model completely
+     *
+     * @throws org.apache.axis.om.OMException
+     */
+    public void detach() throws OMException {
+        if (parent == null)
+            throw new OMException();
+        OMNodeImpl nextSibling = (OMNodeImpl) getNextSibling();
+        if (previousSibling == null)
+            parent.setFirstChild(nextSibling);
+        else
+            previousSibling.setNextSibling(nextSibling);
+        if (nextSibling != null)
+            nextSibling.setPreviousSibling(previousSibling);
+
+    }
+
+    /**
+     * This will insert a sibling just after the current information item.
+     *
+     * @param sibling
+     * @throws org.apache.axis.om.OMException
+     */
+    public void insertSiblingAfter(OMNode sibling) throws OMException {
+        if (parent == null)
+            throw new OMException();
+        sibling.setParent(parent);
+
+        if (sibling instanceof OMNodeImpl) {
+            OMNodeImpl siblingImpl = (OMNodeImpl) sibling;
+            if (nextSibling == null)
+                getNextSibling();
+            siblingImpl.setPreviousSibling(this);
+            if (nextSibling != null)
+                nextSibling.setPreviousSibling(sibling);
+            sibling.setNextSibling(nextSibling);
+            nextSibling = siblingImpl;
+        }
+
+    }
+
+    /**
+     * This will insert a sibling just before the current information item
+     *
+     * @param sibling
+     * @throws org.apache.axis.om.OMException
+     */
+    public void insertSiblingBefore(OMNode sibling) throws OMException {
+        if (parent == null)
+            throw new OMException();
+        sibling.setParent(parent);
+
+        if (sibling instanceof OMNodeImpl) {
+            OMNodeImpl siblingImpl = (OMNodeImpl) sibling;
+            siblingImpl.setPreviousSibling(previousSibling);
+            siblingImpl.setNextSibling(this);
+            if (previousSibling == null)
+                parent.setFirstChild(siblingImpl);
+            else
+                previousSibling.setNextSibling(siblingImpl);
+            previousSibling = siblingImpl;
+        }
+    }
+
+    /**
+     * This is to get the type of node, as this is the super class of all the nodes
+     *
+     * @return
+     * @throws org.apache.axis.om.OMException
+     */
+    public short getType() throws OMException {
+        throw new UnsupportedOperationException();
+    }
+
+    public void setType(short nodeType) throws OMException {
+        throw new UnsupportedOperationException();
+    }
+
+    public OMNode getPreviousSibling() {
+        return previousSibling;
+    }
+
+    public void setPreviousSibling(OMNode previousSibling) {
+        this.previousSibling = (OMNodeImpl) previousSibling;
+    }
+
+    public void print(PrintStream ps) throws OMException {
+        throw new OMException();
+    }
+
+
+}

Added: webservices/axis/trunk/java/dev/scratch/prototype1/src/java/org/apache/axis/om/impl/OMTextImpl.java
==============================================================================
--- (empty file)
+++ webservices/axis/trunk/java/dev/scratch/prototype1/src/java/org/apache/axis/om/impl/OMTextImpl.java	Thu Nov 18 03:16:05 2004
@@ -0,0 +1,83 @@
+package org.apache.axis.om.impl;
+
+import org.apache.axis.om.OMElement;
+import org.apache.axis.om.OMException;
+import org.apache.axis.om.OMNode;
+import org.apache.axis.om.OMText;
+
+import java.io.PrintStream;
+
+/**
+ * Copyright 2001-2004 The Apache Software Foundation.
+ * <p/>
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * <p/>
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * <p/>
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * <p/>
+ * User: Eran Chinthaka - Lanka Software Foundation
+ * Date: Oct 6, 2004
+ * Time: 1:36:55 PM
+ */
+public class OMTextImpl extends OMNodeImpl implements OMText {
+
+    protected short textType;
+
+    public OMTextImpl(OMElement parent, String text) {
+        super(parent);
+        setValue(text);
+        done = true;
+    }
+
+    public OMTextImpl(String s) {
+        super();
+        setValue(s);
+    }
+
+    /**
+     * We use the OMText class to hold comments, text, characterData, CData, etc.,
+     * The codes are found in OMNode class
+     *
+     * @param type
+     */
+    public void setTextType(short type) {
+        this.textType = type;
+    }
+
+    public short getTextType() {
+        return textType;  
+    }
+
+    public OMNode getFirstChild() throws OMException {
+        throw new OMException();
+    }
+
+    public void setFirstChild(OMNode node) throws OMException {
+        throw new OMException();
+    }
+
+    public void print(PrintStream s) throws OMException {
+        s.print(value);
+    }
+
+    /**
+     * This is to get the type of node, as this is the super class of all the nodes
+     *
+     * @return
+     * @throws org.apache.axis.om.OMException
+     */
+    public short getType() throws OMException {
+        return OMNode.TEXT_NODE;    //TODO implement this
+    }
+
+
+
+
+}

Added: webservices/axis/trunk/java/dev/scratch/prototype1/src/java/org/apache/axis/om/impl/OMXMLPullParserWrapper.java
==============================================================================
--- (empty file)
+++ webservices/axis/trunk/java/dev/scratch/prototype1/src/java/org/apache/axis/om/impl/OMXMLPullParserWrapper.java	Thu Nov 18 03:16:05 2004
@@ -0,0 +1,389 @@
+package org.apache.axis.om.impl;
+
+import org.apache.axis.om.*;
+import org.apache.axis.om.soap.SOAPMessage;
+import org.xmlpull.v1.XmlPullParser;
+import org.xmlpull.v1.XmlPullParserException;
+
+/**
+ * Copyright 2001-2004 The Apache Software Foundation.
+ * <p/>
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * <p/>
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * <p/>
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * <p/>
+ * User: Eran Chinthaka - Lanka Software Foundation
+ * Date: Oct 6, 2004
+ * Time: 11:42:44 AM
+ */
+public class OMXMLPullParserWrapper implements OMXMLParserWrapper {
+    private XmlPullParser parser;
+    // private OMElementImpl root;
+    private SOAPMessageImpl document;
+    private OMNodeImpl lastNode;
+    private boolean cache = true;
+    private boolean slip = false;
+    private boolean navigate = false;
+    private boolean done = false;
+    private OMNavigator navigator = new OMNavigator();
+
+    /**
+     * element level 1 = envelope level
+     * element level 2 = Header or Body level
+     * element level 3 = HeaderElement or BodyElement level
+     */
+    private int elementLevel = 0;
+
+    public OMXMLPullParserWrapper(XmlPullParser parser) {
+        this.parser = parser;
+        
+    }
+
+//    public OMElementImpl getSOAPMessage() throws OMException {
+//        if (root == null)
+//            next();
+//        return root;
+//    }
+    public SOAPMessage getSOAPMessage() throws OMException {
+        document = new SOAPMessageImpl(this);
+        return document;
+    }
+
+    private OMNode createOMElement() throws OMException {
+        OMElementImpl node;
+        String elementName = parser.getName();
+        if (lastNode == null) {
+            node = new SOAPEnvelopeImpl(elementName, null, null, this);
+            document.setEnvelope((SOAPEnvelopeImpl) node);
+//            root = new OMElementImpl(parser.getName(), null, null, this);
+//            node = root;
+        } else if (lastNode.isComplete()) {
+            node = constructNode(lastNode.getParent(), elementName);
+//            node = new OMElementImpl(parser.getName(), null, lastNode.getParent(), this);
+            lastNode.setNextSibling(node);
+            node.setPreviousSibling(lastNode);
+        } else {
+            System.out.println("lastNode = " + lastNode.getClass());
+            OMElementImpl e = (OMElementImpl) lastNode;
+            node = constructNode((OMElement) lastNode, elementName);
+//            node = new OMElementImpl(parser.getName(), null, (OMElement) lastNode, this);
+            e.setFirstChild(node);
+        }
+
+        int i, j;
+        try {
+            j = parser.getNamespaceCount(parser.getDepth());
+            i = 0;
+            if (j > 1)
+                i = parser.getNamespaceCount(parser.getDepth() - 1);
+            while (i < j) {
+                node.createNamespace(parser.getNamespaceUri(i), parser.getNamespacePrefix(i));
+                i++;
+            }
+        } catch (XmlPullParserException e) {
+            throw new OMException(e);
+        }
+
+        node.setNamespace(node.resolveNamespace(parser.getNamespace(), parser.getPrefix()));
+
+        j = parser.getAttributeCount();
+        for (i = 0; i < j; i++) {
+            OMNamespace ns = null;
+            String uri = parser.getAttributeNamespace(i);
+            if (uri.hashCode() != 0)
+                ns = node.resolveNamespace(uri, parser.getAttributePrefix(i));
+            node.insertAttribute(new OMAttributeImpl(parser.getAttributeName(i), ns, parser.getAttributeValue(i), node));
+        }
+
+        return node;
+    }
+
+    private OMElementImpl constructNode(OMElement parent, String elementName) {
+        OMElementImpl element = null;
+        if (elementLevel == 2) {
+            // this is either a header or a body
+            if (elementName.equalsIgnoreCase("Header")) {
+                element = new SOAPHeaderImpl(elementName, null, parent, this);
+            } else if (elementName.equalsIgnoreCase("Body")) {
+                element = new SOAPBodyImpl(elementName, null, parent, this);
+            } else {
+                // can there be Elements other than Header and Body in Envelope. If yes, what are they and is it YAGNI ??
+                throw new OMException(elementName + " is not supported here. Envelope can not have elements other than Header and Body.");
+            }
+
+        } else if (elementLevel == 3) {
+            // this is either a headerelement or a bodyelement
+            if (parent.getLocalName().equalsIgnoreCase("Header")) {
+                element = new SOAPHeaderElementImpl(elementName, null, parent, this);
+            } else if (parent.getLocalName().equalsIgnoreCase("Body")) {
+                element = new SOAPBodyElementImpl(elementName, null, parent, this);
+            } else {
+                // can there be Elements other than Header and Body in Envelope. If yes, what are they and is it YAGNI ??
+                throw new OMException(elementName + " is not supported here. Envelope can not have elements other than Header and Body.");
+            }
+
+        } else {
+            // this is neither of above. Just create an element
+            element = new OMElementImpl(elementName, null, parent, this);
+        }
+        return element;
+    }
+
+    private OMNode createOMText() throws OMException {
+        if (lastNode == null)
+            throw new OMException();
+        OMNodeImpl node;
+        if (lastNode.isComplete()) {
+            node = new OMTextImpl(lastNode.getParent(), parser.getText());
+            lastNode.setNextSibling(node);
+            node.setPreviousSibling(lastNode);
+        } else {
+            OMElementImpl e = (OMElementImpl) lastNode;
+            node = new OMTextImpl(e, parser.getText());
+            e.setFirstChild(node);
+        }
+        return node;
+    }
+
+    public void reset(OMNode node) throws OMException {
+        navigate = true;
+        lastNode = null;
+        navigator.init(node);
+    }
+
+
+    public int next() throws OMException {
+        try {
+            if (navigate) {
+                OMNodeImpl next = (OMNodeImpl) navigator.next();
+                if (next != null) {
+                    lastNode = next;
+                    if (lastNode instanceof OMText)
+                        return XmlPullParser.TEXT;
+                    else if (navigator.visited())
+                        return XmlPullParser.END_TAG;
+                    else
+                        return XmlPullParser.START_TAG;
+                }
+                navigate = false;
+                if (done)
+                    return XmlPullParser.END_DOCUMENT;
+                if (slip)
+                    throw new OMException();
+            }
+
+            if (done)
+                throw new OMException();
+
+            int token = parser.nextToken();
+
+            if (!cache) {
+                slip = true;
+                return token;
+            }
+
+            switch (token) {
+                case XmlPullParser.START_TAG:
+                    elementLevel++;
+                    lastNode = (OMNodeImpl) createOMElement();
+                    break;
+
+                case XmlPullParser.TEXT:
+                    lastNode = (OMNodeImpl) createOMText();
+                    break;
+
+                case XmlPullParser.END_TAG:
+                    if (lastNode.isComplete()) {
+                        OMElement parent = lastNode.getParent();
+                        parent.setComplete(true);
+                        lastNode = (OMNodeImpl) parent;
+                    } else {
+                        OMElement e = (OMElement) lastNode;
+                        e.setComplete(true);
+                    }
+                    elementLevel--;
+                    break;
+
+                case XmlPullParser.END_DOCUMENT:
+                    done = true;
+
+                    break;
+                case XmlPullParser.IGNORABLE_WHITESPACE:
+                    next();
+                    break;
+
+                default :
+                    throw new OMException();
+            }
+            return token;
+        } catch (OMException e) {
+            throw e;
+        } catch (Exception e) {
+            e.printStackTrace();
+            throw new OMException(e);
+        }
+    }
+
+    public void discard(OMElement el) throws OMException {
+        OMElementImpl elementImpl = null;
+        if (el instanceof OMElementImpl) {
+            elementImpl = (OMElementImpl) el;
+        } else {
+            throw new OMException();
+        }
+
+        if (elementImpl.isComplete() || !cache)
+            throw new OMException();
+        try {
+            cache = false;
+            do {
+                while (parser.next() != XmlPullParser.END_TAG) ;
+                //	TODO:
+            } while (!parser.getName().equals(elementImpl.getLocalName()));
+            lastNode = (OMNodeImpl) elementImpl.getPreviousSibling();
+            if (lastNode != null)
+                lastNode.setNextSibling(null);
+            else {
+                OMElementImpl parent = (OMElementImpl) elementImpl.getParent();
+                if (parent == null)
+                    throw new OMException();
+                parent.setFirstChild(null);
+                lastNode = parent;
+            }
+            slip = false;
+            cache = true;
+        } catch (OMException e) {
+            throw e;
+        } catch (Exception e) {
+            throw new OMException(e);
+        }
+    }
+
+    public void setCache(boolean b) {
+        cache = b;
+    }
+
+    public String getName() throws OMException {
+        if (navigate) {
+            try {
+                OMElement e = (OMElement) lastNode;
+                return e.getLocalName();
+            } catch (Exception e) {
+                throw new OMException(e);
+            }
+        }
+        return parser.getName();
+    }
+
+    public String getText() throws OMException {
+        if (navigate) {
+            try {
+                return (String) lastNode.getValue();
+            } catch (Exception e) {
+                throw new OMException(e);
+            }
+        }
+        return parser.getText();
+    }
+
+    public String getNamespace() throws OMException {
+        if (navigate) {
+            if (lastNode instanceof OMElement) {
+                OMElement node = (OMElement) lastNode;
+                OMNamespace ns = node.getNamespace();
+                if (ns != null)
+                    return ns.getValue();
+                //	TODO: else
+            }
+            throw new OMException();
+        }
+        return parser.getNamespace();
+    }
+
+    public int getNamespaceCount(int arg) throws OMException {
+        if (navigate)
+        //	TODO:
+            throw new OMException();
+        try {
+            return parser.getNamespaceCount(arg);
+        } catch (Exception e) {
+            throw new OMException(e);
+        }
+    }
+
+    public String getNamespacePrefix(int arg) throws OMException {
+        if (navigate)
+        //	TODO:
+            throw new OMException();
+        try {
+            return parser.getNamespacePrefix(arg);
+        } catch (Exception e) {
+            throw new OMException(e);
+        }
+    }
+
+    public String getNamespaceUri(int arg) throws OMException {
+        if (navigate)
+        //	TODO:
+            throw new OMException();
+        try {
+            return parser.getNamespaceUri(arg);
+        } catch (Exception e) {
+            throw new OMException(e);
+        }
+    }
+
+    public String getNamespace(String arg) throws OMException {
+        if (navigate)
+        //	TODO:
+            throw new OMException();
+        try {
+            return parser.getNamespace(arg);
+        } catch (Exception e) {
+            throw new OMException(e);
+        }
+    }
+
+    public String getPrefix() throws OMException {
+        if (navigate)
+        //	TODO:
+            throw new OMException();
+        return parser.getPrefix();
+    }
+
+    public int getAttributeCount() throws OMException {
+        if (navigate)
+        //	TODO:
+            throw new OMException();
+        return parser.getAttributeCount();
+    }
+
+    public String getAttributeNamespace(int arg) throws OMException {
+        if (navigate)
+        //	TODO:
+            throw new OMException();
+        return parser.getAttributeNamespace(arg);
+    }
+
+    public String getAttributeName(int arg) throws OMException {
+        if (navigate)
+        //	TODO:
+            throw new OMException();
+        return parser.getAttributeNamespace(arg);
+    }
+
+    public String getAttributePrefix(int arg) throws OMException {
+        if (navigate)
+        //	TODO:
+            throw new OMException();
+        return parser.getAttributeNamespace(arg);
+    }
+}

Added: webservices/axis/trunk/java/dev/scratch/prototype1/src/java/org/apache/axis/om/impl/SOAPBodyElementImpl.java
==============================================================================
--- (empty file)
+++ webservices/axis/trunk/java/dev/scratch/prototype1/src/java/org/apache/axis/om/impl/SOAPBodyElementImpl.java	Thu Nov 18 03:16:05 2004
@@ -0,0 +1,44 @@
+package org.apache.axis.om.impl;
+
+import org.apache.axis.om.soap.SOAPBodyElement;
+import org.apache.axis.om.OMNamespace;
+import org.apache.axis.om.OMElement;
+import org.apache.axis.om.OMXMLParserWrapper;
+import org.apache.axis.om.soap.SOAPBodyElement;
+
+/**
+ * Copyright 2001-2004 The Apache Software Foundation.
+ * <p/>
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * <p/>
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * <p/>
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * <p/>
+ * User: Eran Chinthaka - Lanka Software Foundation
+ * Date: Nov 8, 2004
+ * Time: 1:09:37 PM
+ */
+public class SOAPBodyElementImpl extends OMElementImpl implements SOAPBodyElement{
+
+    /**
+     *
+     * @param localName
+     * @param ns
+     * @param parent
+     * @param builder
+     */
+    public SOAPBodyElementImpl(String localName, OMNamespace ns, OMElement parent, OMXMLParserWrapper builder) {
+        super(localName, ns, parent, builder);
+    }
+
+    public SOAPBodyElementImpl(String localName, OMNamespace ns) {
+        super(localName, ns);
+    }
+}

Added: webservices/axis/trunk/java/dev/scratch/prototype1/src/java/org/apache/axis/om/impl/SOAPBodyImpl.java
==============================================================================
--- (empty file)
+++ webservices/axis/trunk/java/dev/scratch/prototype1/src/java/org/apache/axis/om/impl/SOAPBodyImpl.java	Thu Nov 18 03:16:05 2004
@@ -0,0 +1,119 @@
+package org.apache.axis.om.impl;
+
+import org.apache.axis.om.*;
+import org.apache.axis.om.soap.SOAPBody;
+import org.apache.axis.om.soap.SOAPBodyElement;
+import org.apache.axis.om.soap.SOAPEnvelope;
+import org.apache.axis.om.soap.SOAPFault;
+
+/**
+ * Copyright 2001-2004 The Apache Software Foundation.
+ * <p/>
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * <p/>
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * <p/>
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * <p/>
+ * User: Eran Chinthaka - Lanka Software Foundation
+ * Date: Nov 2, 2004
+ * Time: 4:29:00 PM
+ */
+public class SOAPBodyImpl extends OMElementImpl implements SOAPBody {
+
+
+
+    /**
+     * @param envelope
+     */
+    public SOAPBodyImpl(SOAPEnvelope envelope) {
+        super(envelope);
+    }
+
+    public SOAPBodyImpl(String localName, OMNamespace ns, OMElement parent, OMXMLParserWrapper builder) {
+        super(localName, ns, parent, builder);
+    }
+
+    /**
+     * Creates a new <code>SOAPFault</code> object and adds it to
+     * this <code>SOAPBody</code> object.
+     *
+     * @return the new <code>SOAPFault</code> object
+     * @throws org.apache.axis.om.OMException if there is a SOAP error
+     */
+    public SOAPFault addFault() throws OMException {
+        throw new UnsupportedOperationException(); //TODO implement this
+    }
+
+    /**
+     * Indicates whether a <code>SOAPFault</code> object exists in
+     * this <code>SOAPBody</code> object.
+     *
+     * @return <code>true</code> if a <code>SOAPFault</code> object exists in
+     *         this <code>SOAPBody</code> object; <code>false</code>
+     *         otherwise
+     */
+    public boolean hasFault() {
+        throw new UnsupportedOperationException(); //TODO implement this
+    }
+
+    /**
+     * Returns the <code>SOAPFault</code> object in this <code>SOAPBody</code>
+     * object.
+     *
+     * @return the <code>SOAPFault</code> object in this <code>SOAPBody</code>
+     *         object
+     */
+    public SOAPFault getFault() {
+        throw new UnsupportedOperationException(); //TODO implement this
+    }
+
+    /**
+     * Creates a new <code>SOAPBodyElement</code> object with the
+     * specified name and adds it to this <code>SOAPBody</code> object.
+     *
+     * @param element a <code>OMNamedNode</code> object with the name for the new
+     *                <code>SOAPBodyElement</code> object
+     * @return the new <code>SOAPBodyElement</code> object
+     * @throws org.apache.axis.om.OMException if a SOAP error occurs
+     */
+    public SOAPBodyElement addBodyElement(String localName, OMNamespace ns) throws OMException {
+        SOAPBodyElement soapBodyElement = new SOAPBodyElementImpl(localName, ns);
+        this.addChild(soapBodyElement);
+        return soapBodyElement;
+    }
+
+    /**
+     * @param soapFault
+     * @throws org.apache.axis.om.OMException
+     */
+    public void addFault(SOAPFault soapFault) throws OMException {
+        throw new UnsupportedOperationException(); //TODO implement this
+    }
+
+    /**
+     * Adds the root node of the DOM <code>Document</code> to this
+     * <code>SOAPBody</code> object.
+     * <p/>
+     * Calling this method invalidates the <code>document</code> parameter. The
+     * client application should discard all references to this
+     * <code>Document</code> and its contents upon calling
+     * <code>addDocument</code>. The behavior of an application that continues
+     * to use such references is undefined.
+     *
+     * @param element the <code>Document</code> object whose root node will be
+     *                added to this <code>SOAPBody</code>
+     * @return the <code>SOAPBodyElement</code> that represents the root node
+     *         that was added
+     * @throws org.apache.axis.om.OMException if the <code>Document</code> cannot be added
+     */
+    public SOAPBodyElement addDocument(OMElement element) throws OMException {
+        throw new UnsupportedOperationException(); //TODO implement this
+    }
+}

Added: webservices/axis/trunk/java/dev/scratch/prototype1/src/java/org/apache/axis/om/impl/SOAPEnvelopeImpl.java
==============================================================================
--- (empty file)
+++ webservices/axis/trunk/java/dev/scratch/prototype1/src/java/org/apache/axis/om/impl/SOAPEnvelopeImpl.java	Thu Nov 18 03:16:05 2004
@@ -0,0 +1,112 @@
+package org.apache.axis.om.impl;
+
+import org.apache.axis.om.*;
+import org.apache.axis.om.soap.SOAPBody;
+import org.apache.axis.om.soap.SOAPEnvelope;
+import org.apache.axis.om.soap.SOAPHeader;
+import org.apache.axis.om.impl.util.SOAPConstants;
+import org.apache.xml.utils.QName;
+
+import java.util.Iterator;
+
+/**
+ * Copyright 2001-2004 The Apache Software Foundation.
+ * <p/>
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * <p/>
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * <p/>
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * <p/>
+ * User: Eran Chinthaka - Lanka Software Foundation
+ * Date: Oct 29, 2004
+ * Time: 3:41:59 PM
+ */
+public class SOAPEnvelopeImpl extends OMElementImpl implements SOAPEnvelope {
+
+    public SOAPEnvelopeImpl(String localName, OMNamespace ns, OMElement parent, OMXMLParserWrapper builder) {
+        super(localName, ns, parent, builder);
+    }
+
+    /**
+     * @param localName
+     * @param ns
+     */
+    public SOAPEnvelopeImpl(String localName, OMNamespace ns) {
+        super(localName, ns);
+    }
+
+    /**
+     * Creates a new <CODE>Name</CODE> object initialized with the
+     * given local name, namespace prefix, and namespace URI.
+     * <p/>
+     * <P>This factory method creates <CODE>Name</CODE> objects
+     * for use in the SOAP/XML document.
+     *
+     * @param localName a <CODE>String</CODE> giving
+     *                  the local name
+     * @param prefix    a <CODE>String</CODE> giving
+     *                  the prefix of the namespace
+     * @param uri       a <CODE>String</CODE> giving the
+     *                  URI of the namespace
+     * @return a <CODE>OMNamespace</CODE> object initialized with the given
+     *         local name, namespace prefix, and namespace URI
+     * @throws org.apache.axis.om.OMException if there is a SOAP error
+     */
+    public OMNamespace createNamespace(String localName, String prefix, String uri) throws OMException {
+        return this.createNamespace(localName, prefix, uri);
+    }
+
+    /**
+     * Returns the <CODE>SOAPHeader</CODE> object for this <CODE>
+     * SOAPEnvelope</CODE> object.
+     * <p/>
+     * <P> This SOAPHeader will just be a container for all the headers in the
+     * <CODE>SOAPMessage</CODE>
+     * </P>
+     *
+     * @return the <CODE>SOAPHeader</CODE> object or <CODE>
+     *         null</CODE> if there is none
+     * @throws org.apache.axis.om.OMException if there is a problem
+     *                                        obtaining the <CODE>SOAPHeader</CODE> object
+     */
+    public SOAPHeader getHeader() throws OMException {
+        Iterator headerIterator = this.getChildrenWithName(new QName(SOAPConstants.headerNamespaceURI, SOAPConstants.headerLocalName));
+        SOAPHeader soapHeader = null;
+        if (headerIterator.hasNext()) {
+            soapHeader = (SOAPHeader) headerIterator.next();
+        }
+
+        return soapHeader;
+    }
+
+    /**
+     * Returns the <CODE>SOAPBody</CODE> object associated with
+     * this <CODE>SOAPEnvelope</CODE> object.
+     * <p/>
+     * <P> This SOAPBody will just be a container for all the BodyElements in the
+     * <CODE>SOAPMessage</CODE>
+     * </P>
+     *
+     * @return the <CODE>SOAPBody</CODE> object for this <CODE>
+     *         SOAPEnvelope</CODE> object or <CODE>null</CODE> if there
+     *         is none
+     * @throws org.apache.axis.om.OMException if there is a problem
+     *                                        obtaining the <CODE>SOAPBody</CODE> object
+     */
+    public SOAPBody getBody() throws OMException {
+        Iterator bodyIterator = this.getChildrenWithName(new QName(SOAPConstants.bodyNamespaceURI, SOAPConstants.bodyLocalName));
+        SOAPBody soapBody = null;
+        if (bodyIterator.hasNext()) {
+            soapBody = (SOAPBody) bodyIterator.next();
+        }
+
+        return soapBody;
+    }
+}

Added: webservices/axis/trunk/java/dev/scratch/prototype1/src/java/org/apache/axis/om/impl/SOAPHeaderElementImpl.java
==============================================================================
--- (empty file)
+++ webservices/axis/trunk/java/dev/scratch/prototype1/src/java/org/apache/axis/om/impl/SOAPHeaderElementImpl.java	Thu Nov 18 03:16:05 2004
@@ -0,0 +1,133 @@
+package org.apache.axis.om.impl;
+
+import org.apache.axis.om.OMAttribute;
+import org.apache.axis.om.OMElement;
+import org.apache.axis.om.OMNamespace;
+import org.apache.axis.om.OMXMLParserWrapper;
+import org.apache.axis.om.soap.SOAPHeaderElement;
+import org.apache.axis.om.impl.util.SOAPConstants;
+import org.apache.xml.utils.QName;
+
+import java.util.Iterator;
+
+/**
+ * Copyright 2001-2004 The Apache Software Foundation.
+ * <p/>
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * <p/>
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * <p/>
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * <p/>
+ * User: Eran Chinthaka - Lanka Software Foundation
+ * Date: Nov 2, 2004
+ * Time: 3:19:20 PM
+ */
+public class SOAPHeaderElementImpl extends OMElementImpl implements SOAPHeaderElement {
+
+    /**
+     * @param localName
+     * @param ns
+     */
+    public SOAPHeaderElementImpl(String localName, OMNamespace ns) {
+        super(localName, ns);
+    }
+
+    public SOAPHeaderElementImpl(String localName, OMNamespace ns, OMElement parent, OMXMLParserWrapper builder) {
+        super(localName, ns, parent, builder);
+    }
+
+    /**
+     * Sets the actor associated with this <CODE>
+     * SOAPHeaderElement</CODE> object to the specified actor. The
+     * default value of an actor is: <CODE>
+     * SOAPConstants.URI_SOAP_ACTOR_NEXT</CODE>
+     *
+     * @param actorURI a <CODE>String</CODE> giving
+     *                 the URI of the actor to set
+     * @throws IllegalArgumentException if
+     *                                  there is a problem in setting the actor.
+     * @see #getActor() getActor()
+     */
+    public void setActor(String actorURI) {
+        setAttribute(SOAPConstants.attrActor, actorURI);
+    }
+
+    /**
+     *
+     * @param attributeName
+     * @param attrValue
+     */
+    private void setAttribute(String attributeName, String attrValue) {
+        Iterator attrIter = this.getAttributeWithQName(new QName(SOAPConstants.soapEnvelopeNamespaceURI, attributeName));
+        if (attrIter.hasNext()) {
+            ((OMAttribute) attrIter.next()).setValue(attrValue);
+        } else {
+            OMAttribute attribute = new OMAttributeImpl(attributeName, new OMNamespaceImpl(SOAPConstants.soapEnvelopeNamespaceURI, SOAPConstants.soapEnvelopeNamespacePrefix), attrValue, this);
+            this.insertAttribute(attribute);
+        }
+    }
+
+    /**
+     * Returns the uri of the actor associated with this <CODE>
+     * SOAPHeaderElement</CODE> object.
+     *
+     * @return a <CODE>String</CODE> giving the URI of the
+     *         actor
+     * @see #setActor(String) setActor(java.lang.String)
+     */
+    public String getActor() {
+        return getAttribute(SOAPConstants.attrActor);
+    }
+
+    private String getAttribute(String attrName) {
+        Iterator attrIter = this.getAttributeWithQName(new QName(SOAPConstants.soapEnvelopeNamespaceURI, attrName));
+        if (attrIter.hasNext()) {
+            return ((OMAttribute) attrIter.next()).getValue();
+        }
+        return null;
+    }
+
+    /**
+     * Sets the mustUnderstand attribute for this <CODE>
+     * SOAPHeaderElement</CODE> object to be on or off.
+     * <p/>
+     * <P>If the mustUnderstand attribute is on, the actor who
+     * receives the <CODE>SOAPHeaderElement</CODE> must process it
+     * correctly. This ensures, for example, that if the <CODE>
+     * SOAPHeaderElement</CODE> object modifies the message, that
+     * the message is being modified correctly.</P>
+     *
+     * @param mustUnderstand <CODE>true</CODE> to
+     *                       set the mustUnderstand attribute on; <CODE>false</CODE>
+     *                       to turn if off
+     * @throws IllegalArgumentException if
+     *                                  there is a problem in setting the actor.
+     * @see #getMustUnderstand() getMustUnderstand()
+     */
+    public void setMustUnderstand(boolean mustUnderstand) {
+        setAttribute(SOAPConstants.attrMustUnderstand, mustUnderstand ? "true" : "false");
+    }
+
+    /**
+     * Returns whether the mustUnderstand attribute for this
+     * <CODE>SOAPHeaderElement</CODE> object is turned on.
+     *
+     * @return <CODE>true</CODE> if the mustUnderstand attribute of
+     *         this <CODE>SOAPHeaderElement</CODE> object is turned on;
+     *         <CODE>false</CODE> otherwise
+     */
+    public boolean getMustUnderstand() {
+        String mustUnderstand = "";
+        if( (mustUnderstand = getAttribute(SOAPConstants.attrMustUnderstand)) != null){
+            return mustUnderstand.equalsIgnoreCase("true");
+        }
+        return false;
+    }
+}

Added: webservices/axis/trunk/java/dev/scratch/prototype1/src/java/org/apache/axis/om/impl/SOAPHeaderImpl.java
==============================================================================
--- (empty file)
+++ webservices/axis/trunk/java/dev/scratch/prototype1/src/java/org/apache/axis/om/impl/SOAPHeaderImpl.java	Thu Nov 18 03:16:05 2004
@@ -0,0 +1,149 @@
+package org.apache.axis.om.impl;
+
+import org.apache.axis.om.*;
+import org.apache.axis.om.soap.SOAPEnvelope;
+import org.apache.axis.om.soap.SOAPHeader;
+import org.apache.axis.om.soap.SOAPHeaderElement;
+import org.apache.axis.om.impl.util.SOAPConstants;
+import org.apache.xml.utils.QName;
+
+import java.util.Iterator;
+import java.util.HashMap;
+
+/**
+ * Copyright 2001-2004 The Apache Software Foundation.
+ * <p/>
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * <p/>
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * <p/>
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * <p/>
+ * User: Eran Chinthaka - Lanka Software Foundation
+ * Date: Nov 2, 2004
+ * Time: 2:45:24 PM
+ */
+public class SOAPHeaderImpl extends OMElementImpl implements SOAPHeader {
+
+
+    /**
+     * @param envelope
+     */
+    public SOAPHeaderImpl(SOAPEnvelope envelope) {
+        super(envelope);
+    }
+
+    public SOAPHeaderImpl(String localName, OMNamespace ns, OMElement parent, OMXMLParserWrapper builder) {
+        super(localName, ns, parent, builder);
+    }
+
+    /**
+     * Creates a new <CODE>SOAPHeaderElement</CODE> object
+     * initialized with the specified name and adds it to this
+     * <CODE>SOAPHeader</CODE> object.
+     *
+     * @return the new <CODE>SOAPHeaderElement</CODE> object that
+     *         was inserted into this <CODE>SOAPHeader</CODE>
+     *         object
+     * @throws org.apache.axis.om.OMException if a SOAP error occurs
+     */
+    public SOAPHeaderElement addHeaderElement(String localName, OMNamespace ns) throws OMException {
+        SOAPHeaderElement soapHeaderElement = new SOAPHeaderElementImpl(localName, ns);
+        this.addChild(soapHeaderElement);
+        return soapHeaderElement;
+    }
+
+    /**
+     * Returns a list of all the <CODE>SOAPHeaderElement</CODE>
+     * objects in this <CODE>SOAPHeader</CODE> object that have the
+     * the specified actor. An actor is a global attribute that
+     * indicates the intermediate parties to whom the message should
+     * be sent. An actor receives the message and then sends it to
+     * the next actor. The default actor is the ultimate intended
+     * recipient for the message, so if no actor attribute is
+     * included in a <CODE>SOAPHeader</CODE> object, the message is
+     * sent to its ultimate destination.
+     *
+     * @param actor a <CODE>String</CODE> giving the
+     *              URI of the actor for which to search
+     * @return an <CODE>Iterator</CODE> object over all the <CODE>
+     *         SOAPHeaderElement</CODE> objects that contain the
+     *         specified actor
+     * @see #extractHeaderElements(String) extractHeaderElements(java.lang.String)
+     */
+    public Iterator examineHeaderElements(String actor) {
+        throw new UnsupportedOperationException(); //TODO implement this
+    }
+
+    /**
+     * Returns a list of all the <CODE>SOAPHeaderElement</CODE>
+     * objects in this <CODE>SOAPHeader</CODE> object that have
+     * the the specified actor and detaches them from this <CODE>
+     * SOAPHeader</CODE> object.
+     * <p/>
+     * <P>This method allows an actor to process only the parts of
+     * the <CODE>SOAPHeader</CODE> object that apply to it and to
+     * remove them before passing the message on to the next
+     * actor.
+     *
+     * @param actor a <CODE>String</CODE> giving the
+     *              URI of the actor for which to search
+     * @return an <CODE>Iterator</CODE> object over all the <CODE>
+     *         SOAPHeaderElement</CODE> objects that contain the
+     *         specified actor
+     * @see #examineHeaderElements(String) examineHeaderElements(java.lang.String)
+     */
+    public Iterator extractHeaderElements(String actor) {
+        throw new UnsupportedOperationException(); //TODO implement this
+    }
+
+    /**
+     * Returns an <code>Iterator</code> over all the
+     * <code>SOAPHeaderElement</code> objects in this <code>SOAPHeader</code>
+     * object that have the specified actor and that have a MustUnderstand
+     * attribute whose value is equivalent to <code>true</code>.
+     *
+     * @param actor a <code>String</code> giving the URI of the actor for which
+     *              to search
+     * @return an <code>Iterator</code> object over all the
+     *         <code>SOAPHeaderElement</code> objects that contain the
+     *         specified actor and are marked as MustUnderstand
+     */
+    public Iterator examineMustUnderstandHeaderElements(String actor) {
+        throw new UnsupportedOperationException(); //TODO implement this
+    }
+
+    /**
+     * Returns an <code>Iterator</code> over all the
+     * <code>SOAPHeaderElement</code> objects in this <code>SOAPHeader</code>
+     * object.
+     *
+     * Not that this will return elements containing the QName (http://schemas.xmlsoap.org/soap/envelope/, Header)
+     *
+     * @return an <code>Iterator</code> object over all the
+     *         <code>SOAPHeaderElement</code> objects contained by this
+     *         <code>SOAPHeader</code>
+     */
+    public Iterator examineAllHeaderElements() {
+        return this.getChildrenWithName(null);
+    }
+
+    /**
+     * Returns an <code>Iterator</code> over all the
+     * <code>SOAPHeaderElement</code> objects in this <code>SOAPHeader </code>
+     * object and detaches them from this <code>SOAPHeader</code> object.
+     *
+     * @return an <code>Iterator</code> object over all the
+     *         <code>SOAPHeaderElement</code> objects contained by this
+     *         <code>SOAPHeader</code>
+     */
+    public Iterator extractAllHeaderElements() {
+        throw new UnsupportedOperationException(); //TODO implement this
+    }
+}

Added: webservices/axis/trunk/java/dev/scratch/prototype1/src/java/org/apache/axis/om/impl/SOAPMessageImpl.java
==============================================================================
--- (empty file)
+++ webservices/axis/trunk/java/dev/scratch/prototype1/src/java/org/apache/axis/om/impl/SOAPMessageImpl.java	Thu Nov 18 03:16:05 2004
@@ -0,0 +1,70 @@
+package org.apache.axis.om.impl;
+
+import org.apache.axis.om.*;
+import org.apache.axis.om.soap.SOAPEnvelope;
+import org.apache.axis.om.soap.SOAPMessage;
+import org.apache.axis.om.mime.MimeHeaders;
+
+/**
+ * Copyright 2001-2004 The Apache Software Foundation.
+ * <p/>
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * <p/>
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * <p/>
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * <p/>
+ * User: Eran Chinthaka - Lanka Software Foundation
+ * Date: Oct 7, 2004
+ * Time: 10:52:17 AM
+ */
+public class SOAPMessageImpl extends OMNodeImpl implements SOAPMessage {
+
+    private SOAPEnvelope envelope;
+    private OMXMLParserWrapper parserWrapper;
+    private OMFactory omFactory;
+
+    public SOAPMessageImpl(OMXMLParserWrapper parserWrapper) {
+        this.parserWrapper = parserWrapper;
+        omFactory = new OMLinkedListImplFactory();
+    }
+
+    public SOAPMessageImpl(Object[] obj) {
+        //TODO create the OM from Obj
+    }
+
+    
+    public void setEnvelope(SOAPEnvelopeImpl root) {
+        this.envelope = root;
+    }
+
+    /**
+     * Get the envelope element of this document as a SOAPEnvelope
+     *
+     * @return the envelope element
+     */
+    public SOAPEnvelope getEnvelope() {
+        while (envelope == null) {
+            parserWrapper.next();
+        }
+        return envelope;
+    }
+
+    /**
+     * Returns all the transport-specific MIME headers for this
+     * <CODE>SOAPMessage</CODE> object in a transport-independent
+     * fashion.
+     *
+     * @return a <CODE>MimeHeaders</CODE> object containing the
+     *         <CODE>MimeHeader</CODE> objects
+     */
+    public MimeHeaders getMimeHeaders() {
+        throw new UnsupportedOperationException(); //TODO implement this
+    }
+}

Added: webservices/axis/trunk/java/dev/scratch/prototype1/src/java/org/apache/axis/om/impl/util/OMChildrenIterator.java
==============================================================================
--- (empty file)
+++ webservices/axis/trunk/java/dev/scratch/prototype1/src/java/org/apache/axis/om/impl/util/OMChildrenIterator.java	Thu Nov 18 03:16:05 2004
@@ -0,0 +1,82 @@
+package org.apache.axis.om.impl.util;
+
+import org.apache.axis.om.OMNode;
+
+import java.util.Iterator;
+
+/**
+ * Copyright 2001-2004 The Apache Software Foundation.
+ * <p/>
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * <p/>
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * <p/>
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * <p/>
+ * User: Eran Chinthaka - Lanka Software Foundation
+ * Date: Oct 11, 2004
+ * Time: 11:23:07 AM
+ */
+public class OMChildrenIterator implements Iterator {
+
+    private OMNode currentChild;
+
+    public OMChildrenIterator(OMNode currentChild) {
+        this.currentChild = currentChild;
+    }
+
+    /**
+     * Removes from the underlying collection the last element returned by the
+     * iterator (optional operation).  This method can be called only once per
+     * call to <tt>next</tt>.  The behavior of an iterator is unspecified if
+     * the underlying collection is modified while the iteration is in
+     * progress in any way other than by calling this method.
+     *
+     * @throws UnsupportedOperationException if the <tt>remove</tt>
+     *                                       operation is not supported by this Iterator.
+     * @throws IllegalStateException         if the <tt>next</tt> method has not
+     *                                       yet been called, or the <tt>remove</tt> method has already
+     *                                       been called after the last call to the <tt>next</tt>
+     *                                       method.
+     */
+    public void remove() {
+        OMNode temp = currentChild.getNextSibling();
+        currentChild.detach();
+        currentChild = temp;
+    }
+
+    /**
+     * Returns <tt>true</tt> if the iteration has more elements. (In other
+     * words, returns <tt>true</tt> if <tt>next</tt> would return an element
+     * rather than throwing an exception.)
+     *
+     * @return <tt>true</tt> if the iterator has more elements.
+     */
+    public boolean hasNext() {
+        return (currentChild != null);
+    }
+
+    /**
+     * Returns the next element in the iteration.
+     *
+     * @return the next element in the iteration.
+     * @throws java.util.NoSuchElementException
+     *          iteration has no more elements.
+     */
+    public Object next() {
+
+        if (hasNext()) {
+            OMNode returnNode = currentChild;
+            currentChild = currentChild.getNextSibling();
+            return returnNode;
+        }
+        return null;
+
+    }
+}

Added: webservices/axis/trunk/java/dev/scratch/prototype1/src/java/org/apache/axis/om/impl/util/OMChildrenQNameIterator.java
==============================================================================
--- (empty file)
+++ webservices/axis/trunk/java/dev/scratch/prototype1/src/java/org/apache/axis/om/impl/util/OMChildrenQNameIterator.java	Thu Nov 18 03:16:05 2004
@@ -0,0 +1,128 @@
+package org.apache.axis.om.impl.util;
+
+import org.apache.axis.om.OMNode;
+import org.apache.axis.om.impl.OMNamedNodeImpl;
+import org.apache.axis.om.impl.OMNodeImpl;
+import org.apache.xml.utils.QName;
+
+import java.util.Iterator;
+
+/**
+ * Copyright 2001-2004 The Apache Software Foundation.
+ * <p/>
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * <p/>
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * <p/>
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * <p/>
+ * User: Eran Chinthaka - Lanka Software Foundation
+ * Date: Oct 13, 2004
+ * Time: 11:25:29 AM
+ */
+public class OMChildrenQNameIterator implements Iterator {
+
+    private OMNode omNode;
+    private QName givenQName;
+
+    private boolean picked = false;
+
+    public OMChildrenQNameIterator(OMNodeImpl firstChild, QName qName) {
+        this.omNode = firstChild;
+        this.givenQName = qName;
+    }
+
+    /**
+     * Removes from the underlying collection the last element returned by the
+     * iterator (optional operation).  This method can be called only once per
+     * call to <tt>next</tt>.  The behavior of an iterator is unspecified if
+     * the underlying collection is modified while the iteration is in
+     * progress in any way other than by calling this method.
+     *
+     * @throws UnsupportedOperationException if the <tt>remove</tt>
+     *                                       operation is not supported by this Iterator.
+     * @throws IllegalStateException         if the <tt>next</tt> method has not
+     *                                       yet been called, or the <tt>remove</tt> method has already
+     *                                       been called after the last call to the <tt>next</tt>
+     *                                       method.
+     */
+    public void remove() {
+        throw new UnsupportedOperationException(); //TODO implement this
+    }
+
+    /**
+     * Returns <tt>true</tt> if the iteration has more elements. (In other
+     * words, returns <tt>true</tt> if <tt>next</tt> would return an element
+     * rather than throwing an exception.)
+     *
+     * @return <tt>true</tt> if the iterator has more elements.
+     */
+    public boolean hasNext() {
+
+        boolean needToMoveForward = true;
+        boolean isMatchingNodeFound = false;
+
+        while (needToMoveForward) {
+            if (omNode != null) {
+
+                // check the current node for the criteria
+                if ((omNode instanceof OMNamedNodeImpl) && (isQNamesMatch(((OMNamedNodeImpl) omNode).getQName(), this.givenQName))) {
+                    isMatchingNodeFound = true;
+                    needToMoveForward = false;
+                } else {
+                    // get the next named node
+                    omNode = omNode.getNextSibling();
+                    isMatchingNodeFound = needToMoveForward = !(omNode == null);
+                }
+            } else {
+                needToMoveForward = false;
+            }
+        }
+        return isMatchingNodeFound;
+    }
+
+    /**
+     * Returns the next element in the iteration.
+     *
+     * @return the next element in the iteration.
+     * @throws java.util.NoSuchElementException
+     *          iteration has no more elements.
+     */
+    public Object next() {
+        OMNode tempNode = omNode;
+        omNode = omNode.getNextSibling();
+        return tempNode;
+    }
+
+     /**
+     *    Here I can not use the overriden equals method of QName, as one might want to get
+     * some element just by giving the localname, even though a matching element has a namespace uri as well.
+     * This will not be supported in the equals method of the QName
+     * @param elementQName
+     * @param qNameToBeMatched
+     * @return
+     */
+    private boolean isQNamesMatch(QName elementQName, QName qNameToBeMatched){
+
+         // if no QName was given, that means one needs all
+         if(qNameToBeMatched == null){
+             return true;
+         }
+
+        // if the given localname is null, whatever value this.qname has, its a match
+        boolean localNameMatch = qNameToBeMatched.getLocalName() == null || qNameToBeMatched.getLocalName() == "" || (elementQName != null && elementQName.getLocalName().equalsIgnoreCase(qNameToBeMatched.getLocalName()));
+        boolean namespaceURIMatch = qNameToBeMatched.getNamespaceURI() == null || qNameToBeMatched.getNamespaceURI() == "" ||  (elementQName != null && elementQName.getNamespaceURI().equalsIgnoreCase(qNameToBeMatched.getNamespaceURI()));
+
+        return localNameMatch && namespaceURIMatch;
+
+
+    }
+
+
+}

Added: webservices/axis/trunk/java/dev/scratch/prototype1/src/java/org/apache/axis/om/impl/util/SOAPConstants.java
==============================================================================
--- (empty file)
+++ webservices/axis/trunk/java/dev/scratch/prototype1/src/java/org/apache/axis/om/impl/util/SOAPConstants.java	Thu Nov 18 03:16:05 2004
@@ -0,0 +1,40 @@
+package org.apache.axis.om.impl.util;
+
+/**
+ * Copyright 2001-2004 The Apache Software Foundation.
+ * <p/>
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * <p/>
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * <p/>
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * <p/>
+ * User: Eran Chinthaka - Lanka Software Foundation
+ * Date: Nov 8, 2004
+ * Time: 3:38:10 PM
+ */
+public class SOAPConstants {
+
+    public static final String soapEnvelopeNamespaceURI = "http://schemas.xmlsoap.org/soap/envelope/";
+    public static final String soapEnvelopeNamespacePrefix = "soapenv";
+
+    // Header constants
+    public static final String headerNamespaceURI = soapEnvelopeNamespaceURI;
+    public static final String headerLocalName = "Header";
+    public static final String headerNamespacePrefix = soapEnvelopeNamespacePrefix;
+
+    // Body Constants
+    public static final String bodyNamespaceURI = soapEnvelopeNamespaceURI;
+    public static final String bodyLocalName = "Body";
+    public static final String bodyNamespacePrefix = soapEnvelopeNamespacePrefix;
+
+    // Attribute names of a SOAP Envelope
+    public static final String attrActor = "actor";
+    public static final String attrMustUnderstand = "mustUnderstand";
+}

Added: webservices/axis/trunk/java/dev/scratch/prototype1/src/java/org/apache/axis/om/mime/MimeHeader.java
==============================================================================
--- (empty file)
+++ webservices/axis/trunk/java/dev/scratch/prototype1/src/java/org/apache/axis/om/mime/MimeHeader.java	Thu Nov 18 03:16:05 2004
@@ -0,0 +1,60 @@
+/*   Copyright 2004 The Apache Software Foundation
+ *
+ *   Licensed under the Apache License, Version 2.0 (the "License");
+ *   you may not use this file except in compliance with the License.
+ *   You may obtain a copy of the License at
+ *
+ *       http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *   Unless required by applicable law or agreed to in writing, software
+ *   distributed under the License is distributed on an "AS IS" BASIS,
+ *   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *   See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+
+package org.apache.axis.om.mime;
+
+/**
+ * An object that stores a MIME header name and its value. One
+ *   or more <CODE>MimeHeader</CODE> objects may be contained in a
+ *   <CODE>MimeHeaders</CODE> object.
+ * @see javax.xml.soap.MimeHeaders MimeHeaders
+ */
+public class MimeHeader {
+
+    /**
+     * Constructs a <CODE>MimeHeader</CODE> object initialized
+     * with the given name and value.
+     * @param  name a <CODE>String</CODE> giving the
+     *     name of the header
+     * @param  value a <CODE>String</CODE> giving the
+     *     value of the header
+     */
+    public MimeHeader(String name, String value) {
+        this.name  = name;
+        this.value = value;
+    }
+
+    /**
+     * Returns the name of this <CODE>MimeHeader</CODE>
+     * object.
+     * @return  the name of the header as a <CODE>String</CODE>
+     */
+    public String getName() {
+        return name;
+    }
+
+    /**
+     * Returns the value of this <CODE>MimeHeader</CODE>
+     * object.
+     * @return the value of the header as a <CODE>String</CODE>
+     */
+    public String getValue() {
+        return value;
+    }
+
+    private String name;
+
+    private String value;
+}

Added: webservices/axis/trunk/java/dev/scratch/prototype1/src/java/org/apache/axis/om/mime/MimeHeaders.java
==============================================================================
--- (empty file)
+++ webservices/axis/trunk/java/dev/scratch/prototype1/src/java/org/apache/axis/om/mime/MimeHeaders.java	Thu Nov 18 03:16:05 2004
@@ -0,0 +1,310 @@
+/*   Copyright 2004 The Apache Software Foundation
+ *
+ *   Licensed under the Apache License, Version 2.0 (the "License");
+ *   you may not use this file except in compliance with the License.
+ *   You may obtain a copy of the License at
+ *
+ *       http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *   Unless required by applicable law or agreed to in writing, software
+ *   distributed under the License is distributed on an "AS IS" BASIS,
+ *   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *   See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+
+package org.apache.axis.om.mime;
+
+import org.apache.axis.om.mime.MimeHeader;
+
+import java.util.Iterator;
+import java.util.Vector;
+
+/**
+ * B container for <CODE>MimeHeader</CODE> objects, which
+ *   represent the MIME headers present in a MIME part of a
+ *   message.</P>
+ *
+ *   <P>This class is used primarily when an application wants to
+ *   retrieve specific attachments based on certain MIME headers and
+ *   values. This class will most likely be used by implementations
+ *   of <CODE>AttachmentPart</CODE> and other MIME dependent parts
+ *   of the JAXM API.
+ */
+public class MimeHeaders {
+
+    class MatchingIterator implements Iterator {
+
+        private Object nextMatch() {
+
+            label0:
+            while (iterator.hasNext()) {
+                MimeHeader mimeheader = (MimeHeader) iterator.next();
+
+                if (names == null) {
+                    return match
+                           ? null
+                           : mimeheader;
+                }
+
+                for (int i = 0; i < names.length; i++) {
+                    if (!mimeheader.getName().equalsIgnoreCase(names[i])) {
+                        continue;
+                    }
+
+                    if (match) {
+                        return mimeheader;
+                    }
+
+                    continue label0;
+                }
+
+                if (!match) {
+                    return mimeheader;
+                }
+            }
+
+            return null;
+        }
+
+        public boolean hasNext() {
+
+            if (nextHeader == null) {
+                nextHeader = nextMatch();
+            }
+
+            return nextHeader != null;
+        }
+
+        public Object next() {
+
+            if (nextHeader != null) {
+                Object obj = nextHeader;
+
+                nextHeader = null;
+
+                return obj;
+            }
+
+            if (hasNext()) {
+                return nextHeader;
+            } else {
+                return null;
+            }
+        }
+
+        public void remove() {
+            iterator.remove();
+        }
+
+        private boolean match;
+
+        private Iterator iterator;
+
+        private String names[];
+
+        private Object nextHeader;
+
+        MatchingIterator(String as[], boolean flag) {
+
+            match    = flag;
+            names    = as;
+            iterator = headers.iterator();
+        }
+    }
+
+    /**
+     * Constructs
+     *   a default <CODE>MimeHeaders</CODE> object initialized with
+     *   an empty <CODE>Vector</CODE> object.
+     */
+    public MimeHeaders() {
+        headers = new Vector();
+    }
+
+    /**
+     * Returns all of the values for the specified header as an
+     * array of <CODE>String</CODE> objects.
+     * @param   name  the name of the header for which
+     *     values will be returned
+     * @return a <CODE>String</CODE> array with all of the values
+     *     for the specified header
+     * @see #setHeader(String, String) setHeader(java.lang.String, java.lang.String)
+     */
+    public String[] getHeader(String name) {
+
+        Vector vector = new Vector();
+
+        for (int i = 0; i < headers.size(); i++) {
+            MimeHeader mimeheader = (MimeHeader) headers.elementAt(i);
+
+            if (mimeheader.getName().equalsIgnoreCase(name)
+                    && (mimeheader.getValue() != null)) {
+                vector.addElement(mimeheader.getValue());
+            }
+        }
+
+        if (vector.size() == 0) {
+            return null;
+        } else {
+            String as[] = new String[vector.size()];
+
+            vector.copyInto(as);
+
+            return as;
+        }
+    }
+
+    /**
+     * Replaces the current value of the first header entry whose
+     *   name matches the given name with the given value, adding a
+     *   new header if no existing header name matches. This method
+     *   also removes all matching headers after the first one.
+     *
+     *   <P>Note that RFC822 headers can contain only US-ASCII
+     *   characters.</P>
+     * @param  name a <CODE>String</CODE> with the
+     *     name of the header for which to search
+     * @param  value a <CODE>String</CODE> with the
+     *     value that will replace the current value of the
+     *     specified header
+     * @throws IllegalArgumentException if there was a
+     * problem in the mime header name or the value being set
+     * @see #getHeader(String) getHeader(java.lang.String)
+     */
+    public void setHeader(String name, String value) {
+
+        boolean flag = false;
+
+        if ((name == null) || name.equals("")) {
+            throw new IllegalArgumentException(
+                "Illegal MimeHeader name");
+        }
+
+        for (int i = 0; i < headers.size(); i++) {
+            MimeHeader mimeheader = (MimeHeader) headers.elementAt(i);
+
+            if (mimeheader.getName().equalsIgnoreCase(name)) {
+                if (!flag) {
+                    headers.setElementAt(new MimeHeader(mimeheader
+                        .getName(), value), i);
+
+                    flag = true;
+                } else {
+                    headers.removeElementAt(i--);
+                }
+            }
+        }
+
+        if (!flag) {
+            addHeader(name, value);
+        }
+    }
+
+    /**
+     * Adds a <CODE>MimeHeader</CODE> object with the specified
+     *   name and value to this <CODE>MimeHeaders</CODE> object's
+     *   list of headers.
+     *
+     *   <P>Note that RFC822 headers can contain only US-ASCII
+     *   characters.</P>
+     * @param  name   a <CODE>String</CODE> with the
+     *     name of the header to be added
+     * @param  value  a <CODE>String</CODE> with the
+     *     value of the header to be added
+     * @throws IllegalArgumentException if
+     *     there was a problem in the mime header name or value
+     *     being added
+     */
+    public void addHeader(String name, String value) {
+
+        if ((name == null) || name.equals("")) {
+            throw new IllegalArgumentException(
+                "Illegal MimeHeader name");
+        }
+
+        int i = headers.size();
+
+        for (int j = i - 1; j >= 0; j--) {
+            MimeHeader mimeheader = (MimeHeader) headers.elementAt(j);
+
+            if (mimeheader.getName().equalsIgnoreCase(name)) {
+                headers.insertElementAt(new MimeHeader(name, value), j + 1);
+
+                return;
+            }
+        }
+
+        headers.addElement(new MimeHeader(name, value));
+    }
+
+    /**
+     * Remove all <CODE>MimeHeader</CODE> objects whose name
+     * matches the the given name.
+     * @param  name  a <CODE>String</CODE> with the
+     *     name of the header for which to search
+     */
+    public void removeHeader(String name) {
+
+        for (int i = 0; i < headers.size(); i++) {
+            MimeHeader mimeheader = (MimeHeader) headers.elementAt(i);
+
+            if (mimeheader.getName().equalsIgnoreCase(name)) {
+                headers.removeElementAt(i--);
+            }
+        }
+    }
+
+    /**
+     * Removes all the header entries from this <CODE>
+     * MimeHeaders</CODE> object.
+     */
+    public void removeAllHeaders() {
+        headers.removeAllElements();
+    }
+
+    /**
+     * Returns all the headers in this <CODE>MimeHeaders</CODE>
+     * object.
+     * @return  an <CODE>Iterator</CODE> object over this <CODE>
+     *     MimeHeaders</CODE> object's list of <CODE>
+     *     MimeHeader</CODE> objects
+     */
+    public Iterator getAllHeaders() {
+        return headers.iterator();
+    }
+
+    /**
+     * Returns all the <CODE>MimeHeader</CODE> objects whose
+     * name matches a name in the given array of names.
+     * @param   names an array of <CODE>String</CODE>
+     *    objects with the names for which to search
+     * @return  an <CODE>Iterator</CODE> object over the <CODE>
+     *     MimeHeader</CODE> objects whose name matches one of the
+     *     names in the given list
+     */
+    public Iterator getMatchingHeaders(String names[]) {
+        return new MatchingIterator(names, true);
+    }
+
+    /**
+     * Returns all of the <CODE>MimeHeader</CODE> objects whose
+     * name does not match a name in the given array of names.
+     * @param   names  an array of <CODE>String</CODE>
+     *     objects with the names for which to search
+     * @return an <CODE>Iterator</CODE> object over the <CODE>
+     *     MimeHeader</CODE> objects whose name does not match one
+     *     of the names in the given list
+     */
+    public Iterator getNonMatchingHeaders(String names[]) {
+        return new MatchingIterator(names, false);
+    }
+
+    // fixme: does this need to be a Vector? Will a non-synchronized impl of
+    // List do?
+    /**
+     * B <code>Vector</code> containing the headers as <code>MimeHeader</code>
+     *              instances.
+     */
+    protected Vector headers;
+}

Added: webservices/axis/trunk/java/dev/scratch/prototype1/src/java/org/apache/axis/om/soap/SOAPBody.java
==============================================================================
--- (empty file)
+++ webservices/axis/trunk/java/dev/scratch/prototype1/src/java/org/apache/axis/om/soap/SOAPBody.java	Thu Nov 18 03:16:05 2004
@@ -0,0 +1,97 @@
+/*   Copyright 2004 The Apache Software Foundation
+ *
+ *   Licensed under the Apache License, Version 2.0 (the "License");
+ *   you may not use this file except in compliance with the License.
+ *   You may obtain a copy of the License at
+ *
+ *       http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *   Unless required by applicable law or agreed to in writing, software
+ *   distributed under the License is distributed on an "AS IS" BASIS,
+ *   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *   See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+
+package org.apache.axis.om.soap;
+
+import org.apache.axis.om.OMElement;
+import org.apache.axis.om.OMException;
+import org.apache.axis.om.OMNamespace;
+
+
+
+/**
+ * An object that represents the contents of the SOAP body
+ * element in a SOAP message. B SOAP body element consists of XML data
+ * that affects the way the application-specific content is processed.
+ * <P>
+ * B <code>SOAPBody</code> object contains <code>SOAPBodyElement</code>
+ * objects, which have the content for the SOAP body.
+ * B <code>SOAPFault</code> object, which carries status and/or
+ * error information, is an example of a <code>SOAPBodyElement</code> object.
+ *
+ */
+public interface SOAPBody extends OMElement {
+
+    /**
+     * Creates a new <code>SOAPFault</code> object and adds it to
+     * this <code>SOAPBody</code> object.
+     * @return the new <code>SOAPFault</code> object
+     * @throws  org.apache.axis.om.OMException if there is a SOAP error
+     */
+    public abstract SOAPFault addFault() throws OMException;
+
+    /**
+     * Indicates whether a <code>SOAPFault</code> object exists in
+     * this <code>SOAPBody</code> object.
+     * @return <code>true</code> if a <code>SOAPFault</code> object exists in
+     *     this <code>SOAPBody</code> object; <code>false</code>
+     *     otherwise
+     */
+    public abstract boolean hasFault();
+
+    /**
+     * Returns the <code>SOAPFault</code> object in this <code>SOAPBody</code>
+     * object.
+     * @return the <code>SOAPFault</code> object in this <code>SOAPBody</code>
+     *    object
+     */
+    public abstract SOAPFault getFault();
+
+    /**
+     * Creates a new <code>SOAPBodyElement</code> object with the
+     * specified name and adds it to this <code>SOAPBody</code> object.
+     * 
+     * @return the new <code>SOAPBodyElement</code> object
+     * @throws OMException  if a SOAP error occurs
+     */
+    public abstract SOAPBodyElement addBodyElement(String localName, OMNamespace ns)
+        throws OMException;
+
+
+    /**
+     *
+     * @param soapFault
+     * @throws OMException
+     */
+    public abstract void addFault(SOAPFault soapFault) throws OMException;
+
+    /**
+     * Adds the root node of the DOM <code>Document</code> to this
+     * <code>SOAPBody</code> object.
+     * <p>
+     * Calling this method invalidates the <code>document</code> parameter. The
+     * client application should discard all references to this
+     * <code>Document</code> and its contents upon calling
+     * <code>addDocument</code>. The behavior of an application that continues
+     * to use such references is undefined.
+     *
+     * @param element the <code>Document</code> object whose root node will be
+     *              added to this <code>SOAPBody</code>
+     * @return the <code>SOAPBodyElement</code> that represents the root node
+     *              that was added
+     * @throws OMException if the <code>Document</code> cannot be added
+     */
+    public abstract SOAPBodyElement addDocument(OMElement element) throws OMException;
+    }

Added: webservices/axis/trunk/java/dev/scratch/prototype1/src/java/org/apache/axis/om/soap/SOAPBodyElement.java
==============================================================================
--- (empty file)
+++ webservices/axis/trunk/java/dev/scratch/prototype1/src/java/org/apache/axis/om/soap/SOAPBodyElement.java	Thu Nov 18 03:16:05 2004
@@ -0,0 +1,35 @@
+/*   Copyright 2004 The Apache Software Foundation
+ *
+ *   Licensed under the Apache License, Version 2.0 (the "License");
+ *   you may not use this file except in compliance with the License.
+ *   You may obtain a copy of the License at
+ *
+ *       http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *   Unless required by applicable law or agreed to in writing, software
+ *   distributed under the License is distributed on an "AS IS" BASIS,
+ *   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *   See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+
+package org.apache.axis.om.soap;
+
+import org.apache.axis.om.OMElement;
+
+
+/**
+ * B <code>SOAPBodyElement</code> object represents the contents in
+ * a <code>SOAPBody</code> object.  The <code>SOAPFault</code> interface
+ * is a <code>SOAPBodyElement</code> object that has been defined.
+ * <P>
+ * B new <code>SOAPBodyElement</code> object can be created and added
+ * to a <code>SOAPBody</code> object with the <code>SOAPBody</code>
+ * method <code>addBodyElement</code>. In the following line of code,
+ * <code>sb</code> is a <code>SOAPBody</code> object, and
+ * <code>myName</code> is a <code>Name</code> object.
+ * <PRE>
+ *   SOAPBodyElement sbe = sb.addBodyElement(myName);
+ * </PRE>
+ */
+public interface SOAPBodyElement extends OMElement {}

Added: webservices/axis/trunk/java/dev/scratch/prototype1/src/java/org/apache/axis/om/soap/SOAPEnvelope.java
==============================================================================
--- (empty file)
+++ webservices/axis/trunk/java/dev/scratch/prototype1/src/java/org/apache/axis/om/soap/SOAPEnvelope.java	Thu Nov 18 03:16:05 2004
@@ -0,0 +1,87 @@
+/*   Copyright 2004 The Apache Software Foundation
+ *
+ *   Licensed under the Apache License, Version 2.0 (the "License");
+ *   you may not use this file except in compliance with the License.
+ *   You may obtain a copy of the License at
+ *
+ *       http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *   Unless required by applicable law or agreed to in writing, software
+ *   distributed under the License is distributed on an "AS IS" BASIS,
+ *   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *   See the License for the specific language governing permissions and
+ *  limitations under the License.
+ * <p/>
+ * User: Eran Chinthaka - Lanka Software Foundation
+ * Date: Oct 28, 2004
+ * Time: 11:52:18 AM
+ * <p/>
+ *
+ */
+
+
+package org.apache.axis.om.soap;
+
+import org.apache.axis.om.OMElement;
+import org.apache.axis.om.OMException;
+import org.apache.axis.om.OMNamespace;
+import org.apache.axis.om.soap.SOAPBody;
+
+
+public interface SOAPEnvelope extends OMElement {
+
+    /**
+     * Creates a new <CODE>Name</CODE> object initialized with the
+     * given local name, namespace prefix, and namespace URI.
+     * <p/>
+     * <P>This factory method creates <CODE>Name</CODE> objects
+     * for use in the SOAP/XML document.
+     *
+     * @param localName a <CODE>String</CODE> giving
+     *                  the local name
+     * @param prefix    a <CODE>String</CODE> giving
+     *                  the prefix of the namespace
+     * @param uri       a <CODE>String</CODE> giving the
+     *                  URI of the namespace
+     * @return a <CODE>OMNamespace</CODE> object initialized with the given
+     *         local name, namespace prefix, and namespace URI
+     * @throws OMException if there is a SOAP error
+     */
+    public abstract OMNamespace createNamespace(String localName, String prefix, String uri)
+            throws OMException;
+
+
+    /**
+     * Returns the <CODE>SOAPHeader</CODE> object for this <CODE>
+     * SOAPEnvelope</CODE> object.
+     * <p/>
+     * <P> This SOAPHeader will just be a container for all the headers in the
+     * <CODE>SOAPMessage</CODE>
+     * </P>
+     *
+     *
+     * @return the <CODE>SOAPHeader</CODE> object or <CODE>
+     *         null</CODE> if there is none
+     * @throws OMException if there is a problem
+     *                       obtaining the <CODE>SOAPHeader</CODE> object
+     */
+    public abstract SOAPHeader getHeader() throws OMException;
+
+    /**
+     * Returns the <CODE>SOAPBody</CODE> object associated with
+     * this <CODE>SOAPEnvelope</CODE> object.
+     * <p/>
+     * <P> This SOAPBody will just be a container for all the BodyElements in the
+     * <CODE>SOAPMessage</CODE>
+     * </P>
+     *
+     * @return the <CODE>SOAPBody</CODE> object for this <CODE>
+     *         SOAPEnvelope</CODE> object or <CODE>null</CODE> if there
+     *         is none
+     * @throws OMException if there is a problem
+     *                       obtaining the <CODE>SOAPBody</CODE> object
+     */
+    public abstract SOAPBody getBody() throws OMException;
+
+
+}

Added: webservices/axis/trunk/java/dev/scratch/prototype1/src/java/org/apache/axis/om/soap/SOAPFault.java
==============================================================================
--- (empty file)
+++ webservices/axis/trunk/java/dev/scratch/prototype1/src/java/org/apache/axis/om/soap/SOAPFault.java	Thu Nov 18 03:16:05 2004
@@ -0,0 +1,144 @@
+/*   Copyright 2004 The Apache Software Foundation
+ *
+ *   Licensed under the Apache License, Version 2.0 (the "License");
+ *   you may not use this file except in compliance with the License.
+ *   You may obtain a copy of the License at
+ *
+ *       http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *   Unless required by applicable law or agreed to in writing, software
+ *   distributed under the License is distributed on an "AS IS" BASIS,
+ *   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *   See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+
+package org.apache.axis.om.soap;
+
+import org.apache.axis.om.OMException;
+import org.apache.axis.om.soap.SOAPBodyElement;
+
+import java.util.Locale;
+
+
+/**
+ * An element in the <CODE>SOAPBody</CODE> object that contains
+ * error and/or status information. This information may relate to
+ * errors in the <CODE>SOAPMessage</CODE> object or to problems
+ * that are not related to the content in the message itself.
+ * Problems not related to the message itself are generally errors
+ * in processing, such as the inability to communicate with an
+ * upstream server.
+ * <P>
+ * The <CODE>SOAPFault</CODE> interface provides methods for
+ * retrieving the information contained in a <CODE>
+ * SOAPFault</CODE> object and for setting the fault code, the
+ * fault actor, and a string describing the fault. B fault code is
+ * one of the codes defined in the SOAP 1.1 specification that
+ * describe the fault. An actor is an intermediate recipient to
+ * whom a message was routed. The message path may include one or
+ * more actors, or, if no actors are specified, the message goes
+ * only to the default actor, which is the final intended
+ * recipient.
+ */
+public interface SOAPFault extends SOAPBodyElement {
+
+    /**
+     * Sets this <CODE>SOAPFault</CODE> object with the given
+     * fault code.
+     * <p/>
+     * <P>Fault codes, which given information about the fault,
+     * are defined in the SOAP 1.1 specification.</P>
+     *
+     * @param faultCode a <CODE>String</CODE> giving
+     *                  the fault code to be set; must be one of the fault codes
+     *                  defined in the SOAP 1.1 specification
+     * @throws OMException if there was an error in
+     *                     adding the <CODE>faultCode</CODE> to the underlying XML
+     *                     tree.
+     * @see #getFaultCode() getFaultCode()
+     */
+    public abstract void setFaultCode(String faultCode) throws OMException;
+
+    /**
+     * Gets the fault code for this <CODE>SOAPFault</CODE>
+     * object.
+     *
+     * @return a <CODE>String</CODE> with the fault code
+     * @see #setFaultCode(String) setFaultCode(java.lang.String)
+     */
+    public abstract String getFaultCode();
+
+    /**
+     * Sets this <CODE>SOAPFault</CODE> object with the given
+     * fault actor.
+     * <p/>
+     * <P>The fault actor is the recipient in the message path who
+     * caused the fault to happen.</P>
+     *
+     * @param faultActor a <CODE>String</CODE>
+     *                   identifying the actor that caused this <CODE>
+     *                   SOAPFault</CODE> object
+     * @throws OMException if there was an error in
+     *                     adding the <CODE>faultActor</CODE> to the underlying XML
+     *                     tree.
+     * @see #getFaultActor() getFaultActor()
+     */
+    public abstract void setFaultActor(String faultActor) throws OMException;
+
+    /**
+     * Gets the fault actor for this <CODE>SOAPFault</CODE>
+     * object.
+     *
+     * @return a <CODE>String</CODE> giving the actor in the message
+     *         path that caused this <CODE>SOAPFault</CODE> object
+     * @see #setFaultActor(String) setFaultActor(java.lang.String)
+     */
+    public abstract String getFaultActor();
+
+    /**
+     * Sets the fault string for this <CODE>SOAPFault</CODE>
+     * object to the given string.
+     *
+     * @param faultString a <CODE>String</CODE>
+     *                    giving an explanation of the fault
+     * @throws OMException if there was an error in
+     *                     adding the <CODE>faultString</CODE> to the underlying XML
+     *                     tree.
+     * @see #getFaultString() getFaultString()
+     */
+    public abstract void setFaultString(String faultString)
+            throws OMException;
+
+    /**
+     * Gets the fault string for this <CODE>SOAPFault</CODE>
+     * object.
+     *
+     * @return a <CODE>String</CODE> giving an explanation of the
+     *         fault
+     */
+    public abstract String getFaultString();
+
+    /**
+     * Sets the fault string for this <code>SOAPFault</code> object to the given
+     * string and localized to the given locale.
+     *
+     * @param faultString a <code>String</code> giving an explanation of
+     *                    the fault
+     * @param locale      a <code>Locale</code> object indicating the
+     *                    native language of the <code>faultString</code>
+     * @throws OMException if there was an error in adding the
+     *                     <code>faultString</code> to the underlying XML tree
+     */
+    public abstract void setFaultString(String faultString, Locale locale) throws OMException;
+
+    /**
+     * Returns the optional detail element for this <code>SOAPFault</code>
+     * object.
+     *
+     * @return a <code>Locale</code> object indicating the native language of
+     *         the fault string or <code>null</code> if no locale was
+     *         specified
+     */
+    public abstract Locale getFaultStringLocale();
+}

Added: webservices/axis/trunk/java/dev/scratch/prototype1/src/java/org/apache/axis/om/soap/SOAPHeader.java
==============================================================================
--- (empty file)
+++ webservices/axis/trunk/java/dev/scratch/prototype1/src/java/org/apache/axis/om/soap/SOAPHeader.java	Thu Nov 18 03:16:05 2004
@@ -0,0 +1,114 @@
+/*   Copyright 2004 The Apache Software Foundation
+ *
+ *   Licensed under the Apache License, Version 2.0 (the "License");
+ *   you may not use this file except in compliance with the License.
+ *   You may obtain a copy of the License at
+ *
+ *       http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *   Unless required by applicable law or agreed to in writing, software
+ *   distributed under the License is distributed on an "AS IS" BASIS,
+ *   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *   See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+
+package org.apache.axis.om.soap;
+
+import org.apache.axis.om.OMElement;
+import org.apache.axis.om.OMException;
+import org.apache.axis.om.OMNamespace;
+
+import java.util.Iterator;
+
+
+public interface SOAPHeader extends OMElement {
+
+
+
+    /**
+     * Creates a new <CODE>SOAPHeaderElement</CODE> object
+     * initialized with the specified name and adds it to this
+     * <CODE>SOAPHeader</CODE> object.
+     * @return the new <CODE>SOAPHeaderElement</CODE> object that
+     *     was inserted into this <CODE>SOAPHeader</CODE>
+     *     object
+     * @throws  OMException if a SOAP error occurs
+     */
+    public abstract SOAPHeaderElement addHeaderElement(String localName, OMNamespace ns)
+        throws OMException ;
+
+    /**
+     * Returns a list of all the <CODE>SOAPHeaderElement</CODE>
+     * objects in this <CODE>SOAPHeader</CODE> object that have the
+     * the specified actor. An actor is a global attribute that
+     * indicates the intermediate parties to whom the message should
+     * be sent. An actor receives the message and then sends it to
+     * the next actor. The default actor is the ultimate intended
+     * recipient for the message, so if no actor attribute is
+     * included in a <CODE>SOAPHeader</CODE> object, the message is
+     * sent to its ultimate destination.
+     * @param   actor  a <CODE>String</CODE> giving the
+     *     URI of the actor for which to search
+     * @return an <CODE>Iterator</CODE> object over all the <CODE>
+     *     SOAPHeaderElement</CODE> objects that contain the
+     *     specified actor
+     * @see #extractHeaderElements(java.lang.String) extractHeaderElements(java.lang.String)
+     */
+    public abstract Iterator examineHeaderElements(String actor);
+
+    /**
+     * Returns a list of all the <CODE>SOAPHeaderElement</CODE>
+     *   objects in this <CODE>SOAPHeader</CODE> object that have
+     *   the the specified actor and detaches them from this <CODE>
+     *   SOAPHeader</CODE> object.
+     *
+     *   <P>This method allows an actor to process only the parts of
+     *   the <CODE>SOAPHeader</CODE> object that apply to it and to
+     *   remove them before passing the message on to the next
+     *   actor.
+     * @param   actor  a <CODE>String</CODE> giving the
+     *     URI of the actor for which to search
+     * @return an <CODE>Iterator</CODE> object over all the <CODE>
+     *     SOAPHeaderElement</CODE> objects that contain the
+     *     specified actor
+     * @see #examineHeaderElements(java.lang.String) examineHeaderElements(java.lang.String)
+     */
+    public abstract Iterator extractHeaderElements(String actor);
+
+    /**
+     * Returns an <code>Iterator</code> over all the
+     * <code>SOAPHeaderElement</code> objects in this <code>SOAPHeader</code>
+     * object that have the specified actor and that have a MustUnderstand
+     * attribute whose value is equivalent to <code>true</code>.
+     *
+     * @param actor a <code>String</code> giving the URI of the actor for which
+     *              to search
+     * @return an <code>Iterator</code> object over all the
+     *              <code>SOAPHeaderElement</code> objects that contain the
+     *              specified actor and are marked as MustUnderstand
+     */
+    public abstract Iterator examineMustUnderstandHeaderElements(String actor);
+
+    /**
+     * Returns an <code>Iterator</code> over all the
+     * <code>SOAPHeaderElement</code> objects in this <code>SOAPHeader</code>
+     * object.
+     *
+     * @return an <code>Iterator</code> object over all the
+     *              <code>SOAPHeaderElement</code> objects contained by this
+     *              <code>SOAPHeader</code>
+     */
+    public abstract Iterator examineAllHeaderElements();
+
+    /**
+     * Returns an <code>Iterator</code> over all the
+     * <code>SOAPHeaderElement</code> objects in this <code>SOAPHeader </code>
+     * object and detaches them from this <code>SOAPHeader</code> object.
+     *
+     * @return an <code>Iterator</code> object over all the
+     *              <code>SOAPHeaderElement</code> objects contained by this
+     *              <code>SOAPHeader</code>
+     */
+    public abstract Iterator extractAllHeaderElements();
+}

Added: webservices/axis/trunk/java/dev/scratch/prototype1/src/java/org/apache/axis/om/soap/SOAPHeaderElement.java
==============================================================================
--- (empty file)
+++ webservices/axis/trunk/java/dev/scratch/prototype1/src/java/org/apache/axis/om/soap/SOAPHeaderElement.java	Thu Nov 18 03:16:05 2004
@@ -0,0 +1,80 @@
+/*   Copyright 2004 The Apache Software Foundation
+ *
+ *   Licensed under the Apache License, Version 2.0 (the "License");
+ *   you may not use this file except in compliance with the License.
+ *   You may obtain a copy of the License at
+ *
+ *       http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *   Unless required by applicable law or agreed to in writing, software
+ *   distributed under the License is distributed on an "AS IS" BASIS,
+ *   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *   See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+
+package org.apache.axis.om.soap;
+
+import org.apache.axis.om.OMElement;
+
+
+/**
+ *     <P>An object representing the contents in the SOAP header part
+ *   of the SOAP envelope. The immediate children of a <CODE>
+ *   SOAPHeader</CODE> object can be represented only as <CODE>
+ *   SOAPHeaderElement</CODE> objects.</P>
+ *
+ *   <P>B <CODE>SOAPHeaderElement</CODE> object can have other
+ *   <CODE>OMElement</CODE> objects as its children.</P>
+ */
+public interface SOAPHeaderElement extends OMElement {
+
+    /**
+     * Sets the actor associated with this <CODE>
+     * SOAPHeaderElement</CODE> object to the specified actor. The
+     * default value of an actor is: <CODE>
+     * SOAPConstants.URI_SOAP_ACTOR_NEXT</CODE>
+     * @param  actorURI  a <CODE>String</CODE> giving
+     *     the URI of the actor to set
+     * @see #getActor() getActor()
+     * @throws java.lang.IllegalArgumentException if
+     *     there is a problem in setting the actor.
+     */
+    public abstract void setActor(String actorURI);
+
+    /**
+     * Returns the uri of the actor associated with this <CODE>
+     * SOAPHeaderElement</CODE> object.
+     * @return  a <CODE>String</CODE> giving the URI of the
+     *     actor
+     * @see #setActor(java.lang.String) setActor(java.lang.String)
+     */
+    public abstract String getActor();
+
+    /**
+     * Sets the mustUnderstand attribute for this <CODE>
+     *   SOAPHeaderElement</CODE> object to be on or off.
+     *
+     *   <P>If the mustUnderstand attribute is on, the actor who
+     *   receives the <CODE>SOAPHeaderElement</CODE> must process it
+     *   correctly. This ensures, for example, that if the <CODE>
+     *   SOAPHeaderElement</CODE> object modifies the message, that
+     *   the message is being modified correctly.</P>
+     * @param  mustUnderstand  <CODE>true</CODE> to
+     *     set the mustUnderstand attribute on; <CODE>false</CODE>
+     *     to turn if off
+     * @throws java.lang.IllegalArgumentException if
+     *     there is a problem in setting the actor.
+     * @see #getMustUnderstand() getMustUnderstand()
+     */
+    public abstract void setMustUnderstand(boolean mustUnderstand);
+
+    /**
+     * Returns whether the mustUnderstand attribute for this
+     * <CODE>SOAPHeaderElement</CODE> object is turned on.
+     * @return  <CODE>true</CODE> if the mustUnderstand attribute of
+     *     this <CODE>SOAPHeaderElement</CODE> object is turned on;
+     *     <CODE>false</CODE> otherwise
+     */
+    public abstract boolean getMustUnderstand();
+}

Added: webservices/axis/trunk/java/dev/scratch/prototype1/src/java/org/apache/axis/om/soap/SOAPMessage.java
==============================================================================
--- (empty file)
+++ webservices/axis/trunk/java/dev/scratch/prototype1/src/java/org/apache/axis/om/soap/SOAPMessage.java	Thu Nov 18 03:16:05 2004
@@ -0,0 +1,45 @@
+package org.apache.axis.om.soap;
+
+import org.apache.axis.om.mime.MimeHeaders;
+import org.apache.axis.om.soap.SOAPEnvelope;
+import org.apache.axis.om.OMNode;
+
+
+/**
+ * Copyright 2001-2004 The Apache Software Foundation.
+ * <p/>
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * <p/>
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * <p/>
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * @author Axis team
+ *         Date: Oct 4, 2004
+ *         Time: 4:48:10 PM
+ */
+public interface SOAPMessage extends OMNode {
+
+    /**
+     * Get the root element of this document as a SOAPEnvelope
+     *
+     * @return the root element
+     */
+    public SOAPEnvelope getEnvelope();
+
+    /**
+     * Returns all the transport-specific MIME headers for this
+     * <CODE>SOAPMessage</CODE> object in a transport-independent
+     * fashion.
+     * @return a <CODE>MimeHeaders</CODE> object containing the
+     *     <CODE>MimeHeader</CODE> objects
+     */
+    public abstract MimeHeaders getMimeHeaders();
+
+}

Added: webservices/axis/trunk/java/dev/scratch/prototype1/src/java/org/apache/axis/providers/ASyncProvider.java
==============================================================================
--- (empty file)
+++ webservices/axis/trunk/java/dev/scratch/prototype1/src/java/org/apache/axis/providers/ASyncProvider.java	Thu Nov 18 03:16:05 2004
@@ -0,0 +1,36 @@
+/*
+ * Copyright 2003,2004 The Apache Software Foundation.
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.axis.providers;
+
+import org.apache.axis.engine.AxisFault;
+import org.apache.axis.engine.Provider;
+import org.apache.axis.engine.Sender;
+import org.apache.axis.engine.context.MessageContext;
+import org.apache.axis.handlers.AbstractHandler;
+
+/**
+ * @author Srinath Perera (hemapani@opensource.lk)
+ */
+public class ASyncProvider extends AbstractHandler{
+    private Provider doworkProvider;
+    public ASyncProvider(Provider doworkProvider){
+        this.doworkProvider = doworkProvider;
+    }
+
+    public void invoke(MessageContext msgContext) throws AxisFault {
+        msgContext.getGlobalContext().getQueue().submitAJob(msgContext);
+    }
+}

Added: webservices/axis/trunk/java/dev/scratch/prototype1/src/java/org/apache/axis/providers/AbstractProvider.java
==============================================================================
--- (empty file)
+++ webservices/axis/trunk/java/dev/scratch/prototype1/src/java/org/apache/axis/providers/AbstractProvider.java	Thu Nov 18 03:16:05 2004
@@ -0,0 +1,52 @@
+/*
+ * Copyright 2003,2004 The Apache Software Foundation.
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.axis.providers;
+
+import java.lang.reflect.Method;
+
+import javax.xml.namespace.QName;
+
+import org.apache.axis.engine.AxisFault;
+import org.apache.axis.engine.Handler;
+import org.apache.axis.engine.Provider;
+import org.apache.axis.engine.context.MessageContext;
+import org.apache.axis.engine.registry.AbstractEngineElement;
+
+/**
+ * This is the Absract provider. It is just a another handler. the 
+ * protected abstract methods are only for the sake of braking down the logic
+ * @author Srinath Perera(hemapani@opensource.lk)
+ */
+public abstract class AbstractProvider extends AbstractEngineElement implements Handler, Provider{
+    private QName name;
+    private String scope;
+    
+    protected abstract Object makeNewServiceObject(MessageContext msgContext)throws AxisFault;
+
+    public abstract Object getTheImplementationObject(
+            MessageContext msgContext)throws AxisFault;
+    
+    public abstract Object[] deserializeParameters(MessageContext msgContext,Method method)throws AxisFault;
+
+
+    public QName getName() {
+        return name;
+    }
+
+    public void setName(QName name) {
+        this.name = name;
+    }
+}

Added: webservices/axis/trunk/java/dev/scratch/prototype1/src/java/org/apache/axis/providers/SimpleJavaProvider.java
==============================================================================
--- (empty file)
+++ webservices/axis/trunk/java/dev/scratch/prototype1/src/java/org/apache/axis/providers/SimpleJavaProvider.java	Thu Nov 18 03:16:05 2004
@@ -0,0 +1,169 @@
+/*
+ * Copyright 2001-2004 The Apache Software Foundation.
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.axis.providers;
+
+import java.lang.reflect.InvocationTargetException;
+import java.lang.reflect.Method;
+
+import javax.xml.namespace.QName;
+
+import org.apache.axis.engine.AxisFault;
+import org.apache.axis.engine.Constants;
+import org.apache.axis.engine.Handler;
+import org.apache.axis.engine.Service;
+import org.apache.axis.engine.context.MessageContext;
+import org.apache.axis.engine.context.SessionContext;
+import org.apache.axis.engine.registry.Parameter;
+import org.apache.axis.om.OMXMLParserWrapper;
+import org.apache.axis.om.impl.OMXMLPullParserWrapper;
+import org.apache.axis.om.impl.SOAPMessageImpl;
+import org.apache.axis.om.soap.SOAPMessage;
+
+/**
+ * This is a Simple java Provider. 
+ * @author Srinath Perera(hemapani@opensource.lk)
+ */
+
+public class SimpleJavaProvider extends AbstractProvider implements Handler {
+    private String message;
+    private QName name;
+    private String scope;
+    private Method method;
+    private ClassLoader classLoader;
+    
+    public SimpleJavaProvider(){
+        scope = Constants.APPLICATION_SCOPE;
+
+    }
+    
+    protected Object makeNewServiceObject(MessageContext msgContext)
+        throws AxisFault
+    {
+        try {
+            QName serviceName = msgContext.getCurrentService();
+            Service service = msgContext.getGlobalContext().getRegistry().getService(serviceName);
+            classLoader = service.getClassLoader();
+            Parameter classParm = service.getParameter("className");
+            String className = (String)classParm.getValue();
+            if(className == null)
+                throw new AxisFault("className parameter is null");
+            if(classLoader == null){
+                classLoader = Thread.currentThread().getContextClassLoader();
+            }
+            Class implClass =Class.forName(className,true,classLoader);
+            return implClass.newInstance();
+        } catch (Exception e) {
+            throw AxisFault.makeFault(e);
+        }
+    }
+
+    public Object getTheImplementationObject(
+            MessageContext msgContext)throws AxisFault{
+        QName serviceName = msgContext.getCurrentService();                
+        if(Constants.APPLICATION_SCOPE.equals(scope)){
+            return makeNewServiceObject(msgContext);
+        }else if(Constants.SESSION_SCOPE.equals(scope)){
+            SessionContext sessionContext = msgContext.getSessionContext();
+            Object obj = sessionContext.get(serviceName);
+            if(obj == null){
+                obj = makeNewServiceObject(msgContext);
+                sessionContext.put(serviceName,obj);
+            }
+            return obj;            
+        }else if(Constants.GLOBAL_SCOPE.equals(scope)){
+            SessionContext globalContext = msgContext.getSessionContext();
+            Object obj = globalContext.get(serviceName);
+            if(obj == null){
+                obj = makeNewServiceObject(msgContext);
+                globalContext.put(serviceName,obj);
+            }
+            return obj;
+        }else{
+            throw new AxisFault("unknown scope "+ scope);
+        }
+            
+    } 
+    
+    public Object[] deserializeParameters(MessageContext msgContext,Method method){
+        //TODO deserialize the parameters here
+        return null;
+    }
+
+
+    public QName getName() {
+        return name;
+    }
+
+    public void invoke(MessageContext msgContext) throws AxisFault {
+        try {
+            //get the implementation class for the Web Service 
+            Object obj = getTheImplementationObject(msgContext);
+            
+            //find the WebService method  
+            Class ImplClass =obj.getClass();
+            String methodName = msgContext.getCurrentOperation().getLocalPart();
+            Method[] methods = ImplClass.getMethods();
+            for(int i = 0;i<methods.length;i++){
+                if(methods[i].getName().equals(methodName)){
+                    this.method = methods[i];
+                    break;
+                }
+            }
+            //deserialize (XML-> java)
+            Object[] parms = deserializeParameters(msgContext,method);
+            //invoke the WebService 
+            Object result = method.invoke(obj,parms);
+
+            //TODO fix the server side  
+//            OMXMLParserWrapper parser = new OMXMLPullParserWrapper();
+//            msgContext.setOutMessage(new SOAPMessageImpl(parser)); 
+        }  catch (SecurityException e) {
+            throw AxisFault.makeFault(e);
+        } catch (IllegalArgumentException e) {
+            throw AxisFault.makeFault(e);
+        } catch (IllegalAccessException e) {
+            throw AxisFault.makeFault(e);
+        } catch (InvocationTargetException e) {
+            throw AxisFault.makeFault(e);
+        } catch (Exception e) {
+            throw AxisFault.makeFault(e);
+        }
+    }
+
+    public void revoke(MessageContext msgContext) {
+        System.out.println("I am Speaking Provider revoking :)");
+    }
+
+    public void setName(QName name) {
+        this.name = name;
+    }
+
+    /**
+     * @return
+     */
+    public ClassLoader getClassLoader() {
+        return classLoader;
+    }
+
+    /**
+     * @param loader
+     */
+    public void setClassLoader(ClassLoader loader) {
+        classLoader = loader;
+    }
+
+}

Added: webservices/axis/trunk/java/dev/scratch/prototype1/src/java/org/apache/axis/providers/SyncProvider.java
==============================================================================
--- (empty file)
+++ webservices/axis/trunk/java/dev/scratch/prototype1/src/java/org/apache/axis/providers/SyncProvider.java	Thu Nov 18 03:16:05 2004
@@ -0,0 +1,40 @@
+/*
+ * Copyright 2003,2004 The Apache Software Foundation.
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.axis.providers;
+
+import org.apache.axis.engine.AxisFault;
+import org.apache.axis.engine.Provider;
+import org.apache.axis.engine.Sender;
+import org.apache.axis.engine.context.MessageContext;
+import org.apache.axis.handlers.AbstractHandler;
+
+/**
+ * @author Srinath Perera (hemapani@opensource.lk)
+ */
+public class SyncProvider extends AbstractHandler{
+    private Provider doworkProvider;
+    public SyncProvider(Provider doworkProvider){
+        this.doworkProvider = doworkProvider;
+    }
+
+    public void invoke(MessageContext msgContext) throws AxisFault {
+        doworkProvider.invoke(msgContext);
+        Sender sender = new Sender();
+        //TODO .. do we create a new MsgContext
+        sender.send(msgContext);
+
+    }
+}

Added: webservices/axis/trunk/java/dev/scratch/prototype1/src/java/org/apache/axis/transport/TransportSender.java
==============================================================================
--- (empty file)
+++ webservices/axis/trunk/java/dev/scratch/prototype1/src/java/org/apache/axis/transport/TransportSender.java	Thu Nov 18 03:16:05 2004
@@ -0,0 +1,38 @@
+/*
+ * Copyright 2003,2004 The Apache Software Foundation.
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.axis.transport;
+
+import java.io.OutputStream;
+
+import org.apache.axis.engine.AxisFault;
+import org.apache.axis.engine.Handler;
+import org.apache.axis.engine.context.MessageContext;
+import org.apache.axis.handlers.AbstractHandler;
+import org.apache.axis.om.soap.SOAPMessage;
+
+/**
+ * @author Srinath Perera (hemapani@opensource.lk)
+ */
+public class TransportSender extends AbstractHandler implements Handler {
+    private OutputStream out;
+    public TransportSender(OutputStream out){
+        this.out = out;
+    }
+    public void invoke(MessageContext msgContext) throws AxisFault {
+        SOAPMessage message = msgContext.getOutMessage();
+        //Serialize the Mesage
+    }
+}

Added: webservices/axis/trunk/java/dev/scratch/prototype1/src/java/org/apache/axis/transport/http/HTTPConstants.java
==============================================================================
--- (empty file)
+++ webservices/axis/trunk/java/dev/scratch/prototype1/src/java/org/apache/axis/transport/http/HTTPConstants.java	Thu Nov 18 03:16:05 2004
@@ -0,0 +1,127 @@
+/*
+ * Copyright 2001-2004 The Apache Software Foundation.
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.axis.transport.http;
+
+/**
+ * HTTP protocol and message context constants.
+ *
+ * @author Rob Jellinghaus (robj@unrealities.com)
+ * @author Doug Davis (dug@us.ibm.com)
+ * @author Jacek Kopecky (jacek@idoox.com)
+ */
+public class HTTPConstants {
+    /** The MessageContext transport ID of HTTP.
+     *  (Maybe this should be more specific, like "http_servlet",
+     *   whaddya think? - todo by Jacek)
+     */
+
+    public static final String HEADER_PROTOCOL_10 = "HTTP/1.0";
+    public static final String HEADER_PROTOCOL_11 = "HTTP/1.1";
+    public static final String HEADER_PROTOCOL_V10 = "1.0".intern();
+    public static final String HEADER_PROTOCOL_V11 = "1.1".intern();
+    public static final String HEADER_POST = "POST";
+    public static final String HEADER_HOST = "Host";
+    public static final String HEADER_CONTENT_DESCRIPTION = "Content-Description";
+    public static final String HEADER_CONTENT_TYPE = "Content-Type";
+    public static final String HEADER_CONTENT_TRANSFER_ENCODING = "Content-Transfer-Encoding";
+    public static final String HEADER_CONTENT_TYPE_JMS = "ContentType";
+    public static final String HEADER_CONTENT_LENGTH = "Content-Length";
+    public static final String HEADER_CONTENT_LOCATION = "Content-Location";
+    public static final String HEADER_CONTENT_ID = "Content-Id";
+    public static final String HEADER_SOAP_ACTION = "SOAPAction";
+    public static final String HEADER_AUTHORIZATION = "Authorization";
+    public static final String HEADER_PROXY_AUTHORIZATION = "Proxy-Authorization";
+    public static final String HEADER_EXPECT = "Expect";
+    public static final String HEADER_EXPECT_100_Continue = "100-continue";
+    public static final String HEADER_USER_AGENT = "User-Agent";
+    public static final String HEADER_CACHE_CONTROL = "Cache-Control";
+    public static final String HEADER_CACHE_CONTROL_NOCACHE = "no-cache";
+    public static final String HEADER_PRAGMA = "Pragma";
+    public static final String HEADER_LOCATION = "Location";
+
+
+
+    
+    public static final String REQUEST_HEADERS = "HTTP-Request-Headers";
+    public static final String RESPONSE_HEADERS = "HTTP-Response-Headers";
+
+    /*http 1.1*/
+    public static final String HEADER_TRANSFER_ENCODING = "Transfer-Encoding".intern();
+    public static final String HEADER_TRANSFER_ENCODING_CHUNKED = "chunked".intern();
+
+    public static final String HEADER_CONNECTION = "Connection";
+    public static final String HEADER_CONNECTION_CLOSE = "close".intern();
+    public static final String HEADER_CONNECTION_KEEPALIVE = "Keep-Alive".intern();//The default don't send.
+
+    public static final String HEADER_ACCEPT = "Accept";
+    public static final String HEADER_ACCEPT_TEXT_ALL = "text/*";
+    public static final String HEADER_ACCEPT_APPL_SOAP = "application/soap+xml";
+    public static final String HEADER_ACCEPT_MULTIPART_RELATED = "multipart/related";
+    public static final String HEADER_ACCEPT_APPLICATION_DIME = "application/dime";
+    
+
+    /**
+     * Cookie headers
+     */
+    public static final String HEADER_COOKIE = "Cookie";
+    public static final String HEADER_COOKIE2 = "Cookie2";
+    public static final String HEADER_SET_COOKIE = "Set-Cookie";
+    public static final String HEADER_SET_COOKIE2 = "Set-Cookie2";
+    
+    /** Integer
+     */
+    public static String MC_HTTP_STATUS_CODE    = "transport.http.statusCode";
+
+    /** String
+     */
+    public static String MC_HTTP_STATUS_MESSAGE = "transport.http.statusMessage";
+
+    /** HttpServlet
+     */
+    public static String MC_HTTP_SERVLET        = "transport.http.servlet" ;
+
+    /** HttpServletRequest
+     */
+    public static String MC_HTTP_SERVLETREQUEST = "transport.http.servletRequest";
+    /** HttpServletResponse
+     */
+    public static String MC_HTTP_SERVLETRESPONSE= "transport.http.servletResponse";
+    public static String MC_HTTP_SERVLETLOCATION= "transport.http.servletLocation";
+    public static String MC_HTTP_SERVLETPATHINFO= "transport.http.servletPathInfo";
+
+    /**
+     * @deprecated Should use javax.xml.rpc.Call.SOAPACTION_URI_PROPERTY instead.
+     */
+    public static String MC_HTTP_SOAPACTION = javax.xml.rpc.Call.SOAPACTION_URI_PROPERTY;
+
+    /** HTTP header field values
+     */
+    public static final String HEADER_DEFAULT_CHAR_ENCODING = "iso-8859-1";
+    
+    /**
+     * AXIS servlet plugin parameter names.
+     */
+    
+    public static final String PLUGIN_NAME = "transport.http.plugin.pluginName";
+    public static final String PLUGIN_SERVICE_NAME = "transport.http.plugin.serviceName";
+    public static final String PLUGIN_IS_DEVELOPMENT = "transport.http.plugin.isDevelopment";
+    public static final String PLUGIN_ENABLE_LIST = "transport.http.plugin.enableList";
+    public static final String PLUGIN_ENGINE = "transport.http.plugin.engine";
+    public static final String PLUGIN_WRITER = "transport.http.plugin.writer";
+    public static final String PLUGIN_LOG = "transport.http.plugin.log";
+    public static final String PLUGIN_EXCEPTION_LOG = "transport.http.plugin.exceptionLog";
+}

Added: webservices/axis/trunk/java/dev/scratch/prototype1/src/java/org/apache/axis/transport/http/NonBlockingBufferedInputStream.java
==============================================================================
--- (empty file)
+++ webservices/axis/trunk/java/dev/scratch/prototype1/src/java/org/apache/axis/transport/http/NonBlockingBufferedInputStream.java	Thu Nov 18 03:16:05 2004
@@ -0,0 +1,176 @@
+/*
+ * Copyright 2001-2004 The Apache Software Foundation.
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.axis.transport.http;
+
+import java.io.IOException;
+import java.io.InputStream; 
+
+public class NonBlockingBufferedInputStream extends InputStream {
+
+    // current stream to be processed
+    private InputStream in;
+
+    // maximum number of bytes allowed to be returned.
+    private int remainingContent = Integer.MAX_VALUE;
+
+    // Internal buffer for the input stream
+    private byte[] buffer = new byte[4096];
+    private int offset = 0;     // bytes before this offset have been processed
+    private int numbytes = 0;   // number of valid bytes in this buffer
+
+    /**
+     * set the input stream to be used for subsequent reads
+     * @param in the InputStream
+     */
+    public void setInputStream (InputStream in) {
+        this.in = in;
+        numbytes = 0;
+        offset = 0;
+        remainingContent = (in==null)? 0 : Integer.MAX_VALUE;
+    }
+
+    /**
+     * set the maximum number of bytes allowed to be read from this input
+     * stream.
+     * @param value the Content Length
+     */
+    public void setContentLength (int value) {
+        if (in != null) this.remainingContent = value - (numbytes-offset);
+    }
+
+    /**
+     * Replenish the buffer with data from the input stream.  This is 
+     * guaranteed to read atleast one byte or throw an exception.  When
+     * possible, it will read up to the length of the buffer
+     * the data is buffered for efficiency.
+     * @return the byte read
+     */
+    private void refillBuffer() throws IOException {
+        if (remainingContent <= 0 || in == null) return;
+
+        // determine number of bytes to read
+        numbytes = in.available();
+        if (numbytes > remainingContent) numbytes=remainingContent;
+        if (numbytes > buffer.length) numbytes=buffer.length;
+        if (numbytes <= 0) numbytes = 1;
+
+        // actually attempt to read those bytes
+        numbytes = in.read(buffer, 0, numbytes);
+
+        // update internal state to reflect this read
+        remainingContent -= numbytes;
+        offset = 0;
+    }
+
+    /**
+     * Read a byte from the input stream, blocking if necessary.  Internally
+     * the data is buffered for efficiency.
+     * @return the byte read
+     */
+    public int read() throws IOException {
+        if (in == null) return -1;
+        if (offset >= numbytes) refillBuffer();
+        if (offset >= numbytes) return -1;
+        return buffer[offset++] & 0xFF;
+    }
+    
+    /**
+     * Read bytes from the input stream.  This is guaranteed to return at 
+     * least one byte or throw an exception.  When possible, it will return 
+     * more bytes, up to the length of the array, as long as doing so would 
+     * not require waiting on bytes from the input stream.
+     * @param dest      byte array to read into
+     * @return the number of bytes actually read
+     */
+    public int read(byte[] dest) throws IOException {
+        return read(dest, 0, dest.length);
+    }
+
+    /**
+     * Read a specified number of bytes from the input stream.  This is
+     * guaranteed to return at least one byte or throw an execption.  When
+     * possible, it will return more bytes, up to the length specified,
+     * as long as doing so would not require waiting on bytes from the
+     * input stream.
+     * @param dest      byte array to read into
+     * @param off       starting offset into the byte array
+     * @param len       maximum number of bytes to read
+     * @return the number of bytes actually read
+     */
+    public int read(byte[] dest, int off, int len) throws IOException {
+        int ready = numbytes - offset;
+
+        if (ready >= len) {
+            System.arraycopy(buffer, offset, dest, off, len);
+            offset += len;
+            return len;
+        } else if (ready>0) {
+            System.arraycopy(buffer, offset, dest, off, ready);
+            offset = numbytes;
+            return ready;
+        } else {
+            if (in == null) return -1;
+            refillBuffer();
+            if (offset >= numbytes) return -1;
+            return read(dest,off,len);
+        }
+    }
+    
+    /**
+     * skip over (and discard) a specified number of bytes in this input
+     * stream
+     * @param len the number of bytes to be skipped
+     * @return the action number of bytes skipped
+     */
+    public int skip(int len) throws IOException {
+        int count = 0;
+        while (len-->0 && read()>=0) count++;
+        return count;
+    }
+
+    /**
+     * return the number of bytes available to be read without blocking
+     * @return the number of bytes
+     */
+    public int available() throws IOException {
+        if (in == null) return 0;
+
+        // return buffered + available from the stream
+        return (numbytes-offset) + in.available();
+    }
+
+    /**
+     * disassociate from the underlying input stream
+     */
+    public void close() throws IOException {
+        setInputStream(null);
+    }
+
+    /**
+     * Just like read except byte is not removed from the buffer. 
+     * the data is buffered for efficiency.
+     * Was added to support multiline http headers. ;-)
+     * @return the byte read
+     */
+    public int peek() throws IOException {
+        if (in == null) return -1;
+        if (offset >= numbytes) refillBuffer();
+        if (offset >= numbytes) return -1;
+        return buffer[offset] & 0xFF;
+    }
+}
+

Added: webservices/axis/trunk/java/dev/scratch/prototype1/src/java/org/apache/axis/transport/http/SimpleAxisServer.java
==============================================================================
--- (empty file)
+++ webservices/axis/trunk/java/dev/scratch/prototype1/src/java/org/apache/axis/transport/http/SimpleAxisServer.java	Thu Nov 18 03:16:05 2004
@@ -0,0 +1,155 @@
+/*
+ * Copyright 2001-2004 The Apache Software Foundation.
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.axis.transport.http;
+
+
+
+import java.io.IOException;
+import java.net.ServerSocket;
+import java.net.Socket;
+
+import org.apache.axis.engine.AxisEngine;
+import org.apache.axis.utils.Messages;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+
+/**
+ * This is a simple implementation of an HTTP server for processing
+ * SOAP requests via Apache's xml-axis.  This is not intended for production
+ * use.  Its intended uses are for demos, debugging, and performance
+ * profiling.
+ *
+ * Note this classes uses static objects to provide a thread pool, so you should
+ * not use multiple instances of this class in the same JVM/classloader unless
+ * you want bad things to happen at shutdown.
+ * @author Sam Ruby (ruby@us.ibm.com)
+ * @author Rob Jellinghaus (robj@unrealities.com)
+ * @author Alireza Taherkordi (a_taherkordi@users.sourceforge.net)
+ */
+public class SimpleAxisServer implements Runnable {
+    protected static Log log =
+            LogFactory.getLog(SimpleAxisServer.class.getName());
+    private static AxisEngine myAxisServer = null;
+    private ServerSocket serverSocket;    
+    /**
+    are we stopped?
+    latch to true if stop() is called
+     */
+    private boolean stopped = false;
+    
+
+    public SimpleAxisServer(AxisEngine myAxisServer) {
+    	SimpleAxisServer.myAxisServer = myAxisServer;
+		
+    }
+
+
+    /**
+     * stop the server if not already told to.
+     * @throws Throwable
+     */
+    protected void finalize() throws Throwable {
+        stop();
+        super.finalize();
+    }
+
+
+
+
+
+    /**
+     * Accept requests from a given TCP port and send them through the
+     * Axis engine for processing.
+     */
+    public void run() {
+    	 System.out.println("request accepted");
+        // Accept and process requests from the socket
+        while (!stopped) {
+            Socket socket = null;
+            try {
+                socket = serverSocket.accept();
+               
+            } catch (java.io.InterruptedIOException iie) {
+            } catch (Exception e) {
+                log.debug(Messages.getMessage("exception00"), e);
+                break;
+            }
+            if (socket != null) {
+                SimpleAxisWorker worker = new SimpleAxisWorker(this, socket,myAxisServer);
+                worker.run();
+            }
+        }
+        log.info(Messages.getMessage("quit00", "SimpleAxisServer"));
+    }
+
+
+    /**
+     * Obtain the serverSocket that that SimpleAxisServer is listening on.
+     */
+    public ServerSocket getServerSocket() {
+        return serverSocket;
+    }
+
+    /**
+     * Set the serverSocket this server should listen on.
+     * (note : changing this will not affect a running server, but if you
+     *  stop() and then start() the server, the new socket will be used).
+     */
+    public void setServerSocket(ServerSocket serverSocket) {
+        this.serverSocket = serverSocket;
+    }
+
+
+    /**
+     * Start this server as a NON-daemon.
+     */
+    public void start() throws Exception {
+    	run();
+    }
+
+    /**
+     * Stop this server. Can be called safely if the system is already stopped,
+     * or if it was never started.
+     *
+     * This will interrupt any pending accept().
+     */
+    public void stop() {
+        //recognise use before we are live
+        if(stopped ) {
+            return;
+        }
+        /*
+         * Close the server socket cleanly, but avoid fresh accepts while
+         * the socket is closing.
+         */
+        stopped = true;
+
+        try {
+            if(serverSocket != null) {
+                serverSocket.close();
+            }
+        } catch (IOException e) {
+            log.info(Messages.getMessage("exception00"), e);
+        } finally {
+            serverSocket=null;
+        }
+
+        log.info(Messages.getMessage("quit00", "SimpleAxisServer"));
+
+    }
+
+}

Added: webservices/axis/trunk/java/dev/scratch/prototype1/src/java/org/apache/axis/transport/http/SimpleAxisWorker.java
==============================================================================
--- (empty file)
+++ webservices/axis/trunk/java/dev/scratch/prototype1/src/java/org/apache/axis/transport/http/SimpleAxisWorker.java	Thu Nov 18 03:16:05 2004
@@ -0,0 +1,551 @@
+/*
+ * Copyright 2001-2004 The Apache Software Foundation.
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.axis.transport.http;
+
+import java.io.InputStreamReader;
+import java.io.OutputStream;
+import java.net.Socket;
+
+import javax.xml.namespace.QName;
+import javax.xml.soap.MimeHeaders;
+
+import org.apache.axis.encoding.Base64;
+import org.apache.axis.engine.AxisEngine;
+import org.apache.axis.engine.context.MessageContext;
+import org.apache.axis.engine.registry.EngineRegistry;
+import org.apache.axis.om.OMXMLParserWrapper;
+import org.apache.axis.om.impl.OMXMLPullParserWrapper;
+import org.apache.axis.om.impl.SOAPMessageImpl;
+import org.apache.axis.transport.TransportSender;
+import org.apache.axis.utils.Messages;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.xmlpull.v1.XmlPullParser;
+import org.xmlpull.v1.XmlPullParserFactory;
+
+
+
+public class SimpleAxisWorker implements Runnable {
+    protected static Log log =
+            LogFactory.getLog(SimpleAxisWorker.class.getName());
+
+    private AxisEngine engine;
+    private SimpleAxisServer server;
+    private Socket socket;
+
+    // Axis specific constants
+    private static String transportName = "SimpleHTTP";
+
+    // HTTP status codes
+    private static byte OK[] = ("200 " + Messages.getMessage("ok00")).getBytes();
+    private static byte NOCONTENT[] = ("202 " + Messages.getMessage("ok00") + "\n\n").getBytes();
+    private static byte UNAUTH[] = ("401 " + Messages.getMessage("unauth00")).getBytes();
+    private static byte SENDER[] = "400".getBytes();
+    private static byte ISE[] = ("500 " + Messages.getMessage("internalError01")).getBytes();
+
+    // HTTP prefix
+    private static byte HTTP[] = "HTTP/1.0 ".getBytes();
+
+    // Standard MIME headers for XML payload
+    private static byte XML_MIME_STUFF[] =
+            ("\r\nContent-Type: text/xml; charset=utf-8\r\n" +
+            "Content-Length: ").getBytes();
+
+    // Standard MIME headers for HTML payload
+    private static byte HTML_MIME_STUFF[] =
+            ("\r\nContent-Type: text/html; charset=utf-8\r\n" +
+            "Content-Length: ").getBytes();
+
+    // Mime/Content separator
+    private static byte SEPARATOR[] = "\r\n\r\n".getBytes();
+
+    // Tiddly little response
+//    private static final String responseStr =
+//            "<html><head><title>SimpleAxisServer</title></head>" +
+//            "<body><h1>SimpleAxisServer</h1>" +
+//            Messages.getMessage("reachedServer00") +
+//            "</html>";
+//    private static byte cannedHTMLResponse[] = responseStr.getBytes();
+
+    // ASCII character mapping to lower case
+    private static final byte[] toLower = new byte[256];
+
+    static {
+        for (int i = 0; i < 256; i++) {
+            toLower[i] = (byte) i;
+        }
+
+        for (int lc = 'a'; lc <= 'z'; lc++) {
+            toLower[lc + 'A' - 'a'] = (byte) lc;
+        }
+    }
+
+    // buffer for IO
+    private static final int BUFSIZ = 4096;
+
+    // mime header for content length
+    private static final byte lenHeader[] = "content-length: ".getBytes();
+    private static final int lenLen = lenHeader.length;
+
+    // mime header for content type
+    private static final byte typeHeader[] = (HTTPConstants.HEADER_CONTENT_TYPE.toLowerCase() + ": ").getBytes();
+    private static final int typeLen = typeHeader.length;
+
+    // mime header for content location
+    private static final byte locationHeader[] = (HTTPConstants.HEADER_CONTENT_LOCATION.toLowerCase() + ": ").getBytes();
+    private static final int locationLen = locationHeader.length;
+
+    // mime header for soap action
+    private static final byte actionHeader[] = "soapaction: ".getBytes();
+    private static final int actionLen = actionHeader.length;
+
+    // mime header for cookie
+    private static final byte cookieHeader[] = "cookie: ".getBytes();
+    private static final int cookieLen = cookieHeader.length;
+
+    // mime header for cookie2
+    private static final byte cookie2Header[] = "cookie2: ".getBytes();
+    private static final int cookie2Len = cookie2Header.length;
+
+    // HTTP header for authentication
+    private static final byte authHeader[] = "authorization: ".getBytes();
+    private static final int authLen = authHeader.length;
+
+    // mime header for GET
+    private static final byte getHeader[] = "GET".getBytes();
+
+    // mime header for POST
+    private static final byte postHeader[] = "POST".getBytes();
+
+    // header ender
+    private static final byte headerEnder[] = ": ".getBytes();
+
+    // "Basic" auth string
+    private static final byte basicAuth[] = "basic ".getBytes();
+
+    public SimpleAxisWorker(SimpleAxisServer server, Socket socket,AxisEngine engine) {
+        this.server = server;
+        this.socket = socket;
+        this.engine = engine;
+    }
+
+    /**
+     * Run method
+     */ 
+    public void run() {
+        try {
+            execute();
+        } finally {
+        }
+    }
+    
+    /**
+     * The main workhorse method.
+     */
+    public void execute () {
+        byte buf[] = new byte[BUFSIZ];
+        // create an Axis server
+
+        MessageContext msgContext = new MessageContext(engine.getRegistry());
+
+
+        // Reusuable, buffered, content length controlled, InputStream
+        NonBlockingBufferedInputStream is =
+                new NonBlockingBufferedInputStream();
+
+        // buffers for the headers we care about
+        StringBuffer soapAction = new StringBuffer();
+        StringBuffer httpRequest = new StringBuffer();
+        StringBuffer fileName = new StringBuffer();
+        StringBuffer cookie = new StringBuffer();
+        StringBuffer cookie2 = new StringBuffer();
+        StringBuffer authInfo = new StringBuffer();
+        StringBuffer contentType = new StringBuffer();
+        StringBuffer contentLocation = new StringBuffer();
+
+
+        try {
+            // assume the best
+            byte[] status = OK;
+
+            // assume we're not getting WSDL
+            boolean doWsdl = false;
+
+            // cookie for this session, if any
+            String cooky = null;
+
+            String methodName = null;
+
+            try {
+                authInfo.delete(0, authInfo.length());
+
+                // read headers
+                is.setInputStream(socket.getInputStream());
+                // parse all headers into hashtable
+                MimeHeaders requestHeaders = new MimeHeaders();
+                int contentLength = parseHeaders(is, buf, contentType,
+                        contentLocation, soapAction,
+                        httpRequest, fileName,
+                        cookie, cookie2, authInfo, requestHeaders);
+                is.setContentLength(contentLength);
+
+                int paramIdx = fileName.toString().indexOf('?');
+                if (paramIdx != -1) {
+                    // Got params
+                    String params = fileName.substring(paramIdx + 1);
+                    fileName.setLength(paramIdx);
+
+                    log.debug(Messages.getMessage("filename00",
+                            fileName.toString()));
+                    log.debug(Messages.getMessage("params00",
+                            params));
+
+                    if ("wsdl".equalsIgnoreCase(params))
+                        doWsdl = true;
+
+                    if (params.startsWith("method=")) {
+                        methodName = params.substring(7);
+                    }
+                }
+
+
+
+                String filePart = fileName.toString();
+                if (filePart.startsWith("axis/services/")) {
+                    String servicePart = filePart.substring(14);
+                    int separator = servicePart.indexOf('/');
+                    if (separator > -1) {
+                        msgContext.setProperty("objectID",
+                                       servicePart.substring(separator + 1));
+                        servicePart = servicePart.substring(0, separator);
+                    }
+                    msgContext.setCurrentService(new QName(servicePart));
+                }
+
+                if (authInfo.length() > 0) {
+                    // Process authentication info
+                    //authInfo = new StringBuffer("dXNlcjE6cGFzczE=");
+                    byte[] decoded = Base64.decode(authInfo.toString());
+                    StringBuffer userBuf = new StringBuffer();
+                    StringBuffer pwBuf = new StringBuffer();
+                    StringBuffer authBuf = userBuf;
+                    for (int i = 0; i < decoded.length; i++) {
+                        if ((char) (decoded[i] & 0x7f) == ':') {
+                            authBuf = pwBuf;
+                            continue;
+                        }
+                        authBuf.append((char) (decoded[i] & 0x7f));
+                    }
+
+                    if (log.isDebugEnabled()) {
+                        log.debug(Messages.getMessage("user00",
+                                userBuf.toString()));
+                    }
+
+                    msgContext.setProperty(MessageContext.USER_NAME,userBuf.toString());
+                    msgContext.setProperty(MessageContext.PASSWARD,pwBuf.toString());
+                }
+///////////////////////
+                // if get, then return simpleton document as response
+                if (httpRequest.toString().equals("GET")) {
+                		throw new UnsupportedOperationException("GET not supported"); 
+                } else {
+
+                    // this may be "" if either SOAPAction: "" or if no SOAPAction at all.
+                    // for now, do not complain if no SOAPAction at all
+                    String soapActionString = soapAction.toString();
+                    if (soapActionString != null) {
+                        msgContext.setUseSOAPAction(true);
+                        msgContext.setSoapAction(soapActionString);
+                    }
+
+                    // Send it on its way...
+                    OutputStream out = socket.getOutputStream();
+                    out.write(HTTP);
+                    out.write(status);
+                    log.info("status written");
+                    msgContext.setTransportSender(new TransportSender(out));
+
+                    XmlPullParserFactory pf = XmlPullParserFactory.newInstance();
+                    pf.setNamespaceAware(true);
+                    XmlPullParser  parser = pf.newPullParser();
+                    parser.setInput(new InputStreamReader(is));
+                    
+                    OMXMLParserWrapper parserWrapper = new OMXMLPullParserWrapper(parser); 
+                    msgContext.setInMessage(parserWrapper.getSOAPMessage());
+                    EngineRegistry reg = engine.getRegistry();
+                    // invoke the Axis engine
+                    engine.recive(msgContext);
+                    log.info("revice done");
+                    out.flush();
+                }
+
+            } catch (Exception e) {
+            	e.printStackTrace();
+            }
+
+
+//            if (resposeMessage != null) {
+//
+//                //out.write(XML_MIME_STUFF);
+//                out.write(("\r\n" + HTTPConstants.HEADER_CONTENT_TYPE + ": " +resposeMessage.getContentType()).getBytes());
+//
+//            }
+
+            // out.write(response);
+            
+        } catch (Exception e) {
+            log.info(Messages.getMessage("exception00"), e);
+        } finally {
+            try {
+                if (socket != null) socket.close();
+            } catch (Exception e) {
+            }
+        }
+    }
+
+    protected void invokeMethodFromGet(String methodName, String args) throws Exception {
+
+    }
+
+    /**
+     * Read all mime headers, returning the value of Content-Length and
+     * SOAPAction.
+     * @param is         InputStream to read from
+     * @param contentType The content type.
+     * @param contentLocation The content location
+     * @param soapAction StringBuffer to return the soapAction into
+     * @param httpRequest StringBuffer for GET / POST
+     * @param cookie first cookie header (if doSessions)
+     * @param cookie2 second cookie header (if doSessions)
+     * @param headers HTTP headers to transfer to MIME headers
+     * @return Content-Length
+     */
+    private int parseHeaders(NonBlockingBufferedInputStream is,
+                             byte buf[],
+                             StringBuffer contentType,
+                             StringBuffer contentLocation,
+                             StringBuffer soapAction,
+                             StringBuffer httpRequest,
+                             StringBuffer fileName,
+                             StringBuffer cookie,
+                             StringBuffer cookie2,
+                             StringBuffer authInfo,
+                             MimeHeaders headers)
+            throws java.io.IOException {
+        int n;
+        int len = 0;
+
+        // parse first line as GET or POST
+        n = this.readLine(is, buf, 0, buf.length);
+        if (n < 0) {
+            // nothing!
+            throw new java.io.IOException(Messages.getMessage("unexpectedEOS00"));
+        }
+
+        // which does it begin with?
+        httpRequest.delete(0, httpRequest.length());
+        fileName.delete(0, fileName.length());
+        contentType.delete(0, contentType.length());
+        contentLocation.delete(0, contentLocation.length());
+
+        if (buf[0] == getHeader[0]) {
+            httpRequest.append("GET");
+            for (int i = 0; i < n - 5; i++) {
+                char c = (char) (buf[i + 5] & 0x7f);
+                if (c == ' ')
+                    break;
+                fileName.append(c);
+            }
+            log.debug(Messages.getMessage("filename01", "SimpleAxisServer", fileName.toString()));
+            return 0;
+        } else if (buf[0] == postHeader[0]) {
+            httpRequest.append("POST");
+            for (int i = 0; i < n - 6; i++) {
+                char c = (char) (buf[i + 6] & 0x7f);
+                if (c == ' ')
+                    break;
+                fileName.append(c);
+            }
+            log.debug(Messages.getMessage("filename01", "SimpleAxisServer", fileName.toString()));
+        } else {
+            throw new java.io.IOException(Messages.getMessage("badRequest00"));
+        }
+
+        while ((n = readLine(is, buf, 0, buf.length)) > 0) {
+
+            if ((n <= 2) && (buf[0] == '\n' || buf[0] == '\r') && (len > 0)) break;
+
+            // RobJ gutted the previous logic; it was too hard to extend for more headers.
+            // Now, all it does is search forwards for ": " in the buf,
+            // then do a length / byte compare.
+            // Hopefully this is still somewhat efficient (Sam is watching!).
+
+            // First, search forwards for ": "
+            int endHeaderIndex = 0;
+            while (endHeaderIndex < n && toLower[buf[endHeaderIndex]] != headerEnder[0]) {
+                endHeaderIndex++;
+            }
+            endHeaderIndex += 2;
+            // endHeaderIndex now points _just past_ the ": ", and is
+            // comparable to the various lenLen, actionLen, etc. values
+
+            // convenience; i gets pre-incremented, so initialize it to one less
+            int i = endHeaderIndex - 1;
+
+            // which header did we find?
+            if (endHeaderIndex == lenLen && matches(buf, lenHeader)) {
+                // parse content length
+
+                while ((++i < n) && (buf[i] >= '0') && (buf[i] <= '9')) {
+                    len = (len * 10) + (buf[i] - '0');
+                }
+                headers.addHeader(HTTPConstants.HEADER_CONTENT_LENGTH, String.valueOf(len));
+
+            } else if (endHeaderIndex == actionLen
+                    && matches(buf, actionHeader)) {
+
+                soapAction.delete(0, soapAction.length());
+                // skip initial '"'
+                i++;
+                while ((++i < n) && (buf[i] != '"')) {
+                    soapAction.append((char) (buf[i] & 0x7f));
+                }
+                headers.addHeader(HTTPConstants.HEADER_SOAP_ACTION, "\"" + soapAction.toString() + "\"");
+
+            } else if (endHeaderIndex == authLen && matches(buf, authHeader)) {
+                if (matches(buf, endHeaderIndex, basicAuth)) {
+                    i += basicAuth.length;
+                    while (++i < n && (buf[i] != '\r') && (buf[i] != '\n')) {
+                        if (buf[i] == ' ') continue;
+                        authInfo.append((char) (buf[i] & 0x7f));
+                    }
+                    headers.addHeader(HTTPConstants.HEADER_AUTHORIZATION, new String(basicAuth) + authInfo.toString());
+                } else {
+                    throw new java.io.IOException(
+                            Messages.getMessage("badAuth00"));
+                }
+            } else if (endHeaderIndex == locationLen && matches(buf, locationHeader)) {
+                while (++i < n && (buf[i] != '\r') && (buf[i] != '\n')) {
+                    if (buf[i] == ' ') continue;
+                    contentLocation.append((char) (buf[i] & 0x7f));
+                }
+                headers.addHeader(HTTPConstants.HEADER_CONTENT_LOCATION, contentLocation.toString());
+            } else if (endHeaderIndex == typeLen && matches(buf, typeHeader)) {
+                while (++i < n && (buf[i] != '\r') && (buf[i] != '\n')) {
+                    if (buf[i] == ' ') continue;
+                    contentType.append((char) (buf[i] & 0x7f));
+                }
+                headers.addHeader(HTTPConstants.HEADER_CONTENT_TYPE, contentLocation.toString());
+            } else {
+                String customHeaderName = new String(buf, 0, endHeaderIndex - 2);
+                StringBuffer customHeaderValue = new StringBuffer();
+                while (++i < n && (buf[i] != '\r') && (buf[i] != '\n')) {
+                    if (buf[i] == ' ') continue;
+                    customHeaderValue.append((char) (buf[i] & 0x7f));
+                }
+                headers.addHeader(customHeaderName, customHeaderValue.toString());
+            }
+
+        }
+        return len;
+    }
+
+    /**
+     * does tolower[buf] match the target byte array, up to the target's length?
+     */
+    public boolean matches(byte[] buf, byte[] target) {
+        for (int i = 0; i < target.length; i++) {
+            if (toLower[buf[i]] != target[i]) {
+                return false;
+            }
+        }
+        return true;
+    }
+
+    /**
+     * Case-insensitive match of a target byte [] to a source byte [],
+     * starting from a particular offset into the source.
+     */
+    public boolean matches(byte[] buf, int bufIdx, byte[] target) {
+        for (int i = 0; i < target.length; i++) {
+            if (toLower[buf[bufIdx + i]] != target[i]) {
+                return false;
+            }
+        }
+        return true;
+    }
+
+    /**
+     * output an integer into the output stream
+     * @param out       OutputStream to be written to
+     * @param value     Integer value to be written.
+     */
+    private void putInt(byte buf[], OutputStream out, int value)
+            throws java.io.IOException {
+        int len = 0;
+        int offset = buf.length;
+
+        // negative numbers
+        if (value < 0) {
+            buf[--offset] = (byte) '-';
+            value = -value;
+            len++;
+        }
+
+        // zero
+        if (value == 0) {
+            buf[--offset] = (byte) '0';
+            len++;
+        }
+
+        // positive numbers
+        while (value > 0) {
+            buf[--offset] = (byte) (value % 10 + '0');
+            value = value / 10;
+            len++;
+        }
+
+        // write the result
+        out.write(buf, offset, len);
+    }
+
+    /**
+     * Read a single line from the input stream
+     * @param is        inputstream to read from
+     * @param b         byte array to read into
+     * @param off       starting offset into the byte array
+     * @param len       maximum number of bytes to read
+     */
+    private int readLine(NonBlockingBufferedInputStream is, byte[] b, int off, int len)
+            throws java.io.IOException {
+        int count = 0, c;
+
+        while ((c = is.read()) != -1) {
+            if (c != '\n' && c != '\r') {
+                b[off++] = (byte) c;
+                count++;
+            }
+            if (count == len) break;
+            if ('\n' == c) {
+                int peek = is.peek(); //If the next line begins with tab or space then this is a continuation.
+                if (peek != ' ' && peek != '\t') break;
+            }
+        }
+        return count > 0 ? count : -1;
+    }
+}

Added: webservices/axis/trunk/java/dev/scratch/prototype1/src/java/org/apache/axis/utils/HashedBaundle.java
==============================================================================
--- (empty file)
+++ webservices/axis/trunk/java/dev/scratch/prototype1/src/java/org/apache/axis/utils/HashedBaundle.java	Thu Nov 18 03:16:05 2004
@@ -0,0 +1,50 @@
+/*
+ * Copyright 2001-2004 The Apache Software Foundation.
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.axis.utils;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+
+/**
+ * @author Srinath Perera(hemapani@opensource.lk)
+ */
+public class HashedBaundle {
+    private ArrayList list;
+    private HashMap map;
+    public HashedBaundle(){
+        list = new ArrayList();
+        map = new HashMap();
+    }
+    public void add(Object key,Object obj){
+        list.add(obj);
+        map.put(key,obj);
+    }
+    public Object get(Object key){
+        return map.get(key);
+    }
+    public int getCount(){
+        return list.size();
+    }
+    public Object get(int index){
+        return this.list.get(index);
+    }
+    public void remove(Object key){
+        Object obj = map.remove(key);
+        list.remove(obj);
+    }
+    
+}

Added: webservices/axis/trunk/java/dev/scratch/prototype1/src/java/org/apache/axis/utils/Messages.java
==============================================================================
--- (empty file)
+++ webservices/axis/trunk/java/dev/scratch/prototype1/src/java/org/apache/axis/utils/Messages.java	Thu Nov 18 03:16:05 2004
@@ -0,0 +1,174 @@
+/*
+ * Copyright 2001-2004 The Apache Software Foundation.
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.axis.utils;
+
+import java.util.Locale;
+import java.util.MissingResourceException;
+import java.util.ResourceBundle;
+
+import org.apache.axis.i18n.MessageBundle;
+import org.apache.axis.i18n.MessagesConstants;
+
+/**
+ * @see org.apache.axis.i18n.Messages
+ * 
+ * @author Richard A. Sitze (rsitze@us.ibm.com)
+ * @author Karl Moss (kmoss@macromedia.com)
+ * @author Glen Daniels (gdaniels@apache.org)
+ */
+public class Messages {
+    private static final Class  thisClass = Messages.class;
+
+    private static final String projectName = MessagesConstants.projectName;
+
+    private static final String resourceName = MessagesConstants.resourceName;
+    private static final Locale locale = MessagesConstants.locale;
+
+    private static final String packageName = getPackage(thisClass.getName());
+    private static final ClassLoader classLoader = thisClass.getClassLoader();
+
+    private static final ResourceBundle parent =
+        (MessagesConstants.rootPackageName == packageName)
+        ? null
+        : MessagesConstants.rootBundle;
+
+
+    /***** NO NEED TO CHANGE ANYTHING BELOW *****/
+
+    private static final MessageBundle messageBundle =
+        new MessageBundle(projectName, packageName, resourceName,
+                                     locale, classLoader, parent);
+
+    /**
+      * Get a message from resource.properties from the package of the given object.
+      * @param caller The calling object, used to get the package name and class loader
+      * @param locale The locale
+      * @param key The resource key
+      * @return The formatted message
+      */
+    public static String getMessage(String key)
+        throws MissingResourceException
+    {
+        return messageBundle.getMessage(key);
+    }
+
+    /**
+      * Get a message from resource.properties from the package of the given object.
+      * @param caller The calling object, used to get the package name and class loader
+      * @param locale The locale
+      * @param key The resource key
+      * @param arg0 The argument to place in variable {0}
+      * @return The formatted message
+      */
+    public static String getMessage(String key, String arg0)
+        throws MissingResourceException
+    {
+        return messageBundle.getMessage(key, arg0);
+    }
+
+    /**
+      * Get a message from resource.properties from the package of the given object.
+      * @param caller The calling object, used to get the package name and class loader
+      * @param locale The locale
+      * @param key The resource key
+      * @param arg0 The argument to place in variable {0}
+      * @param arg1 The argument to place in variable {1}
+      * @return The formatted message
+      */
+    public static String getMessage(String key, String arg0, String arg1)
+        throws MissingResourceException
+    {
+        return messageBundle.getMessage(key, arg0, arg1);
+    }
+
+    /**
+      * Get a message from resource.properties from the package of the given object.
+      * @param caller The calling object, used to get the package name and class loader
+      * @param locale The locale
+      * @param key The resource key
+      * @param arg0 The argument to place in variable {0}
+      * @param arg1 The argument to place in variable {1}
+      * @param arg2 The argument to place in variable {2}
+      * @return The formatted message
+      */
+    public static String getMessage(String key, String arg0, String arg1, String arg2)
+        throws MissingResourceException
+    {
+        return messageBundle.getMessage(key, arg0, arg1, arg2);
+    }
+
+    /**
+      * Get a message from resource.properties from the package of the given object.
+      * @param caller The calling object, used to get the package name and class loader
+      * @param locale The locale
+      * @param key The resource key
+      * @param arg0 The argument to place in variable {0}
+      * @param arg1 The argument to place in variable {1}
+      * @param arg2 The argument to place in variable {2}
+      * @param arg3 The argument to place in variable {3}
+      * @return The formatted message
+      */
+    public static String getMessage(String key, String arg0, String arg1, String arg2, String arg3)
+        throws MissingResourceException
+    {
+        return messageBundle.getMessage(key, arg0, arg1, arg2, arg3);
+    }
+
+    /**
+      * Get a message from resource.properties from the package of the given object.
+      * @param caller The calling object, used to get the package name and class loader
+      * @param locale The locale
+      * @param key The resource key
+      * @param arg0 The argument to place in variable {0}
+      * @param arg1 The argument to place in variable {1}
+      * @param arg2 The argument to place in variable {2}
+      * @param arg3 The argument to place in variable {3}
+      * @param arg4 The argument to place in variable {4}
+      * @return The formatted message
+      */
+    public static String getMessage(String key, String arg0, String arg1, String arg2, String arg3, String arg4)
+        throws MissingResourceException
+    {
+        return messageBundle.getMessage(key, arg0, arg1, arg2, arg3, arg4);
+    }
+
+    /**
+      * Get a message from resource.properties from the package of the given object.
+      * @param caller The calling object, used to get the package name and class loader
+      * @param locale The locale
+      * @param key The resource key
+      * @param array An array of objects to place in corresponding variables
+      * @return The formatted message
+      */
+    public static String getMessage(String key, String[] args)
+        throws MissingResourceException
+    {
+        return messageBundle.getMessage(key, args);
+    }
+    
+    public static ResourceBundle getResourceBundle() {
+        return messageBundle.getResourceBundle();
+    }
+    
+    public static MessageBundle getMessageBundle() {
+        return messageBundle;
+    }
+
+    private static final String getPackage(String name) {
+        return name.substring(0, name.lastIndexOf('.')).intern();
+    }
+}

Added: webservices/axis/trunk/java/dev/scratch/prototype1/src/samples/soap/sample1.txt
==============================================================================
--- (empty file)
+++ webservices/axis/trunk/java/dev/scratch/prototype1/src/samples/soap/sample1.txt	Thu Nov 18 03:16:05 2004
@@ -0,0 +1,12 @@
+POST /axis/services/EchoService HTTP/1.1
+Host: 127.0.0.1
+Content-Type: application/soap+xml; charset="utf-8"
+
+<?xml version='1.0' ?>
+<env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope"> 
+ <env:Header>
+ </env:Header>
+ <env:Body>
+	<axis2:echoVoid xmlns:axis2="http://ws.apache.org/axis2" ></axis2:echoVoid>
+ </env:Body>
+</env:Envelope>
\ No newline at end of file

Added: webservices/axis/trunk/java/dev/scratch/prototype1/src/samples/soap/sample1.xml
==============================================================================
--- (empty file)
+++ webservices/axis/trunk/java/dev/scratch/prototype1/src/samples/soap/sample1.xml	Thu Nov 18 03:16:05 2004
@@ -0,0 +1,8 @@
+<?xml version='1.0' ?>
+<env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope"> 
+ <env:Header>
+ </env:Header>
+ <env:Body>
+	<axis2:echoVoid xmlns:axis2="http://ws.apache.org/axis2" ></axis2:echoVoid>
+ </env:Body>
+</env:Envelope>
\ No newline at end of file

Added: webservices/axis/trunk/java/dev/scratch/prototype1/src/test-resources/soapmessage.xml
==============================================================================
--- (empty file)
+++ webservices/axis/trunk/java/dev/scratch/prototype1/src/test-resources/soapmessage.xml	Thu Nov 18 03:16:05 2004
@@ -0,0 +1,15 @@
+<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/03/addressing">
+    <soapenv:Header>
+        <wsa:MessageID soapenv:mustUnderstand="0">uuid:920C5190-0B8F-11D9-8CED-F22EDEEBF7E5</wsa:MessageID>
+        <wsa:To soapenv:mustUnderstand="0">http://localhost:8081/axis/services/BankPort</wsa:To>
+        <wsa:From soapenv:mustUnderstand="0">
+            <Address xmlns="http://schemas.xmlsoap.org/ws/2004/03/addressing">http://schemas.xmlsoap.org/ws/2004/03/addressing/role/anonymous</Address>
+        </wsa:From>
+    </soapenv:Header>
+    <soapenv:Body>
+        <ns1:getBalance soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:ns1="http://localhost:8081/axis/services/BankPort">
+            <accountNo href="#id0"/>
+        </ns1:getBalance>
+        <multiRef id="id0" soapenc:root="0" soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xsi:type="xsd:int" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">1001</multiRef>
+    </soapenv:Body>
+</soapenv:Envelope>
\ No newline at end of file

Added: webservices/axis/trunk/java/dev/scratch/prototype1/src/test/org/apache/axis/AbstractTestCase.java
==============================================================================
--- (empty file)
+++ webservices/axis/trunk/java/dev/scratch/prototype1/src/test/org/apache/axis/AbstractTestCase.java	Thu Nov 18 03:16:05 2004
@@ -0,0 +1,69 @@
+/*
+ * Copyright 2001-2004 The Apache Software Foundation.
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+ 
+package org.apache.axis;
+
+import java.io.File;
+
+import junit.framework.TestCase;
+
+/**
+ * Abstract base class for test cases.
+ */
+public abstract class AbstractTestCase
+	extends TestCase 
+{
+	protected String testDir = "src/test/";
+	protected String sampleDir = "src/samples/";
+	protected String outDir = "target/generated/samples/";
+	protected String tempDir = "target/generated/temp";
+	/** 
+	 * Basedir for all file I/O. Important when running tests from
+	 * the reactor.
+	 */
+	public String basedir = System.getProperty("basedir");
+    
+	/**
+	 * Constructor.
+	 */
+	public AbstractTestCase(String testName)
+	{
+		super(testName);
+		if(basedir == null){
+			basedir = new File(".").getAbsolutePath();
+			if(!(basedir.endsWith("axis")
+				||basedir.endsWith("axis\\")
+				||basedir.endsWith("axis/"))){
+				basedir = new File("./modules/axis").getAbsolutePath();
+			}
+		}
+		testDir = new File(basedir,testDir).getAbsolutePath();
+		sampleDir = new File(basedir,sampleDir).getAbsolutePath();
+		outDir = new File(basedir,outDir).getAbsolutePath();
+		tempDir = new File(basedir,tempDir).getAbsolutePath();
+	}
+    
+	/**
+	 * Get test input file.
+	 *
+	 * @param path Path to test input file.
+	 */
+	public String getTestFile(String path)
+	{
+		return new File(basedir,path).getAbsolutePath();
+	}
+}
+

Added: webservices/axis/trunk/java/dev/scratch/prototype1/src/test/org/apache/axis/engine/EchoTest.java
==============================================================================
--- (empty file)
+++ webservices/axis/trunk/java/dev/scratch/prototype1/src/test/org/apache/axis/engine/EchoTest.java	Thu Nov 18 03:16:05 2004
@@ -0,0 +1,120 @@
+/*
+ * Copyright 2003,2004 The Apache Software Foundation.
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.axis.engine;
+
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileNotFoundException;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.io.OutputStream;
+import java.io.Reader;
+import java.net.ServerSocket;
+import java.net.Socket;
+
+import javax.xml.namespace.QName;
+
+import org.apache.axis.AbstractTestCase;
+import org.apache.axis.engine.AxisEngine;
+import org.apache.axis.engine.EngineUtils;
+import org.apache.axis.engine.Global;
+import org.apache.axis.engine.Operation;
+import org.apache.axis.engine.Service;
+import org.apache.axis.engine.SimpleGlobal;
+import org.apache.axis.engine.SimpleModule;
+import org.apache.axis.engine.SimpleOperation;
+import org.apache.axis.engine.SimpleService;
+import org.apache.axis.engine.SimpleTransport;
+import org.apache.axis.engine.Transport;
+import org.apache.axis.engine.context.MessageContext;
+import org.apache.axis.engine.exec.Constants;
+import org.apache.axis.engine.exec.ExecutionChain;
+import org.apache.axis.engine.registry.ConcreateParameter;
+import org.apache.axis.engine.registry.EchoService;
+import org.apache.axis.engine.registry.EngineRegistry;
+import org.apache.axis.engine.registry.MockFlow;
+import org.apache.axis.engine.registry.Module;
+import org.apache.axis.engine.registry.Parameter;
+import org.apache.axis.engine.registry.SimpleEngineRegistry;
+import org.apache.axis.providers.SimpleJavaProvider;
+import org.apache.axis.providers.SyncProvider;
+import org.apache.axis.transport.http.SimpleAxisServer;
+
+/**
+ * @author Srinath Perera(hemapani@opensource.lk)
+ */
+public class EchoTest extends AbstractTestCase{
+    private QName serviceName = new QName("","EchoService");
+    private QName operationName = new QName("http://ws.apache.org/axis2","echoVoid");
+    private QName transportName = new QName("","NullTransport");
+
+    private EngineRegistry engineRegistry;
+    private MessageContext mc;
+    private Thread thisThread = null;
+    private SimpleAxisServer sas;
+    private int testingPort = 1234;
+
+    public EchoTest(String testName) {
+        super(testName);
+    }
+
+    protected void setUp() throws Exception {
+        engineRegistry = Utils.createMockRegistry(serviceName,operationName,transportName);
+        
+        mc = new MessageContext(engineRegistry);
+        mc.setCurrentTansport(transportName);
+        mc.setCurrentService(serviceName);
+        mc.setCurrentOperation(operationName);
+
+        AxisEngine engine = new AxisEngine(engineRegistry);
+        sas = new SimpleAxisServer(engine);
+        sas.setServerSocket(new ServerSocket(testingPort));
+        thisThread = new Thread(sas);
+        thisThread.start();
+    }
+
+    protected void tearDown() throws Exception {
+    	sas.stop();
+    }
+
+
+    public void testEchoStringServer() throws Exception{
+    	File file = new File("src/samples/soap/sample1.txt");
+    	FileInputStream in = new FileInputStream(file);
+    	
+    	Socket socket = new Socket("127.0.0.1",testingPort);
+    	System.out.println("scoket created");
+    	OutputStream out = socket.getOutputStream();
+    	byte[]  buf = new byte[1024];
+    	int index = -1;
+    	while((index = in.read(buf)) > 0){
+    		out.write(buf,0,index);
+    	}
+    	System.out.println("Message Send");
+    	
+    	InputStream respose = socket.getInputStream();
+    	Reader rReader = new InputStreamReader(respose);
+    	char[] charBuf = new char[1024];
+    	while((index = rReader.read(charBuf)) > 0){
+        	System.out.println(charBuf);    		
+    	}
+    	
+    	in.close();
+    	out.close();
+    	rReader.close();
+    	socket.close();
+    }
+}

Added: webservices/axis/trunk/java/dev/scratch/prototype1/src/test/org/apache/axis/engine/EngineTest.java
==============================================================================
--- (empty file)
+++ webservices/axis/trunk/java/dev/scratch/prototype1/src/test/org/apache/axis/engine/EngineTest.java	Thu Nov 18 03:16:05 2004
@@ -0,0 +1,63 @@
+/*
+ * Copyright 2001-2004 The Apache Software Foundation.
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.axis.engine;
+
+import javax.xml.namespace.QName;
+
+import junit.framework.TestCase;
+
+import org.apache.axis.engine.AxisEngine;
+import org.apache.axis.engine.context.MessageContext;
+import org.apache.axis.engine.registry.EngineRegistry;
+
+/**
+ * @author hemapani@opensource.lk
+ */
+public class EngineTest extends TestCase{
+    private QName serviceName = new QName("","EchoService");
+    private QName operationName = new QName("","echoVoid");
+    private QName transportName = new QName("","NullTransport");
+    private EngineRegistry engineRegistry;
+    private MessageContext mc;
+    
+    public EngineTest() {
+        super();
+    }
+    
+    public EngineTest(String arg0) {
+        super(arg0);
+    }
+    protected void setUp() throws Exception {
+        engineRegistry = Utils.createMockRegistry(serviceName,operationName,transportName);
+        mc = new MessageContext(engineRegistry);
+        mc.setCurrentTansport(transportName);
+        mc.setCurrentService(serviceName);
+        mc.setCurrentOperation(operationName);
+    }
+
+    public void testSend()throws Exception{
+        AxisEngine engine = new AxisEngine(engineRegistry);
+        engine.send(mc);
+    }
+    public void testRecive()throws Exception{
+        AxisEngine engine = new AxisEngine(engineRegistry);
+        engine.recive(mc);
+    }
+    protected void tearDown() throws Exception {
+    }
+
+}

Added: webservices/axis/trunk/java/dev/scratch/prototype1/src/test/org/apache/axis/engine/Utils.java
==============================================================================
--- (empty file)
+++ webservices/axis/trunk/java/dev/scratch/prototype1/src/test/org/apache/axis/engine/Utils.java	Thu Nov 18 03:16:05 2004
@@ -0,0 +1,115 @@
+/*
+ * Copyright 2003,2004 The Apache Software Foundation.
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.axis.engine;
+
+import javax.xml.namespace.QName;
+
+import org.apache.axis.engine.AxisFault;
+import org.apache.axis.engine.EngineUtils;
+import org.apache.axis.engine.Global;
+import org.apache.axis.engine.Operation;
+import org.apache.axis.engine.Service;
+import org.apache.axis.engine.SimpleGlobal;
+import org.apache.axis.engine.SimpleModule;
+import org.apache.axis.engine.SimpleOperation;
+import org.apache.axis.engine.SimpleService;
+import org.apache.axis.engine.SimpleTransport;
+import org.apache.axis.engine.Transport;
+import org.apache.axis.engine.context.MessageContext;
+import org.apache.axis.engine.exec.Constants;
+import org.apache.axis.engine.exec.ExecutionChain;
+import org.apache.axis.engine.exec.Phase;
+import org.apache.axis.engine.registry.ConcreateParameter;
+import org.apache.axis.engine.registry.EchoService;
+import org.apache.axis.engine.registry.EngineRegistry;
+import org.apache.axis.engine.registry.MockFlow;
+import org.apache.axis.engine.registry.Module;
+import org.apache.axis.engine.registry.Parameter;
+import org.apache.axis.engine.registry.SimpleEngineRegistry;
+import org.apache.axis.providers.SimpleJavaProvider;
+import org.apache.axis.providers.SyncProvider;
+
+/**
+ * @author Srinath Perera (hemapani@opensource.lk)
+ */
+public class Utils {
+    public static EngineRegistry createMockRegistry(QName serviceName,QName operationName,QName transportName) throws AxisFault{
+        EngineRegistry engineRegistry = null;
+        Global global = new SimpleGlobal();
+        global.setInFlow(new MockFlow("globel inflow",4));
+        global.setOutFlow(new MockFlow("globel outflow",2));
+        global.setFaultFlow(new MockFlow("globel faultflow",1));
+        engineRegistry = new SimpleEngineRegistry(global);
+        
+        Transport transport = new SimpleTransport(transportName);
+        transport.setInFlow(new MockFlow("transport inflow",4));
+        transport.setOutFlow(new MockFlow("transport outflow",2));
+        transport.setFaultFlow(new MockFlow("transport faultflow",1));
+        engineRegistry.addTransport(transport);
+        
+        Service service = new SimpleService(serviceName);
+        service.setInFlow(new MockFlow("service inflow",4));
+        service.setOutFlow(new MockFlow("service outflow",5));
+        service.setFaultFlow(new MockFlow("service faultflow",1));
+        service.setClassLoader(Thread.currentThread().getContextClassLoader());
+        
+        Parameter classParam = new ConcreateParameter("className",EchoService.class.getName());
+        service.addParameter(classParam);
+         
+        service.setProvider(new SyncProvider(new SimpleJavaProvider()));
+        
+        Module m1 = new SimpleModule(new QName("","A Mdoule 1"));
+        m1.setInFlow(new MockFlow("service module inflow",4));
+        m1.setFaultFlow(new MockFlow("service module faultflow",1));
+        service.addModule(m1);
+        
+        Operation operation = new SimpleOperation(operationName,service);
+        operation.setInFlow(new MockFlow("inflow",4));
+        
+        service.addOperation(operation);
+        engineRegistry.addService(service);
+        //create Execution Chains
+        ExecutionChain inchain = new ExecutionChain();
+        inchain.addPhase(new Phase(Constants.PHASE_TRANSPORT));
+        inchain.addPhase(new Phase(Constants.PHASE_GLOBAL));
+        inchain.addPhase(new Phase(Constants.PHASE_SERVICE));
+        EngineUtils.addHandlers(transport.getInFlow(),inchain,Constants.PHASE_TRANSPORT);
+        EngineUtils.addHandlers(global.getInFlow(),inchain,Constants.PHASE_GLOBAL);
+        EngineUtils.addHandlers(service.getInFlow(),inchain,Constants.PHASE_SERVICE);
+        service.setInputExecutionChain(inchain);
+        
+        ExecutionChain outchain = new ExecutionChain();
+        outchain.addPhase(new Phase(Constants.PHASE_SERVICE));
+        outchain.addPhase(new Phase(Constants.PHASE_GLOBAL));
+        outchain.addPhase(new Phase(Constants.PHASE_TRANSPORT));
+        EngineUtils.addHandlers(service.getInFlow(),outchain,Constants.PHASE_SERVICE);
+        EngineUtils.addHandlers(global.getInFlow(),outchain,Constants.PHASE_GLOBAL);
+        EngineUtils.addHandlers(transport.getInFlow(),outchain,Constants.PHASE_TRANSPORT);
+        service.setOutExecutionChain(outchain);
+        
+        ExecutionChain faultchain = new ExecutionChain();
+        
+        faultchain.addPhase(new Phase(Constants.PHASE_SERVICE));
+        faultchain.addPhase(new Phase(Constants.PHASE_GLOBAL));
+        faultchain.addPhase(new Phase(Constants.PHASE_TRANSPORT));
+        
+        EngineUtils.addHandlers(service.getInFlow(),faultchain,Constants.PHASE_SERVICE);
+        EngineUtils.addHandlers(global.getInFlow(),faultchain,Constants.PHASE_GLOBAL);
+        EngineUtils.addHandlers(transport.getInFlow(),faultchain,Constants.PHASE_TRANSPORT);
+        service.setFaultExecutionChain(outchain);
+        return engineRegistry;
+    }
+}

Added: webservices/axis/trunk/java/dev/scratch/prototype1/src/test/org/apache/axis/engine/registry/EchoService.java
==============================================================================
--- (empty file)
+++ webservices/axis/trunk/java/dev/scratch/prototype1/src/test/org/apache/axis/engine/registry/EchoService.java	Thu Nov 18 03:16:05 2004
@@ -0,0 +1,24 @@
+package org.apache.axis.engine.registry;
+/*
+ * Copyright 2003,2004 The Apache Software Foundation.
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+/**
+ * @author Srinath Perera(hemapani@opensource.lk)
+ */
+public class EchoService {
+    public void echoVoid(){
+        System.out.println("echo Service Called");
+    }
+}

Added: webservices/axis/trunk/java/dev/scratch/prototype1/src/test/org/apache/axis/engine/registry/MockFlow.java
==============================================================================
--- (empty file)
+++ webservices/axis/trunk/java/dev/scratch/prototype1/src/test/org/apache/axis/engine/registry/MockFlow.java	Thu Nov 18 03:16:05 2004
@@ -0,0 +1,29 @@
+/*
+ * Copyright 2001-2004 The Apache Software Foundation.
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.axis.engine.registry;
+
+
+public class MockFlow extends ConcreateFlow implements Flow{
+    public MockFlow(String message,int length){
+        super();
+        for(int i = 0;i<length;i++){
+            SpeakingHandler h1 = new SpeakingHandler("Executing "+ i +" inside "+message);
+            super.addHandler(h1);
+        }
+    }
+
+}

Added: webservices/axis/trunk/java/dev/scratch/prototype1/src/test/org/apache/axis/engine/registry/SpeakingHandler.java
==============================================================================
--- (empty file)
+++ webservices/axis/trunk/java/dev/scratch/prototype1/src/test/org/apache/axis/engine/registry/SpeakingHandler.java	Thu Nov 18 03:16:05 2004
@@ -0,0 +1,52 @@
+/*
+ * Copyright 2001-2004 The Apache Software Foundation.
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.axis.engine.registry;
+
+import javax.xml.namespace.QName;
+
+import org.apache.axis.engine.AxisFault;
+import org.apache.axis.engine.Handler;
+import org.apache.axis.engine.context.MessageContext;
+
+public class SpeakingHandler extends AbstractEngineElement implements Handler {
+    private String message;
+    private QName name;
+    
+    public SpeakingHandler(QName name){
+        this.name = name;
+    }
+    public SpeakingHandler(String message){
+        this.message = message;
+    }
+
+    public QName getName() {
+        return name;
+    }
+
+    public void invoke(MessageContext msgContext) throws AxisFault {
+        System.out.println("I am "+ message +" Handler Running :)");
+    }
+
+    public void revoke(MessageContext msgContext) {
+        System.out.println("I am "+ message +" Handler Running :)");
+    }
+
+    public void setName(QName name) {
+        this.name = name;
+    }
+
+}

Added: webservices/axis/trunk/java/dev/scratch/prototype1/src/test/org/apache/axis/engine/registry/SpeakingProvider.java
==============================================================================
--- (empty file)
+++ webservices/axis/trunk/java/dev/scratch/prototype1/src/test/org/apache/axis/engine/registry/SpeakingProvider.java	Thu Nov 18 03:16:05 2004
@@ -0,0 +1,60 @@
+/*
+ * Copyright 2001-2004 The Apache Software Foundation.
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.axis.engine.registry;
+
+import java.lang.reflect.Method;
+
+import org.apache.axis.engine.AxisFault;
+import org.apache.axis.engine.Handler;
+import org.apache.axis.engine.context.MessageContext;
+import org.apache.axis.providers.AbstractProvider;
+
+public class SpeakingProvider extends AbstractProvider implements Handler {
+    private String message;
+    public SpeakingProvider(){}
+
+
+    public void invoke(MessageContext msgContext) throws AxisFault {
+        System.out.println("I am Speaking Provider Running :)");
+    }
+
+    public void revoke(MessageContext msgContext) {
+        System.out.println("I am Speaking Provider revoking :)");
+    }
+    /* (non-Javadoc)
+     * @see org.apache.axis.engine.AbstractProvider#deserializeParameters(org.apache.axis.engine.MessageContext, java.lang.reflect.Method)
+     */
+    public Object[] deserializeParameters(
+        MessageContext msgContext,
+        Method method)
+        throws AxisFault {
+        return null;
+    }
+
+    public Object getTheImplementationObject(MessageContext msgContext)
+        throws AxisFault {
+        return null;
+    }
+
+    protected Object makeNewServiceObject(
+        MessageContext msgContext)
+        throws AxisFault {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+}

Added: webservices/axis/trunk/java/dev/scratch/prototype1/src/test/org/apache/axis/om/OMTest.java
==============================================================================
--- (empty file)
+++ webservices/axis/trunk/java/dev/scratch/prototype1/src/test/org/apache/axis/om/OMTest.java	Thu Nov 18 03:16:05 2004
@@ -0,0 +1,95 @@
+/*
+ * Copyright 2003,2004 The Apache Software Foundation.
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.axis.om;
+
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.InputStreamReader;
+import java.util.Iterator;
+
+
+import org.apache.axis.om.impl.OMXMLPullParserWrapper;
+import org.apache.axis.om.impl.SOAPMessageImpl;
+import org.apache.axis.om.soap.SOAPMessage;
+import org.xmlpull.v1.XmlPullParser;
+import org.xmlpull.v1.XmlPullParserFactory;
+
+import junit.framework.TestCase;
+
+/**
+ * @author Srinath Perera (hemapani@opensource.lk)
+ */
+public class OMTest extends TestCase{
+    SOAPMessage omdoc;
+    protected void setUp() throws Exception {
+        File file = new File("src/samples/soap/sample1.xml");
+        FileInputStream in = new FileInputStream(file);
+        
+        XmlPullParserFactory pf = XmlPullParserFactory.newInstance();
+        pf.setNamespaceAware(true);
+        XmlPullParser  parser = pf.newPullParser();
+        parser.setInput(new InputStreamReader(in));
+        
+        OMXMLParserWrapper parserWrapper = new OMXMLPullParserWrapper(parser); 
+        omdoc = parserWrapper.getSOAPMessage();
+    }
+
+    
+    /**
+     * Sometime the hasNext() in the childeren iterator is true yet the next() is null
+     */
+
+//    public void testNullInChilderen(){
+//        isNullChildrenAreThere(omdoc.getDocumentElement());
+//    }
+    
+    /**
+     * the document is completly namesapce qulified so all the OMElements got to have namespace values not null
+     *
+     */
+    public void test4MissingNamespaces(){
+        isNameSpacesMissing(omdoc.getEnvelope());
+    }
+    
+    public void isNullChildrenAreThere(OMElement omeleent){
+        Iterator it = omeleent.getChildren();
+        while(it.hasNext()){
+            OMNode node = (OMNode)it.next();
+            assertNotNull(node);
+            if(node.getType() == OMNode.ELEMENT_NODE){
+                isNullChildrenAreThere((OMElement)node);
+            }
+        }
+    }
+
+    public void isNameSpacesMissing(OMElement omeleent){
+        OMNamespace omns = omeleent.getNamespace();
+        assertNotNull(omns);
+        assertNotNull(omns.getValue());
+        Iterator it = omeleent.getChildren();
+        while(it.hasNext()){
+            OMNode node = (OMNode)it.next();
+            
+            if(node != null && node.getType() == OMNode.ELEMENT_NODE){
+                isNameSpacesMissing((OMElement)node);
+            }
+        }
+    }
+    protected void tearDown() throws Exception {
+        // TODO Auto-generated method stub
+        super.tearDown();
+    }
+}

Added: webservices/axis/trunk/java/dev/scratch/prototype1/src/test/org/apache/axis/om/OMTestCase.java
==============================================================================
--- (empty file)
+++ webservices/axis/trunk/java/dev/scratch/prototype1/src/test/org/apache/axis/om/OMTestCase.java	Thu Nov 18 03:16:05 2004
@@ -0,0 +1,55 @@
+package org.apache.axis.om;
+
+import junit.framework.TestCase;
+import org.apache.axis.om.impl.OMXMLPullParserWrapper;
+import org.apache.axis.om.soap.SOAPEnvelope;
+import org.apache.axis.om.soap.SOAPMessage;
+import org.xmlpull.v1.XmlPullParser;
+import org.xmlpull.v1.XmlPullParserFactory;
+
+import java.io.FileReader;
+
+/**
+ * Copyright 2001-2004 The Apache Software Foundation.
+ * <p/>
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * <p/>
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * <p/>
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * <p/>
+ * User: Eran Chinthaka - Lanka Software Foundation
+ * Date: Nov 2, 2004
+ * Time: 2:15:28 PM
+ */
+public class OMTestCase extends TestCase  {
+
+    protected static final String IN_FILE_NAME = "src/test-resources/soapmessage.xml";
+    protected OMXMLPullParserWrapper omXmlPullParserWrapper;
+
+    protected SOAPMessage soapMessage;
+    protected SOAPEnvelope soapEnvelope;
+
+
+    protected void setUp() throws Exception {
+        super.setUp();
+        soapMessage = getOMBuilder().getSOAPMessage();
+        soapEnvelope = soapMessage.getEnvelope();
+    }
+
+    protected OMXMLPullParserWrapper getOMBuilder() throws Exception {
+        XmlPullParser parser = XmlPullParserFactory.newInstance().newPullParser();
+        parser.setFeature(XmlPullParser.FEATURE_PROCESS_NAMESPACES, true);
+        parser.setInput(new FileReader(IN_FILE_NAME));
+        omXmlPullParserWrapper = new OMXMLPullParserWrapper(parser);
+        return omXmlPullParserWrapper;
+    }
+
+
+}

Added: webservices/axis/trunk/java/dev/scratch/prototype1/src/test/org/apache/axis/om/soap/SOAPBodyTest.java
==============================================================================
--- (empty file)
+++ webservices/axis/trunk/java/dev/scratch/prototype1/src/test/org/apache/axis/om/soap/SOAPBodyTest.java	Thu Nov 18 03:16:05 2004
@@ -0,0 +1,76 @@
+/**
+* Copyright 2001-2004 The Apache Software Foundation.
+* <p/>
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* <p/>
+* http://www.apache.org/licenses/LICENSE-2.0
+* <p/>
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+* <p/>
+* Author: Eran Chinthaka - Lanka Software Foundation
+* Date: Nov 2, 2004
+* Time: 2:36:54 PM
+*/
+package org.apache.axis.om.soap;
+
+import org.apache.axis.om.impl.OMNamespaceImpl;
+import org.apache.axis.om.soap.SOAPBody;
+import org.apache.axis.om.soap.SOAPBodyElement;
+import org.apache.axis.om.OMTestCase;
+
+
+public class SOAPBodyTest extends OMTestCase {
+
+    SOAPBody soapBody;
+
+    public static void main(String[] args) {
+    }
+
+    /*
+     * @see TestCase#setUp()
+     */
+    protected void setUp() throws Exception {
+        super.setUp();
+        soapBody = soapEnvelope.getBody();
+    }
+
+    /*
+     * Class under test for SOAPFault addFault()
+     */
+    public void testAddFault() {
+        //TODO Implement addFault().
+    }
+
+    public void testHasFault() {
+        //TODO Implement hasFault().
+    }
+
+    public void testGetFault() {
+        //TODO Implement getFault().
+    }
+
+    public void testAddBodyElement() {
+         String newElementName = "MyBodyElement";
+        SOAPBodyElement soapBodyElement = soapBody.addBodyElement(newElementName, new OMNamespaceImpl("http://opensource.lk", "lsf"));
+        assertTrue("Body Element added has different parent than it should have", soapBodyElement.getParent() == soapBody);
+        assertTrue("Body Element added has different localname than it was given", soapBodyElement.getLocalName().equalsIgnoreCase(newElementName));
+    }
+
+    /*
+     * Class under test for void addFault(SOAPFault)
+     */
+    public void testAddFaultSOAPFault() {
+        //TODO Implement addFault().
+    }
+
+    public void testAddDocument() {
+        //TODO Implement addDocument().
+    }
+
+}

Added: webservices/axis/trunk/java/dev/scratch/prototype1/src/test/org/apache/axis/om/soap/SOAPEnvelopeTest.java
==============================================================================
--- (empty file)
+++ webservices/axis/trunk/java/dev/scratch/prototype1/src/test/org/apache/axis/om/soap/SOAPEnvelopeTest.java	Thu Nov 18 03:16:05 2004
@@ -0,0 +1,44 @@
+/**
+* Copyright 2001-2004 The Apache Software Foundation.
+* <p/>
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* <p/>
+* http://www.apache.org/licenses/LICENSE-2.0
+* <p/>
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+* <p/>
+* Author: Eran Chinthaka - Lanka Software Foundation
+* Date: Nov 2, 2004
+* Time: 2:39:39 PM
+*/
+package org.apache.axis.om.soap;
+
+import org.apache.axis.om.OMTestCase;
+
+
+public class SOAPEnvelopeTest extends OMTestCase {
+    protected void setUp() throws Exception {
+        super.setUp();
+    }
+
+
+    public void testGetHeader() {
+        SOAPHeader header = soapEnvelope.getHeader();
+        assertTrue("Header information retrieved not correct", ( header != null && header.getLocalName().equalsIgnoreCase("Header")) );
+    }
+
+    public void testGetBody() {
+        SOAPBody body = soapEnvelope.getBody();
+        assertTrue("Header information retrieved not correct", ( body != null && body.getLocalName().equalsIgnoreCase("Body")) );
+
+    }
+
+
+
+}

Added: webservices/axis/trunk/java/dev/scratch/prototype1/src/test/org/apache/axis/om/soap/SOAPHeaderElementTest.java
==============================================================================
--- (empty file)
+++ webservices/axis/trunk/java/dev/scratch/prototype1/src/test/org/apache/axis/om/soap/SOAPHeaderElementTest.java	Thu Nov 18 03:16:05 2004
@@ -0,0 +1,64 @@
+/**
+* Copyright 2001-2004 The Apache Software Foundation.
+* <p/>
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* <p/>
+* http://www.apache.org/licenses/LICENSE-2.0
+* <p/>
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+* <p/>
+* Author: Eran Chinthaka - Lanka Software Foundation
+* Date: Nov 2, 2004
+* Time: 2:40:21 PM
+*/
+package org.apache.axis.om.soap;
+
+import org.apache.axis.om.soap.SOAPHeader;
+import org.apache.axis.om.soap.SOAPHeaderElement;
+import org.apache.axis.om.OMTestCase;
+
+import java.util.Iterator;
+
+
+public class SOAPHeaderElementTest extends OMTestCase {
+
+    SOAPHeader soapHeader;
+    SOAPHeaderElement soapHeaderElement;
+
+
+    protected void setUp() throws Exception {
+        super.setUp();
+        soapHeader = soapEnvelope.getHeader();
+        Iterator headerElementIter = soapHeader.examineAllHeaderElements();
+        if (headerElementIter.hasNext()) {
+            soapHeaderElement = (SOAPHeaderElement) headerElementIter.next();
+       }
+    }
+
+    public static void main(String[] args) {
+    }
+
+    public void testSetAndGetActor() {
+        String newActorURI = "http://newActor.org";
+        soapHeaderElement.setActor(newActorURI);
+        assertTrue("Actor was not properly set", soapHeaderElement.getActor().equalsIgnoreCase(newActorURI));
+    }
+
+
+    public void testSetAndGetMustUnderstand() {
+
+        soapHeaderElement.setMustUnderstand(false);
+        assertTrue("MustUnderstand was not properly set", !soapHeaderElement.getMustUnderstand());
+    }
+
+    public void testGetMustUnderstand() {
+        //TODO Implement getMustUnderstand().
+    }
+
+}

Added: webservices/axis/trunk/java/dev/scratch/prototype1/src/test/org/apache/axis/om/soap/SOAPHeaderTest.java
==============================================================================
--- (empty file)
+++ webservices/axis/trunk/java/dev/scratch/prototype1/src/test/org/apache/axis/om/soap/SOAPHeaderTest.java	Thu Nov 18 03:16:05 2004
@@ -0,0 +1,77 @@
+/**
+* Copyright 2001-2004 The Apache Software Foundation.
+* <p/>
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* <p/>
+* http://www.apache.org/licenses/LICENSE-2.0
+* <p/>
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+* <p/>
+* Author: Eran Chinthaka - Lanka Software Foundation
+* Date: Nov 2, 2004
+* Time: 2:39:57 PM
+*/
+package org.apache.axis.om.soap;
+
+import org.apache.axis.om.impl.OMNamespaceImpl;
+import org.apache.axis.om.soap.SOAPHeader;
+import org.apache.axis.om.soap.SOAPHeaderElement;
+import org.apache.axis.om.OMTestCase;
+
+import java.util.Iterator;
+
+
+public class SOAPHeaderTest extends OMTestCase {
+
+    SOAPHeader soapHeader;
+    public static void main(String[] args) {
+    }
+
+    /*
+     * @see TestCase#setUp()
+     */
+    protected void setUp() throws Exception {
+        super.setUp();
+        soapHeader = soapEnvelope.getHeader();
+    }
+
+    public void testAddHeaderElement() {
+        String newElementName = "MyHeaderElement";
+        SOAPHeaderElement soapHeaderElement = soapHeader.addHeaderElement(newElementName, new OMNamespaceImpl("http://opensource.lk", "lsf"));
+        assertTrue("Header Element added has different parent than it should have", soapHeaderElement.getParent() == soapHeader);
+        assertTrue("Header Element added has different localname than it was given", soapHeaderElement.getLocalName().equalsIgnoreCase(newElementName));
+    }
+
+    public void testExamineHeaderElements() {
+    }
+
+    public void testExtractHeaderElements() {
+        //TODO Implement extractHeaderElements().
+    }
+
+    public void testExamineMustUnderstandHeaderElements() {
+        //TODO Implement examineMustUnderstandHeaderElements().
+    }
+
+    public void testExamineAllHeaderElements() {
+        Iterator iterator = soapHeader.examineAllHeaderElements();
+        int headerElementCount = 0;
+        while (iterator.hasNext()) {
+            iterator.next();
+            headerElementCount++;
+        }
+
+        assertTrue("Number of header elements in the header differs from expected value of 3", headerElementCount == 3);
+    }
+
+    public void testExtractAllHeaderElements() {
+        //TODO Implement extractAllHeaderElements().
+    }
+
+}