axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chinth...@apache.org
Subject svn commit: r171054 - in /webservices/axis/trunk/java: etc/ modules/addressing/test/org/apache/axis/handlers/addressing/ modules/addressing/test/org/apache/axis/handlers/util/ modules/xml/src/org/apache/axis/soap/impl/llom/factory/
Date Fri, 20 May 2005 05:01:41 GMT
Author: chinthaka
Date: Thu May 19 22:01:41 2005
New Revision: 171054

URL: http://svn.apache.org/viewcvs?rev=171054&view=rev
Log:
Fixing Addressing test cases and including the tests the main build.


Modified:
    webservices/axis/trunk/java/etc/project.xml
    webservices/axis/trunk/java/modules/addressing/test/org/apache/axis/handlers/addressing/AddressingOutHandlerTest.java
    webservices/axis/trunk/java/modules/addressing/test/org/apache/axis/handlers/util/TestUtil.java
    webservices/axis/trunk/java/modules/xml/src/org/apache/axis/soap/impl/llom/factory/SOAPLinkedListImplFactory.java

Modified: webservices/axis/trunk/java/etc/project.xml
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/etc/project.xml?rev=171054&r1=171053&r2=171054&view=diff
==============================================================================
--- webservices/axis/trunk/java/etc/project.xml (original)
+++ webservices/axis/trunk/java/etc/project.xml Thu May 19 22:01:41 2005
@@ -170,9 +170,7 @@
     
       <excludes>
         <exclude>**/*Abstract*.java</exclude>
-	    <exclude>**/*Util*.java</exclude>
-		<exclude>**/*AddressingInHandlerTest.java</exclude>
-		<exclude>**/*AddressingOutHandlerTest.java</exclude> 
+	    <exclude>**/*Util*.java</exclude> 
 		<exclude>**/*PhaseResolvingTest.java</exclude>
 
 	    <exclude>**/*Phase*.java</exclude>

Modified: webservices/axis/trunk/java/modules/addressing/test/org/apache/axis/handlers/addressing/AddressingOutHandlerTest.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/addressing/test/org/apache/axis/handlers/addressing/AddressingOutHandlerTest.java?rev=171054&r1=171053&r2=171054&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/addressing/test/org/apache/axis/handlers/addressing/AddressingOutHandlerTest.java
(original)
+++ webservices/axis/trunk/java/modules/addressing/test/org/apache/axis/handlers/addressing/AddressingOutHandlerTest.java
Thu May 19 22:01:41 2005
@@ -4,10 +4,8 @@
 
 import junit.framework.TestCase;
 
-import org.apache.axis.addressing.AddressingConstants;
-import org.apache.axis.addressing.AnyContentType;
-import org.apache.axis.addressing.EndpointReference;
-import org.apache.axis.addressing.ServiceName;
+import org.apache.axis.addressing.*;
+import org.apache.axis.addressing.miheaders.RelatesTo;
 import org.apache.axis.context.MessageContext;
 import org.apache.axis.context.OperationContextFactory;
 import org.apache.axis.handlers.util.TestUtil;
@@ -15,6 +13,7 @@
 import org.apache.axis.om.impl.llom.util.XMLComparator;
 import org.apache.axis.soap.SOAPEnvelope;
 import org.apache.axis.soap.impl.llom.builder.StAXSOAPModelBuilder;
+import org.apache.axis.description.ServiceDescription;
 import org.apache.wsdl.WSDLConstants;
 
 /**
@@ -50,8 +49,6 @@
         outHandler = new AddressingOutHandler();
         testUtil = new TestUtil();
 
-        msgCtxt = new MessageContext(null, null, null,null,OperationContextFactory.createMEPContext(WSDLConstants.MEP_CONSTANT_IN_OUT,false,null,null));
-
     }
 
     public void testAddToSOAPHeader() throws Exception {
@@ -77,45 +74,45 @@
         assertTrue(xmlComparator.compare(omBuilder.getDocumentElement(), defaultEnvelope));
     }
 
-//    public void testHeaderCreationFromMsgCtxtInformation() throws Exception {
-//        MessageInformationHeadersCollection mIHeaders = new MessageInformationHeadersCollection();
-//
-//        AnyContentType referenceValues = new AnyContentType();
-//
-//        EndpointReference epr = new EndpointReference(WSA_FROM, "http://www.from.org/service/");
-//        referenceValues.addReferenceValue(new QName("Reference2"), "Value 200");
-//        epr.setReferenceParameters(referenceValues);
-//        mIHeaders.setFrom(epr);
-//
-//        epr = new EndpointReference(WSA_TO, "http://www.to.org/service/");
-//        referenceValues = new AnyContentType();
-//        referenceValues.addReferenceValue(new QName("Reference1"), "Value 100");
-//        epr.setReferenceProperties(referenceValues);
-//        epr.setServiceName(new ServiceName(new QName("http://www.from.org/service/", "Service",
"serviceNS"), "port"));
-//        mIHeaders.setTo(epr);
-//
-//        epr = new EndpointReference(WSA_REPLY_TO, "http://www.replyTo.org/service/");
-//        referenceValues = new AnyContentType();
-//        referenceValues.addReferenceValue(new QName("Reference3"), "Value 300");
-//        epr.setPortType(new QName("http://www.from.org/service/port/", "Port", "portNS"));
-//        epr.setReferenceProperties(referenceValues);
-//
-//        referenceValues = new AnyContentType();
-//        referenceValues.addReferenceValue(new QName("Reference4"), "Value 400");
-//        epr.setReferenceParameters(referenceValues);
-//        mIHeaders.setTo(epr);
-//
-//        mIHeaders.setMessageId("123456-7890");
-//        mIHeaders.setAction("http://www.actions.org/action");
-//
-//        RelatesTo relatesTo = new RelatesTo("http://www.relatesTo.org/service/", "TestRelation");
-//        mIHeaders.setRelatesTo(relatesTo);
-//
-//        msgCtxt.setMessageInformationHeaders(mIHeaders);
-//        msgCtxt.setEnvelope(OMAbstractFactory.getSOAP11Factory().getDefaultEnvelope());
-//        outHandler.invoke(msgCtxt);
-//
-//        XMLComparator xmlComparator = new XMLComparator();
-//        assertTrue(xmlComparator.compare(msgCtxt.getEnvelope(), testUtil.getOMBuilder("OutHandlerTest.xml").getDocumentElement()));
-//    }
+    public void testHeaderCreationFromMsgCtxtInformation() throws Exception {
+        MessageInformationHeadersCollection mIHeaders = new MessageInformationHeadersCollection();
+
+        AnyContentType referenceValues = new AnyContentType();
+
+        EndpointReference epr = new EndpointReference(WSA_FROM, "http://www.from.org/service/");
+        referenceValues.addReferenceValue(new QName("Reference2"), "Value 200");
+        epr.setReferenceParameters(referenceValues);
+        mIHeaders.setFrom(epr);
+
+        epr = new EndpointReference(WSA_TO, "http://www.to.org/service/");
+        referenceValues = new AnyContentType();
+        referenceValues.addReferenceValue(new QName("Reference1"), "Value 100");
+        epr.setReferenceProperties(referenceValues);
+        epr.setServiceName(new ServiceName(new QName("http://www.from.org/service/", "Service",
"serviceNS"), "port"));
+        mIHeaders.setTo(epr);
+
+        epr = new EndpointReference(WSA_REPLY_TO, "http://www.replyTo.org/service/");
+        referenceValues = new AnyContentType();
+        referenceValues.addReferenceValue(new QName("Reference3"), "Value 300");
+        epr.setPortType(new QName("http://www.from.org/service/port/", "Port", "portNS"));
+        epr.setReferenceProperties(referenceValues);
+
+        referenceValues = new AnyContentType();
+        referenceValues.addReferenceValue(new QName("Reference4"), "Value 400");
+        epr.setReferenceParameters(referenceValues);
+        mIHeaders.setReplyTo(epr);
+
+        mIHeaders.setMessageId("123456-7890");
+        mIHeaders.setAction("http://www.actions.org/action");
+
+        RelatesTo relatesTo = new RelatesTo("http://www.relatesTo.org/service/", "TestRelation");
+        mIHeaders.setRelatesTo(relatesTo);
+
+        msgCtxt = new MessageContext(null, mIHeaders);
+        msgCtxt.setEnvelope(OMAbstractFactory.getSOAP11Factory().getDefaultEnvelope());
+        outHandler.invoke(msgCtxt);
+
+        XMLComparator xmlComparator = new XMLComparator();
+        assertTrue(xmlComparator.compare(msgCtxt.getEnvelope(), testUtil.getOMBuilder("OutHandlerTest.xml").getDocumentElement()));
+    }
 }

Modified: webservices/axis/trunk/java/modules/addressing/test/org/apache/axis/handlers/util/TestUtil.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/addressing/test/org/apache/axis/handlers/util/TestUtil.java?rev=171054&r1=171053&r2=171054&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/addressing/test/org/apache/axis/handlers/util/TestUtil.java
(original)
+++ webservices/axis/trunk/java/modules/addressing/test/org/apache/axis/handlers/util/TestUtil.java
Thu May 19 22:01:41 2005
@@ -31,7 +31,7 @@
 
     protected static final String IN_FILE_NAME = "soapmessage.xml";
     protected StAXSOAPModelBuilder builder;
-    protected String testResourceDir = "src" + File.separator + "test-resources";
+    protected String testResourceDir = "test-resources";
 
 
     public StAXSOAPModelBuilder getOMBuilder(String fileName) throws Exception {

Modified: webservices/axis/trunk/java/modules/xml/src/org/apache/axis/soap/impl/llom/factory/SOAPLinkedListImplFactory.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/xml/src/org/apache/axis/soap/impl/llom/factory/SOAPLinkedListImplFactory.java?rev=171054&r1=171053&r2=171054&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/xml/src/org/apache/axis/soap/impl/llom/factory/SOAPLinkedListImplFactory.java
(original)
+++ webservices/axis/trunk/java/modules/xml/src/org/apache/axis/soap/impl/llom/factory/SOAPLinkedListImplFactory.java
Thu May 19 22:01:41 2005
@@ -7,6 +7,7 @@
 import org.apache.axis.om.impl.llom.factory.OMLinkedListImplFactory;
 import org.apache.axis.soap.*;
 import org.apache.axis.soap.impl.llom.*;
+import org.apache.axis.soap.impl.llom.SOAPConstants;
 import org.apache.axis.soap.impl.llom.soap11.SOAP11Constants;
 
 /**



Mime
View raw message