You are viewing a plain text version of this content. The canonical link for it is here.
Posted to muse-dev@ws.apache.org by ip...@apache.org on 2005/05/25 18:04:52 UTC

svn commit: r178470 - /incubator/muse/trunk/src/site/content/interop/src/test/org/apache/xmlbeans/BugTester.java

Author: ips
Date: Wed May 25 09:04:51 2005
New Revision: 178470

URL: http://svn.apache.org/viewcvs?rev=178470&view=rev
Log:
added test for Saaj proxy feature

Modified:
    incubator/muse/trunk/src/site/content/interop/src/test/org/apache/xmlbeans/BugTester.java

Modified: incubator/muse/trunk/src/site/content/interop/src/test/org/apache/xmlbeans/BugTester.java
URL: http://svn.apache.org/viewcvs/incubator/muse/trunk/src/site/content/interop/src/test/org/apache/xmlbeans/BugTester.java?rev=178470&r1=178469&r2=178470&view=diff
==============================================================================
--- incubator/muse/trunk/src/site/content/interop/src/test/org/apache/xmlbeans/BugTester.java (original)
+++ incubator/muse/trunk/src/site/content/interop/src/test/org/apache/xmlbeans/BugTester.java Wed May 25 09:04:51 2005
@@ -18,6 +18,11 @@
 import junit.framework.TestCase;
 
 import java.net.URL;
+import java.io.File;
+
+import org.apache.xmlbeans.impl.newstore2.Saaj;
+
+import javax.xml.soap.SOAPEnvelope;
 
 /**
  * TODO
@@ -30,7 +35,7 @@
         XmlObject xBean = XmlObject.Factory.parse( "<?xml version=\"1.0\" encoding=\"utf-8\"?><soap:Envelope xmlns:wsa=\"http://schemas.xmlsoap.org/ws/2003/03/addressing\" xmlns:soap=\"http://schemas.xmlsoap.org/soap/envelope/\"><soap:Header><wsa:Action>http://docs.oasis-open.org/wsn/2004/06/WS-BaseNotification/Notify</wsa:Action><wsa:MessageID>uuid:9ef8b30f-0887-4e48-a922-b06fa6f5964b</wsa:MessageID><wsa:To>http://156.152.12.172:9101/</wsa:To></soap:Header><soap:Body><Notify xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns=\"http://docs.oasis-open.org/wsn/2004/06/wsn-WS-BaseNotification-1.2-draft-01.xsd\"><NotificationMessage><Topic xmlns:soapenv=\"http://schemas.xmlsoap.org/soap/envelope/\" xmlns:wsdm=\"http://docs.oasis-open.org/wsdm/2004/12/mows/wsdm-mows-events.xml\" xmlns:wsn=\"http://docs.oasis-open.org/wsn/2004/06/wsn-WS-BaseNotification-1.2-draft-01.xsd\" Dialect=\"http://docs.oasis-open.org/wsn/2004/06/TopicExpression/Simple\">wsdm:RequestProcessingObservations</Topic><Message><ManagementEvent ReportTime=\"2005-04-13T13:34:09.6562816-04:00\" xmlns=\"http://docs.oasis-open.org/wsdm/2004/12/muws/wsdm-muws-part1.xsd\"><EventId>eid:c2e0fc75-272a-4ac7-b08f-28de513e1219</EventId><SourceComponent><ResourceId>rid:e3a0b27a-45e0-40af-a15b-1cdc263f24ce</ResourceId></SourceComponent><RequestProcessingNotification CurrentTime=\"2005-04-13T13:34:09.6562816-04:00\" xmlns=\"http://docs.oasis-open.org/wsdm/2004/12/mows/wsdm-mows.xsd\"><Request><Message><Size Unit=\"byte\">350</Size><Text>" +
                         "&lt;?xml version=\"1.0\" encoding=\"utf-8\"?&gt;&lt;soap:Envelope xmlns:soap=\"http://schemas.xmlsoap.org/soap/envelope/\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\"&gt;&lt;soap:Body&gt;&lt;GetCurrentTemperature xmlns=\"http://everest.org/\"&gt;&lt;altitude&gt;8000&lt;/altitude&gt;&lt;/GetCurrentTemperature&gt;&lt;/soap:Body&gt;&lt;/soap:Envelope&gt;\n" +
                         "</Text></Message></Request><StateInformation><StateTransition Time=\"2005-04-13T13:34:09.6562816-04:00\" xmlns=\"http://docs.oasis-open.org/wsdm/2004/12/muws/wsdm-muws-part2.xsd\"><EnteredState><RequestReceivedState xmlns=\"http://docs.oasis-open.org/wsdm/2004/12/mows/wsdm-mows.xsd\" /></EnteredState></StateTransition></StateInformation></RequestProcessingNotification></ManagementEvent></Message></NotificationMessage></Notify></soap:Body></soap:Envelope>" );
-        System.out.println( xBean );  // visually verify that both Message elements are serialized with the correct namespaces 
+        System.out.println( xBean );  // visually verify that both Message elements are serialized with the correct namespaces
     }
 
     public void testParseURLWithNoTerminatingNewline() throws Exception
@@ -41,6 +46,14 @@
         // TODO: try w/ http URL
     }
 
+    public void testSaajProxy() throws Exception
+    {
+        XmlOptions xmlOpts = new XmlOptions();
+        xmlOpts.put( Saaj.SAAJ_IMPL, new Object() );
+        XmlObject xBean = XmlObject.Factory.parse( new File( "C:\\Projects\\Apache\\apollo\\trunk\\src\\site\\content\\tutorial\\requests\\Destroy.soap" ), xmlOpts );
+        assertTrue( xBean instanceof SOAPEnvelope );
+    }
+        
     public void testXmlObjectValueEquals() throws Exception
     {
         // TODO: test if XmlObject#valueEquals() works when comparing two complex types



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