synapse-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sami...@apache.org
Subject svn commit: r356561 - in /incubator/synapse/trunk/java: project.xml test/org/apache/synapse/TestSynapseMessage.java
Date Tue, 13 Dec 2005 18:22:32 GMT
Author: saminda
Date: Tue Dec 13 10:22:28 2005
New Revision: 356561

URL: http://svn.apache.org/viewcvs?rev=356561&view=rev
Log:
Good News :) All test cases up and running and the build is sucessful. 
AddressingInProcessorTest is included to the test suite. 

Modified:
    incubator/synapse/trunk/java/project.xml
    incubator/synapse/trunk/java/test/org/apache/synapse/TestSynapseMessage.java

Modified: incubator/synapse/trunk/java/project.xml
URL: http://svn.apache.org/viewcvs/incubator/synapse/trunk/java/project.xml?rev=356561&r1=356560&r2=356561&view=diff
==============================================================================
--- incubator/synapse/trunk/java/project.xml (original)
+++ incubator/synapse/trunk/java/project.xml Tue Dec 13 10:22:28 2005
@@ -256,7 +256,7 @@
                 <include>**/*Test.java</include>
             </includes>
             <excludes>
-            <exclude>**/AddressingInProcessorTest.java</exclude>
+            <!--<exclude>**/AddressingInProcessorTest.java</exclude>-->
             </excludes>
         </unitTest>
         <resources>

Modified: incubator/synapse/trunk/java/test/org/apache/synapse/TestSynapseMessage.java
URL: http://svn.apache.org/viewcvs/incubator/synapse/trunk/java/test/org/apache/synapse/TestSynapseMessage.java?rev=356561&r1=356560&r2=356561&view=diff
==============================================================================
--- incubator/synapse/trunk/java/test/org/apache/synapse/TestSynapseMessage.java (original)
+++ incubator/synapse/trunk/java/test/org/apache/synapse/TestSynapseMessage.java Tue Dec 13
10:22:28 2005
@@ -8,8 +8,11 @@
 import org.apache.axis2.context.ConfigurationContextFactory;
 import org.apache.axis2.om.OMAbstractFactory;
 import org.apache.axis2.om.OMElement;
+import org.apache.axis2.om.OMNamespace;
 
 import org.apache.axis2.soap.SOAPEnvelope;
+import org.apache.axis2.soap.SOAPHeaderBlock;
+import org.apache.axis2.soap.SOAPFactory;
 import org.apache.synapse.axis2.Axis2SynapseMessage;
 
 public class TestSynapseMessage {
@@ -52,14 +55,11 @@
             String testingRepository) {
         Axis2SynapseMessage sm =
                 createSampleSOAP11MessageWithoutAddressing(testingRepository);
-
-        OMElement addressingTo = OMAbstractFactory.getOMFactory()
-                .createOMElement("To", Submission.WSA_NAMESPACE, "wsa");
-        OMAbstractFactory.getOMFactory().createText(addressingTo,
-                URN_SAMPLE_TO_ADDRESS);
-        sm.getEnvelope().getHeader().addChild(addressingTo);
-        SOAPEnvelope env = sm.getEnvelope();
-        System.out.println(env);
+        SOAPFactory fac = OMAbstractFactory.getSOAP11Factory();
+        OMNamespace wsaTo = fac.createOMNamespace(Submission.WSA_NAMESPACE,"wsa");
+        SOAPHeaderBlock addressingToHeaderBlock = fac.createSOAPHeaderBlock("To",wsaTo, sm.getEnvelope().getHeader());
+        addressingToHeaderBlock.setText(URN_SAMPLE_TO_ADDRESS);
+        sm.getEnvelope().getHeader().addChild(addressingToHeaderBlock);
         return sm;
 
     }



---------------------------------------------------------------------
To unsubscribe, e-mail: synapse-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: synapse-dev-help@ws.apache.org


Mime
View raw message