Author: ips
Date: Fri May 27 21:20:56 2005
New Revision: 178856

URL: http://svn.apache.org/viewcvs?rev=178856&view=rev
Log:
cosmetic

Modified:
    
incubator/hermes/trunk/src/java/org/apache/ws/notification/topics/impl/SubscriptionTopicListener.java

Modified: 
incubator/hermes/trunk/src/java/org/apache/ws/notification/topics/impl/SubscriptionTopicListener.java
URL: 
http://svn.apache.org/viewcvs/incubator/hermes/trunk/src/java/org/apache/ws/notification/topics/impl/SubscriptionTopicListener.java?rev=178856&r1=178855&r2=178856&view=diff
==============================================================================
--- 
incubator/hermes/trunk/src/java/org/apache/ws/notification/topics/impl/SubscriptionTopicListener.java
 (original)
+++ 
incubator/hermes/trunk/src/java/org/apache/ws/notification/topics/impl/SubscriptionTopicListener.java
 Fri May 27 21:20:56 2005
@@ -78,7 +78,6 @@
     static
     {
         EMITTER_POOL = new PooledExecutor( 100 );
-
         // make sure the threads are non-daemon threads so they have time to 
complete even if the JVM wants to shut down
         EMITTER_POOL.setThreadFactory( new 
NamedThread.ConcurrentThreadFactory( "notifmgr-emitter", false ) );
     }
@@ -119,16 +118,16 @@
                      evaluatePrecondition( m_subscription.getPrecondition(),
                                 
m_subscription.getProducerResource().getResourcePropertySet() ) )
                 {
-                    if ( m_subscription.getUseNotify() )  // wrap message in 
Notify element
+                    if ( m_subscription.getUseNotify() )
                     {
                         msg = wrapMessageWithNotify( msg );
                     }
-                    Document document = toDomDocument( msg );
+                    Document dom = toDomDocument( msg );
                     EndpointReference consumerEPR = 
m_subscription.getConsumerReference();
-                    SOAPMessage soapMessage =
-                            buildSOAPMessage( document,
+                    SOAPMessage soapMsg =
+                            buildSOAPMessage( dom,
                                     (EndpointReferenceType) ( 
(XmlObjectWrapper) consumerEPR ).getXmlObject() );
-                    EMITTER_POOL.execute( EmitterTask.createEmitterTask( 
soapMessage,
+                    EMITTER_POOL.execute( EmitterTask.createEmitterTask( 
soapMsg,
                             new URL( consumerEPR.getAddress().toString() ) ) );
                 }
             }
@@ -141,11 +140,12 @@
         NotifyDocument.Notify notify = notifyDoc.addNewNotify();
         NotificationMessageHolderType notifMsgHolder = 
notify.addNewNotificationMessage();
         notifMsgHolder.setMessage( msg );
-        notifMsgHolder.setProducerReference( (EndpointReferenceType) ( 
(XmlBeansEndpointReference) 
m_subscription.getProducerResource().getEndpointReference() 
).getXmlObject(org.apache.ws.addressing.v2003_03.AddressingConstants.NSURI_ADDRESSING_SCHEMA)
 );
+        EndpointReference producerEPR = 
m_subscription.getProducerResource().getEndpointReference();
+        XmlBeansEndpointReference xBeansProducerEPR = 
((XmlBeansEndpointReference)producerEPR);
+        notifMsgHolder.setProducerReference( (EndpointReferenceType) 
xBeansProducerEPR.getXmlObject(org.apache.ws.addressing.v2003_03.AddressingConstants.NSURI_ADDRESSING_SCHEMA)
 );
         TopicExpressionType topicExpr = (TopicExpressionType) ( 
(XmlObjectWrapper) m_subscription.getTopicExpression() ).getXmlObject();
         notifMsgHolder.setTopic( topicExpr );
-        msg = notifyDoc;
-        return msg;
+        return notifyDoc;
     }
 
     private boolean evaluateSelector( QueryExpression selector, XmlObject msg )
@@ -212,17 +212,17 @@
     private Document toDomDocument( XmlObject notifyDoc )
             throws ParserConfigurationException, SAXException, IOException
     {
-        Document document = null;
+        Document dom;
         if ( XmlBeanUtils.isDocument( notifyDoc ) )
         {
-            document = (Document) notifyDoc.newDomNode();
+            dom = (Document) notifyDoc.newDomNode();
         }
         else
         {
-            String s = notifyDoc.xmlText( new XmlOptions().setSaveOuter() );
-            document = JaxpUtils.toDocument( s );
+            String notifyDocAsString = notifyDoc.xmlText( new 
XmlOptions().setSaveOuter() );
+            dom = JaxpUtils.toDocument( notifyDocAsString );
         }
-        return document;
+        return dom;
     }
 
     /**
@@ -325,4 +325,5 @@
         addWSAHeaders( header, consumerEPR );
         return msg;
     }
+    
 }



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

Reply via email to