Author: asankha
Date: Tue Apr 17 23:06:38 2007
New Revision: 529883

URL: http://svn.apache.org/viewvc?view=rev&rev=529883
Log:
fix unit test to use xpath to select result value for stability

Modified:
    
webservices/synapse/trunk/java/modules/core/src/test/java/org/apache/synapse/n2n/SynapseCommodityServiceTest.java

Modified: 
webservices/synapse/trunk/java/modules/core/src/test/java/org/apache/synapse/n2n/SynapseCommodityServiceTest.java
URL: 
http://svn.apache.org/viewvc/webservices/synapse/trunk/java/modules/core/src/test/java/org/apache/synapse/n2n/SynapseCommodityServiceTest.java?view=diff&rev=529883&r1=529882&r2=529883
==============================================================================
--- 
webservices/synapse/trunk/java/modules/core/src/test/java/org/apache/synapse/n2n/SynapseCommodityServiceTest.java
 (original)
+++ 
webservices/synapse/trunk/java/modules/core/src/test/java/org/apache/synapse/n2n/SynapseCommodityServiceTest.java
 Tue Apr 17 23:06:38 2007
@@ -24,6 +24,7 @@
 import org.apache.axiom.om.OMElement;
 import org.apache.axiom.om.OMFactory;
 import org.apache.axiom.om.OMNamespace;
+import org.apache.axiom.om.xpath.AXIOMXPath;
 import org.apache.axis2.addressing.EndpointReference;
 import org.apache.axis2.client.Options;
 import org.apache.axis2.client.ServiceClient;
@@ -130,8 +131,9 @@
 
         assertNotNull(response);
 
-        OMElement returnEle = response.getFirstElement().getFirstElement().
-            getFirstChildWithName(new QName("return"));
+        AXIOMXPath xPath = new AXIOMXPath("//return");
+        xPath.addNamespace("ns","http://services.samples/xsd";);
+        OMElement returnEle = (OMElement) xPath.selectSingleNode(response);
 
         assertNotNull(returnEle);
 



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to