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 sc...@apache.org on 2005/05/23 20:56:17 UTC

svn commit: r178004 - /incubator/muse/trunk/src/java/org/apache/ws/muws/v1_0/topics/impl/XmlBeansAdvertisementTopicImpl.java

Author: scamp
Date: Mon May 23 11:56:17 2005
New Revision: 178004

URL: http://svn.apache.org/viewcvs?rev=178004&view=rev
Log: (empty)

Modified:
    incubator/muse/trunk/src/java/org/apache/ws/muws/v1_0/topics/impl/XmlBeansAdvertisementTopicImpl.java

Modified: incubator/muse/trunk/src/java/org/apache/ws/muws/v1_0/topics/impl/XmlBeansAdvertisementTopicImpl.java
URL: http://svn.apache.org/viewcvs/incubator/muse/trunk/src/java/org/apache/ws/muws/v1_0/topics/impl/XmlBeansAdvertisementTopicImpl.java?rev=178004&r1=178003&r2=178004&view=diff
==============================================================================
--- incubator/muse/trunk/src/java/org/apache/ws/muws/v1_0/topics/impl/XmlBeansAdvertisementTopicImpl.java (original)
+++ incubator/muse/trunk/src/java/org/apache/ws/muws/v1_0/topics/impl/XmlBeansAdvertisementTopicImpl.java Mon May 23 11:56:17 2005
@@ -4,6 +4,7 @@
 import org.apache.commons.logging.LogFactory;
 import org.apache.ws.XmlObjectWrapper;
 import org.apache.ws.addressing.EndpointReference;
+import org.apache.ws.addressing.XmlBeansEndpointReference;
 import org.apache.ws.muws.impl.CategoryImpl;
 import org.apache.ws.muws.v1_0.MuwsConstants;
 import org.apache.ws.muws.v1_0.events.Situation;
@@ -62,9 +63,10 @@
         CreationNotificationDocument creationNotificationDocument = CreationNotificationDocument.Factory.newInstance();
         org.oasisOpen.docs.wsdm.x2004.x12.muws.wsdmMuwsPart2.CreationNotificationDocument.CreationNotification creationNotification = creationNotificationDocument.addNewCreationNotification();
         EndpointReference endpointReference = event.getEndpointReference();
-        if(endpointReference != null && endpointReference instanceof XmlObjectWrapper)
+        if(endpointReference != null && endpointReference instanceof XmlBeansEndpointReference)
         {
-            XmlObject xmlObject = ((XmlObjectWrapper)endpointReference).getXmlObject();
+            XmlBeansEndpointReference xmlepr = (XmlBeansEndpointReference)endpointReference;
+            XmlObject xmlObject = xmlepr.getXmlObject(org.apache.ws.addressing.v2004_08_10.AddressingConstants.NSURI_ADDRESSING_SCHEMA);
             if(xmlObject instanceof EndpointReferenceType)
             {
                 creationNotification.setManageabilityEndpointReferenceArray(new EndpointReferenceType[]{(EndpointReferenceType)xmlObject});
@@ -104,25 +106,18 @@
         {
             DestructionNotificationDocument destructionNotificationDocument = DestructionNotificationDocument.Factory.newInstance();
             org.oasisOpen.docs.wsdm.x2004.x12.muws.wsdmMuwsPart2.DestructionNotificationDocument.DestructionNotification destructionNotification = destructionNotificationDocument.addNewDestructionNotification();
-            EndpointReference endpointReference = event.getEndpointReference();
-            if (endpointReference != null && endpointReference instanceof XmlObjectWrapper)
+
+            destructionNotification.setResourceId((String) resourceID);
+            try
             {
-                    destructionNotification.setResourceId((String)resourceID);
-                    try
-                    {
-                        publish(buildManagementEvent(destructionNotificationDocument));
-                    }
-                    catch (Exception e)
-                    {
-                        if (LOG.isDebugEnabled())
-                        {
-                            LOG.debug("Publishing of the notification: " + destructionNotificationDocument.toString() + " failed.", e);
-                        }
-                    }
+                publish(buildManagementEvent(destructionNotificationDocument));
             }
-            else
+            catch (Exception e)
             {
-                LOG.debug("The EndpointReference was either null or it was not an instance of XmlObjectWrapper.  EPR: " + endpointReference );
+                if (LOG.isDebugEnabled())
+                {
+                    LOG.debug("Publishing of the notification: " + destructionNotificationDocument.toString() + " failed.", e);
+                }
             }
         }
     }



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