Author: ips
Date: Tue May 24 11:45:26 2005
New Revision: 178240

URL: http://svn.apache.org/viewcvs?rev=178240&view=rev
Log:
misc

Added:
    incubator/muse/trunk/src/site/content/interop/src/test/org/apache/xmlbeans/
    
incubator/muse/trunk/src/site/content/interop/src/test/org/apache/xmlbeans/BugTester.java
    
incubator/muse/trunk/src/site/content/interop/src/test/org/apache/xmlbeans/NoNewLine.xml
Modified:
    
incubator/muse/trunk/src/java/org/apache/ws/muws/v1_0/capability/impl/RelationshipsCapabilityImpl.java
    
incubator/muse/trunk/src/site/content/interop/src/java/org/everestWeather/wsdm/samples/x2005/x04/schema/WeatherstationResource.java

Modified: 
incubator/muse/trunk/src/java/org/apache/ws/muws/v1_0/capability/impl/RelationshipsCapabilityImpl.java
URL: 
http://svn.apache.org/viewcvs/incubator/muse/trunk/src/java/org/apache/ws/muws/v1_0/capability/impl/RelationshipsCapabilityImpl.java?rev=178240&r1=178239&r2=178240&view=diff
==============================================================================
--- 
incubator/muse/trunk/src/java/org/apache/ws/muws/v1_0/capability/impl/RelationshipsCapabilityImpl.java
 (original)
+++ 
incubator/muse/trunk/src/java/org/apache/ws/muws/v1_0/capability/impl/RelationshipsCapabilityImpl.java
 Tue May 24 11:45:26 2005
@@ -17,23 +17,21 @@
 
 import org.apache.ws.muws.v1_0.capability.RelationshipsCapability;
 import org.apache.ws.resource.ResourceContext;
-import org.apache.ws.resource.Resource;
 import org.apache.ws.resource.properties.NamespaceVersionHolder;
-import org.apache.ws.resource.properties.ResourcePropertySet;
 import org.apache.ws.resource.properties.ResourceProperty;
+import org.apache.ws.resource.properties.ResourcePropertySet;
 import 
org.apache.ws.resource.properties.impl.AbstractResourcePropertiesPortType;
 import org.apache.ws.util.XmlBeanUtils;
 import org.apache.xmlbeans.XmlObject;
 import 
org.oasisOpen.docs.wsdm.x2004.x12.muws.wsdmMuwsPart2.QueryRelationshipsByTypeDocument;
 import 
org.oasisOpen.docs.wsdm.x2004.x12.muws.wsdmMuwsPart2.QueryRelationshipsByTypeResponseDocument;
-import 
org.oasisOpen.docs.wsdm.x2004.x12.muws.wsdmMuwsPart2.RelationshipDocument;
 import org.oasisOpen.docs.wsdm.x2004.x12.muws.wsdmMuwsPart2.RelationshipType;
 
-import javax.xml.rpc.JAXRPCException;
 import javax.xml.namespace.QName;
+import javax.xml.rpc.JAXRPCException;
+import java.util.ArrayList;
 import java.util.Iterator;
 import java.util.List;
-import java.util.ArrayList;
 
 /**
  * TODO
@@ -52,7 +50,7 @@
     /**
      * @param requestDoc
      *
-     * @return
+     * @return QueryRelationshipsByTypeResponse document
      */
     public QueryRelationshipsByTypeResponseDocument queryRelationshipsByType(
             QueryRelationshipsByTypeDocument requestDoc )

Modified: 
incubator/muse/trunk/src/site/content/interop/src/java/org/everestWeather/wsdm/samples/x2005/x04/schema/WeatherstationResource.java
URL: 
http://svn.apache.org/viewcvs/incubator/muse/trunk/src/site/content/interop/src/java/org/everestWeather/wsdm/samples/x2005/x04/schema/WeatherstationResource.java?rev=178240&r1=178239&r2=178240&view=diff
==============================================================================
--- 
incubator/muse/trunk/src/site/content/interop/src/java/org/everestWeather/wsdm/samples/x2005/x04/schema/WeatherstationResource.java
 (original)
+++ 
incubator/muse/trunk/src/site/content/interop/src/java/org/everestWeather/wsdm/samples/x2005/x04/schema/WeatherstationResource.java
 Tue May 24 11:45:26 2005
@@ -307,7 +307,7 @@
             resourceProperty = 
resourcePropertySet.get(WeatherstationPropertyQNames.SERVICETIME);
             ServiceTimeDocument serviceTimeDocument = 
ServiceTimeDocument.Factory.newInstance();
             DurationMetric serviceTimeMetric = 
serviceTimeDocument.addNewServiceTime();
-            GDurationBuilder builder = new GDurationBuilder(+1, 1, 2, 3, 4, 5, 
6, new BigDecimal(0.789));
+            GDurationBuilder builder = new GDurationBuilder(+1, 1, 2, 3, 4, 5, 
6, new BigDecimal("0.789"));
             serviceTimeMetric.setGDurationValue(builder.toGDuration());
             serviceTimeMetric.setDuration(builder.toGDuration());
             resourceProperty.add(serviceTimeDocument);
@@ -331,14 +331,12 @@
         }
         catch (Exception e)
         {
-            throw new javax.xml.rpc.JAXRPCException("There was a problem in 
initializing your resource properties.  Please check your init() method. Cause: 
" + e.getLocalizedMessage());
+            throw new javax.xml.rpc.JAXRPCException("There was a problem in 
initializing your resource properties. Please check your init() method. Cause: 
" + e.getLocalizedMessage());
         }
         // Resource Property 
{http://docs.oasis-open.org/wsn/2004/06/wsn-WS-BaseNotification-1.2-draft-01.xsd}FixedTopicSet
 is implemented by the framework.
         // Resource Property 
{http://docs.oasis-open.org/wsn/2004/06/wsn-WS-BaseNotification-1.2-draft-01.xsd}Topic
 is implemented by the framework.
         // Resource Property 
{http://docs.oasis-open.org/wsn/2004/06/wsn-WS-BaseNotification-1.2-draft-01.xsd}TopicExpressionDialects
 is implemented by the framework.
 
-
-
         /**
          * This method call will make all resource properties be exposed
          * as Topics.  If you would like to change that behaviour you can
@@ -379,4 +377,5 @@
         ResourceProperty resourceProperty = 
getResourcePropertySet().get(WeatherstationPropertyQNames.FCCID);
         resourceProperty.add(fccidDocument);
     }
+
 }

Added: 
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=178240&view=auto
==============================================================================
--- 
incubator/muse/trunk/src/site/content/interop/src/test/org/apache/xmlbeans/BugTester.java
 (added)
+++ 
incubator/muse/trunk/src/site/content/interop/src/test/org/apache/xmlbeans/BugTester.java
 Tue May 24 11:45:26 2005
@@ -0,0 +1,49 @@
+/*=============================================================================*
+ *  Copyright 2005 The Apache Software Foundation
+ *
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ 
*=============================================================================*/
+package org.apache.xmlbeans;
+
+import junit.framework.TestCase;
+
+import java.net.URL;
+
+/**
+ * TODO
+ */
+public class BugTester extends TestCase
+{
+
+    public void testParseMgmtEventXml() throws Exception
+    {
+        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 
+    }
+
+    public void testParseURLWithNoTerminatingNewline() throws Exception
+    {
+        XmlObject.Factory.parse(
+                new URL(
+                        
"file:///C:/Projects/Apache/muse/trunk/src/site/content/interop/src/test/org/apache/xmlbeans/NoNewLine.xml"
 ) );
+        // TODO: try w/ http URL
+    }
+
+    public void testXmlObjectValueEquals() throws Exception
+    {
+        // TODO: test if XmlObject#valueEquals() works when comparing two 
complex types
+    }
+
+}

Added: 
incubator/muse/trunk/src/site/content/interop/src/test/org/apache/xmlbeans/NoNewLine.xml
URL: 
http://svn.apache.org/viewcvs/incubator/muse/trunk/src/site/content/interop/src/test/org/apache/xmlbeans/NoNewLine.xml?rev=178240&view=auto
==============================================================================
--- 
incubator/muse/trunk/src/site/content/interop/src/test/org/apache/xmlbeans/NoNewLine.xml
 (added)
+++ 
incubator/muse/trunk/src/site/content/interop/src/test/org/apache/xmlbeans/NoNewLine.xml
 Tue May 24 11:45:26 2005
@@ -0,0 +1 @@
+<Foo />
\ No newline at end of file



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

Reply via email to