You are viewing a plain text version of this content. The canonical link for it is here.
Posted to axis-cvs@ws.apache.org by ch...@apache.org on 2006/07/25 07:25:30 UTC

svn commit: r425290 - in /webservices/axis2/trunk/java/modules/savan/src/org/apache/savan: handlers/SavanInHandler.java handlers/SavanOutHandler.java module/SavanModule.java

Author: chamikara
Date: Mon Jul 24 22:25:29 2006
New Revision: 425290

URL: http://svn.apache.org/viewvc?rev=425290&view=rev
Log:
Out Handler should build the publication before sending it to the subscriber endpoints.
Removing some unnecessary prints.



Modified:
    webservices/axis2/trunk/java/modules/savan/src/org/apache/savan/handlers/SavanInHandler.java
    webservices/axis2/trunk/java/modules/savan/src/org/apache/savan/handlers/SavanOutHandler.java
    webservices/axis2/trunk/java/modules/savan/src/org/apache/savan/module/SavanModule.java

Modified: webservices/axis2/trunk/java/modules/savan/src/org/apache/savan/handlers/SavanInHandler.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/savan/src/org/apache/savan/handlers/SavanInHandler.java?rev=425290&r1=425289&r2=425290&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/savan/src/org/apache/savan/handlers/SavanInHandler.java (original)
+++ webservices/axis2/trunk/java/modules/savan/src/org/apache/savan/handlers/SavanInHandler.java Mon Jul 24 22:25:29 2006
@@ -41,8 +41,6 @@
 
 	public void invoke(MessageContext msgContext) throws AxisFault {
 		
-		System.out.println("SAVAN IN HANDLER CALLED...");
-		
 		SavanMessageContext smc = new SavanMessageContext (msgContext);
 		
 		//setting the Protocol

Modified: webservices/axis2/trunk/java/modules/savan/src/org/apache/savan/handlers/SavanOutHandler.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/savan/src/org/apache/savan/handlers/SavanOutHandler.java?rev=425290&r1=425289&r2=425290&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/savan/src/org/apache/savan/handlers/SavanOutHandler.java (original)
+++ webservices/axis2/trunk/java/modules/savan/src/org/apache/savan/handlers/SavanOutHandler.java Mon Jul 24 22:25:29 2006
@@ -43,8 +43,6 @@
 	
 	public void invoke(MessageContext msgContext) throws AxisFault {
 
-		System.out.println("SAVAN OUT HANDLER CALLED...");
-		
 		SavanMessageContext smc = new SavanMessageContext (msgContext);
 		int messagetype = smc.getMessageType();
 	
@@ -54,16 +52,14 @@
 			SubscriberStore store = (SubscriberStore) CommonUtil.getSubscriberStore(msgContext.getAxisService());
 			if (store != null) {
 				
-				System.out.println("sending publication:");
-				System.out.println(msgContext.getEnvelope());
+				//building the publication envelope
+				msgContext.getEnvelope().build();
+				
 				PublicationReport report = new PublicationReport();
 				Iterator iterator = store.retrieveAll();
 				while (iterator.hasNext()) {
 					AbstractSubscriber subscriber = (AbstractSubscriber) iterator.next();
 					try {
-						
-						System.out.println("INVOKING SUBSCRIBER...");
-						
 						subscriber.processPublication (publication, report);
 					} catch (SavanException e) {
 						report.addErrorReportEntry(subscriber.getId(),e);
@@ -75,7 +71,6 @@
 			} else {
 				String message = "Couldnt send the message since the subscriber storage was not found";
 				log.debug(message);
-				throw new SavanException (message);
 			}
 			
 			msgContext.pause();

Modified: webservices/axis2/trunk/java/modules/savan/src/org/apache/savan/module/SavanModule.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/savan/src/org/apache/savan/module/SavanModule.java?rev=425290&r1=425289&r2=425290&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/savan/src/org/apache/savan/module/SavanModule.java (original)
+++ webservices/axis2/trunk/java/modules/savan/src/org/apache/savan/module/SavanModule.java Mon Jul 24 22:25:29 2006
@@ -21,12 +21,15 @@
 import org.apache.axis2.context.ConfigurationContext;
 import org.apache.axis2.description.AxisDescription;
 import org.apache.axis2.description.AxisModule;
+import org.apache.axis2.description.AxisService;
+import org.apache.axis2.description.Parameter;
 import org.apache.axis2.modules.Module;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 import org.apache.savan.SavanConstants;
 import org.apache.savan.SavanException;
 import org.apache.savan.configuration.ConfigurationManager;
+import org.apache.savan.storage.SubscriberStore;
 
 /**
  * Savan Module class. 
@@ -37,6 +40,14 @@
 	private static final Log log = LogFactory.getLog(SavanModule.class);
 	
 	public void engageNotify(AxisDescription axisDescription) throws AxisFault {
+		//adding a subscriber store to the description
+		
+		if (axisDescription instanceof AxisService) { //TODO remove this restriction
+
+			//TODO set a suitable SubscriberStore for the service.
+			
+		}
+		
 	}
 
 	public void init(ConfigurationContext configContext, AxisModule module) throws AxisFault {



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