You are viewing a plain text version of this content. The canonical link for it is here.
Posted to sandesha-dev@ws.apache.org by ch...@apache.org on 2005/10/26 08:49:52 UTC

svn commit: r328579 - in /webservices/sandesha/trunk/src/org/apache/sandesha2: ./ client/ handlers/ msgprocessors/ util/ workers/

Author: chamikara
Date: Tue Oct 25 23:49:15 2005
New Revision: 328579

URL: http://svn.apache.org/viewcvs?rev=328579&view=rev
Log:
Refactoring - To comply with the recent refactoring of Axis2.

Modified:
    webservices/sandesha/trunk/src/org/apache/sandesha2/RMMsgContext.java
    webservices/sandesha/trunk/src/org/apache/sandesha2/client/SandeshaMepClient.java
    webservices/sandesha/trunk/src/org/apache/sandesha2/client/TwoWayOptionalTransportBasedSender.java
    webservices/sandesha/trunk/src/org/apache/sandesha2/handlers/SandeshaInHandler.java
    webservices/sandesha/trunk/src/org/apache/sandesha2/handlers/SandeshaOutHandler.java
    webservices/sandesha/trunk/src/org/apache/sandesha2/msgprocessors/ApplicationMsgProcessor.java
    webservices/sandesha/trunk/src/org/apache/sandesha2/util/RMMsgCreator.java
    webservices/sandesha/trunk/src/org/apache/sandesha2/util/SandeshaUtil.java
    webservices/sandesha/trunk/src/org/apache/sandesha2/workers/Sender.java

Modified: webservices/sandesha/trunk/src/org/apache/sandesha2/RMMsgContext.java
URL: http://svn.apache.org/viewcvs/webservices/sandesha/trunk/src/org/apache/sandesha2/RMMsgContext.java?rev=328579&r1=328578&r2=328579&view=diff
==============================================================================
--- webservices/sandesha/trunk/src/org/apache/sandesha2/RMMsgContext.java (original)
+++ webservices/sandesha/trunk/src/org/apache/sandesha2/RMMsgContext.java Tue Oct 25 23:49:15 2005
@@ -136,7 +136,7 @@
 	}
 
 	public void test() {
-		String opearaitonName = msgContext.getOperationContext().getOperationDescription().getName().getLocalPart();
+		String opearaitonName = msgContext.getOperationContext().getAxisOperation().getName().getLocalPart();
 		System.out.println("Operation is:" + opearaitonName);
 	}
 

Modified: webservices/sandesha/trunk/src/org/apache/sandesha2/client/SandeshaMepClient.java
URL: http://svn.apache.org/viewcvs/webservices/sandesha/trunk/src/org/apache/sandesha2/client/SandeshaMepClient.java?rev=328579&r1=328578&r2=328579&view=diff
==============================================================================
--- webservices/sandesha/trunk/src/org/apache/sandesha2/client/SandeshaMepClient.java (original)
+++ webservices/sandesha/trunk/src/org/apache/sandesha2/client/SandeshaMepClient.java Tue Oct 25 23:49:15 2005
@@ -26,7 +26,7 @@
 import org.apache.axis2.context.MessageContext;
 import org.apache.axis2.context.OperationContext;
 import org.apache.axis2.context.ServiceContext;
-import org.apache.axis2.description.OperationDescription;
+import org.apache.axis2.description.AxisOperation;
 import org.apache.axis2.description.TransportInDescription;
 import org.apache.axis2.description.TransportOutDescription;
 import org.apache.axis2.engine.AxisConfiguration;
@@ -60,7 +60,7 @@
 		callbackReceiver = new CallbackReceiver();
 	}
 
-	public MessageContext invokeDual(OperationDescription axisop,
+	public MessageContext invokeDual(AxisOperation axisop,
 			final MessageContext msgctx) throws AxisFault {
 
 		prepareInvocation(axisop, msgctx);
@@ -78,14 +78,14 @@
 			axisop.setMessageReceiver(callbackReceiver);
 			callbackReceiver.addCallback(messageID, callback);
 			msgctx.setReplyTo(ListenerManager.replyToEPR(serviceContext
-					.getServiceConfig().getName().getLocalPart()
+					.getAxisService().getName().getLocalPart()
 					+ "/" + axisop.getName().getLocalPart(), listenerTransport
 					.getName().getLocalPart()));
 		}
 		
 		msgctx.setTo(to);
 		msgctx.setServiceContext(serviceContext);
-		ConfigurationContext syscontext = serviceContext.getEngineContext();
+		ConfigurationContext syscontext = serviceContext.getConfigurationContext();
 		msgctx.setConfigurationContext(syscontext);
 
 		checkTransport(msgctx);
@@ -157,7 +157,7 @@
 		}
 
 		//find and set the transport details
-		AxisConfiguration axisConfig = serviceContext.getEngineContext()
+		AxisConfiguration axisConfig = serviceContext.getConfigurationContext()
 				.getAxisConfiguration();
 		this.listenerTransport = axisConfig.getTransportIn(new QName(
 				listenerTransport));
@@ -174,13 +174,13 @@
 
 		//if seperate transport is used, start the required listeners
 		if (hasAsyncResponse) {
-			if (!serviceContext.getEngineContext().getAxisConfiguration()
+			if (!serviceContext.getConfigurationContext().getAxisConfiguration()
 					.isEngaged(new QName(Constants.MODULE_ADDRESSING))) {
 				throw new AxisFault(Messages
 						.getMessage("2channelNeedAddressing"));
 			}
 			ListenerManager.makeSureStarted(listenerTransport, serviceContext
-					.getEngineContext());
+					.getConfigurationContext());
 		}
 	}
 
@@ -189,7 +189,7 @@
 			senderTransport = inferTransport(to);
 		}
 		if (listenerTransport == null) {
-			listenerTransport = serviceContext.getEngineContext()
+			listenerTransport = serviceContext.getConfigurationContext()
 					.getAxisConfiguration().getTransportIn(
 							senderTransport.getName());
 		}

Modified: webservices/sandesha/trunk/src/org/apache/sandesha2/client/TwoWayOptionalTransportBasedSender.java
URL: http://svn.apache.org/viewcvs/webservices/sandesha/trunk/src/org/apache/sandesha2/client/TwoWayOptionalTransportBasedSender.java?rev=328579&r1=328578&r2=328579&view=diff
==============================================================================
--- webservices/sandesha/trunk/src/org/apache/sandesha2/client/TwoWayOptionalTransportBasedSender.java (original)
+++ webservices/sandesha/trunk/src/org/apache/sandesha2/client/TwoWayOptionalTransportBasedSender.java Tue Oct 25 23:49:15 2005
@@ -45,10 +45,10 @@
 			response.setProperty(MessageContext.TRANSPORT_IN, msgctx
 					.getProperty(MessageContext.TRANSPORT_IN));
 			
-			OperationContext newOperationContext = new OperationContext (msgctx.getOperationDescription());
+			OperationContext newOperationContext = new OperationContext (msgctx.getAxisOperation());
 			
 			newOperationContext.setProperty("test","test123");
-			msgctx.getOperationDescription().registerOperationContext(response,
+			msgctx.getAxisOperation().registerOperationContext(response,
 					newOperationContext);
 			response.setServerSide(false);
 			response.setServiceContext(msgctx.getServiceContext());

Modified: webservices/sandesha/trunk/src/org/apache/sandesha2/handlers/SandeshaInHandler.java
URL: http://svn.apache.org/viewcvs/webservices/sandesha/trunk/src/org/apache/sandesha2/handlers/SandeshaInHandler.java?rev=328579&r1=328578&r2=328579&view=diff
==============================================================================
--- webservices/sandesha/trunk/src/org/apache/sandesha2/handlers/SandeshaInHandler.java (original)
+++ webservices/sandesha/trunk/src/org/apache/sandesha2/handlers/SandeshaInHandler.java Tue Oct 25 23:49:15 2005
@@ -52,7 +52,7 @@
 	}
 
 	public void invoke(MessageContext msgCtx) throws AxisFault {
-		
+
 		RMMsgContext rmMsgCtx = null;
 		try {
 			rmMsgCtx = MsgInitializer.initializeMessage(msgCtx);

Modified: webservices/sandesha/trunk/src/org/apache/sandesha2/handlers/SandeshaOutHandler.java
URL: http://svn.apache.org/viewcvs/webservices/sandesha/trunk/src/org/apache/sandesha2/handlers/SandeshaOutHandler.java?rev=328579&r1=328578&r2=328579&view=diff
==============================================================================
--- webservices/sandesha/trunk/src/org/apache/sandesha2/handlers/SandeshaOutHandler.java (original)
+++ webservices/sandesha/trunk/src/org/apache/sandesha2/handlers/SandeshaOutHandler.java Tue Oct 25 23:49:15 2005
@@ -60,7 +60,7 @@
 public class SandeshaOutHandler extends AbstractHandler {
 
 	public void invoke(MessageContext msgCtx) throws AxisFault {
-	
+
 		String DONE = (String) msgCtx
 				.getProperty(Constants.APPLICATION_PROCESSING_DONE);
 		if (null != DONE && "true".equals(DONE))
@@ -252,7 +252,7 @@
 					newMsgCtx.setServiceContext(msgCtx.getServiceContext());
 					newMsgCtx.setServiceContextID(msgCtx.getServiceContextID());
 					OperationContext newOpContext = new OperationContext(
-							newMsgCtx.getOperationDescription());
+							newMsgCtx.getAxisOperation());
 
 					//if server side add request message
 					if (msgCtx.isServerSide()) {
@@ -303,7 +303,7 @@
 
 						String to = toEPR.getAddress();
 						String operationName = msgCtx.getOperationContext()
-								.getOperationDescription().getName()
+								.getAxisOperation().getName()
 								.getLocalPart();
 						msgCtx.setWSAAction(to + "/" + operationName);
 					}

Modified: webservices/sandesha/trunk/src/org/apache/sandesha2/msgprocessors/ApplicationMsgProcessor.java
URL: http://svn.apache.org/viewcvs/webservices/sandesha/trunk/src/org/apache/sandesha2/msgprocessors/ApplicationMsgProcessor.java?rev=328579&r1=328578&r2=328579&view=diff
==============================================================================
--- webservices/sandesha/trunk/src/org/apache/sandesha2/msgprocessors/ApplicationMsgProcessor.java (original)
+++ webservices/sandesha/trunk/src/org/apache/sandesha2/msgprocessors/ApplicationMsgProcessor.java Tue Oct 25 23:49:15 2005
@@ -153,7 +153,7 @@
 
 		//TODO set a suitable operation description
 		OperationContext ackOpContext = new OperationContext(msgCtx
-				.getOperationDescription());
+				.getAxisOperation());
 
 		try {
 			ackOpContext.addMessageContext(ackMsgCtx);

Modified: webservices/sandesha/trunk/src/org/apache/sandesha2/util/RMMsgCreator.java
URL: http://svn.apache.org/viewcvs/webservices/sandesha/trunk/src/org/apache/sandesha2/util/RMMsgCreator.java?rev=328579&r1=328578&r2=328579&view=diff
==============================================================================
--- webservices/sandesha/trunk/src/org/apache/sandesha2/util/RMMsgCreator.java (original)
+++ webservices/sandesha/trunk/src/org/apache/sandesha2/util/RMMsgCreator.java Tue Oct 25 23:49:15 2005
@@ -28,8 +28,8 @@
 import org.apache.axis2.context.ConfigurationContext;
 import org.apache.axis2.context.MessageContext;
 import org.apache.axis2.context.OperationContext;
-import org.apache.axis2.description.OperationDescription;
-import org.apache.axis2.description.OperationDescriptionFactory;
+import org.apache.axis2.description.AxisOperation;
+import org.apache.axis2.description.AxisOperationFactory;
 import org.apache.axis2.om.OMAbstractFactory;
 import org.apache.axis2.om.impl.MIMEOutputUtils;
 import org.apache.axis2.soap.SOAPEnvelope;
@@ -107,17 +107,17 @@
 
 		String createSeqMsgId = SandeshaUtil.getUUID();
 		try {
-			OperationDescription appMsgOperationDesc = applicationMsgContext.getOperationDescription();
-			OperationDescription createSeqOperationDesc = OperationDescriptionFactory.getOperetionDescription(OperationDescriptionFactory.MEP_CONSTANT_OUT_IN);
+			AxisOperation appMsgOperationDesc = applicationMsgContext.getAxisOperation();
+			AxisOperation createSeqOperationDesc = AxisOperationFactory.getOperetionDescription(AxisOperationFactory.MEP_CONSTANT_OUT_IN);
 			createSeqOperationDesc.setPhasesOutFlow(appMsgOperationDesc.getPhasesOutFlow());
 			createSeqOperationDesc.setPhasesOutFaultFlow(appMsgOperationDesc.getPhasesOutFaultFlow());
 			createSeqOperationDesc.setPhasesInFaultFlow(appMsgOperationDesc.getPhasesInFaultFlow());
 			createSeqOperationDesc.setRemainingPhasesInFlow(appMsgOperationDesc.getRemainingPhasesInFlow());
 			
-			createSeqmsgContext.setOperationDescription(createSeqOperationDesc);
+			createSeqmsgContext.setAxisOperation(createSeqOperationDesc);
 			//TODO set a suitable ope. description
 			OperationContext createSeqOpContext = new OperationContext(
-					createSeqmsgContext.getOperationDescription());
+					createSeqmsgContext.getAxisOperation());
 			createSeqmsgContext.setOperationContext(createSeqOpContext);
 			createSeqOpContext.addMessageContext(createSeqmsgContext);
 			//registering opearion context
@@ -239,8 +239,8 @@
 		terminateMessage.setServiceContextID(referenceMessage
 				.getServiceContextID());
 		
-		terminateMessage.setOperationDescription(referenceMessage.getOperationDescription());
-		OperationContext newOperationCtx = new OperationContext (terminateMessage.getOperationDescription());
+		terminateMessage.setAxisOperation(referenceMessage.getAxisOperation());
+		OperationContext newOperationCtx = new OperationContext (terminateMessage.getAxisOperation());
 		try {
 			newOperationCtx.addMessageContext(terminateMessage);
 		} catch (AxisFault e) {
@@ -380,7 +380,7 @@
 
 			//TODO set a suitable description
 			OperationContext ackOpCtx = new OperationContext(applicationMsgCtx
-					.getOperationDescription());
+					.getAxisOperation());
 
 			ackMsgCtx.setOperationContext(ackOpCtx);
 			ackOpCtx.addMessageContext(ackMsgCtx);

Modified: webservices/sandesha/trunk/src/org/apache/sandesha2/util/SandeshaUtil.java
URL: http://svn.apache.org/viewcvs/webservices/sandesha/trunk/src/org/apache/sandesha2/util/SandeshaUtil.java?rev=328579&r1=328578&r2=328579&view=diff
==============================================================================
--- webservices/sandesha/trunk/src/org/apache/sandesha2/util/SandeshaUtil.java (original)
+++ webservices/sandesha/trunk/src/org/apache/sandesha2/util/SandeshaUtil.java Tue Oct 25 23:49:15 2005
@@ -192,8 +192,8 @@
 			newMessageContext.setProcessingFault(msgCtx.isProcessingFault());
 			newMessageContext.setResponseWritten(msgCtx.isResponseWritten());
 			newMessageContext.setRestThroughPOST(msgCtx.isRestThroughPOST());
-			newMessageContext.setOperationDescription(msgCtx
-					.getOperationDescription());
+			newMessageContext.setAxisOperation(msgCtx
+					.getAxisOperation());
 
 			if (msgCtx.getEnvelope() != null)
 				newMessageContext.setEnvelope(msgCtx.getEnvelope());
@@ -253,11 +253,11 @@
 					.setProperty(MessageContext.CHARACTER_SET_ENCODING, charSetEncoding);
 
 			newMessageContext.setMessageInformationHeaders(msgInfoHeaders1);
-			newMessageContext.setServiceDescription(msgCtx
-					.getServiceDescription());
-			if (msgCtx.getServiceGroupDescription() != null)
-				newMessageContext.setServiceGroupDescription(msgCtx
-						.getServiceGroupDescription());
+			newMessageContext.setAxisService(msgCtx
+					.getAxisService());
+			if (msgCtx.getAxisServiceGroup() != null)
+				newMessageContext.setAxisServiceGroup(msgCtx
+						.getAxisServiceGroup());
 
 			newMessageContext.setSoapAction(msgCtx.getSoapAction());
 			newMessageContext.setWSAAction(msgCtx.getWSAAction());

Modified: webservices/sandesha/trunk/src/org/apache/sandesha2/workers/Sender.java
URL: http://svn.apache.org/viewcvs/webservices/sandesha/trunk/src/org/apache/sandesha2/workers/Sender.java?rev=328579&r1=328578&r2=328579&view=diff
==============================================================================
--- webservices/sandesha/trunk/src/org/apache/sandesha2/workers/Sender.java (original)
+++ webservices/sandesha/trunk/src/org/apache/sandesha2/workers/Sender.java Tue Oct 25 23:49:15 2005
@@ -34,7 +34,6 @@
 import org.apache.axis2.context.ConfigurationContext;
 import org.apache.axis2.context.MessageContext;
 import org.apache.axis2.context.OperationContext;
-import org.apache.axis2.description.OperationDescription;
 import org.apache.axis2.engine.AxisEngine;
 import org.apache.axis2.i18n.Messages;
 import org.apache.axis2.om.OMException;
@@ -141,7 +140,7 @@
 		}
 		if (rmMsgCtx.getMessageType() == Constants.MessageTypes.APPLICATION) {
 			//a ack may arrive. (not a application response)
-			if (rmMsgCtx.getMessageContext().getOperationDescription()
+			if (rmMsgCtx.getMessageContext().getAxisOperation()
 					.getMessageExchangePattern().equals(
 							org.apache.wsdl.WSDLConstants.MEP_URI_IN_OUT)) {
 				responseExpected = true;
@@ -189,8 +188,8 @@
 			response.setServiceGroupContextId(msgCtx.getServiceGroupContextId());
 			response.setServiceGroupContext(msgCtx.getServiceGroupContext());
 			response.setServiceContext(msgCtx.getServiceContext());
-			response.setServiceDescription(msgCtx.getServiceDescription());
-			response.setServiceGroupDescription(msgCtx.getServiceGroupDescription());
+			response.setAxisService (msgCtx.getAxisService());
+			response.setAxisServiceGroup(msgCtx.getAxisServiceGroup());
 			
 			//Changed following from TransportUtils to SandeshaUtil since op. context is anavailable.
 			SOAPEnvelope resenvelope = null;



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