axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sc...@apache.org
Subject svn commit: r428742 [2/2] - in /webservices/axis2/trunk/java/modules/jaxws: src/org/apache/axis2/jaxws/ src/org/apache/axis2/jaxws/client/proxy/ src/org/apache/axis2/jaxws/core/controller/ src/org/apache/axis2/jaxws/description/ src/org/apache/axis2/ja...
Date Fri, 04 Aug 2006 14:48:36 GMT
Modified: webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/message/SAAJConverterTests.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/message/SAAJConverterTests.java?rev=428742&r1=428741&r2=428742&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/message/SAAJConverterTests.java
(original)
+++ webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/message/SAAJConverterTests.java
Fri Aug  4 07:48:34 2006
@@ -23,13 +23,17 @@
 import javax.xml.soap.SOAPBodyElement;
 import javax.xml.soap.SOAPElement;
 import javax.xml.soap.SOAPEnvelope;
+import javax.xml.soap.SOAPFactory;
 import javax.xml.soap.SOAPMessage;
 import javax.xml.stream.XMLInputFactory;
 import javax.xml.stream.XMLStreamReader;
 
 import junit.framework.TestCase;
 
+import org.apache.axiom.om.OMAbstractFactory;
 import org.apache.axiom.om.OMElement;
+import org.apache.axiom.om.OMFactory;
+import org.apache.axiom.om.OMNamespace;
 import org.apache.axiom.soap.impl.builder.StAXSOAPModelBuilder;
 import org.apache.axis2.jaxws.message.factory.SAAJConverterFactory;
 import org.apache.axis2.jaxws.message.util.SAAJConverter;
@@ -150,4 +154,25 @@
 		om = converter.toOM(se);
 		assertTrue(om.getLocalName().equals("a"));
 	}
+	
+	/**
+	 * @testStrategy: Create an OMElement, without using a builder.  Verification of AXIS2-970
+	 */
+    public void test3() throws Exception {
+    	
+//    	 Step 1: Get the SAAJConverter object from the Factory
+		SAAJConverterFactory f = (SAAJConverterFactory) 
+			FactoryRegistry.getFactory(SAAJConverterFactory.class);
+		SAAJConverter converter = f.getSAAJConverter();
+		
+		// Stept 2: Create OM and parent SOAPElement
+        OMFactory fac = OMAbstractFactory.getOMFactory();
+        OMNamespace wrapNs = fac.createOMNamespace("namespace", "prefix");
+        OMElement ome = fac.createOMElement("localname", wrapNs);
+        SOAPFactory sf = SOAPFactory.newInstance();
+        SOAPElement se = sf.createElement("name");
+        
+        // Step 3: Do the conversion
+        converter.toSAAJ(ome, se, sf);
+    }
 }



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


Mime
View raw message