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 ch...@apache.org on 2004/12/22 09:21:10 UTC

svn commit: r123062 - in webservices/axis/trunk/java/dev/scratch/prototype2/src: java/org/apache/axis/addressing java/org/apache/axis/addressing/miheaders java/org/apache/axis/impl/llom java/org/apache/axis/impl/llom/builder java/org/apache/axis/impl/llom/factory java/org/apache/axis/om test/org/apache/axis/addressing test/org/apache/axis/addressing/miheaders test/org/apache/axis/clientapi

Author: chinthaka
Date: Wed Dec 22 00:21:08 2004
New Revision: 123062

URL: http://svn.apache.org/viewcvs?view=rev&rev=123062
Log:
1. Addded some more test cases
2. Removed parent and localName from the SOAPEnvelope constructor
3. Fixed a bug in StAXSOAPBuilder
Added:
   webservices/axis/trunk/java/dev/scratch/prototype2/src/test/org/apache/axis/addressing/
   webservices/axis/trunk/java/dev/scratch/prototype2/src/test/org/apache/axis/addressing/AnyContentTypeTest.java
   webservices/axis/trunk/java/dev/scratch/prototype2/src/test/org/apache/axis/addressing/EndpointReferenceTypeTest.java
   webservices/axis/trunk/java/dev/scratch/prototype2/src/test/org/apache/axis/addressing/miheaders/
   webservices/axis/trunk/java/dev/scratch/prototype2/src/test/org/apache/axis/addressing/miheaders/RelatesToTest.java
   webservices/axis/trunk/java/dev/scratch/prototype2/src/test/org/apache/axis/clientapi/
   webservices/axis/trunk/java/dev/scratch/prototype2/src/test/org/apache/axis/clientapi/AsyncResultTest.java
Modified:
   webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/addressing/ServiceName.java
   webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/addressing/miheaders/RelatesTo.java
   webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/impl/llom/SOAPEnvelopeImpl.java
   webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/impl/llom/builder/StAXSOAPModelBuilder.java
   webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/impl/llom/factory/OMLinkedListImplFactory.java
   webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/om/OMFactory.java

Modified: webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/addressing/ServiceName.java
Url: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/addressing/ServiceName.java?view=diff&rev=123062&p1=webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/addressing/ServiceName.java&r1=123061&p2=webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/addressing/ServiceName.java&r2=123062
==============================================================================
--- webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/addressing/ServiceName.java	(original)
+++ webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/addressing/ServiceName.java	Wed Dec 22 00:21:08 2004
@@ -42,4 +42,20 @@
         this.name = name;
         this.portName = portName;
     }
+
+    public QName getName() {
+        return name;
+    }
+
+    public void setName(QName name) {
+        this.name = name;
+    }
+
+    public String getPortName() {
+        return portName;
+    }
+
+    public void setPortName(String portName) {
+        this.portName = portName;
+    }
 }

Modified: webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/addressing/miheaders/RelatesTo.java
Url: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/addressing/miheaders/RelatesTo.java?view=diff&rev=123062&p1=webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/addressing/miheaders/RelatesTo.java&r1=123061&p2=webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/addressing/miheaders/RelatesTo.java&r2=123062
==============================================================================
--- webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/addressing/miheaders/RelatesTo.java	(original)
+++ webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/addressing/miheaders/RelatesTo.java	Wed Dec 22 00:21:08 2004
@@ -29,4 +29,20 @@
         this.address = address;
         this.relationshipType = relationshipType;
     }
+
+    public String getAddress() {
+        return address;
+    }
+
+    public void setAddress(String address) {
+        this.address = address;
+    }
+
+    public String getRelationshipType() {
+        return relationshipType;
+    }
+
+    public void setRelationshipType(String relationshipType) {
+        this.relationshipType = relationshipType;
+    }
 }

Modified: webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/impl/llom/SOAPEnvelopeImpl.java
Url: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/impl/llom/SOAPEnvelopeImpl.java?view=diff&rev=123062&p1=webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/impl/llom/SOAPEnvelopeImpl.java&r1=123061&p2=webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/impl/llom/SOAPEnvelopeImpl.java&r2=123062
==============================================================================
--- webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/impl/llom/SOAPEnvelopeImpl.java	(original)
+++ webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/impl/llom/SOAPEnvelopeImpl.java	Wed Dec 22 00:21:08 2004
@@ -27,21 +27,18 @@
      * @param builder
      */
     public SOAPEnvelopeImpl(OMXMLParserWrapper builder) {
-        super("", null, null, builder);
-        this.localName = SOAPENVELOPE_LOCAL_NAME;
-
+        super(SOAPENVELOPE_LOCAL_NAME, null, null, builder);
     }
 
-    public SOAPEnvelopeImpl(String localName, OMNamespace ns, OMElement parent, OMXMLParserWrapper builder) {
-        super(localName, ns, parent, builder);
+    public SOAPEnvelopeImpl(OMNamespace ns, OMXMLParserWrapper builder) {
+        super(SOAPENVELOPE_LOCAL_NAME, ns, null, builder);
     }
 
     /**
-     * @param localName
      * @param ns
      */
-    public SOAPEnvelopeImpl(String localName, OMNamespace ns) {
-        super(localName, ns);
+    public SOAPEnvelopeImpl(OMNamespace ns) {
+        super(SOAPENVELOPE_LOCAL_NAME, ns);
     }
 
     /**

Modified: webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/impl/llom/builder/StAXSOAPModelBuilder.java
Url: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/impl/llom/builder/StAXSOAPModelBuilder.java?view=diff&rev=123062&p1=webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/impl/llom/builder/StAXSOAPModelBuilder.java&r1=123061&p2=webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/impl/llom/builder/StAXSOAPModelBuilder.java&r2=123062
==============================================================================
--- webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/impl/llom/builder/StAXSOAPModelBuilder.java	(original)
+++ webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/impl/llom/builder/StAXSOAPModelBuilder.java	Wed Dec 22 00:21:08 2004
@@ -21,8 +21,8 @@
  * 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.
- *
- *         Note - OM navigator has been removed to simplify the build process
+ * <p/>
+ * Note - OM navigator has been removed to simplify the build process
  */
 public class StAXSOAPModelBuilder extends StAXBuilder {
 
@@ -81,7 +81,10 @@
         OMElement element = null;
         if (isEnvelope) {
 
-            envelope = ombuilderFactory.createSOAPEnvelope(elementName, null, null, this);
+            if (!elementName.equalsIgnoreCase(OMConstants.SOAPENVELOPE_LOCAL_NAME)) {
+                throw new OMException("First Element must contain the local name, " + OMConstants.SOAPENVELOPE_LOCAL_NAME);
+            }
+            envelope = ombuilderFactory.createSOAPEnvelope(null, this);
             element = (OMElementImpl) envelope;
             processNamespaceData(element, true);
 

Modified: webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/impl/llom/factory/OMLinkedListImplFactory.java
Url: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/impl/llom/factory/OMLinkedListImplFactory.java?view=diff&rev=123062&p1=webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/impl/llom/factory/OMLinkedListImplFactory.java&r1=123061&p2=webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/impl/llom/factory/OMLinkedListImplFactory.java&r2=123062
==============================================================================
--- webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/impl/llom/factory/OMLinkedListImplFactory.java	(original)
+++ webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/impl/llom/factory/OMLinkedListImplFactory.java	Wed Dec 22 00:21:08 2004
@@ -1,13 +1,7 @@
 package org.apache.axis.impl.llom.factory;
 
 import org.apache.axis.impl.llom.*;
-import org.apache.axis.impl.llom.util.StreamWriterToContentHandlerConverter;
-import org.apache.axis.impl.llom.builder.ObjectToOMBuilder;
 import org.apache.axis.om.*;
-import org.xml.sax.ContentHandler;
-
-import javax.xml.stream.XMLStreamWriter;
-import javax.xml.stream.XMLOutputFactory;
 
 /**
  * Copyright 2001-2004 The Apache Software Foundation.
@@ -76,16 +70,12 @@
         return new SOAPBodyImpl(localName, ns, parent, builder);
     }
 
-    public SOAPEnvelope createSOAPEnvelope(String localName, OMNamespace ns, OMElement parent, OMXMLParserWrapper builder) {
-        if (!localName.equals(OMConstants.SOAPENVELOPE_LOCAL_NAME)) {
-            throw new OMException("wrong name for the envelope!");
-        }
-        return new SOAPEnvelopeImpl(localName, ns, parent, builder);
-
+    public SOAPEnvelope createSOAPEnvelope(OMNamespace ns, OMXMLParserWrapper builder) {
+        return new SOAPEnvelopeImpl(ns, builder);
     }
 
-    public SOAPEnvelope createSOAPEnvelope(String localName, OMNamespace ns) {
-        return new SOAPEnvelopeImpl(localName, ns);
+    public SOAPEnvelope createSOAPEnvelope(OMNamespace ns) {
+        return new SOAPEnvelopeImpl(ns);
     }
 
     public SOAPEnvelope createOMEnvelope(OMXMLParserWrapper parserWrapper) {
@@ -121,7 +111,7 @@
     public SOAPEnvelope getDefaultEnvelope() {
         //Create an envelop
         OMNamespace ns = new OMNamespaceImpl(OMConstants.SOAP_ENVELOPE_NAMESPACE_URI, OMConstants.SOAPENVELOPE_NAMESPACE_PREFIX);
-        SOAPEnvelopeImpl env = new SOAPEnvelopeImpl(OMConstants.SOAPENVELOPE_LOCAL_NAME, ns);
+        SOAPEnvelopeImpl env = new SOAPEnvelopeImpl(ns);
 
         SOAPBodyImpl bodyImpl = new SOAPBodyImpl(env);
         bodyImpl.setComplete(true);

Modified: webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/om/OMFactory.java
Url: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/om/OMFactory.java?view=diff&rev=123062&p1=webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/om/OMFactory.java&r1=123061&p2=webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/om/OMFactory.java&r2=123062
==============================================================================
--- webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/om/OMFactory.java	(original)
+++ webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/om/OMFactory.java	Wed Dec 22 00:21:08 2004
@@ -108,19 +108,16 @@
 
 
     /**
-     * @param localName
      * @param ns
-     * @param parent
      * @param builder
      * @return
      */
-    public abstract SOAPEnvelope createSOAPEnvelope(String localName, OMNamespace ns, OMElement parent, OMXMLParserWrapper builder);
+    public abstract SOAPEnvelope createSOAPEnvelope(OMNamespace ns, OMXMLParserWrapper builder);
 
     /**
-     * @param localName
      * @param ns
      */
-    public abstract SOAPEnvelope createSOAPEnvelope(String localName, OMNamespace ns);
+    public abstract SOAPEnvelope createSOAPEnvelope(OMNamespace ns);
 
     /**
      * @param envelope

Added: webservices/axis/trunk/java/dev/scratch/prototype2/src/test/org/apache/axis/addressing/AnyContentTypeTest.java
Url: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/dev/scratch/prototype2/src/test/org/apache/axis/addressing/AnyContentTypeTest.java?view=auto&rev=123062
==============================================================================
--- (empty file)
+++ webservices/axis/trunk/java/dev/scratch/prototype2/src/test/org/apache/axis/addressing/AnyContentTypeTest.java	Wed Dec 22 00:21:08 2004
@@ -0,0 +1,56 @@
+/**
+* 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: Dec 22, 2004
+* Time: 11:32:03 AM
+*/
+package org.apache.axis.addressing;
+
+import junit.framework.TestCase;
+
+import javax.xml.namespace.QName;
+
+
+public class AnyContentTypeTest extends TestCase {
+    private AnyContentType anyContentType;
+
+    public static void main(String[] args) {
+        junit.textui.TestRunner.run(AnyContentTypeTest.class);
+    }
+
+    /*
+     * @see TestCase#setUp()
+     */
+    protected void setUp() throws Exception {
+        super.setUp();
+        anyContentType = new AnyContentType();
+    }
+
+    public void testAddAndGetReferenceValue() {
+        System.out.println("Testing by putting more than 5 values in this. (this is initialized for 5)");
+        for(int i=0; i < 10; i++){
+           anyContentType.addReferenceValue(new QName("http://www.opensouce.lk/"+i, ""+i), "value "+i*100);
+        }
+
+        for(int i=0; i < 10; i++){
+           String value = anyContentType.getReferenceValue(new QName("http://www.opensouce.lk/"+i, ""+i));
+            assertEquals("Input value differs from what is taken out from AnyContentType", value, "value "+i*100);
+        }
+
+    }
+
+   
+}

Added: webservices/axis/trunk/java/dev/scratch/prototype2/src/test/org/apache/axis/addressing/EndpointReferenceTypeTest.java
Url: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/dev/scratch/prototype2/src/test/org/apache/axis/addressing/EndpointReferenceTypeTest.java?view=auto&rev=123062
==============================================================================
--- (empty file)
+++ webservices/axis/trunk/java/dev/scratch/prototype2/src/test/org/apache/axis/addressing/EndpointReferenceTypeTest.java	Wed Dec 22 00:21:08 2004
@@ -0,0 +1,108 @@
+/**
+ * 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: Dec 22, 2004
+ * Time: 11:42:51 AM
+ */
+package org.apache.axis.addressing;
+
+import junit.framework.TestCase;
+
+import javax.xml.namespace.QName;
+
+
+public class EndpointReferenceTypeTest extends TestCase {
+
+    EndpointReferenceType endpointReferenceType;
+    private String headerType = AddressingConstants.WSA_FROM;
+    private String address = "htttp://wwww.openource.lk/~chinthaka";
+
+    public static void main(String[] args) {
+        junit.textui.TestRunner.run(EndpointReferenceTypeTest.class);
+    }
+
+    /*
+     * @see TestCase#setUp()
+     */
+    protected void setUp() throws Exception {
+        super.setUp();
+        endpointReferenceType = new EndpointReferenceType(headerType, address);
+    }
+
+    public void testGetAndSetMessageInformationHeaderType() {
+        assertEquals("MessageInformationHeaderType not set properly in the constructor", headerType, endpointReferenceType.getMessageInformationHeaderType());
+
+        endpointReferenceType.setMessageInformationHeaderType(AddressingConstants.WSA_REPLY_TO);
+        assertEquals("MessageInformationHeaderType not set properly in the setter method", AddressingConstants.WSA_REPLY_TO, endpointReferenceType.getMessageInformationHeaderType());
+    }
+
+    public void testGetAndSetAddress() {
+        assertEquals("Address not set properly in the constructor", address, endpointReferenceType.getAddress());
+
+        String newAddress = "http://www.axis2.com";
+        endpointReferenceType.setAddress(newAddress);
+        assertEquals("Address not set properly in the setter method", newAddress, endpointReferenceType.getAddress());
+    }
+
+    public void testGetAndSetPortType() {
+        QName portType = new QName("www.someport.com", "port");
+        endpointReferenceType.setPortType(portType);
+        assertEquals("PortType not set/get properly", portType, endpointReferenceType.getPortType());
+    }
+
+    public void testGetAndSetReferenceProperties() {
+        AnyContentType anyContentType = new AnyContentType();
+        for(int i=0; i < 10; i++){
+           anyContentType.addReferenceValue(new QName("http://www.opensouce.lk/"+i, ""+i), "value "+i*100);
+        }
+        endpointReferenceType.setReferenceProperties(anyContentType);
+
+        AnyContentType retrievedAnyContentType = endpointReferenceType.getReferenceProperties();
+        for(int i=0; i < 10; i++){
+           String value = retrievedAnyContentType.getReferenceValue(new QName("http://www.opensouce.lk/"+i, ""+i));
+            assertEquals("Input value differs from what is taken out from AnyContentType", value, "value "+i*100);
+        }
+
+    }
+
+    public void testGetAndSetReferenceParameters() {
+       AnyContentType anyContentType = new AnyContentType();
+        for(int i=0; i < 10; i++){
+           anyContentType.addReferenceValue(new QName("http://www.opensouce.lk/"+i, ""+i), "value "+i*50);
+        }
+        endpointReferenceType.setReferenceParameters(anyContentType);
+
+        AnyContentType retrievedAnyContentType = endpointReferenceType.getReferenceParameters();
+        for(int i=0; i < 10; i++){
+           String value = retrievedAnyContentType.getReferenceValue(new QName("http://www.opensouce.lk/"+i, ""+i));
+            assertEquals("Input value differs from what is taken out from AnyContentType", value, "value "+i*50);
+        }
+    }
+
+    public void testGetAndSetServiceName() {
+        ServiceName serviceName = new ServiceName(new QName("www.someservicename.org", "service"));
+        endpointReferenceType.setServiceName(serviceName);
+        ServiceName retrievedServiceName = endpointReferenceType.getServiceName();
+        assertEquals("ServiceName name has not been get/set properly", serviceName.getName(), retrievedServiceName.getName());
+
+        serviceName = new ServiceName(new QName("www.someservicename.org", "service"), "portName");
+        endpointReferenceType.setServiceName(serviceName);
+        retrievedServiceName = endpointReferenceType.getServiceName();
+        assertEquals("ServiceName name has not been get/set properly", serviceName.getName(), retrievedServiceName.getName());
+        assertEquals("ServiceName portName has not been get/set properly", serviceName.getPortName(), retrievedServiceName.getPortName());
+    }
+
+}

Added: webservices/axis/trunk/java/dev/scratch/prototype2/src/test/org/apache/axis/addressing/miheaders/RelatesToTest.java
Url: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/dev/scratch/prototype2/src/test/org/apache/axis/addressing/miheaders/RelatesToTest.java?view=auto&rev=123062
==============================================================================
--- (empty file)
+++ webservices/axis/trunk/java/dev/scratch/prototype2/src/test/org/apache/axis/addressing/miheaders/RelatesToTest.java	Wed Dec 22 00:21:08 2004
@@ -0,0 +1,67 @@
+/**
+* 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: Dec 22, 2004
+* Time: 12:11:29 PM
+*/
+package org.apache.axis.addressing.miheaders;
+
+import junit.framework.TestCase;
+
+
+public class RelatesToTest extends TestCase {
+    private RelatesTo relatesTo;
+      String address = "www.someaddress.com";
+    String relationshipType = "Reply";
+
+
+    public static void main(String[] args) {
+        junit.textui.TestRunner.run(RelatesToTest.class);
+
+    }
+
+    protected void setUp() throws Exception {
+
+    }
+
+    public void testGetAddress() {
+        relatesTo = new RelatesTo(address, relationshipType);
+
+        assertEquals("RelatesTo address has not been set properly in the constructor", relatesTo.getAddress(), address);
+
+        String newAddress = "www.newRelation.org";
+        relatesTo.setAddress(newAddress);
+        assertEquals("RelatesTo address has not been get/set properly", relatesTo.getAddress(), newAddress);
+
+    }
+
+    public void testGetRelationshipType() {
+        relatesTo = new RelatesTo(address, relationshipType);
+
+        assertEquals("RelatesTo RelationshipType has not been set properly in the constructor", relatesTo.getRelationshipType(), relationshipType);
+
+        String newRelationshipType = "AnyOtherType";
+        relatesTo.setRelationshipType(newRelationshipType);
+        assertEquals("RelatesTo address has not been get/set properly", relatesTo.getRelationshipType(), newRelationshipType);
+    }
+
+    public void testSingleArgumentConstructor(){
+        relatesTo = new RelatesTo(address);
+        assertEquals("RelatesTo address has not been set properly in the constructor", relatesTo.getAddress(), address);
+        
+    }
+
+}

Added: webservices/axis/trunk/java/dev/scratch/prototype2/src/test/org/apache/axis/clientapi/AsyncResultTest.java
Url: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/dev/scratch/prototype2/src/test/org/apache/axis/clientapi/AsyncResultTest.java?view=auto&rev=123062
==============================================================================
--- (empty file)
+++ webservices/axis/trunk/java/dev/scratch/prototype2/src/test/org/apache/axis/clientapi/AsyncResultTest.java	Wed Dec 22 00:21:08 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: Dec 22, 2004
+ * Time: 1:54:47 PM
+ */
+package org.apache.axis.clientapi;
+
+import junit.framework.TestCase;
+import org.apache.axis.om.SOAPEnvelope;
+import org.apache.axis.om.OMFactory;
+
+
+public class AsyncResultTest extends TestCase {
+
+    private AsyncResult asyncResult;
+
+    public static void main(String[] args) {
+        junit.textui.TestRunner.run(AsyncResultTest.class);
+    }
+
+    protected void setUp() throws Exception {
+        asyncResult = new AsyncResult();
+
+    }
+
+    public void testSetResult() {
+//            SOAPEnvelope soapEnvelope = OMFactory.newInstance().createSOAPEnvelope()
+    }
+
+}