axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chinth...@apache.org
Subject svn commit: r153902 [8/8] - in webservices/axis/trunk/java/dev/scratch/prototype2/src: java/org/apache/axis/addressing/ java/org/apache/axis/addressing/miheaders/ java/org/apache/axis/addressing/om/ java/org/apache/axis/clientapi/ java/org/apache/axis/context/ java/org/apache/axis/deployment/ java/org/apache/axis/deployment/listener/ java/org/apache/axis/deployment/repository/utill/ java/org/apache/axis/description/ java/org/apache/axis/engine/ java/org/apache/axis/handlers/ java/org/apache/axis/om/ java/org/apache/axis/om/impl/llom/ java/org/apache/axis/om/impl/llom/builder/ java/org/apache/axis/om/impl/llom/factory/ java/org/apache/axis/om/impl/llom/serialize/ java/org/apache/axis/om/impl/llom/traverse/ java/org/apache/axis/phaseresolver/ java/org/apache/axis/providers/ java/org/apache/axis/receivers/ java/org/apache/axis/transport/ java/org/apache/axis/transport/http/ java/org/apache/axis/wsdl/wsdltowom/ java/org/apache/wsdl/ java/org/apache/wsdl/impl/ java/org/apache/wsdl/util/ test/org/apache/axis/ test/org/apache/axis/addressing/ test/org/apache/axis/addressing/miheaders/ test/org/apache/axis/clientapi/ test/org/apache/axis/deployment/ test/org/apache/axis/description/ test/org/apache/axis/encoding/ test/org/apache/axis/engine/ test/org/apache/axis/integration/ test/org/apache/axis/misc/ test/org/apache/axis/om/ test/org/apache/axis/om/builder/ test/org/apache/axis/om/builder/dummy/ test/org/apache/axis/om/factory/ test/org/apache/axis/om/impl/builder/ test/org/apache/axis/om/impl/seriliazer/ test/org/apache/axis/om/impl/streamwrapper/ test/org/apache/axis/om/impl/traverse/ test/org/apache/axis/testUtils/ test/org/apache/axis/transport/ test/org/apache/wsdl/
Date Tue, 15 Feb 2005 06:23:27 GMT
Modified: webservices/axis/trunk/java/dev/scratch/prototype2/src/test/org/apache/axis/om/OMTest.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/dev/scratch/prototype2/src/test/org/apache/axis/om/OMTest.java?view=diff&r1=153901&r2=153902
==============================================================================
--- webservices/axis/trunk/java/dev/scratch/prototype2/src/test/org/apache/axis/om/OMTest.java (original)
+++ webservices/axis/trunk/java/dev/scratch/prototype2/src/test/org/apache/axis/om/OMTest.java Mon Feb 14 22:22:34 2005
@@ -15,22 +15,22 @@
  */
 package org.apache.axis.om;
 
-import java.io.File;
-import java.io.FileReader;
-import java.util.Iterator;
+import org.apache.axis.AbstractTestCase;
+import org.apache.axis.om.impl.llom.builder.StAXSOAPModelBuilder;
 
 import javax.xml.stream.XMLInputFactory;
 import javax.xml.stream.XMLStreamReader;
-
-import org.apache.axis.AbstractTestCase;
-import org.apache.axis.om.impl.llom.builder.StAXSOAPModelBuilder;
+import java.io.File;
+import java.io.FileReader;
+import java.util.Iterator;
 
 /**
  * This test case tests the basic expectations of the engine from the OM.
  */
-public class OMTest extends AbstractTestCase{
+public class OMTest extends AbstractTestCase {
     private SOAPEnvelope envelope;
     private OMFactory fac;
+
     /**
      * Constructor.
      */
@@ -42,63 +42,63 @@
         File file = getTestResourceFile("soap/sample1.xml");
         XMLStreamReader parser = XMLInputFactory.newInstance().createXMLStreamReader(new FileReader(file));
         fac = OMFactory.newInstance();
-        OMXMLParserWrapper builder = new StAXSOAPModelBuilder(fac,parser);
+        OMXMLParserWrapper builder = new StAXSOAPModelBuilder(fac, parser);
         envelope = (SOAPEnvelope) builder.getDocumentElement();
     }
 
-    
+
     /**
      * Sometime the hasNext() in the childeren iterator is true yet the next() is null
      */
 
-    public void testNullInChilderen(){
+    public void testNullInChilderen() {
         isNullChildrenThere(envelope);
     }
-    
+
     /**
      * the envelope is completly namesapce qulified so all the OMElements got to have namespace values not null
-     *
      */
-    public void test4MissingNamespaces(){
+    public void test4MissingNamespaces() {
         isNameSpacesMissing(envelope);
     }
-    
-    public void isNullChildrenThere(OMElement omeleent){
+
+    public void isNullChildrenThere(OMElement omeleent) {
         Iterator it = omeleent.getChildren();
-        while(it.hasNext()){
-            OMNode node = (OMNode)it.next();
+        while (it.hasNext()) {
+            OMNode node = (OMNode) it.next();
             assertNotNull(node);
-            if(node.getType() == OMNode.ELEMENT_NODE){
-                isNullChildrenThere((OMElement)node);
+            if (node.getType() == OMNode.ELEMENT_NODE) {
+                isNullChildrenThere((OMElement) node);
             }
         }
     }
 
-    public void isNameSpacesMissing(OMElement omeleent){
+    public void isNameSpacesMissing(OMElement omeleent) {
         OMNamespace omns = omeleent.getNamespace();
         assertNotNull(omns);
         assertNotNull(omns.getName());
         Iterator it = omeleent.getChildren();
-        while(it.hasNext()){
-            OMNode node = (OMNode)it.next();
-            
-            if(node != null && node.getType() == OMNode.ELEMENT_NODE){
-                isNameSpacesMissing((OMElement)node);
+        while (it.hasNext()) {
+            OMNode node = (OMNode) it.next();
+
+            if (node != null && node.getType() == OMNode.ELEMENT_NODE) {
+                isNameSpacesMissing((OMElement) node);
             }
         }
     }
 
-     public void testRootNotCompleteInPartialBuild() throws Exception {
-         assertFalse("Root should not be complete",envelope.isComplete());
+    public void testRootNotCompleteInPartialBuild() throws Exception {
+        assertFalse("Root should not be complete", envelope.isComplete());
     }
 
     /**
      * Assumption - The fed XML has at least two children under the root element
+     *
      * @throws Exception
      */
     public void testFirstChildDetach() throws Exception {
-        OMElement root= envelope;
-        assertFalse("Root should not be complete",root.isComplete());
+        OMElement root = envelope;
+        assertFalse("Root should not be complete", root.isComplete());
         OMNode oldFirstChild = root.getFirstChild();
         assertNotNull(oldFirstChild);
         oldFirstChild.detach();
@@ -106,7 +106,7 @@
         OMNode newFirstChild = root.getFirstChild();
         assertNotNull(newFirstChild);
 
-        assertNotSame(oldFirstChild,newFirstChild);
+        assertNotSame(oldFirstChild, newFirstChild);
     }
 
     //todo this is wrong correct this

Modified: webservices/axis/trunk/java/dev/scratch/prototype2/src/test/org/apache/axis/om/OMTestCase.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/dev/scratch/prototype2/src/test/org/apache/axis/om/OMTestCase.java?view=diff&r1=153901&r2=153902
==============================================================================
--- webservices/axis/trunk/java/dev/scratch/prototype2/src/test/org/apache/axis/om/OMTestCase.java (original)
+++ webservices/axis/trunk/java/dev/scratch/prototype2/src/test/org/apache/axis/om/OMTestCase.java Mon Feb 14 22:22:34 2005
@@ -1,18 +1,13 @@
 package org.apache.axis.om;
 
+import org.apache.axis.AbstractTestCase;
+import org.apache.axis.om.impl.llom.builder.StAXSOAPModelBuilder;
+
+import javax.xml.stream.*;
 import java.io.FileReader;
 import java.io.InputStream;
 import java.io.OutputStream;
 
-import javax.xml.stream.XMLInputFactory;
-import javax.xml.stream.XMLOutputFactory;
-import javax.xml.stream.XMLStreamException;
-import javax.xml.stream.XMLStreamReader;
-import javax.xml.stream.XMLStreamWriter;
-
-import org.apache.axis.AbstractTestCase;
-import org.apache.axis.om.impl.llom.builder.StAXSOAPModelBuilder;
-
 
 /**
  * Copyright 2001-2004 The Apache Software Foundation.
@@ -36,7 +31,7 @@
 public abstract class OMTestCase extends AbstractTestCase {
 
     protected static final String IN_FILE_NAME = "soap/soapmessage.xml";
-    protected  StAXSOAPModelBuilder builder;
+    protected StAXSOAPModelBuilder builder;
     protected OMFactory ombuilderFactory;
 
     protected SOAPEnvelope soapEnvelope;
@@ -49,22 +44,22 @@
 
     protected void setUp() throws Exception {
         super.setUp();
-        soapEnvelope = (SOAPEnvelope)getOMBuilder("").getDocumentElement();
+        soapEnvelope = (SOAPEnvelope) getOMBuilder("").getDocumentElement();
     }
 
     protected StAXSOAPModelBuilder getOMBuilder(String fileName) throws Exception {
-        if(fileName == "" || fileName == null){
+        if (fileName == "" || fileName == null) {
             fileName = IN_FILE_NAME;
         }
         XMLStreamReader parser = XMLInputFactory.newInstance().createXMLStreamReader(new FileReader(getTestResourceFile(fileName)));
-        builder = new StAXSOAPModelBuilder(OMFactory.newInstance(),parser);
+        builder = new StAXSOAPModelBuilder(OMFactory.newInstance(), parser);
         return builder;
     }
 
     protected StAXSOAPModelBuilder getOMBuilder(InputStream in) throws Exception {
 
         XMLStreamReader parser = XMLInputFactory.newInstance().createXMLStreamReader(in);
-        builder = new StAXSOAPModelBuilder(OMFactory.newInstance(),parser);
+        builder = new StAXSOAPModelBuilder(OMFactory.newInstance(), parser);
         return builder;
     }
 

Modified: webservices/axis/trunk/java/dev/scratch/prototype2/src/test/org/apache/axis/om/OMTestUtils.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/dev/scratch/prototype2/src/test/org/apache/axis/om/OMTestUtils.java?view=diff&r1=153901&r2=153902
==============================================================================
--- webservices/axis/trunk/java/dev/scratch/prototype2/src/test/org/apache/axis/om/OMTestUtils.java (original)
+++ webservices/axis/trunk/java/dev/scratch/prototype2/src/test/org/apache/axis/om/OMTestUtils.java Mon Feb 14 22:22:34 2005
@@ -16,104 +16,98 @@
 
 package org.apache.axis.om;
 
-import java.io.File;
-import java.io.FileReader;
-import java.util.Iterator;
-
-import javax.xml.stream.XMLInputFactory;
-import javax.xml.stream.XMLStreamReader;
-
 import junit.framework.TestCase;
-
 import org.apache.axis.engine.AxisFault;
 import org.apache.axis.om.impl.llom.factory.OMXMLBuilderFactory;
-import org.w3c.dom.Attr;
-import org.w3c.dom.Element;
-import org.w3c.dom.NamedNodeMap;
-import org.w3c.dom.Node;
-import org.w3c.dom.NodeList;
+import org.w3c.dom.*;
+
+import javax.xml.stream.XMLInputFactory;
+import javax.xml.stream.XMLStreamReader;
+import java.io.File;
+import java.io.FileReader;
+import java.util.Iterator;
 
 public class OMTestUtils {
 
     public static OMXMLParserWrapper getOMBuilder(File file) throws Exception {
         XMLStreamReader parser = XMLInputFactory.newInstance().createXMLStreamReader(new FileReader(file));
-        OMXMLParserWrapper builder =   OMXMLBuilderFactory.createStAXSOAPModelBuilder(OMFactory.newInstance(),parser);
+        OMXMLParserWrapper builder = OMXMLBuilderFactory.createStAXSOAPModelBuilder(OMFactory.newInstance(), parser);
         return builder;
     }
 
-    public static void walkThrough(OMElement omEle){
+    public static void walkThrough(OMElement omEle) {
         Iterator attibIt = omEle.getAttributes();
-        if(attibIt!= null){
-			while(attibIt.hasNext()){
-				TestCase.assertNotNull("once the has next is not null, the " +
-						"element should not be null",attibIt.next());
-			}
+        if (attibIt != null) {
+            while (attibIt.hasNext()) {
+                TestCase.assertNotNull("once the has next is not null, the " +
+                        "element should not be null", attibIt.next());
+            }
         }
         Iterator it = omEle.getChildren();
-        if(it != null){
-			while(it.hasNext()){
-				OMNode ele = (OMNode)it.next();
-				TestCase.assertNotNull("once the has next is not null, the " +
-						"element should not be null",ele);
-
-				if(ele instanceof OMElement){
-					walkThrough((OMElement)ele);
-				}    
-			}
+        if (it != null) {
+            while (it.hasNext()) {
+                OMNode ele = (OMNode) it.next();
+                TestCase.assertNotNull("once the has next is not null, the " +
+                        "element should not be null", ele);
+
+                if (ele instanceof OMElement) {
+                    walkThrough((OMElement) ele);
+                }
+            }
         }
     }
 
-    public static void compare(Element ele,OMElement omele) throws Exception{
-        if(ele == null && omele == null){
+    public static void compare(Element ele, OMElement omele) throws Exception {
+        if (ele == null && omele == null) {
             return;
-        }else if(ele != null && omele != null){
+        } else if (ele != null && omele != null) {
 
             TestCase.assertTrue(ele.getLocalName().equals(omele.getLocalName()));
             TestCase.assertTrue(ele.getNamespaceURI().equals(omele.getNamespace().getName()));
 
             //go through the attributes
-            NamedNodeMap map =  ele.getAttributes();
+            NamedNodeMap map = ele.getAttributes();
             Iterator attIterator = omele.getAttributes();
             OMAttribute omattribute;
             Attr domAttribute;
             String DOMAttrName;
-            
+
             while (attIterator != null && attIterator.hasNext() && map == null) {
-                omattribute = (OMAttribute)attIterator.next(); 
-                
-                Node node = map.getNamedItemNS(omattribute.getNamespace().getName(),omattribute.getLocalName());
-                if(node.getNodeType() == Node.ATTRIBUTE_NODE){
-                    Attr attr = (Attr)node;
-                    TestCase.assertEquals(attr.getValue(),omattribute.getValue());
-                }else{
+                omattribute = (OMAttribute) attIterator.next();
+
+                Node node = map.getNamedItemNS(omattribute.getNamespace().getName(), omattribute.getLocalName());
+                if (node.getNodeType() == Node.ATTRIBUTE_NODE) {
+                    Attr attr = (Attr) node;
+                    TestCase.assertEquals(attr.getValue(), omattribute.getValue());
+                } else {
                     throw new AxisFault("return type is not a Attribute");
                 }
-                
+
             }
 
             Iterator it = omele.getChildren();
             NodeList list = ele.getChildNodes();
-            for(int i = 0;i<list.getLength();i++){
+            for (int i = 0; i < list.getLength(); i++) {
                 Node node = list.item(i);
-                if(node.getNodeType() == Node.ELEMENT_NODE){
+                if (node.getNodeType() == Node.ELEMENT_NODE) {
                     TestCase.assertTrue(it.hasNext());
-                    OMNode tempOmNode = (OMNode)it.next();
-                    while(tempOmNode.getType() != OMNode.ELEMENT_NODE){
+                    OMNode tempOmNode = (OMNode) it.next();
+                    while (tempOmNode.getType() != OMNode.ELEMENT_NODE) {
                         TestCase.assertTrue(it.hasNext());
-                        tempOmNode = (OMNode)it.next();
+                        tempOmNode = (OMNode) it.next();
                     }
-                    compare((Element)node,(OMElement)tempOmNode);
+                    compare((Element) node, (OMElement) tempOmNode);
                 }
             }
 
 
-        }else{
+        } else {
             throw new Exception("One is null");
         }
     }
 
-    public static SOAPEnvelope createOM(File file) throws Exception{
-        return (SOAPEnvelope)getOMBuilder(file).getDocumentElement();
+    public static SOAPEnvelope createOM(File file) throws Exception {
+        return (SOAPEnvelope) getOMBuilder(file).getDocumentElement();
     }
 
 }

Modified: webservices/axis/trunk/java/dev/scratch/prototype2/src/test/org/apache/axis/om/SOAPFaultTest.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/dev/scratch/prototype2/src/test/org/apache/axis/om/SOAPFaultTest.java?view=diff&r1=153901&r2=153902
==============================================================================
--- webservices/axis/trunk/java/dev/scratch/prototype2/src/test/org/apache/axis/om/SOAPFaultTest.java (original)
+++ webservices/axis/trunk/java/dev/scratch/prototype2/src/test/org/apache/axis/om/SOAPFaultTest.java Mon Feb 14 22:22:34 2005
@@ -1,12 +1,12 @@
 package org.apache.axis.om;
 
+import org.apache.axis.AbstractTestCase;
+
 import javax.xml.namespace.QName;
 import javax.xml.stream.XMLOutputFactory;
 import javax.xml.stream.XMLStreamException;
 import javax.xml.stream.XMLStreamWriter;
 
-import org.apache.axis.AbstractTestCase;
-
 /**
  * Copyright 2001-2004 The Apache Software Foundation.
  * <p/>
@@ -23,7 +23,7 @@
  * limitations under the License.
  * <p/>
  */
-public class SOAPFaultTest extends AbstractTestCase{
+public class SOAPFaultTest extends AbstractTestCase {
     private SOAPEnvelope soapEnvelope;
     private XMLStreamWriter writer;
 
@@ -37,26 +37,24 @@
     protected void setUp() throws Exception {
         super.setUp();
         writer = XMLOutputFactory.newInstance().
-                            createXMLStreamWriter(System.out);
+                createXMLStreamWriter(System.out);
     }
 
-    public void testSOAPFault() throws Exception{
-            soapEnvelope = (SOAPEnvelope) OMTestUtils.getOMBuilder(getTestResourceFile("soap/minimalMessage.xml")).getDocumentElement();
-            SOAPBody soapBody = soapEnvelope.getBody();
-
-            SOAPFault soapFault = OMFactory.newInstance().createSOAPFault(soapBody, new Exception("Something has gone wrong som where !!"));
-            soapBody.addFault(soapFault);
-
-            soapFault.setFaultCode(new QName("http://opensource.lk", "Axis", "SOAP-ENV"));
-            assertEquals("faultcode returned is incorrect", soapFault.getFaultCode().getLocalPart(), "Axis");
-            assertEquals("faultcode returned is incorrect", soapFault.getFaultCode().getPrefix(), "SOAP-ENV");
+    public void testSOAPFault() throws Exception {
+        soapEnvelope = (SOAPEnvelope) OMTestUtils.getOMBuilder(getTestResourceFile("soap/minimalMessage.xml")).getDocumentElement();
+        SOAPBody soapBody = soapEnvelope.getBody();
+
+        SOAPFault soapFault = OMFactory.newInstance().createSOAPFault(soapBody, new Exception("Something has gone wrong som where !!"));
+        soapBody.addFault(soapFault);
+
+        soapFault.setFaultCode(new QName("http://opensource.lk", "Axis", "SOAP-ENV"));
+        assertEquals("faultcode returned is incorrect", soapFault.getFaultCode().getLocalPart(), "Axis");
+        assertEquals("faultcode returned is incorrect", soapFault.getFaultCode().getPrefix(), "SOAP-ENV");
 
-            soapFault.setFaultActor("Neo");
-            assertEquals("faultactor returned is incorrect", soapFault.getFaultActor(), "Neo");
+        soapFault.setFaultActor("Neo");
+        assertEquals("faultactor returned is incorrect", soapFault.getFaultActor(), "Neo");
 
-            
 
- 
     }
 
     private void print() throws XMLStreamException {

Modified: webservices/axis/trunk/java/dev/scratch/prototype2/src/test/org/apache/axis/om/builder/ObjectToOMBuilderTest.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/dev/scratch/prototype2/src/test/org/apache/axis/om/builder/ObjectToOMBuilderTest.java?view=diff&r1=153901&r2=153902
==============================================================================
--- webservices/axis/trunk/java/dev/scratch/prototype2/src/test/org/apache/axis/om/builder/ObjectToOMBuilderTest.java (original)
+++ webservices/axis/trunk/java/dev/scratch/prototype2/src/test/org/apache/axis/om/builder/ObjectToOMBuilderTest.java Mon Feb 14 22:22:34 2005
@@ -1,23 +1,17 @@
 package org.apache.axis.om.builder;
 
-import java.io.File;
-import java.io.FileOutputStream;
-import java.util.Iterator;
-
-import javax.xml.stream.XMLOutputFactory;
-import javax.xml.stream.XMLStreamWriter;
-
 import junit.framework.TestCase;
-
-import org.apache.axis.om.OMConstants;
-import org.apache.axis.om.OMElement;
-import org.apache.axis.om.OMFactory;
-import org.apache.axis.om.OMNamespace;
-import org.apache.axis.om.OMNode;
+import org.apache.axis.om.*;
 import org.apache.axis.om.builder.dummy.DummyOutObject;
 import org.apache.axis.testUtils.Encoder;
 import org.apache.axis.testUtils.ObjectToOMBuilder;
 
+import javax.xml.stream.XMLOutputFactory;
+import javax.xml.stream.XMLStreamWriter;
+import java.io.File;
+import java.io.FileOutputStream;
+import java.util.Iterator;
+
 /**
  * Copyright 2001-2004 The Apache Software Foundation.
  * <p/>
@@ -52,8 +46,8 @@
         OMFactory omFactory = OMFactory.newInstance();
         OMNamespace ns = omFactory.createOMNamespace(OMConstants.SOAP_ENVELOPE_NAMESPACE_URI, OMConstants.SOAPENVELOPE_NAMESPACE_PREFIX);
         element = omFactory.createOMElement("Body", ns);
-        new ObjectToOMBuilder(element,outObject);
-        tempFile = File.createTempFile("temp","xml");
+        new ObjectToOMBuilder(element, outObject);
+        tempFile = File.createTempFile("temp", "xml");
         writer = XMLOutputFactory.newInstance().createXMLStreamWriter(new FileOutputStream(tempFile));
 
     }
@@ -69,7 +63,6 @@
     public void testSerialization() throws Exception {
         element.serialize(writer, true);
     }
-
 
 
     protected void tearDown() throws Exception {

Modified: webservices/axis/trunk/java/dev/scratch/prototype2/src/test/org/apache/axis/om/builder/dummy/DummyOutObject.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/dev/scratch/prototype2/src/test/org/apache/axis/om/builder/dummy/DummyOutObject.java?view=diff&r1=153901&r2=153902
==============================================================================
--- webservices/axis/trunk/java/dev/scratch/prototype2/src/test/org/apache/axis/om/builder/dummy/DummyOutObject.java (original)
+++ webservices/axis/trunk/java/dev/scratch/prototype2/src/test/org/apache/axis/om/builder/dummy/DummyOutObject.java Mon Feb 14 22:22:34 2005
@@ -1,21 +1,18 @@
 package org.apache.axis.om.builder.dummy;
 
-import java.io.FileReader;
-import java.io.IOException;
-
-import javax.xml.parsers.ParserConfigurationException;
-import javax.xml.parsers.SAXParserFactory;
-import javax.xml.stream.XMLStreamReader;
-
 import org.apache.axis.engine.AxisFault;
 import org.apache.axis.om.OMException;
 import org.apache.axis.testUtils.Encoder;
-
 import org.xml.sax.ContentHandler;
 import org.xml.sax.InputSource;
 import org.xml.sax.SAXException;
 import org.xml.sax.XMLReader;
 
+import javax.xml.parsers.ParserConfigurationException;
+import javax.xml.parsers.SAXParserFactory;
+import javax.xml.stream.XMLStreamReader;
+import java.io.FileReader;
+
 /**
  * Copyright 2001-2004 The Apache Software Foundation.
  * <p/>
@@ -45,22 +42,23 @@
     }
 
     private void setup() throws SAXException, ParserConfigurationException {
-            SAXParserFactory saxParserFactory = SAXParserFactory.newInstance();
-            saxParserFactory.setNamespaceAware(true);
-            parser = saxParserFactory.newSAXParser().getXMLReader();
-           
+        SAXParserFactory saxParserFactory = SAXParserFactory.newInstance();
+        saxParserFactory.setNamespaceAware(true);
+        parser = saxParserFactory.newSAXParser().getXMLReader();
+
 
     }
 
 
-    public void serialize(ContentHandler contentHandler) throws OMException{
+    public void serialize(ContentHandler contentHandler) throws OMException {
         try {
             parser.parse(new InputSource(new FileReader(fileName)));
         } catch (Exception e) {
-           throw new OMException(e);
+            throw new OMException(e);
         }
 
     }
+
     /* (non-Javadoc)
      * @see org.apache.axis.encoding.Encoder#deSerialize(javax.xml.stream.XMLStreamReader)
      */

Modified: webservices/axis/trunk/java/dev/scratch/prototype2/src/test/org/apache/axis/om/factory/OMLinkedListImplFactoryTest.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/dev/scratch/prototype2/src/test/org/apache/axis/om/factory/OMLinkedListImplFactoryTest.java?view=diff&r1=153901&r2=153902
==============================================================================
--- webservices/axis/trunk/java/dev/scratch/prototype2/src/test/org/apache/axis/om/factory/OMLinkedListImplFactoryTest.java (original)
+++ webservices/axis/trunk/java/dev/scratch/prototype2/src/test/org/apache/axis/om/factory/OMLinkedListImplFactoryTest.java Mon Feb 14 22:22:34 2005
@@ -18,18 +18,7 @@
  */
 
 import org.apache.axis.AbstractTestCase;
-import org.apache.axis.om.OMConstants;
-import org.apache.axis.om.OMElement;
-import org.apache.axis.om.OMFactory;
-import org.apache.axis.om.OMNamespace;
-import org.apache.axis.om.OMTestUtils;
-import org.apache.axis.om.OMText;
-import org.apache.axis.om.OMXMLParserWrapper;
-import org.apache.axis.om.SOAPBody;
-import org.apache.axis.om.SOAPEnvelope;
-import org.apache.axis.om.SOAPFault;
-import org.apache.axis.om.SOAPHeader;
-import org.apache.axis.om.SOAPHeaderBlock;
+import org.apache.axis.om.*;
 
 /**
  * User: Eran Chinthaka (eran.chinthaka@gmail.com)
@@ -121,7 +110,6 @@
             SOAPEnvelope soapEnvelope = omFactory.createSOAPEnvelope(soapNamespace, OMTestUtils.getOMBuilder(getTestResourceFile("soap/minimalMessage.xml")));
             assertTrue("SOAPEnvelope with a builder should start with done = false ", !soapEnvelope.isComplete());
             assertTrue("This SOAPEnvelope must have a builder ", soapEnvelope.getBuilder() instanceof OMXMLParserWrapper);
-
 
 
         } catch (Exception e) {

Modified: webservices/axis/trunk/java/dev/scratch/prototype2/src/test/org/apache/axis/om/impl/builder/StAXOMBuilderTest.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/dev/scratch/prototype2/src/test/org/apache/axis/om/impl/builder/StAXOMBuilderTest.java?view=diff&r1=153901&r2=153902
==============================================================================
--- webservices/axis/trunk/java/dev/scratch/prototype2/src/test/org/apache/axis/om/impl/builder/StAXOMBuilderTest.java (original)
+++ webservices/axis/trunk/java/dev/scratch/prototype2/src/test/org/apache/axis/om/impl/builder/StAXOMBuilderTest.java Mon Feb 14 22:22:34 2005
@@ -20,11 +20,6 @@
  * Time: 2:29:07 PM
  */
 
-import java.io.FileReader;
-import java.util.Iterator;
-
-import javax.xml.stream.XMLInputFactory;
-
 import org.apache.axis.AbstractTestCase;
 import org.apache.axis.om.OMElement;
 import org.apache.axis.om.OMFactory;
@@ -33,6 +28,10 @@
 import org.apache.axis.om.impl.llom.builder.StAXOMBuilder;
 import org.apache.axis.om.impl.llom.factory.OMXMLBuilderFactory;
 
+import javax.xml.stream.XMLInputFactory;
+import java.io.FileReader;
+import java.util.Iterator;
+
 public class StAXOMBuilderTest extends AbstractTestCase {
     StAXOMBuilder stAXOMBuilder;
     FileReader testFile;
@@ -56,15 +55,15 @@
         assertTrue(" Name of the root element is wrong", rootElement.getLocalName().equalsIgnoreCase("Root"));
         // get the first OMElement child
         OMNode omnode = rootElement.getFirstChild();
-        while(omnode instanceof OMText){
+        while (omnode instanceof OMText) {
             omnode = omnode.getNextSibling();
         }
 
-        Iterator children = ((OMElement)omnode).getChildren();
+        Iterator children = ((OMElement) omnode).getChildren();
         int childrenCount = 0;
         while (children.hasNext()) {
             OMNode node = (OMNode) children.next();
-            if(node instanceof OMElement)
+            if (node instanceof OMElement)
                 childrenCount++;
         }
         assertTrue(childrenCount == 5);

Modified: webservices/axis/trunk/java/dev/scratch/prototype2/src/test/org/apache/axis/om/impl/seriliazer/ElementSerializerTest.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/dev/scratch/prototype2/src/test/org/apache/axis/om/impl/seriliazer/ElementSerializerTest.java?view=diff&r1=153901&r2=153902
==============================================================================
--- webservices/axis/trunk/java/dev/scratch/prototype2/src/test/org/apache/axis/om/impl/seriliazer/ElementSerializerTest.java (original)
+++ webservices/axis/trunk/java/dev/scratch/prototype2/src/test/org/apache/axis/om/impl/seriliazer/ElementSerializerTest.java Mon Feb 14 22:22:34 2005
@@ -1,24 +1,16 @@
 package org.apache.axis.om.impl.seriliazer;
 
-import java.io.File;
-import java.io.FileOutputStream;
-import java.io.FileReader;
+import org.apache.axis.AbstractTestCase;
+import org.apache.axis.om.*;
+import org.apache.axis.om.impl.llom.factory.OMXMLBuilderFactory;
 
 import javax.xml.stream.XMLInputFactory;
 import javax.xml.stream.XMLOutputFactory;
 import javax.xml.stream.XMLStreamReader;
 import javax.xml.stream.XMLStreamWriter;
-
-import org.apache.axis.AbstractTestCase;
-import org.apache.axis.om.OMElement;
-import org.apache.axis.om.OMFactory;
-import org.apache.axis.om.OMNamespace;
-import org.apache.axis.om.OMNode;
-import org.apache.axis.om.OMText;
-import org.apache.axis.om.OMXMLParserWrapper;
-import org.apache.axis.om.SOAPBody;
-import org.apache.axis.om.SOAPEnvelope;
-import org.apache.axis.om.impl.llom.factory.OMXMLBuilderFactory;
+import java.io.File;
+import java.io.FileOutputStream;
+import java.io.FileReader;
 
 
 /**
@@ -40,7 +32,8 @@
     private XMLStreamReader reader;
     private XMLStreamWriter writer;
     private OMXMLParserWrapper builder;
-    private  File tempFile;
+    private File tempFile;
+
     public ElementSerializerTest(String testName) {
         super(testName);
     }
@@ -48,35 +41,35 @@
     protected void setUp() throws Exception {
         reader = XMLInputFactory.newInstance().
                 createXMLStreamReader(new FileReader(getTestResourceFile("soap/soapmessage.xml")));
-        tempFile = File.createTempFile("temp","xml");
+        tempFile = File.createTempFile("temp", "xml");
         writer = XMLOutputFactory.newInstance().
                 createXMLStreamWriter(new FileOutputStream(tempFile));
-         builder = OMXMLBuilderFactory.createStAXSOAPModelBuilder(OMFactory.newInstance(),reader);
+        builder = OMXMLBuilderFactory.createStAXSOAPModelBuilder(OMFactory.newInstance(), reader);
     }
 
-    public void testElementSerilization() throws Exception{
+    public void testElementSerilization() throws Exception {
         OMElement elt = builder.getDocumentElement();
-        elt.serialize(writer,true);
+        elt.serialize(writer, true);
 
     }
 
-    public void testElementSerilizationCacheOff() throws Exception{
+    public void testElementSerilizationCacheOff() throws Exception {
         OMElement elt = builder.getDocumentElement();
-        elt.serialize(writer,false);
+        elt.serialize(writer, false);
 
     }
 
-    public void testElementSerilizationChild() throws Exception{
+    public void testElementSerilizationChild() throws Exception {
         OMElement elt = builder.getDocumentElement();
         OMNode node = elt.getFirstChild().getNextSibling();
-        node.serialize(writer,true);
+        node.serialize(writer, true);
 
     }
 
-    public void testElementSerilizationSOAPBodyCacheOff() throws Exception{
-        SOAPEnvelope env = (SOAPEnvelope)builder.getDocumentElement();
+    public void testElementSerilizationSOAPBodyCacheOff() throws Exception {
+        SOAPEnvelope env = (SOAPEnvelope) builder.getDocumentElement();
         OMNode node = env.getBody();
-        node.serialize(writer,false);
+        node.serialize(writer, false);
     }
 
     public void testElement() throws Exception {
@@ -84,49 +77,49 @@
                 reader);
         SOAPEnvelope env = (SOAPEnvelope) builder.getDocumentElement();
         SOAPBody body = env.getBody();
-        body.serialize(writer,true);
+        body.serialize(writer, true);
     }
 
     public void testCompleteElement() throws Exception {
         OMXMLParserWrapper builder = OMXMLBuilderFactory.createStAXSOAPModelBuilder(OMFactory.newInstance(),
                 reader);
         SOAPEnvelope env = (SOAPEnvelope) builder.getDocumentElement();
-        env.serialize(writer,true);
+        env.serialize(writer, true);
     }
 
     public void testDualNamespaces1() throws Exception {
         OMFactory factory = OMFactory.newInstance();
-        OMNamespace ns1 = factory.createOMNamespace("bar","x");
-        OMNamespace ns2 = factory.createOMNamespace("bar","y");
+        OMNamespace ns1 = factory.createOMNamespace("bar", "x");
+        OMNamespace ns2 = factory.createOMNamespace("bar", "y");
 
-        OMElement root = factory.createOMElement("root",ns1);
-        OMElement elt11 = factory.createOMElement("foo1",ns1);
-        OMElement elt12 = factory.createOMElement("foo2",ns1);
-        OMElement elt21 = factory.createOMElement("yuck",ns2);
-        OMElement elt22 = factory.createOMElement("yuck",ns2);
+        OMElement root = factory.createOMElement("root", ns1);
+        OMElement elt11 = factory.createOMElement("foo1", ns1);
+        OMElement elt12 = factory.createOMElement("foo2", ns1);
+        OMElement elt21 = factory.createOMElement("yuck", ns2);
+        OMElement elt22 = factory.createOMElement("yuck", ns2);
 
         elt11.addChild(elt21);
         elt12.addChild(elt22);
         root.addChild(elt11);
         root.addChild(elt12);
-        root.serialize(writer,true);
+        root.serialize(writer, true);
     }
 
     public void testDualNamespaces2() throws Exception {
         OMFactory factory = OMFactory.newInstance();
 
-        OMNamespace ns1 = factory.createOMNamespace("bar","x");
-        OMElement root = factory.createOMElement("root",ns1);
-        OMNamespace ns2 = root.declareNamespace("bar","y");
-        OMElement elt1 = factory.createOMElement("foo",ns1);
-        OMElement elt2 = factory.createOMElement("yuck",ns2);
-        OMText txt1 = factory.createText(elt2,"blah");
+        OMNamespace ns1 = factory.createOMNamespace("bar", "x");
+        OMElement root = factory.createOMElement("root", ns1);
+        OMNamespace ns2 = root.declareNamespace("bar", "y");
+        OMElement elt1 = factory.createOMElement("foo", ns1);
+        OMElement elt2 = factory.createOMElement("yuck", ns2);
+        OMText txt1 = factory.createText(elt2, "blah");
 
         elt2.addChild(txt1);
         elt1.addChild(elt2);
         root.addChild(elt1);
 
-        root.serialize(writer,true);
+        root.serialize(writer, true);
     }
 
     protected void tearDown() throws Exception {

Modified: webservices/axis/trunk/java/dev/scratch/prototype2/src/test/org/apache/axis/om/impl/seriliazer/OMSerailizerTest.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/dev/scratch/prototype2/src/test/org/apache/axis/om/impl/seriliazer/OMSerailizerTest.java?view=diff&r1=153901&r2=153902
==============================================================================
--- webservices/axis/trunk/java/dev/scratch/prototype2/src/test/org/apache/axis/om/impl/seriliazer/OMSerailizerTest.java (original)
+++ webservices/axis/trunk/java/dev/scratch/prototype2/src/test/org/apache/axis/om/impl/seriliazer/OMSerailizerTest.java Mon Feb 14 22:22:34 2005
@@ -1,14 +1,5 @@
 package org.apache.axis.om.impl.seriliazer;
 
-import java.io.File;
-import java.io.FileOutputStream;
-import java.io.FileReader;
-
-import javax.xml.stream.XMLInputFactory;
-import javax.xml.stream.XMLOutputFactory;
-import javax.xml.stream.XMLStreamReader;
-import javax.xml.stream.XMLStreamWriter;
-
 import org.apache.axis.AbstractTestCase;
 import org.apache.axis.om.OMFactory;
 import org.apache.axis.om.OMXMLParserWrapper;
@@ -17,6 +8,13 @@
 import org.apache.axis.om.impl.llom.factory.OMXMLBuilderFactory;
 import org.apache.axis.om.impl.llom.serialize.StreamingOMSerializer;
 
+import javax.xml.stream.XMLInputFactory;
+import javax.xml.stream.XMLOutputFactory;
+import javax.xml.stream.XMLStreamReader;
+import javax.xml.stream.XMLStreamWriter;
+import java.io.File;
+import java.io.FileOutputStream;
+import java.io.FileReader;
 
 
 /**
@@ -57,7 +55,7 @@
     public void testRawSerializer() throws Exception {
         StreamingOMSerializer serializer = new StreamingOMSerializer();
         //serializer.setNamespacePrefixStack(new Stack());
-        serializer.serialize(reader,writer);
+        serializer.serialize(reader, writer);
 
     }
 
@@ -69,7 +67,7 @@
         serializer.serialize(env.getPullParser(false), writer);
     }
 
-     public void testElementPullStream1WithCacheOff() throws Exception {
+    public void testElementPullStream1WithCacheOff() throws Exception {
         OMXMLParserWrapper builder = OMXMLBuilderFactory.createStAXSOAPModelBuilder(OMFactory.newInstance(),
                 reader);
         SOAPEnvelope env = (SOAPEnvelope) builder.getDocumentElement();

Modified: webservices/axis/trunk/java/dev/scratch/prototype2/src/test/org/apache/axis/om/impl/streamwrapper/OMStaxStreamingWrapperTest.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/dev/scratch/prototype2/src/test/org/apache/axis/om/impl/streamwrapper/OMStaxStreamingWrapperTest.java?view=diff&r1=153901&r2=153902
==============================================================================
--- webservices/axis/trunk/java/dev/scratch/prototype2/src/test/org/apache/axis/om/impl/streamwrapper/OMStaxStreamingWrapperTest.java (original)
+++ webservices/axis/trunk/java/dev/scratch/prototype2/src/test/org/apache/axis/om/impl/streamwrapper/OMStaxStreamingWrapperTest.java Mon Feb 14 22:22:34 2005
@@ -1,16 +1,15 @@
 package org.apache.axis.om.impl.streamwrapper;
 
-import java.io.File;
-import java.io.FileReader;
-
-import javax.xml.stream.XMLInputFactory;
-import javax.xml.stream.XMLStreamReader;
-
 import org.apache.axis.AbstractTestCase;
 import org.apache.axis.om.OMFactory;
 import org.apache.axis.om.OMXMLParserWrapper;
 import org.apache.axis.om.SOAPEnvelope;
 import org.apache.axis.om.impl.llom.factory.OMXMLBuilderFactory;
+
+import javax.xml.stream.XMLInputFactory;
+import javax.xml.stream.XMLStreamReader;
+import java.io.File;
+import java.io.FileReader;
 
 /**
  * Copyright 2001-2004 The Apache Software Foundation.

Modified: webservices/axis/trunk/java/dev/scratch/prototype2/src/test/org/apache/axis/om/impl/streamwrapper/OmStAXBuilderTest.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/dev/scratch/prototype2/src/test/org/apache/axis/om/impl/streamwrapper/OmStAXBuilderTest.java?view=diff&r1=153901&r2=153902
==============================================================================
--- webservices/axis/trunk/java/dev/scratch/prototype2/src/test/org/apache/axis/om/impl/streamwrapper/OmStAXBuilderTest.java (original)
+++ webservices/axis/trunk/java/dev/scratch/prototype2/src/test/org/apache/axis/om/impl/streamwrapper/OmStAXBuilderTest.java Mon Feb 14 22:22:34 2005
@@ -1,20 +1,19 @@
 package org.apache.axis.om.impl.streamwrapper;
 
-import java.io.File;
-import java.io.FileOutputStream;
-import java.io.FileReader;
-
-import javax.xml.stream.XMLInputFactory;
-import javax.xml.stream.XMLOutputFactory;
-import javax.xml.stream.XMLStreamReader;
-import javax.xml.stream.XMLStreamWriter;
-
 import org.apache.axis.AbstractTestCase;
 import org.apache.axis.om.OMFactory;
 import org.apache.axis.om.OMXMLParserWrapper;
 import org.apache.axis.om.SOAPEnvelope;
 import org.apache.axis.om.impl.llom.factory.OMXMLBuilderFactory;
 
+import javax.xml.stream.XMLInputFactory;
+import javax.xml.stream.XMLOutputFactory;
+import javax.xml.stream.XMLStreamReader;
+import javax.xml.stream.XMLStreamWriter;
+import java.io.File;
+import java.io.FileOutputStream;
+import java.io.FileReader;
+
 /**
  * Copyright 2001-2004 The Apache Software Foundation.
  * <p/>
@@ -29,11 +28,10 @@
  * 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.
- *
  */
-public class OmStAXBuilderTest extends AbstractTestCase{
+public class OmStAXBuilderTest extends AbstractTestCase {
 
-    private OMFactory factory =null;
+    private OMFactory factory = null;
     private OMXMLParserWrapper builder;
     private File tempFile;
 
@@ -45,17 +43,17 @@
         factory = OMFactory.newInstance();
         XMLStreamReader reader = XMLInputFactory.newInstance().
                 createXMLStreamReader(new FileReader(getTestResourceFile("soap/soapmessage.xml")));
-        builder = OMXMLBuilderFactory.createStAXSOAPModelBuilder(factory,reader);
+        builder = OMXMLBuilderFactory.createStAXSOAPModelBuilder(factory, reader);
         tempFile = File.createTempFile("temp", "xml");
     }
 
-    public void testStaxBuilder()throws Exception{
+    public void testStaxBuilder() throws Exception {
 
-        SOAPEnvelope envelope = (SOAPEnvelope)builder.getDocumentElement();
+        SOAPEnvelope envelope = (SOAPEnvelope) builder.getDocumentElement();
         assertNotNull(envelope);
         XMLStreamWriter writer = XMLOutputFactory.newInstance().createXMLStreamWriter(new FileOutputStream(tempFile));
 //        XMLStreamWriter writer = XMLOutputFactory.newInstance().createXMLStreamWriter(System.out);
-        envelope.serialize(writer,true);
+        envelope.serialize(writer, true);
 
 
     }

Modified: webservices/axis/trunk/java/dev/scratch/prototype2/src/test/org/apache/axis/om/impl/traverse/OMChildrenWithSpecificAttributeIteratorTest.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/dev/scratch/prototype2/src/test/org/apache/axis/om/impl/traverse/OMChildrenWithSpecificAttributeIteratorTest.java?view=diff&r1=153901&r2=153902
==============================================================================
--- webservices/axis/trunk/java/dev/scratch/prototype2/src/test/org/apache/axis/om/impl/traverse/OMChildrenWithSpecificAttributeIteratorTest.java (original)
+++ webservices/axis/trunk/java/dev/scratch/prototype2/src/test/org/apache/axis/om/impl/traverse/OMChildrenWithSpecificAttributeIteratorTest.java Mon Feb 14 22:22:34 2005
@@ -19,11 +19,6 @@
  */
 package org.apache.axis.om.impl.traverse;
 
-import java.io.ByteArrayInputStream;
-import java.util.Iterator;
-
-import javax.xml.namespace.QName;
-
 import org.apache.axis.addressing.AddressingConstants;
 import org.apache.axis.om.OMConstants;
 import org.apache.axis.om.OMTestCase;
@@ -31,6 +26,10 @@
 import org.apache.axis.om.SOAPHeaderBlock;
 import org.apache.axis.om.impl.llom.traverse.OMChildrenWithSpecificAttributeIterator;
 
+import javax.xml.namespace.QName;
+import java.io.ByteArrayInputStream;
+import java.util.Iterator;
+
 
 public class OMChildrenWithSpecificAttributeIteratorTest extends OMTestCase implements OMConstants {
 
@@ -102,7 +101,7 @@
         int childrenCount = 0;
         while (soapHeaderChildrenIter.hasNext()) {
             Object o = soapHeaderChildrenIter.next();
-             childrenCount++;
+            childrenCount++;
         }
 
         assertEquals("OMChildrenWithSpecificAttributeIterator with detach true, not working properly", childrenCount, 6); // here this 6 includes white spaces as OMText

Modified: webservices/axis/trunk/java/dev/scratch/prototype2/src/test/org/apache/axis/testUtils/ArrayTypeEncoder.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/dev/scratch/prototype2/src/test/org/apache/axis/testUtils/ArrayTypeEncoder.java?view=diff&r1=153901&r2=153902
==============================================================================
--- webservices/axis/trunk/java/dev/scratch/prototype2/src/test/org/apache/axis/testUtils/ArrayTypeEncoder.java (original)
+++ webservices/axis/trunk/java/dev/scratch/prototype2/src/test/org/apache/axis/testUtils/ArrayTypeEncoder.java Mon Feb 14 22:22:34 2005
@@ -15,61 +15,59 @@
  */
 package org.apache.axis.testUtils;
 
-import java.util.ArrayList;
-
-import javax.xml.stream.XMLStreamConstants;
-import javax.xml.stream.XMLStreamException;
-import javax.xml.stream.XMLStreamReader;
-
 import org.apache.axis.engine.AxisFault;
-
 import org.apache.axis.om.OMConstants;
 import org.apache.axis.om.OMException;
 import org.xml.sax.ContentHandler;
 import org.xml.sax.SAXException;
 
+import javax.xml.stream.XMLStreamConstants;
+import javax.xml.stream.XMLStreamException;
+import javax.xml.stream.XMLStreamReader;
+import java.util.ArrayList;
+
 
-public class ArrayTypeEncoder implements Encoder{
+public class ArrayTypeEncoder implements Encoder {
     private Object[] obj = null;
     private Encoder arrayTypeEncoder;
-    
-    public ArrayTypeEncoder(Object[] obj,Encoder arrayTypeEncoder){
-       this.obj = obj;
-       this.arrayTypeEncoder = arrayTypeEncoder;
+
+    public ArrayTypeEncoder(Object[] obj, Encoder arrayTypeEncoder) {
+        this.obj = obj;
+        this.arrayTypeEncoder = arrayTypeEncoder;
     }
- 
-    public ArrayTypeEncoder(Encoder arrayTypeEncoder){
-       this.arrayTypeEncoder = arrayTypeEncoder;
+
+    public ArrayTypeEncoder(Encoder arrayTypeEncoder) {
+        this.arrayTypeEncoder = arrayTypeEncoder;
     }
 
- 
+
     public void serialize(ContentHandler cHandler) throws OMException {
         try {
-        	for(int i = 0;i<obj.length;i++){
-				cHandler.startElement(OMConstants.ARRAY_ITEM_NSURI,OMConstants.ARRAY_ITEM_LOCALNAME,OMConstants.ARRAY_ITEM_QNAME,null);
-				arrayTypeEncoder.setObject(obj[i]);
-				arrayTypeEncoder.serialize(cHandler);
-				cHandler.endElement(OMConstants.ARRAY_ITEM_NSURI,OMConstants.ARRAY_ITEM_LOCALNAME,OMConstants.ARRAY_ITEM_QNAME);
-        	}
+            for (int i = 0; i < obj.length; i++) {
+                cHandler.startElement(OMConstants.ARRAY_ITEM_NSURI, OMConstants.ARRAY_ITEM_LOCALNAME, OMConstants.ARRAY_ITEM_QNAME, null);
+                arrayTypeEncoder.setObject(obj[i]);
+                arrayTypeEncoder.serialize(cHandler);
+                cHandler.endElement(OMConstants.ARRAY_ITEM_NSURI, OMConstants.ARRAY_ITEM_LOCALNAME, OMConstants.ARRAY_ITEM_QNAME);
+            }
         } catch (SAXException e) {
             throw new OMException(e);
         }
 
     }
 
-	/**
-	 * @return
-	 */
-	public Encoder getArrayTypeEncoder() {
-		return arrayTypeEncoder;
-	}
-
-	/**
-	 * @param encoder
-	 */
-	public void setArrayTypeEncoder(Encoder encoder) {
-		arrayTypeEncoder = encoder;
-	}
+    /**
+     * @return
+     */
+    public Encoder getArrayTypeEncoder() {
+        return arrayTypeEncoder;
+    }
+
+    /**
+     * @param encoder
+     */
+    public void setArrayTypeEncoder(Encoder encoder) {
+        arrayTypeEncoder = encoder;
+    }
 
     public Object deSerialize(XMLStreamReader xpp) throws AxisFault {
         ArrayList objs = new ArrayList();
@@ -77,7 +75,7 @@
         try {
             int event = xpp.next();
             while (XMLStreamConstants.START_ELEMENT != event
-                && XMLStreamConstants.END_ELEMENT != event) {
+                    && XMLStreamConstants.END_ELEMENT != event) {
                 event = xpp.next();
             }
             if (XMLStreamConstants.END_ELEMENT == event) {
@@ -106,7 +104,7 @@
     }
 
     public void setObject(Object obj) {
-        this.obj = (Object[])obj;
+        this.obj = (Object[]) obj;
     }
 
 }

Modified: webservices/axis/trunk/java/dev/scratch/prototype2/src/test/org/apache/axis/testUtils/Encoder.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/dev/scratch/prototype2/src/test/org/apache/axis/testUtils/Encoder.java?view=diff&r1=153901&r2=153902
==============================================================================
--- webservices/axis/trunk/java/dev/scratch/prototype2/src/test/org/apache/axis/testUtils/Encoder.java (original)
+++ webservices/axis/trunk/java/dev/scratch/prototype2/src/test/org/apache/axis/testUtils/Encoder.java Mon Feb 14 22:22:34 2005
@@ -13,19 +13,20 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
- 
-package org.apache.axis.testUtils;
 
-import javax.xml.stream.XMLStreamReader;
+package org.apache.axis.testUtils;
 
 import org.apache.axis.engine.AxisFault;
 import org.apache.axis.om.OMException;
-
 import org.xml.sax.ContentHandler;
 
+import javax.xml.stream.XMLStreamReader;
+
+
+public interface Encoder {
+    public Object deSerialize(XMLStreamReader xpp) throws AxisFault;
+
+    public void setObject(Object obj);
 
-public interface Encoder{
-	public Object deSerialize(XMLStreamReader xpp)throws AxisFault;
-	public void setObject(Object obj);
-    public void serialize(ContentHandler contentHandler)throws OMException ;
+    public void serialize(ContentHandler contentHandler) throws OMException;
 }

Modified: webservices/axis/trunk/java/dev/scratch/prototype2/src/test/org/apache/axis/testUtils/ObjectToOMBuilder.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/dev/scratch/prototype2/src/test/org/apache/axis/testUtils/ObjectToOMBuilder.java?view=diff&r1=153901&r2=153902
==============================================================================
--- webservices/axis/trunk/java/dev/scratch/prototype2/src/test/org/apache/axis/testUtils/ObjectToOMBuilder.java (original)
+++ webservices/axis/trunk/java/dev/scratch/prototype2/src/test/org/apache/axis/testUtils/ObjectToOMBuilder.java Mon Feb 14 22:22:34 2005
@@ -1,16 +1,6 @@
 package org.apache.axis.testUtils;
 
-import java.util.ArrayList;
-import java.util.List;
-
-import org.apache.axis.om.OMConstants;
-import org.apache.axis.om.OMElement;
-import org.apache.axis.om.OMException;
-import org.apache.axis.om.OMFactory;
-import org.apache.axis.om.OMNamespace;
-import org.apache.axis.om.OMNode;
-import org.apache.axis.om.OMText;
-import org.apache.axis.om.OMXMLParserWrapper;
+import org.apache.axis.om.*;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 import org.xml.sax.Attributes;
@@ -18,6 +8,9 @@
 import org.xml.sax.Locator;
 import org.xml.sax.SAXException;
 
+import java.util.ArrayList;
+import java.util.List;
+
 /**
  * Copyright 2001-2004 The Apache Software Foundation.
  * <p/>
@@ -59,7 +52,6 @@
     }
 
 
-
     /**
      * @param startElement - this refers to the element the object should come under.
      *                     Most of the time this will be a OMBodyBlock element
@@ -87,11 +79,11 @@
                     if (externalContentHandler == null) {
                         throw new IllegalStateException("Cannot have no cache with an empty content handler");
                     }
-					outObject.serialize(externalContentHandler);
-                }else{
-					outObject.serialize(this);
+                    outObject.serialize(externalContentHandler);
+                } else {
+                    outObject.serialize(this);
                 }
-                
+
                 this.startElement.setComplete(true);
             }
         }
@@ -180,7 +172,7 @@
     }
 
     public void startElement(String namespaceURI, String localName, String qName, Attributes atts) throws SAXException {
-        log.info("Building OM for Element {"+namespaceURI+'}'+ localName +" for the ObjectPusher");
+        log.info("Building OM for Element {" + namespaceURI + '}' + localName + " for the ObjectPusher");
         if (localName.length() == 0)
             localName = qName;
 
@@ -205,7 +197,7 @@
         String attrUri = "";
         String attrPrefix = "";
         OMNamespace ns = null;
-        if(atts != null){
+        if (atts != null) {
             for (int i = 0; i < atts.getLength(); i++) {
 
                 attrUri = atts.getURI(i);
@@ -244,7 +236,7 @@
 
     public void registerExternalContentHandler(Object obj) {
         if (obj instanceof ContentHandler)
-            this.externalContentHandler = (ContentHandler)obj;
+            this.externalContentHandler = (ContentHandler) obj;
         else
             throw new IllegalArgumentException("Attempt to register wrong type of content handler");
     }

Modified: webservices/axis/trunk/java/dev/scratch/prototype2/src/test/org/apache/axis/testUtils/SimpleJavaProvider.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/dev/scratch/prototype2/src/test/org/apache/axis/testUtils/SimpleJavaProvider.java?view=diff&r1=153901&r2=153902
==============================================================================
--- webservices/axis/trunk/java/dev/scratch/prototype2/src/test/org/apache/axis/testUtils/SimpleJavaProvider.java (original)
+++ webservices/axis/trunk/java/dev/scratch/prototype2/src/test/org/apache/axis/testUtils/SimpleJavaProvider.java Mon Feb 14 22:22:34 2005
@@ -16,12 +16,6 @@
 
 package org.apache.axis.testUtils;
 
-import java.lang.reflect.InvocationTargetException;
-import java.lang.reflect.Method;
-
-import javax.xml.namespace.QName;
-import javax.xml.stream.XMLStreamReader;
-
 import org.apache.axis.context.MessageContext;
 import org.apache.axis.context.SessionContext;
 import org.apache.axis.description.AxisOperation;
@@ -29,15 +23,16 @@
 import org.apache.axis.engine.AxisFault;
 import org.apache.axis.engine.Constants;
 import org.apache.axis.engine.Provider;
-import org.apache.axis.om.OMConstants;
-import org.apache.axis.om.OMElement;
-import org.apache.axis.om.OMFactory;
-import org.apache.axis.om.OMNamespace;
-import org.apache.axis.om.SOAPEnvelope;
+import org.apache.axis.om.*;
 import org.apache.axis.providers.AbstractProvider;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 
+import javax.xml.namespace.QName;
+import javax.xml.stream.XMLStreamReader;
+import java.lang.reflect.InvocationTargetException;
+import java.lang.reflect.Method;
+
 /**
  * This is a Simple java Provider.
  */
@@ -46,7 +41,7 @@
     protected Log log = LogFactory.getLog(getClass());
     protected String scope;
     protected Method method;
-   // protected ClassLoader classLoader;
+    // protected ClassLoader classLoader;
 
     public SimpleJavaProvider() {
         scope = Constants.APPLICATION_SCOPE;
@@ -54,7 +49,7 @@
     }
 
     protected Object makeNewServiceObject(MessageContext msgContext)
-        throws AxisFault {
+            throws AxisFault {
         try {
             AxisService service = msgContext.getService();
             Class implClass = service.getServiceClass();
@@ -65,7 +60,7 @@
     }
 
     public Object getTheImplementationObject(MessageContext msgContext)
-        throws AxisFault {
+            throws AxisFault {
         AxisService service = msgContext.getService();
         QName serviceName = service.getName();
         if (Constants.APPLICATION_SCOPE.equals(scope)) {
@@ -92,20 +87,19 @@
 
     }
 
-    public Object[] deserializeParameters(
-        MessageContext msgContext,
-        Method method)
-        throws AxisFault {
+    public Object[] deserializeParameters(MessageContext msgContext,
+                                          Method method)
+            throws AxisFault {
         //   org.TimeRecorder.BEFORE_DESERALIZE = System.currentTimeMillis();
         XMLStreamReader xpp =
-            msgContext.getSoapOperationElement().getPullParser(true);
+                msgContext.getSoapOperationElement().getPullParser(true);
         Class[] parms = method.getParameterTypes();
         Object[] objs = new Object[parms.length];
 
         for (int i = 0; i < parms.length; i++) {
-            if (int.class.equals(parms[i])|| Integer.class.equals(parms[i])) {
+            if (int.class.equals(parms[i]) || Integer.class.equals(parms[i])) {
                 objs[i] =
-                    new Integer(SimpleTypeEncodingUtils.deserializeInt(xpp));
+                        new Integer(SimpleTypeEncodingUtils.deserializeInt(xpp));
             } else if (String.class.equals(parms[i])) {
                 objs[i] = SimpleTypeEncodingUtils.deserializeString(xpp);
             } else if (String[].class.equals(parms[i])) {
@@ -148,17 +142,15 @@
 
             OMNamespace ns = fac.createOMNamespace("http://soapenc/", "res");
             OMElement responseMethodName =
-                fac.createOMElement(methodName + "Response", ns);
+                    fac.createOMElement(methodName + "Response", ns);
             responseEnvelope.getBody().addChild(responseMethodName);
             OMElement returnelement =
-                fac.createOMElement(methodName + "Return", ns);
+                    fac.createOMElement(methodName + "Return", ns);
             responseMethodName.addChild(returnelement);
 
-            returnelement.setBuilder(
-                new ObjectToOMBuilder(returnelement, outobj));
-            returnelement.declareNamespace(
-                OMConstants.ARRAY_ITEM_NSURI,
-                OMConstants.ARRAY_ITEM_NS_PREFIX);
+            returnelement.setBuilder(new ObjectToOMBuilder(returnelement, outobj));
+            returnelement.declareNamespace(OMConstants.ARRAY_ITEM_NSURI,
+                    OMConstants.ARRAY_ITEM_NS_PREFIX);
             msgContext.setEnvelope(responseEnvelope);
 
             return msgContext;

Modified: webservices/axis/trunk/java/dev/scratch/prototype2/src/test/org/apache/axis/testUtils/SimpleTypeEncoder.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/dev/scratch/prototype2/src/test/org/apache/axis/testUtils/SimpleTypeEncoder.java?view=diff&r1=153901&r2=153902
==============================================================================
--- webservices/axis/trunk/java/dev/scratch/prototype2/src/test/org/apache/axis/testUtils/SimpleTypeEncoder.java (original)
+++ webservices/axis/trunk/java/dev/scratch/prototype2/src/test/org/apache/axis/testUtils/SimpleTypeEncoder.java Mon Feb 14 22:22:34 2005
@@ -15,74 +15,75 @@
 */
 package org.apache.axis.testUtils;
 
-import javax.xml.stream.XMLStreamReader;
-
 import org.apache.axis.engine.AxisFault;
 import org.apache.axis.om.OMConstants;
 import org.apache.axis.om.OMException;
 import org.xml.sax.ContentHandler;
 import org.xml.sax.SAXException;
 
+import javax.xml.stream.XMLStreamReader;
+
 
-public class SimpleTypeEncoder implements Encoder{
+public class SimpleTypeEncoder implements Encoder {
     private Object obj = null;
-    public SimpleTypeEncoder(Object obj){
+
+    public SimpleTypeEncoder(Object obj) {
         this.obj = obj;
     }
 
 
     public void serialize(ContentHandler cHandler) throws OMException {
         try {
-            if(obj == null){
+            if (obj == null) {
                 return;
             }
-            char[] str=null;
-            if(obj.getClass() == String.class){
-                str = ((String)obj).toCharArray();
-                cHandler.characters(str,0,str.length);
-            }else if(obj.getClass() == String[].class){
-                String[] strs = (String[])obj;
+            char[] str = null;
+            if (obj.getClass() == String.class) {
+                str = ((String) obj).toCharArray();
+                cHandler.characters(str, 0, str.length);
+            } else if (obj.getClass() == String[].class) {
+                String[] strs = (String[]) obj;
                 str = null;
                 for (int i = 0; i < strs.length; i++) {
                     cHandler.startElement(OMConstants.ARRAY_ITEM_NSURI,
                             OMConstants.ARRAY_ITEM_LOCALNAME,
-                            OMConstants.ARRAY_ITEM_QNAME ,
+                            OMConstants.ARRAY_ITEM_QNAME,
                             null);
                     str = strs[i].toCharArray();
-                    cHandler.characters(str,0,str.length);
-                    cHandler.endElement(OMConstants.ARRAY_ITEM_NSURI,OMConstants.ARRAY_ITEM_LOCALNAME, OMConstants.ARRAY_ITEM_QNAME );
+                    cHandler.characters(str, 0, str.length);
+                    cHandler.endElement(OMConstants.ARRAY_ITEM_NSURI, OMConstants.ARRAY_ITEM_LOCALNAME, OMConstants.ARRAY_ITEM_QNAME);
                 }
-            }else if(obj.getClass() == Integer.class){
+            } else if (obj.getClass() == Integer.class) {
                 str = obj.toString().toCharArray();
-                cHandler.characters(str,0,str.length);
-            }else if(obj.getClass() == int[].class){
-                int[] intArray = (int[])obj;
+                cHandler.characters(str, 0, str.length);
+            } else if (obj.getClass() == int[].class) {
+                int[] intArray = (int[]) obj;
                 for (int i = 0; i < intArray.length; i++) {
                     cHandler.startElement(OMConstants.ARRAY_ITEM_NSURI,
                             OMConstants.ARRAY_ITEM_LOCALNAME,
-                            OMConstants.ARRAY_ITEM_QNAME ,
+                            OMConstants.ARRAY_ITEM_QNAME,
                             null);
                     str = String.valueOf(intArray[i]).toCharArray();
-                    cHandler.characters(str,0,str.length);
-                    cHandler.endElement(OMConstants.ARRAY_ITEM_NSURI,OMConstants.ARRAY_ITEM_LOCALNAME, OMConstants.ARRAY_ITEM_QNAME );
+                    cHandler.characters(str, 0, str.length);
+                    cHandler.endElement(OMConstants.ARRAY_ITEM_NSURI, OMConstants.ARRAY_ITEM_LOCALNAME, OMConstants.ARRAY_ITEM_QNAME);
                 }
 
-            }else if(obj.getClass() == Double.class){
+            } else if (obj.getClass() == Double.class) {
                 str = obj.toString().toCharArray();
-                cHandler.characters(str,0,str.length);
-            }else if(obj.getClass() == double[].class){
-                double[] doubleArray = (double[])obj;
+                cHandler.characters(str, 0, str.length);
+            } else if (obj.getClass() == double[].class) {
+                double[] doubleArray = (double[]) obj;
                 for (int i = 0; i < doubleArray.length; i++) {
                     cHandler.startElement(OMConstants.ARRAY_ITEM_NSURI,
                             OMConstants.ARRAY_ITEM_LOCALNAME,
-                            OMConstants.ARRAY_ITEM_QNAME ,
+                            OMConstants.ARRAY_ITEM_QNAME,
                             null);
                     str = String.valueOf(doubleArray[i]).toCharArray();
-                    cHandler.characters(str,0,str.length);
-                    cHandler.endElement(OMConstants.ARRAY_ITEM_NSURI,OMConstants.ARRAY_ITEM_LOCALNAME, OMConstants.ARRAY_ITEM_QNAME );
+                    cHandler.characters(str, 0, str.length);
+                    cHandler.endElement(OMConstants.ARRAY_ITEM_NSURI, OMConstants.ARRAY_ITEM_LOCALNAME, OMConstants.ARRAY_ITEM_QNAME);
                 }
 
-            }else{
+            } else {
                 throw new OMException("Unsupported type");
             }
         } catch (SAXException e) {
@@ -102,7 +103,7 @@
     * @see org.apache.axis.encoding.Encoder#setObject(java.lang.Object)
     */
     public void setObject(Object obj) {
-        this.obj =obj;
+        this.obj = obj;
     }
 
 }

Modified: webservices/axis/trunk/java/dev/scratch/prototype2/src/test/org/apache/axis/testUtils/SimpleTypeEncodingUtils.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/dev/scratch/prototype2/src/test/org/apache/axis/testUtils/SimpleTypeEncodingUtils.java?view=diff&r1=153901&r2=153902
==============================================================================
--- webservices/axis/trunk/java/dev/scratch/prototype2/src/test/org/apache/axis/testUtils/SimpleTypeEncodingUtils.java (original)
+++ webservices/axis/trunk/java/dev/scratch/prototype2/src/test/org/apache/axis/testUtils/SimpleTypeEncodingUtils.java Mon Feb 14 22:22:34 2005
@@ -28,7 +28,7 @@
 
 
     public static String[] deserializeStringArray(XMLStreamReader xpp)
-        throws AxisFault {
+            throws AxisFault {
         ArrayList strings = new ArrayList();
 
         try {
@@ -55,32 +55,32 @@
     }
 
     public static String deserializeStringWithWiteSpaces(XMLStreamReader xpp)
-        throws AxisFault {
-                StringBuffer value = new StringBuffer();
-                try {
-                    int event = xpp.getEventType();
-                    while(XMLStreamConstants.START_ELEMENT != event){
-                        event = xpp.next();
-                    }
-                    event = xpp.next();
-                    while(XMLStreamConstants.END_ELEMENT != event){
-                        if(XMLStreamConstants.CHARACTERS == event){
-                            value.append(xpp.getText());
-                        }
-                        event = xpp.next();
-                    }
-                } catch (XMLStreamException e) {
-                    throw AxisFault.makeFault(e);
-                }
-                if(value.length() == 0){
-                    return null;
-                }else{
-                    return value.toString();        
+            throws AxisFault {
+        StringBuffer value = new StringBuffer();
+        try {
+            int event = xpp.getEventType();
+            while (XMLStreamConstants.START_ELEMENT != event) {
+                event = xpp.next();
+            }
+            event = xpp.next();
+            while (XMLStreamConstants.END_ELEMENT != event) {
+                if (XMLStreamConstants.CHARACTERS == event) {
+                    value.append(xpp.getText());
                 }
+                event = xpp.next();
+            }
+        } catch (XMLStreamException e) {
+            throw AxisFault.makeFault(e);
+        }
+        if (value.length() == 0) {
+            return null;
+        } else {
+            return value.toString();
         }
-        
+    }
+
     public static String deserializeString(XMLStreamReader xpp)
-        throws AxisFault {
+            throws AxisFault {
         String value = null;
         try {
             int event = xpp.getEventType();
@@ -90,7 +90,7 @@
             event = xpp.next();
             while (XMLStreamConstants.END_ELEMENT != event) {
                 if (XMLStreamConstants.CHARACTERS == event
-                    && !xpp.isWhiteSpace()) {
+                        && !xpp.isWhiteSpace()) {
                     value = xpp.getText();
                 }
                 event = xpp.next();
@@ -109,7 +109,7 @@
         return Integer.parseInt(val);
     }
 
-     public static double deserializeDouble(XMLStreamReader xpp) throws AxisFault {
+    public static double deserializeDouble(XMLStreamReader xpp) throws AxisFault {
         String val = deserializeString(xpp);
         if (val == null) {
             throw new AxisFault("Number format exception value is null");
@@ -118,7 +118,7 @@
     }
 
     public static int[] deserializeIntArray(XMLStreamReader xpp)
-        throws AxisFault {
+            throws AxisFault {
         ArrayList ints = new ArrayList();
 
         try {
@@ -127,7 +127,7 @@
             while (true) {
                 if (XMLStreamConstants.START_ELEMENT == event) {
                     String stringValue = deserializeString(xpp);
-                    if (stringValue==null){
+                    if (stringValue == null) {
                         throw new AxisFault("Wrong type of argument");
                     }
                     ints.add(stringValue);
@@ -141,7 +141,7 @@
             int intCount = ints.size();
             int[] intVals = new int[intCount];
             for (int i = 0; i < intCount; i++) {
-                intVals[i] =  Integer.parseInt(ints.get(i).toString());
+                intVals[i] = Integer.parseInt(ints.get(i).toString());
             }
             return intVals;
         } catch (XMLStreamException e) {
@@ -151,47 +151,45 @@
     }
 
     public static double[] deserializeDoubleArray(XMLStreamReader xpp)
-           throws AxisFault {
-           ArrayList doubles = new ArrayList();
+            throws AxisFault {
+        ArrayList doubles = new ArrayList();
 
-           try {
-               int event = xpp.next();
+        try {
+            int event = xpp.next();
 
-               while (true) {
-                   if (XMLStreamConstants.START_ELEMENT == event) {
-                       String stringValue = deserializeString(xpp);
-                       if (stringValue==null){
-                           throw new AxisFault("Wrong type of argument");
-                       }
-                       doubles.add(stringValue);
-                   } else if (XMLStreamConstants.END_ELEMENT == event) {
-                       break;
-                   } else if (XMLStreamConstants.END_DOCUMENT == event) {
-                       throw new AxisFault("premature end of file");
-                   }
-                   event = xpp.next();
-               }
-               int doubleCount = doubles.size();
-               double[] doubleVals = new double[doubleCount];
-               for (int i = 0; i < doubleCount; i++) {
-                   doubleVals[i] =  Double.parseDouble(doubles.get(i).toString());
-               }
-               return doubleVals;
-           } catch (XMLStreamException e) {
-               throw AxisFault.makeFault(e);
-           }
-
-       }
-
-    public static void serialize(
-        XMLStreamWriter out,
-        QName elementName,
-        String value)
-        throws AxisFault {
-        try {
-            out.writeStartElement(
-                elementName.getNamespaceURI(),
-                elementName.getLocalPart());
+            while (true) {
+                if (XMLStreamConstants.START_ELEMENT == event) {
+                    String stringValue = deserializeString(xpp);
+                    if (stringValue == null) {
+                        throw new AxisFault("Wrong type of argument");
+                    }
+                    doubles.add(stringValue);
+                } else if (XMLStreamConstants.END_ELEMENT == event) {
+                    break;
+                } else if (XMLStreamConstants.END_DOCUMENT == event) {
+                    throw new AxisFault("premature end of file");
+                }
+                event = xpp.next();
+            }
+            int doubleCount = doubles.size();
+            double[] doubleVals = new double[doubleCount];
+            for (int i = 0; i < doubleCount; i++) {
+                doubleVals[i] = Double.parseDouble(doubles.get(i).toString());
+            }
+            return doubleVals;
+        } catch (XMLStreamException e) {
+            throw AxisFault.makeFault(e);
+        }
+
+    }
+
+    public static void serialize(XMLStreamWriter out,
+                                 QName elementName,
+                                 String value)
+            throws AxisFault {
+        try {
+            out.writeStartElement(elementName.getNamespaceURI(),
+                    elementName.getLocalPart());
             out.writeCharacters(value);
             out.writeEndElement();
         } catch (XMLStreamException e) {

Modified: webservices/axis/trunk/java/dev/scratch/prototype2/src/test/org/apache/axis/transport/HTTPTrasportHeaderParsingTest.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/dev/scratch/prototype2/src/test/org/apache/axis/transport/HTTPTrasportHeaderParsingTest.java?view=diff&r1=153901&r2=153902
==============================================================================
--- webservices/axis/trunk/java/dev/scratch/prototype2/src/test/org/apache/axis/transport/HTTPTrasportHeaderParsingTest.java (original)
+++ webservices/axis/trunk/java/dev/scratch/prototype2/src/test/org/apache/axis/transport/HTTPTrasportHeaderParsingTest.java Mon Feb 14 22:22:34 2005
@@ -16,15 +16,15 @@
 
 package org.apache.axis.transport;
 
-import java.io.BufferedReader;
-import java.io.StringReader;
-import java.util.Map;
-
 import org.apache.axis.AbstractTestCase;
 import org.apache.axis.engine.AxisFault;
 import org.apache.axis.transport.http.HTTPConstants;
 import org.apache.axis.transport.http.HTTPTransportReciver;
 
+import java.io.BufferedReader;
+import java.io.StringReader;
+import java.util.Map;
+
 public class HTTPTrasportHeaderParsingTest extends AbstractTestCase {
 
     public HTTPTrasportHeaderParsingTest(String testName) {
@@ -33,7 +33,7 @@
 
     public void testServerHaeders() throws Exception {
         String message =
-            "POST /axis2/services/echo HTTP/1.0\n"
+                "POST /axis2/services/echo HTTP/1.0\n"
                 + "Content-Type: text/xml; charset=utf-8\n"
                 + "Accept: application/soap+xml, application/dime, multipart/related, text/*\n"
                 + "User-Agent: Axis/1.2RC1\n"
@@ -44,26 +44,24 @@
                 + "Content-Length: 73507\n\nee rwewebtewbeww";
         StringReader reader = new StringReader(message);
         HTTPTransportReciver reciver = new HTTPTransportReciver();
-        
+
         Map map = reciver.parseTheHeaders(reader, true);
         assertEquals(map.get(HTTPConstants.PROTOCOL_VERSION), "HTTP/1.0");
-        assertEquals(
-            map.get(HTTPConstants.REQUEST_URI),
-            "/axis2/services/echo");
-        assertEquals(
-            map.get("Accept"),
-            "application/soap+xml, application/dime, multipart/related, text/*");
+        assertEquals(map.get(HTTPConstants.REQUEST_URI),
+                "/axis2/services/echo");
+        assertEquals(map.get("Accept"),
+                "application/soap+xml, application/dime, multipart/related, text/*");
         assertEquals(map.get("User-Agent"), "Axis/1.2RC1");
         assertEquals(map.get("Host"), "127.0.0.1:8081");
         assertEquals(map.get("Cache-Control"), "no-cache");
         assertEquals(map.get("Pragma"), "no-cache");
         assertEquals(map.get("Content-Length"), "73507");
-        assertEquals(reader.read(),'e');
+        assertEquals(reader.read(), 'e');
     }
 
     public void testClientHeaders() throws Exception {
         String message =
-            "HTTP/1.1 200 OK\n"
+                "HTTP/1.1 200 OK\n"
                 + "Content-Type: text/xml;charset=utf-8\n"
                 + "Date: Sat, 12 Feb 2005 10:39:39 GMT\n"
                 + "Server: Apache-Coyote/1.1\n"
@@ -79,13 +77,13 @@
         assertEquals(map.get("Date"), "Sat, 12 Feb 2005 10:39:39 GMT");
         assertEquals(map.get("Server"), "Apache-Coyote/1.1");
         assertEquals(map.get("Connection"), "close");
-        assertEquals(reader.read(),'A');
+        assertEquals(reader.read(), 'A');
     }
 
     public void testWrongClientHeaders() throws AxisFault {
         try {
             String message =
-                "HTTP/1.1 200 OK\n"
+                    "HTTP/1.1 200 OK\n"
                     + "Content-Type: text/xml;charset=utf-8\n"
                     + "Date: Sat, 12 Feb 2005 10:39:39 GMT\n"
                     + "Server: Apache-Coyote/1.1\n"

Modified: webservices/axis/trunk/java/dev/scratch/prototype2/src/test/org/apache/wsdl/InterfaceTest.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/dev/scratch/prototype2/src/test/org/apache/wsdl/InterfaceTest.java?view=diff&r1=153901&r2=153902
==============================================================================
--- webservices/axis/trunk/java/dev/scratch/prototype2/src/test/org/apache/wsdl/InterfaceTest.java (original)
+++ webservices/axis/trunk/java/dev/scratch/prototype2/src/test/org/apache/wsdl/InterfaceTest.java Mon Feb 14 22:22:34 2005
@@ -27,76 +27,75 @@
         super(testName);
     }
 
-    public void testGetAllOperations(){
-        WSDLOperation op ;
+    public void testGetAllOperations() {
+        WSDLOperation op;
         WSDLInterface intfc;
         WSDLInterface[] array = new WSDLInterface[5];
         int interfaceCounter = 5;
         int operationCounter = 5;
-        
-        for(int j=0; j<interfaceCounter; j++){
+
+        for (int j = 0; j < interfaceCounter; j++) {
             intfc = new WSDLInterfaceImpl();
-            intfc.setName(new QName(WSDLConstants.WSDL2_0_NAMESPACE,"inteface"+j));
-	        for(int i=0; i<operationCounter; i++){
-	            op = new WSDLOperationImpl();
-	        	op.setName(new QName(WSDLConstants.WSDL1_1_NAMESPACE, "op"+i+"of inteface"+j));
-	        	assertNotNull(op.getName());
-	        	intfc.setOperation(op);
-	        }
-	        if(j>0){
-	            intfc.addSuperInterface(array[j-1]);
-	        }
-	        array[j] = intfc;
+            intfc.setName(new QName(WSDLConstants.WSDL2_0_NAMESPACE, "inteface" + j));
+            for (int i = 0; i < operationCounter; i++) {
+                op = new WSDLOperationImpl();
+                op.setName(new QName(WSDLConstants.WSDL1_1_NAMESPACE, "op" + i + "of inteface" + j));
+                assertNotNull(op.getName());
+                intfc.setOperation(op);
+            }
+            if (j > 0) {
+                intfc.addSuperInterface(array[j - 1]);
+            }
+            array[j] = intfc;
         }
         //System.out.println(array[0].getAllOperations().size());
-        assertEquals(((WSDLOperation)array[0].getAllOperations().get(new QName(WSDLConstants.WSDL1_1_NAMESPACE, "op0of inteface0"))).getName().getLocalPart(),"op0of inteface0" );
-        assertEquals(((WSDLOperation)array[0].getAllOperations().get(new QName(WSDLConstants.WSDL1_1_NAMESPACE, "op1of inteface0"))).getName().getLocalPart(),"op1of inteface0" );
-        assertEquals(array[interfaceCounter-1].getAllOperations().size(), interfaceCounter*operationCounter );
-        assertEquals(interfaceCounter*operationCounter,array[interfaceCounter-1].getAllOperations().size());
-        
+        assertEquals(((WSDLOperation) array[0].getAllOperations().get(new QName(WSDLConstants.WSDL1_1_NAMESPACE, "op0of inteface0"))).getName().getLocalPart(), "op0of inteface0");
+        assertEquals(((WSDLOperation) array[0].getAllOperations().get(new QName(WSDLConstants.WSDL1_1_NAMESPACE, "op1of inteface0"))).getName().getLocalPart(), "op1of inteface0");
+        assertEquals(array[interfaceCounter - 1].getAllOperations().size(), interfaceCounter * operationCounter);
+        assertEquals(interfaceCounter * operationCounter, array[interfaceCounter - 1].getAllOperations().size());
+
         Iterator iter = array[1].getAllOperations().keySet().iterator();
-        while(iter.hasNext()){
-           assertNotNull(((WSDLOperation)array[interfaceCounter-1].getAllOperations().get(iter.next())).getName());
+        while (iter.hasNext()) {
+            assertNotNull(((WSDLOperation) array[interfaceCounter - 1].getAllOperations().get(iter.next())).getName());
         }
-                
-        for(int j=0; j<interfaceCounter; j++){
-            for(int i=0; i<operationCounter; i++){
-                
-                assertEquals(((WSDLOperation)array[interfaceCounter-1].getAllOperations().get(new QName(WSDLConstants.WSDL1_1_NAMESPACE, "op"+j+"of inteface"+i))).getName().getLocalPart(),"op"+j+"of inteface"+i );
+
+        for (int j = 0; j < interfaceCounter; j++) {
+            for (int i = 0; i < operationCounter; i++) {
+
+                assertEquals(((WSDLOperation) array[interfaceCounter - 1].getAllOperations().get(new QName(WSDLConstants.WSDL1_1_NAMESPACE, "op" + j + "of inteface" + i))).getName().getLocalPart(), "op" + j + "of inteface" + i);
             }
         }
 
     }
-    
-    /***
-     * When a interface inherit two or more Interfaces the inherited operation 
+
+    /**
+     * When a interface inherit two or more Interfaces the inherited operation
      * who have the same QName should be the same Operation.
-     *
      */
-    public void testInheritedOperationResolution()throws Exception {
-        WSDLOperation op ;
+    public void testInheritedOperationResolution() throws Exception {
+        WSDLOperation op;
         WSDLInterface intfc;
         WSDLInterface[] array = new WSDLInterface[5];
         int interfaceCounter = 5;
         int operationCounter = 5;
-        for(int i= 0; i< interfaceCounter; i++){
+        for (int i = 0; i < interfaceCounter; i++) {
             intfc = new WSDLInterfaceImpl();
-            for(int j=0; j< operationCounter; j++){
+            for (int j = 0; j < operationCounter; j++) {
                 op = new WSDLOperationImpl();
-                op.setName(new QName(WSDLConstants.WSDL1_1_NAMESPACE, "operation"+j));                
+                op.setName(new QName(WSDLConstants.WSDL1_1_NAMESPACE, "operation" + j));
                 intfc.setOperation(op);
             }
-            intfc.setName(new QName(WSDLConstants.WSDL2_0_NAMESPACE, "Interface"+i));
+            intfc.setName(new QName(WSDLConstants.WSDL2_0_NAMESPACE, "Interface" + i));
             array[i] = intfc;
         }
-                
+
         WSDLInterface inheritedInterface = new WSDLInterfaceImpl();
-        for(int i=0; i< array.length; i++){
+        for (int i = 0; i < array.length; i++) {
             inheritedInterface.addSuperInterface(array[i]);
         }
-        
-        assertEquals(inheritedInterface.getAllOperations().size(),5);
-        
+
+        assertEquals(inheritedInterface.getAllOperations().size(), 5);
+
     }
 }
 

Modified: webservices/axis/trunk/java/dev/scratch/prototype2/src/test/org/apache/wsdl/WOMBuilderTest.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/dev/scratch/prototype2/src/test/org/apache/wsdl/WOMBuilderTest.java?view=diff&r1=153901&r2=153902
==============================================================================
--- webservices/axis/trunk/java/dev/scratch/prototype2/src/test/org/apache/wsdl/WOMBuilderTest.java (original)
+++ webservices/axis/trunk/java/dev/scratch/prototype2/src/test/org/apache/wsdl/WOMBuilderTest.java Mon Feb 14 22:22:34 2005
@@ -32,81 +32,81 @@
 
 /**
  * @author chathura@opensource.lk
- *
  */
 public class WOMBuilderTest extends AbstractTestCase {
 
     private WSDLDescription womDescription = null;
-    
+
     private Definition wsdl4jDefinition = null;
-        
-    public WOMBuilderTest(String testName){
-        super(testName);       
-    }
-    
-    private void initialize()throws Exception{
-        if(null == this.womDescription){        
-            InputStream in =new FileInputStream(this.getTestResourceFile("wsdl/SeismicService.wsdl"));
-        	this.womDescription = WOMBuilderFactory.getBuilder(WOMBuilderFactory.WSDL11).build(in);
+
+    public WOMBuilderTest(String testName) {
+        super(testName);
+    }
+
+    private void initialize() throws Exception {
+        if (null == this.womDescription) {
+            InputStream in = new FileInputStream(this.getTestResourceFile("wsdl/SeismicService.wsdl"));
+            this.womDescription = WOMBuilderFactory.getBuilder(WOMBuilderFactory.WSDL11).build(in);
         }
-        if(null == wsdl4jDefinition){
+        if (null == wsdl4jDefinition) {
             WSDLReader reader = WSDLFactory.newInstance().newWSDLReader();
             Document doc = Utils.newDocument(new FileInputStream(this.getTestResourceFile("wsdl/SeismicService.wsdl")));
             this.wsdl4jDefinition = reader.readWSDL(null, doc);
-        }        
+        }
     }
-    
-    public void testTopLevelComponentCount()throws Exception{
+
+    public void testTopLevelComponentCount() throws Exception {
         this.initialize();
         assertEquals(womDescription.getServices().size(), wsdl4jDefinition.getServices().size());
-        assertEquals(womDescription.getWsdlInterfaces().size(), wsdl4jDefinition.getPortTypes().size());;
+        assertEquals(womDescription.getWsdlInterfaces().size(), wsdl4jDefinition.getPortTypes().size());
+        ;
         assertEquals(womDescription.getServices().size(), wsdl4jDefinition.getServices().size());
         assertEquals(womDescription.getBindings().size(), wsdl4jDefinition.getBindings().size());
-        assertEquals(womDescription.getTypes().getTypes().size(), wsdl4jDefinition.getTypes().getExtensibilityElements().size());        
-    } 
-    
-    public void testInterfacesComponent()throws Exception{
+        assertEquals(womDescription.getTypes().getTypes().size(), wsdl4jDefinition.getTypes().getExtensibilityElements().size());
+    }
+
+    public void testInterfacesComponent() throws Exception {
         this.initialize();
-        Iterator interfaceIterator = this.womDescription.getWsdlInterfaces().values().iterator();  
+        Iterator interfaceIterator = this.womDescription.getWsdlInterfaces().values().iterator();
         Iterator porttypeIterator = this.wsdl4jDefinition.getPortTypes().values().iterator();
-        while(interfaceIterator.hasNext() & porttypeIterator.hasNext()){
-            WSDLInterface wsdlInterface = (WSDLInterface)interfaceIterator.next();
-            PortType porttype = (PortType)porttypeIterator.next();
+        while (interfaceIterator.hasNext() & porttypeIterator.hasNext()) {
+            WSDLInterface wsdlInterface = (WSDLInterface) interfaceIterator.next();
+            PortType porttype = (PortType) porttypeIterator.next();
             assertEquals(wsdlInterface.getName(), porttype.getQName());
             assertEquals(wsdlInterface.getTargetnamespace(), porttype.getQName().getNamespaceURI());
             assertEquals(wsdlInterface.getAllOperations().size(), porttype.getOperations().size());
             Iterator womOperationIterator = wsdlInterface.getAllOperations().values().iterator();
             Iterator wsdl4jOprationIterator = porttype.getOperations().iterator();
             //Will only work if the order is retained in the iteration
-            while(womOperationIterator.hasNext() & wsdl4jOprationIterator.hasNext()){
-                this.operationsWaliking((WSDLOperation)womOperationIterator.next(), (Operation)wsdl4jOprationIterator.next());
+            while (womOperationIterator.hasNext() & wsdl4jOprationIterator.hasNext()) {
+                this.operationsWaliking((WSDLOperation) womOperationIterator.next(), (Operation) wsdl4jOprationIterator.next());
             }
-            
+
         }
     }
 
-    public void testServiceComponent()throws Exception {
+    public void testServiceComponent() throws Exception {
         this.initialize();
         Iterator womServiceIterator = this.womDescription.getServices().values().iterator();
         Iterator wsdl4jServiceIterator = this.wsdl4jDefinition.getServices().values().iterator();
-        
-        while(womServiceIterator.hasNext() & wsdl4jServiceIterator.hasNext()){
-            WSDLService wsdlService = (WSDLService)womServiceIterator.next();
-            Service wsdl4jService = (Service)wsdl4jServiceIterator.next();
+
+        while (womServiceIterator.hasNext() & wsdl4jServiceIterator.hasNext()) {
+            WSDLService wsdlService = (WSDLService) womServiceIterator.next();
+            Service wsdl4jService = (Service) wsdl4jServiceIterator.next();
             assertEquals(wsdlService.getName(), wsdl4jService.getQName());
 //            System.out.println(wsdlService.getServiceInterface());
         }
     }
-    
-    
-    private void operationsWaliking(WSDLOperation womOperation, Operation wsdl4jOperation){
+
+
+    private void operationsWaliking(WSDLOperation womOperation, Operation wsdl4jOperation) {
         assertEquals(womOperation.getName().getLocalPart(), wsdl4jOperation.getName());
         //System.out.println(((ExtensibilityElement)wsdl4jDefinition.getTypes().getExtensibilityElements().get(1)).getElementType());
 //        System.out.println(womOperation.getInputMessage().getMessageLabel());
 //        System.out.println(wsdl4jOperation.getInput().getName());
         //assertEquals(womOperation.getInputMessage().getMessageLabel(), wsdl4jOperation.getInput().getName());
-       
+
     }
-    
-    
+
+
 }



Mime
View raw message