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/06/14 19:41:22 UTC

svn commit: r190630 - in /incubator/muse/trunk/src: java/org/apache/ws/muws/ java/org/apache/ws/muws/v1_0/events/ java/org/apache/ws/muws/v1_0/events/impl/ site/content/interop/src/test/org/apache/xmlbeans/ templates/v2004_12/

Author: ips
Date: Tue Jun 14 10:41:21 2005
New Revision: 190630

URL: http://svn.apache.org/viewcvs?rev=190630&view=rev
Log:
added interface and impl for MUWS LangString type; updated Situation/SituationImpl to use LangString instead of String for the Message field; fixed error in Relationships-AbstractResource-init.txt template

Added:
    incubator/muse/trunk/src/java/org/apache/ws/muws/v1_0/events/LangString.java
    incubator/muse/trunk/src/java/org/apache/ws/muws/v1_0/events/SubstitutableMsg.java
    incubator/muse/trunk/src/java/org/apache/ws/muws/v1_0/events/impl/LangStringImpl.java
    incubator/muse/trunk/src/java/org/apache/ws/muws/v1_0/events/impl/SubstitutableMsgImpl.java
Removed:
    incubator/muse/trunk/src/java/org/apache/ws/muws/v1_0/events/SubstitutionalMsg.java
    incubator/muse/trunk/src/java/org/apache/ws/muws/v1_0/events/impl/SubstitutionalMsgImpl.java
Modified:
    incubator/muse/trunk/src/java/org/apache/ws/muws/MuwsUtils.java
    incubator/muse/trunk/src/java/org/apache/ws/muws/v1_0/events/Situation.java
    incubator/muse/trunk/src/java/org/apache/ws/muws/v1_0/events/impl/SituationImpl.java
    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/FeatureTester.java
    incubator/muse/trunk/src/templates/v2004_12/Relationships-AbstractResource_init.txt

Modified: incubator/muse/trunk/src/java/org/apache/ws/muws/MuwsUtils.java
URL: http://svn.apache.org/viewcvs/incubator/muse/trunk/src/java/org/apache/ws/muws/MuwsUtils.java?rev=190630&r1=190629&r2=190630&view=diff
==============================================================================
--- incubator/muse/trunk/src/java/org/apache/ws/muws/MuwsUtils.java (original)
+++ incubator/muse/trunk/src/java/org/apache/ws/muws/MuwsUtils.java Tue Jun 14 10:41:21 2005
@@ -15,13 +15,13 @@
 {
 
     /**
-     * Replaces the default resoruce property for Relationships with a XmlBeansRelationshipResourceProperty
+     * Replaces the Relationship resource property in the specified property set with a
+     * special {@link org.apache.ws.muws.v1_0.impl.XmlBeansRelationshipResourceProperty}.
      *
      * @param propSet
      */
     public static void updateRelationshipResourceProperty( ResourcePropertySet propSet, org.apache.ws.notification.base.NotificationProducerResource notifResource )
     {
-        //init the RelationshipsProperties Resource
         if ( propSet.get( org.apache.ws.muws.v1_0.capability.RelationshipsCapability.PROP_NAME_RELATIONSHIP ) != null )
         {
             org.apache.ws.muws.v1_0.impl.XmlBeansRelationshipResourceProperty relationshipResourceProperty = new org.apache.ws.muws.v1_0.impl.XmlBeansRelationshipResourceProperty( propSet.getMetaData().getPropertyMetaData( org.apache.ws.muws.v1_0.capability.RelationshipsCapability.PROP_NAME_RELATIONSHIP ),
@@ -31,7 +31,7 @@
     }
 
     /**
-     * Initializes the Muws Relationship topics in the TopicSet
+     * Adds the MUWS RelationshipCreated/Deleted topics to the specified topic set.
      *
      * @param topicSet
      *

Added: incubator/muse/trunk/src/java/org/apache/ws/muws/v1_0/events/LangString.java
URL: http://svn.apache.org/viewcvs/incubator/muse/trunk/src/java/org/apache/ws/muws/v1_0/events/LangString.java?rev=190630&view=auto
==============================================================================
--- incubator/muse/trunk/src/java/org/apache/ws/muws/v1_0/events/LangString.java (added)
+++ incubator/muse/trunk/src/java/org/apache/ws/muws/v1_0/events/LangString.java Tue Jun 14 10:41:21 2005
@@ -0,0 +1,28 @@
+/*=============================================================================*
+ *  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.ws.muws.v1_0.events;
+
+/**
+ * A representation of the muws-p2-xs:LangString type.
+ */
+public interface LangString
+{
+
+    String getValue();
+
+    String getLang();
+
+}

Modified: incubator/muse/trunk/src/java/org/apache/ws/muws/v1_0/events/Situation.java
URL: http://svn.apache.org/viewcvs/incubator/muse/trunk/src/java/org/apache/ws/muws/v1_0/events/Situation.java?rev=190630&r1=190629&r2=190630&view=diff
==============================================================================
--- incubator/muse/trunk/src/java/org/apache/ws/muws/v1_0/events/Situation.java (original)
+++ incubator/muse/trunk/src/java/org/apache/ws/muws/v1_0/events/Situation.java Tue Jun 14 10:41:21 2005
@@ -12,18 +12,18 @@
 
     void setPriority(short priority);
     void setSeverity(short severity);
-    void setMessage(String message);
+    void setMessage(LangString message);
     void setSituationTime(Calendar cal);
     void setSuccessDisposition (Boolean bool);
-    void setSubstitutionalMsg( SubstitutionalMsg msg);
+    void setSubstitutionalMsg( SubstitutableMsg msg);
 
     Category getSituationCategory();
 
     short getPriority();
     short getSeverity();
-    String getMessage();
+    LangString getMessage();
     Calendar getSituationTime();
     Boolean getSuccessDisposition();
-    SubstitutionalMsg getSubstitutionalMsg();
+    SubstitutableMsg getSubstitutionalMsg();
 
 }

Added: incubator/muse/trunk/src/java/org/apache/ws/muws/v1_0/events/SubstitutableMsg.java
URL: http://svn.apache.org/viewcvs/incubator/muse/trunk/src/java/org/apache/ws/muws/v1_0/events/SubstitutableMsg.java?rev=190630&view=auto
==============================================================================
--- incubator/muse/trunk/src/java/org/apache/ws/muws/v1_0/events/SubstitutableMsg.java (added)
+++ incubator/muse/trunk/src/java/org/apache/ws/muws/v1_0/events/SubstitutableMsg.java Tue Jun 14 10:41:21 2005
@@ -0,0 +1,14 @@
+package org.apache.ws.muws.v1_0.events;
+
+/**
+ * @author Sal Campana
+ */
+public interface SubstitutableMsg
+{
+    void setMsgId(String messageId);
+    void setMsgType(String msgType);
+    void addValue(String value);
+    String getMsgId();
+    String getMsgType();
+    String[] getValueArray();
+}

Added: incubator/muse/trunk/src/java/org/apache/ws/muws/v1_0/events/impl/LangStringImpl.java
URL: http://svn.apache.org/viewcvs/incubator/muse/trunk/src/java/org/apache/ws/muws/v1_0/events/impl/LangStringImpl.java?rev=190630&view=auto
==============================================================================
--- incubator/muse/trunk/src/java/org/apache/ws/muws/v1_0/events/impl/LangStringImpl.java (added)
+++ incubator/muse/trunk/src/java/org/apache/ws/muws/v1_0/events/impl/LangStringImpl.java Tue Jun 14 10:41:21 2005
@@ -0,0 +1,95 @@
+/*=============================================================================*
+ *  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.ws.muws.v1_0.events.impl;
+
+import org.apache.ws.muws.v1_0.events.LangString;
+import org.apache.ws.XmlObjectWrapper;
+import org.apache.xmlbeans.XmlObject;
+
+import java.util.Locale;
+
+/**
+ * A {@link LangString} implementation that supports converting to and from a LangString
+ * XMLBean.
+ *
+ * @author Ian Springer (ian DOT springer AT hp DOT com)
+ */
+public class LangStringImpl implements LangString, XmlObjectWrapper
+{
+
+    private String m_value;
+    private String m_lang;
+
+    public LangStringImpl( String value )
+    {
+        this( value, toXmlLang( Locale.getDefault() ) );
+    }
+
+    public LangStringImpl( org.oasisOpen.docs.wsdm.x2004.x12.muws.wsdmMuwsPart2.LangString langString )
+    {
+        this( langString.getStringValue(), langString.getLang() );
+    }
+
+    public LangStringImpl( String value, String lang )
+    {
+        m_value = value;
+        m_lang = lang;
+    }
+
+    public String getValue()
+    {
+        return m_value;
+    }
+
+    public String getLang()
+    {
+        return m_lang;
+    }
+
+    public XmlObject getXmlObject()
+    {
+        org.oasisOpen.docs.wsdm.x2004.x12.muws.wsdmMuwsPart2.LangString langString = org.oasisOpen.docs.wsdm.x2004.x12.muws.wsdmMuwsPart2.LangString.Factory.newInstance();
+        langString.setStringValue( m_value );
+        langString.setLang( m_lang );
+        return langString;
+    }
+
+    public String toString()
+    {
+        return m_value;
+    }
+
+    public static String toXmlLang( Locale locale )
+    {
+        if ( "".equals( locale.getLanguage() ) )
+        {
+            throw new IllegalArgumentException( "Cannot convert a Locale with no language to an xml:lang - RFC 3066 mandates that language tags have a primary subcode." );
+        }
+        StringBuffer buf = new StringBuffer( locale.getLanguage() );
+        if ( ! "".equals( locale.getCountry() ) )
+        {
+            buf.append( "-" );
+            buf.append( locale.getCountry() );
+            if ( ! "".equals( locale.getVariant() ) )
+            {
+                buf.append( "-" );
+                buf.append( locale.getVariant() );
+            }
+        }
+        return buf.toString();
+    }
+
+}

Modified: incubator/muse/trunk/src/java/org/apache/ws/muws/v1_0/events/impl/SituationImpl.java
URL: http://svn.apache.org/viewcvs/incubator/muse/trunk/src/java/org/apache/ws/muws/v1_0/events/impl/SituationImpl.java?rev=190630&r1=190629&r2=190630&view=diff
==============================================================================
--- incubator/muse/trunk/src/java/org/apache/ws/muws/v1_0/events/impl/SituationImpl.java (original)
+++ incubator/muse/trunk/src/java/org/apache/ws/muws/v1_0/events/impl/SituationImpl.java Tue Jun 14 10:41:21 2005
@@ -2,8 +2,9 @@
 
 import org.apache.ws.XmlObjectWrapper;
 import org.apache.ws.muws.Category;
+import org.apache.ws.muws.v1_0.events.LangString;
 import org.apache.ws.muws.v1_0.events.Situation;
-import org.apache.ws.muws.v1_0.events.SubstitutionalMsg;
+import org.apache.ws.muws.v1_0.events.SubstitutableMsg;
 import org.apache.ws.util.XmlBeanUtils;
 import org.apache.xmlbeans.XmlObject;
 import org.oasisOpen.docs.wsdm.x2004.x12.muws.wsdmMuwsPart2.SituationDocument;
@@ -11,7 +12,6 @@
 
 import java.util.Calendar;
 
-
 /**
  * @author Sal Campana
  */
@@ -19,58 +19,57 @@
 {
     private short m_priority = -1;
     private short m_severity = -1;
-    private String m_message;
+    private LangString m_message;
     private Calendar m_situationTime;
     private Boolean m_successDisposition;
-    private SubstitutionalMsg m_substitutionMsg;
+    private SubstitutableMsg m_substitutableMsg;
     private Category m_situationCategory;
 
-    public SituationImpl(Category situationCategory)
+    public SituationImpl( Category situationCategory )
     {
-        if (situationCategory == null)
+        if ( situationCategory == null )
         {
-            throw new IllegalArgumentException("Category may not be null.");
+            throw new IllegalArgumentException( "Category may not be null." );
         }
         m_situationCategory = situationCategory;
     }
 
-    public void setPriority(short priority)
+    public void setPriority( short priority )
     {
-        if (priority < 0 || priority > 100)
+        if ( priority < 0 || priority > 100 )
         {
-            throw new IllegalArgumentException("priority may only be a value from 0 to 100.");
+            throw new IllegalArgumentException( "Priority may only be a value from 0 to 100." );
         }
         m_priority = priority;
     }
 
-    public void setSeverity(short severity)
+    public void setSeverity( short severity )
     {
-        if (severity < 0 || severity > 6)
+        if ( severity < 0 || severity > 6 )
         {
-            throw new IllegalArgumentException("Severity may only be a value from 0 to 6.");
+            throw new IllegalArgumentException( "Severity may only be a value from 0 to 6." );
         }
         m_severity = severity;
     }
 
-    public void setMessage(String message)
+    public void setMessage( LangString message )
     {
-
         m_message = message;
     }
 
-    public void setSituationTime(Calendar cal)
+    public void setSituationTime( Calendar cal )
     {
         m_situationTime = cal;
     }
 
-    public void setSuccessDisposition(Boolean bool)
+    public void setSuccessDisposition( Boolean bool )
     {
         m_successDisposition = bool;
     }
 
-    public void setSubstitutionalMsg(SubstitutionalMsg msg)
+    public void setSubstitutionalMsg( SubstitutableMsg msg )
     {
-        m_substitutionMsg = msg;
+        m_substitutableMsg = msg;
     }
 
     public Category getSituationCategory()
@@ -88,7 +87,7 @@
         return m_severity;
     }
 
-    public String getMessage()
+    public LangString getMessage()
     {
         return m_message;
     }
@@ -103,58 +102,57 @@
         return m_successDisposition;
     }
 
-    public SubstitutionalMsg getSubstitutionalMsg()
+    public SubstitutableMsg getSubstitutionalMsg()
     {
-        return m_substitutionMsg;
+        return m_substitutableMsg;
     }
 
     public XmlObject getXmlObject()
     {
-        SituationDocument situationDocument = SituationDocument.Factory.newInstance();
+        SituationDocument situationDoc = SituationDocument.Factory.newInstance();
 
-        org.oasisOpen.docs.wsdm.x2004.x12.muws.wsdmMuwsPart2.SituationType situationType = situationDocument.addNewSituation();
+        org.oasisOpen.docs.wsdm.x2004.x12.muws.wsdmMuwsPart2.SituationType situationType = situationDoc.addNewSituation();
         org.oasisOpen.docs.wsdm.x2004.x12.muws.wsdmMuwsPart2.SituationCategoryType situationCategoryType = situationType.addNewSituationCategory();
-        XmlBeanUtils.addChildElement(situationCategoryType, ((XmlObjectWrapper) m_situationCategory).getXmlObject());
+        XmlBeanUtils.addChildElement( situationCategoryType, ( (XmlObjectWrapper) m_situationCategory ).getXmlObject() );
 
-        if (m_message != null)
+        if ( m_message != null )
         {
-            org.oasisOpen.docs.wsdm.x2004.x12.muws.wsdmMuwsPart2.LangString langString = situationType.addNewMessage();
-            langString.setLang(m_message);
+            org.oasisOpen.docs.wsdm.x2004.x12.muws.wsdmMuwsPart2.LangString langString = (org.oasisOpen.docs.wsdm.x2004.x12.muws.wsdmMuwsPart2.LangString) ( (XmlObjectWrapper) m_message ).getXmlObject();
+            situationType.setMessage( langString );
         }
 
-        if (m_substitutionMsg != null)
+        if ( m_substitutableMsg != null )
         {
-            situationType.setSubstitutableMsg((org.oasisOpen.docs.wsdm.x2004.x12.muws.wsdmMuwsPart2.SubstitutableMsgType) ((XmlObjectWrapper)m_substitutionMsg).getXmlObject());
-            org.oasisOpen.docs.wsdm.x2004.x12.muws.wsdmMuwsPart2.SubstitutableMsgType substitutableMsgType = situationType.addNewSubstitutableMsg();
+            org.oasisOpen.docs.wsdm.x2004.x12.muws.wsdmMuwsPart2.SubstitutableMsgType substitutableMsg = (org.oasisOpen.docs.wsdm.x2004.x12.muws.wsdmMuwsPart2.SubstitutableMsgType) ( (XmlObjectWrapper) m_substitutableMsg ).getXmlObject();
+            situationType.setSubstitutableMsg( substitutableMsg );
         }
 
-        if (m_priority != -1)
+        if ( m_priority != -1 )
         {
-            situationType.setPriority(m_priority);
+            situationType.setPriority( m_priority );
         }
 
-        if (m_severity != -1)
+        if ( m_severity != -1 )
         {
-            situationType.setSeverity(m_severity);
+            situationType.setSeverity( m_severity );
         }
 
-
-        if (m_situationTime != null)
+        if ( m_situationTime != null )
         {
-            situationType.setSituationTime(m_situationTime);
+            situationType.setSituationTime( m_situationTime );
         }
 
-        if (m_successDisposition != null)
+        if ( m_successDisposition != null )
         {
-            if (m_successDisposition.booleanValue() == true)
+            if ( m_successDisposition.booleanValue() )
             {
-                situationType.setSuccessDisposition(SituationType.SuccessDisposition.SUCCESSFUL);
+                situationType.setSuccessDisposition( SituationType.SuccessDisposition.SUCCESSFUL );
             }
             else
             {
-                situationType.setSuccessDisposition(SituationType.SuccessDisposition.UNSUCCESSFUL);
+                situationType.setSuccessDisposition( SituationType.SuccessDisposition.UNSUCCESSFUL );
             }
         }
-        return situationDocument;
+        return situationDoc;
     }
 }

Added: incubator/muse/trunk/src/java/org/apache/ws/muws/v1_0/events/impl/SubstitutableMsgImpl.java
URL: http://svn.apache.org/viewcvs/incubator/muse/trunk/src/java/org/apache/ws/muws/v1_0/events/impl/SubstitutableMsgImpl.java?rev=190630&view=auto
==============================================================================
--- incubator/muse/trunk/src/java/org/apache/ws/muws/v1_0/events/impl/SubstitutableMsgImpl.java (added)
+++ incubator/muse/trunk/src/java/org/apache/ws/muws/v1_0/events/impl/SubstitutableMsgImpl.java Tue Jun 14 10:41:21 2005
@@ -0,0 +1,65 @@
+package org.apache.ws.muws.v1_0.events.impl;
+
+import org.apache.ws.muws.v1_0.events.SubstitutableMsg;
+import org.apache.ws.XmlObjectWrapper;
+import org.apache.xmlbeans.XmlObject;
+import org.oasisOpen.docs.wsdm.x2004.x12.muws.wsdmMuwsPart2.SubstitutableMsgType;
+
+import java.util.List;
+import java.util.ArrayList;
+
+
+/**
+ * @author Sal Campana
+ */
+public class SubstitutableMsgImpl implements SubstitutableMsg, XmlObjectWrapper
+{
+    private String m_messageId;
+    private String m_msgType;
+    private List m_values = new ArrayList();
+
+
+    public void setMsgId(String messageId)
+    {
+        m_messageId = messageId;
+    }
+
+    public void setMsgType(String msgType)
+    {
+        m_msgType = msgType;
+    }
+
+    public void addValue(String value)
+    {
+       m_values.add(value);
+    }
+
+    public String getMsgId()
+    {
+        return m_messageId;
+    }
+
+    public String getMsgType()
+    {
+        return m_msgType;
+    }
+
+    public String[] getValueArray()
+    {
+        return (String[]) m_values.toArray(new String[0]);
+    }
+
+    public XmlObject getXmlObject()
+    {        
+        SubstitutableMsgType substitutableMsgType = SubstitutableMsgType.Factory.newInstance();
+        substitutableMsgType.setMsgId(m_messageId);
+        substitutableMsgType.setMsgIdType(m_msgType);
+        for (int i = 0; i < m_values.size(); i++)
+        {
+            String s = (String) m_values.get(i);
+            org.apache.xmlbeans.XmlAnySimpleType xmlAnySimpleType = substitutableMsgType.addNewValue();
+            xmlAnySimpleType.setStringValue(s);
+        }
+        return substitutableMsgType;
+    }
+}

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=190630&r1=190629&r2=190630&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 Tue Jun 14 10:41:21 2005
@@ -18,6 +18,17 @@
 import junit.framework.TestCase;
 
 import java.net.URL;
+import java.io.File;
+
+import org.w3c.dom.Node;
+import org.apache.ws.util.JaxpUtils;
+import org.apache.ws.util.XmlBeanUtils;
+import org.oasisOpen.docs.wsn.x2004.x06.wsnWSBaseNotification12Draft01.SubscribeDocument;
+import org.xmlsoap.schemas.ws.x2003.x03.addressing.EndpointReferenceType;
+import org.xmlsoap.schemas.ws.x2003.x03.addressing.AttributedURI;
+import org.xmlsoap.schemas.ws.x2003.x03.addressing.ReferencePropertiesType;
+
+import javax.xml.namespace.QName;
 
 /**
  * TODO
@@ -27,9 +38,10 @@
 
     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>" );
+        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
     }
 
@@ -40,10 +52,24 @@
                         "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
+    }
+
+    public void testGetDomNode() throws Exception
+    {
+        SubscribeDocument subscribeDocument = SubscribeDocument.Factory.newInstance();
+        SubscribeDocument.Subscribe subscribe = subscribeDocument.addNewSubscribe();
+        EndpointReferenceType endpointReferenceType = subscribe.addNewConsumerReference();
+        AttributedURI attributedURI = endpointReferenceType.addNewAddress();
+        attributedURI.setStringValue( "http://foo.com/" );
+        ReferencePropertiesType referencePropertiesType = endpointReferenceType.addNewReferenceProperties();
+        XmlBeanUtils.addChildElement( referencePropertiesType, new QName( "Fudge" ) );
+        Node domNode = subscribeDocument.getDomNode();
+        // TODO: this isn't working - figure out how to reproduce the bug...
+        System.out.println( JaxpUtils.toString( domNode );
     }
 
 }

Modified: incubator/muse/trunk/src/site/content/interop/src/test/org/apache/xmlbeans/FeatureTester.java
URL: http://svn.apache.org/viewcvs/incubator/muse/trunk/src/site/content/interop/src/test/org/apache/xmlbeans/FeatureTester.java?rev=190630&r1=190629&r2=190630&view=diff
==============================================================================
--- incubator/muse/trunk/src/site/content/interop/src/test/org/apache/xmlbeans/FeatureTester.java (original)
+++ incubator/muse/trunk/src/site/content/interop/src/test/org/apache/xmlbeans/FeatureTester.java Tue Jun 14 10:41:21 2005
@@ -16,12 +16,12 @@
 package org.apache.xmlbeans;
 
 import junit.framework.TestCase;
-
-import java.io.File;
-
 import org.apache.xmlbeans.impl.newstore2.Saaj;
+import org.apache.xmlbeans.impl.xb.xsdschema.SchemaDocument;
+import org.oasisOpen.docs.wsrf.x2004.x06.wsrfWSResourceProperties12Draft01.QueryExpressionDocument;
 
 import javax.xml.soap.SOAPEnvelope;
+import java.io.File;
 
 /**
  * TODO
@@ -33,8 +33,20 @@
     {
         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 );
+        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 testGetSchemaSourceName() throws Exception
+    {
+        QueryExpressionDocument xBean = QueryExpressionDocument.Factory.newInstance();
+        String schemaName = xBean.schemaType().getSourceName();
+        String schemaPath = "schema/src/" + schemaName;
+        ClassLoader classLoader = Thread.currentThread().getContextClassLoader();
+        XmlObject schemaXBean = XmlObject.Factory.parse( classLoader.getResourceAsStream( schemaPath ) );
+        assertTrue( schemaXBean instanceof SchemaDocument );
     }
 
 }

Modified: incubator/muse/trunk/src/templates/v2004_12/Relationships-AbstractResource_init.txt
URL: http://svn.apache.org/viewcvs/incubator/muse/trunk/src/templates/v2004_12/Relationships-AbstractResource_init.txt?rev=190630&r1=190629&r2=190630&view=diff
==============================================================================
--- incubator/muse/trunk/src/templates/v2004_12/Relationships-AbstractResource_init.txt (original)
+++ incubator/muse/trunk/src/templates/v2004_12/Relationships-AbstractResource_init.txt Tue Jun 14 10:41:21 2005
@@ -1,11 +1,16 @@
 #if ($notificationProducer)
      /**
-      *init the RelationshipsProperties Resource for sending Relationship events...NOTE: THIS DOES NOT REGISTER THE TOPICS
+      * Add a specialized version of the Relationship ResourceProperty that will automatically publish
+      * RelationshipCreated/Deleted events when elements are added to or removed from the ResourceProperty.
+      */
+     org.apache.ws.muws.MuwsUtils.updateRelationshipResourceProperty( m_propSet, this );
+     /**
+      * Add the MUWS RelationshipCreated/Deleted topics to our topic set.
       *
       * NOTE: IF ADDING additional Topics to the Muws2 TopicSpace AFTER this method call, make sure to use
-      * the returned muws2topics TopicSpace.  Anytime a TopicSpace is added to a TopicSpaceSet, the set returns
-      * the Active handle to that TopicSpace and INVALIDATES the previous handle.
+      * the returned muws2topics TopicSpace. Anytime a TopicSpace is added to a TopicSpaceSet, the set returns
+      * the active handle to that TopicSpace and INVALIDATES the previous handle.
       */
-     org.apache.ws.notification.topics.TopicSpace muws2topics =  org.apache.ws.muws.MuwsUtils.updateRelationshipResourceProperty(m_propSet, this);
+     org.apache.ws.notification.topics.TopicSpace muws2topics = org.apache.ws.muws.MuwsUtils.addRelationshipTopics( getTopicSpaceSet() );
      
 #end



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