ws-sandesha-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mckie...@apache.org
Subject svn commit: r593494 - in /webservices/sandesha/trunk/java/modules: core/src/main/java/org/apache/sandesha2/msgprocessors/ core/src/main/java/org/apache/sandesha2/msgreceivers/ core/src/main/java/org/apache/sandesha2/polling/ core/src/main/java/org/apac...
Date Fri, 09 Nov 2007 11:31:01 GMT
Author: mckierna
Date: Fri Nov  9 03:30:57 2007
New Revision: 593494

URL: http://svn.apache.org/viewvc?rev=593494&view=rev
Log:
https://issues.apache.org/jira/browse/SANDESHA2-127

Modified:
    webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/msgprocessors/AckRequestedProcessor.java
    webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/msgprocessors/AcknowledgementProcessor.java
    webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/msgprocessors/ApplicationMsgProcessor.java
    webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/msgprocessors/CreateSeqMsgProcessor.java
    webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/msgprocessors/CreateSeqResponseMsgProcessor.java
    webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/msgprocessors/SequenceProcessor.java
    webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/msgreceivers/RMMessageReceiver.java
    webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/polling/PollingManager.java
    webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/storage/beans/RMSequenceBean.java
    webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/util/AcknowledgementManager.java
    webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/util/FaultManager.java
    webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/util/RMMsgCreator.java
    webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/util/SandeshaUtil.java
    webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/util/SequenceManager.java
    webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/util/TerminateManager.java
    webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/workers/Sender.java
    webservices/sandesha/trunk/java/modules/tests/src/test/java/org/apache/sandesha2/faulttests/CreateSequenceRefusedFaultTest.java
    webservices/sandesha/trunk/java/modules/tests/src/test/java/org/apache/sandesha2/faulttests/InvalidAcknowledgementTest.java
    webservices/sandesha/trunk/java/modules/tests/src/test/java/org/apache/sandesha2/faulttests/MessageNumberRolloverFaultTest.java
    webservices/sandesha/trunk/java/modules/tests/src/test/java/org/apache/sandesha2/faulttests/SequenceClosedFaultTest.java
    webservices/sandesha/trunk/java/modules/tests/src/test/java/org/apache/sandesha2/faulttests/SequenceTerminatedFaultTest.java

Modified: webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/msgprocessors/AckRequestedProcessor.java
URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/msgprocessors/AckRequestedProcessor.java?rev=593494&r1=593493&r2=593494&view=diff
==============================================================================
--- webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/msgprocessors/AckRequestedProcessor.java (original)
+++ webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/msgprocessors/AckRequestedProcessor.java Fri Nov  9 03:30:57 2007
@@ -134,12 +134,11 @@
 		}
 
 		// Setting the ack depending on AcksTo.
-		EndpointReference acksTo = new EndpointReference(rmdBean.getAcksToEPR());
-		String acksToStr = acksTo.getAddress();
+		EndpointReference acksTo = rmdBean.getAcksToEndpointReference();
 
-		if (acksToStr == null)
+		if (acksTo == null || acksTo.getAddress()==null)
 			throw new SandeshaException(SandeshaMessageHelper.getMessage(SandeshaMessageKeys.acksToStrNotSet));
-
+		
 		//Getting the operation for ack messages.
 		AxisOperation ackOperation = SpecSpecificConstants.getWSRMOperation(
 				Sandesha2Constants.MessageTypes.ACK,

Modified: webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/msgprocessors/AcknowledgementProcessor.java
URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/msgprocessors/AcknowledgementProcessor.java?rev=593494&r1=593493&r2=593494&view=diff
==============================================================================
--- webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/msgprocessors/AcknowledgementProcessor.java (original)
+++ webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/msgprocessors/AcknowledgementProcessor.java Fri Nov  9 03:30:57 2007
@@ -148,9 +148,8 @@
 			return;
 		}
 		
-		String replyToAddress = rmsBean.getReplyToEPR();
-		EndpointReference replyTo = new EndpointReference (replyToAddress);
-		boolean anonReplyTo = replyTo.hasAnonymousAddress();
+		EndpointReference replyTo = rmsBean.getReplyToEndpointReference();
+		boolean anonReplyTo = replyTo==null || replyTo.hasAnonymousAddress();
 		
 		String rmVersion = rmMsgCtx.getRMSpecVersion();
 		
@@ -186,7 +185,7 @@
 							// Check we haven't got an Ack for a message that hasn't been sent yet !
 							if (retransmitterBean.getSentCount() == 0) {
 								FaultManager.makeInvalidAcknowledgementFault(rmMsgCtx, sequenceAck, ackRange,
-										storageManager, piggybackedAck);
+										storageManager, piggybackedAck, null); //do not want to send the fault to acksTo in this case
 								if (log.isDebugEnabled())
 									log.debug("Exit: AcknowledgementProcessor::processAckHeader, Invalid Ack");
 								return;

Modified: webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/msgprocessors/ApplicationMsgProcessor.java
URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/msgprocessors/ApplicationMsgProcessor.java?rev=593494&r1=593493&r2=593494&view=diff
==============================================================================
--- webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/msgprocessors/ApplicationMsgProcessor.java (original)
+++ webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/msgprocessors/ApplicationMsgProcessor.java Fri Nov  9 03:30:57 2007
@@ -371,8 +371,8 @@
 
 		// setting async ack endpoint for the server side. (if present)
 		if (serverSide) {
-			if (rmsBean.getToEPR() != null) {
-				msgContext.setProperty(SandeshaClientConstants.AcksTo, rmsBean.getToEPR());
+			if (rmsBean.getToEndpointReference() != null) {
+				msgContext.setProperty(SandeshaClientConstants.AcksTo, rmsBean.getToEndpointReference().getAddress());
 			}
 		}
 

Modified: webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/msgprocessors/CreateSeqMsgProcessor.java
URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/msgprocessors/CreateSeqMsgProcessor.java?rev=593494&r1=593493&r2=593494&view=diff
==============================================================================
--- webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/msgprocessors/CreateSeqMsgProcessor.java (original)
+++ webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/msgprocessors/CreateSeqMsgProcessor.java Fri Nov  9 03:30:57 2007
@@ -79,9 +79,8 @@
 			if (createSeqPart == null) {
 				if (log.isDebugEnabled())
 					log.debug(SandeshaMessageHelper.getMessage(SandeshaMessageKeys.noCreateSeqParts));
-				FaultManager.makeCreateSequenceRefusedFault(createSeqRMMsg, 
-																										SandeshaMessageHelper.getMessage(SandeshaMessageKeys.noCreateSeqParts), 
-																										new Exception());
+				FaultManager.makeCreateSequenceRefusedFault(createSeqRMMsg, SandeshaMessageHelper.getMessage(SandeshaMessageKeys.noCreateSeqParts), 
+																										new Exception(), null);
 				// Return false if an Exception hasn't been thrown.
 				if (log.isDebugEnabled())
 					log.debug("Exit: CreateSeqMsgProcessor::processInMessage " + Boolean.FALSE);				
@@ -114,7 +113,7 @@
 			if (toEPR.hasAnonymousAddress()) {
 	
 				RMSBean findBean = new RMSBean ();
-				findBean.setReplyToEPR(toEPR.getAddress());
+				findBean.setReplyToEndpointReference(toEPR);
 				findBean.setTerminationPauserForCS(true);
 				
 				//TODO recheck
@@ -125,7 +124,7 @@
 					if (requestSideRefMessage==null) {
 						FaultManager.makeCreateSequenceRefusedFault(createSeqRMMsg, 
 								SandeshaMessageHelper.getMessage(SandeshaMessageKeys.referencedMessageNotFound, rmsBean.getInternalSequenceID()),
-								new Exception());						
+								new Exception(), null);						
 						// Return false if an Exception hasn't been thrown.
 						if (log.isDebugEnabled())
 							log.debug("Exit: CreateSeqMsgProcessor::processInMessage " + Boolean.FALSE);				
@@ -164,9 +163,9 @@
 				if (accept == null) {
 					if (log.isDebugEnabled())
 						log.debug(SandeshaMessageHelper.getMessage(SandeshaMessageKeys.noAcceptPart));
-					FaultManager.makeCreateSequenceRefusedFault(createSeqRMMsg, 
-																											SandeshaMessageHelper.getMessage(SandeshaMessageKeys.noAcceptPart), 
-																											new Exception());
+					FaultManager.makeCreateSequenceRefusedFault(createSeqRMMsg, SandeshaMessageHelper.getMessage(SandeshaMessageKeys.noAcceptPart), 
+																new Exception(),
+																null);
 					// Return false if an Exception hasn't been thrown.
 					if (log.isDebugEnabled())
 						log.debug("Exit: CreateSeqMsgProcessor::processInMessage " + Boolean.FALSE);				
@@ -189,9 +188,9 @@
 					// this is a dummy value
 					rMSBean.setCreateSeqMsgID(SandeshaUtil.getUUID()); 
 						
-					rMSBean.setToEPR(rmdBean.getToEPR());
-					rMSBean.setAcksToEPR(rmdBean.getToEPR());  // The acks need to flow back into this endpoint
-					rMSBean.setReplyToEPR(rmdBean.getReplyToEPR());
+					rMSBean.setToEndpointReference(rmdBean.getToEndpointReference());
+					rMSBean.setAcksToEndpointReference(rmdBean.getToEndpointReference());  // The acks need to flow back into this endpoint
+					rMSBean.setReplyToEndpointReference(rmdBean.getReplyToEndpointReference());
 					rMSBean.setLastActivatedTime(System.currentTimeMillis());
 					rMSBean.setRMVersion(rmdBean.getRMVersion());
 					rMSBean.setClientCompletedMessages(new RangeString());
@@ -216,9 +215,8 @@
 					// If this new sequence has anonymous acksTo, then we must poll for the acks
 					// If the inbound sequence is targetted at the WSRM anonymous URI, we need to start
 					// polling for this sequence.
-					String acksTo = rMSBean.getAcksToEPR();
-					EndpointReference reference = new EndpointReference(acksTo);
-					if ((acksTo == null || reference.hasAnonymousAddress()) &&
+					EndpointReference reference = rMSBean.getAcksToEndpointReference();
+					if ((reference == null || reference.hasAnonymousAddress()) &&
 						Sandesha2Constants.SPEC_VERSIONS.v1_1.equals(createSeqRMMsg.getRMSpecVersion())) {
 						rMSBean.setPollingMode(true);
 					}
@@ -265,7 +263,9 @@
 			catch(AxisFault e){
 				FaultManager.makeCreateSequenceRefusedFault(createSeqRMMsg, 
 						SandeshaMessageHelper.getMessage(SandeshaMessageKeys.couldNotSendCreateSeqResponse, 
-																						 SandeshaUtil.getStackTraceFromException(e)), e);
+													     SandeshaUtil.getStackTraceFromException(e)), 
+													     e,
+													     rmdBean.getAcksToEndpointReference());
 				// Return false if an Exception hasn't been thrown.
 				if (log.isDebugEnabled())
 					log.debug("Exit: CreateSeqMsgProcessor::processInMessage " + Boolean.FALSE);				
@@ -291,7 +291,7 @@
 			if (createSeqRMMsg.getMessageContext().getProperty(SOAP12Constants.SOAP_FAULT_CODE_LOCAL_NAME) == null && 
 					createSeqRMMsg.getMessageContext().getProperty(SOAP11Constants.SOAP_FAULT_CODE_LOCAL_NAME) == null) {
 				// Add the fault details to the message
-				FaultManager.makeCreateSequenceRefusedFault(createSeqRMMsg, SandeshaUtil.getStackTraceFromException(e), e);				
+				FaultManager.makeCreateSequenceRefusedFault(createSeqRMMsg, SandeshaUtil.getStackTraceFromException(e), e, null);				
 				
 				// Return false if an Exception hasn't been thrown.
 				if (log.isDebugEnabled())

Modified: webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/msgprocessors/CreateSeqResponseMsgProcessor.java
URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/msgprocessors/CreateSeqResponseMsgProcessor.java?rev=593494&r1=593493&r2=593494&view=diff
==============================================================================
--- webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/msgprocessors/CreateSeqResponseMsgProcessor.java (original)
+++ webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/msgprocessors/CreateSeqResponseMsgProcessor.java Fri Nov  9 03:30:57 2007
@@ -151,9 +151,8 @@
 		if (Sandesha2Constants.SPEC_VERSIONS.v1_1.equals(createSeqResponseRMMsgCtx.getRMSpecVersion())) {
 			SandeshaPolicyBean policy = SandeshaUtil.getPropertyBean(configCtx.getAxisConfiguration());
 			if(policy.isEnableMakeConnection()) {
-				String acksTo = rmsBean.getAcksToEPR();
-				EndpointReference reference = new EndpointReference(acksTo);
-				if(acksTo == null || reference.hasAnonymousAddress()) {
+				EndpointReference reference = rmsBean.getAcksToEndpointReference();
+				if(reference == null || reference.hasAnonymousAddress()) {
 					rmsBean.setPollingMode(true);
 				}
 			}
@@ -179,7 +178,7 @@
 			RMDBean rMDBean = new RMDBean();
 			
 			EndpointReference acksToEPR = accept.getAcksTo().getEPR();
-			rMDBean.setAcksToEPR(acksToEPR.getAddress());
+			rMDBean.setAcksToEndpointReference(acksToEPR);
 			rMDBean.setSequenceID(rmsBean.getOfferedSequence());
 			rMDBean.setNextMsgNoToProcess(1);
 			rMDBean.setOutboundInternalSequence(rmsBean.getInternalSequenceID());

Modified: webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/msgprocessors/SequenceProcessor.java
URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/msgprocessors/SequenceProcessor.java?rev=593494&r1=593493&r2=593494&view=diff
==============================================================================
--- webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/msgprocessors/SequenceProcessor.java (original)
+++ webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/msgprocessors/SequenceProcessor.java Fri Nov  9 03:30:57 2007
@@ -164,7 +164,7 @@
 		}
 		FaultManager.checkForLastMsgNumberExceeded(rmMsgCtx, storageManager);
 		
-		if (FaultManager.checkForMessageRolledOver(rmMsgCtx, sequenceId, msgNo)) {
+		if (FaultManager.checkForMessageRolledOver(rmMsgCtx, sequenceId, msgNo, bean)) {
 			
 			if (log.isDebugEnabled())
 				log.debug("Exit: SequenceProcessor::processReliableMessage, Message rolled over " + msgNo);
@@ -241,7 +241,7 @@
 			  }
 		  }
 			
-			EndpointReference acksTo = new EndpointReference (bean.getAcksToEPR());
+			EndpointReference acksTo = bean.getAcksToEndpointReference();
 			
 			// Send an Ack if needed.
 			//We are not sending acks for duplicate messages in the RM 1.0 anon InOut case.
@@ -336,7 +336,7 @@
 		boolean ackBackChannel = SpecSpecificConstants.sendAckInBackChannel (rmMsgCtx.getMessageType());
 		// If we are processing an inOnly message we must ack the back channel otherwise the connection stays open
 		if (!ackBackChannel && mep == WSDLConstants.MEP_CONSTANT_IN_ONLY) ackBackChannel = true;
-		EndpointReference acksTo = new EndpointReference (bean.getAcksToEPR());
+		EndpointReference acksTo = bean.getAcksToEndpointReference();
 		if (acksTo.hasAnonymousAddress() && backchannelFree && ackBackChannel) {
 			boolean responseWritten = TransportUtils.isResponseWritten(msgCtx);
 			if (!responseWritten) {				

Modified: webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/msgreceivers/RMMessageReceiver.java
URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/msgreceivers/RMMessageReceiver.java?rev=593494&r1=593493&r2=593494&view=diff
==============================================================================
--- webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/msgreceivers/RMMessageReceiver.java (original)
+++ webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/msgreceivers/RMMessageReceiver.java Fri Nov  9 03:30:57 2007
@@ -77,7 +77,7 @@
 					if (rmMsgCtx.getMessageType() == Sandesha2Constants.MessageTypes.CREATE_SEQ)
 						FaultManager.makeCreateSequenceRefusedFault(rmMsgCtx, 
 								SandeshaMessageHelper.getMessage(SandeshaMessageKeys.reliableMessagingNotEnabled, msgCtx.getAxisService().getName()), 
-								new Exception());
+								new Exception(), null);
 					else
 						throw new AxisFault(SandeshaMessageHelper.getMessage(SandeshaMessageKeys.reliableMessagingNotEnabled, msgCtx.getAxisService().getName()));
 					

Modified: webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/polling/PollingManager.java
URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/polling/PollingManager.java?rev=593494&r1=593493&r2=593494&view=diff
==============================================================================
--- webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/polling/PollingManager.java (original)
+++ webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/polling/PollingManager.java Fri Nov  9 03:30:57 2007
@@ -212,17 +212,17 @@
 		if(log.isDebugEnabled()) log.debug("Enter: PollingManager::pollForSequence, rmBean: " + rmBean);
 		
 		//create a MakeConnection message  
-		String replyTo = rmBean.getReplyToEPR();
+		EndpointReference replyTo = rmBean.getReplyToEndpointReference();
 		String wireSeqId = null;
 		String wireAddress = null;
 		if(anonUUID != null) {
 			// If we are polling on a RM anon URI then we don't want to include the sequence id
 			// in the MakeConnection message.
 			wireAddress = anonUUID;
-		} else if(SandeshaUtil.isWSRMAnonymous(replyTo)) {
+		} else if(replyTo!=null && SandeshaUtil.isWSRMAnonymous(replyTo.getAddress())) {
 			// If we are polling on a RM anon URI then we don't want to include the sequence id
 			// in the MakeConnection message.
-			wireAddress = replyTo;
+			wireAddress = replyTo.getAddress();
 		} else {
 			wireSeqId = rmBean.getSequenceID();
 		}

Modified: webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/storage/beans/RMSequenceBean.java
URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/storage/beans/RMSequenceBean.java?rev=593494&r1=593493&r2=593494&view=diff
==============================================================================
--- webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/storage/beans/RMSequenceBean.java (original)
+++ webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/storage/beans/RMSequenceBean.java Fri Nov  9 03:30:57 2007
@@ -19,6 +19,8 @@
 
 package org.apache.sandesha2.storage.beans;
 
+import org.apache.axis2.addressing.EndpointReference;
+
 /**
  * This bean is used at the receiving side (of both server and client)
  * There is one entry for each sequence.
@@ -33,11 +35,23 @@
 	 */
 	private String sequenceID;
 	
+	/**
+	 * @deprecated use toEndpointReference instead
+	 */
 	private String toEPR;
+	private EndpointReference toEndpointReference;
 
+	/**
+	 * @deprecated use replyToEndpointReference instead
+	 */
 	private String replyToEPR;
+	private EndpointReference replyToEndpointReference;
 	
+	/**
+	 * @deprecated use acksToEndpointRef instead
+	 */
 	private String acksToEPR;
+	private EndpointReference acksToEndpointRef;
 	
 	private String RMVersion;
 	
@@ -89,15 +103,18 @@
 	 */
 	public RMSequenceBean(RMSequenceBean beanToCopy) {
 		acksToEPR = beanToCopy.getAcksToEPR();
+		acksToEndpointRef = beanToCopy.getAcksToEndpointReference();
 		closed = beanToCopy.isClosed();
 		lastActivatedTime = beanToCopy.getLastActivatedTime();
 		pollingMode = beanToCopy.isPollingMode();
 		replyToEPR = beanToCopy.getReplyToEPR();
+		replyToEndpointReference = beanToCopy.getReplyToEndpointReference();
 		RMVersion = beanToCopy.getRMVersion();
 		securityTokenData = beanToCopy.getSecurityTokenData();		
 		sequenceID = beanToCopy.getSequenceID();
 		terminated = beanToCopy.isTerminated();
-		toEPR = beanToCopy.getToEPR(); 		
+		toEPR = beanToCopy.getToEPR(); 	
+		toEndpointReference = beanToCopy.getToEndpointReference();
 		serviceName = beanToCopy.getServiceName();
 	}
 
@@ -120,30 +137,87 @@
 		this.sequenceID = sequenceID;
 	}
 	
+	/**
+	 * @deprecated
+	 */
 	public String getAcksToEPR() {
-  	return acksToEPR;
-  }
+		return acksToEPR;
+	}
+	
+	public EndpointReference getAcksToEndpointReference(){
+		if(acksToEndpointRef==null && acksToEPR!=null){
+			//this is for release to release compatability with serializaed data
+			acksToEndpointRef = new EndpointReference(acksToEPR);;
+		}
+		return acksToEndpointRef;
+	}
 
+	/**
+	 * @deprecated
+	 */
 	public void setAcksToEPR(String acksToEPR) {
-  	this.acksToEPR = acksToEPR;
-  }
+		this.acksToEPR = acksToEPR;
+	}
+	
+	public void setAcksToEndpointReference(EndpointReference acksToEndpointRef){
+		this.acksToEndpointRef = acksToEndpointRef;
+		acksToEPR = acksToEndpointRef.getAddress();
+	}
 
+	/**
+	 * @deprecated
+	 */
 	public String getReplyToEPR() {
   	return replyToEPR;
   }
+	
+	public EndpointReference getReplyToEndpointReference(){
+		if(replyToEndpointReference==null && replyToEPR!=null){
+			//this is for release to release compatability with serializaed data
+			replyToEndpointReference = new EndpointReference(replyToEPR);;
+		}
+		return replyToEndpointReference;
+	}	
 
+	/**
+	 * @deprecated
+	 */
 	public void setReplyToEPR(String replyToEPR) {
   	this.replyToEPR = replyToEPR;
   }
+	
+	public void setReplyToEndpointReference(EndpointReference replyToEndpointRef){
+		this.replyToEndpointReference = replyToEndpointRef;
+		replyToEPR = replyToEndpointRef.getAddress();
+	}	
 
+	/**
+	 * @deprecated
+	 */
 	public String getToEPR() {
   	return toEPR;
   }
+	
+	public EndpointReference getToEndpointReference(){
+		if(toEndpointReference==null && toEPR!=null){
+			//this is for release to release compatability with serializaed data
+			toEndpointReference = new EndpointReference(toEPR);;
+		}
+		return toEndpointReference;
+	}		
 
+	/**
+	 * @deprecated
+	 */
 	public void setToEPR(String toEPR) {
   	this.toEPR = toEPR;
   }
-
+	
+	public void setToEndpointReference(EndpointReference toEndpointRef){
+		this.toEndpointReference = toEndpointRef;
+		toEPR = toEndpointReference.getAddress();
+	}
+	
 	public boolean isPollingMode() {
 		return pollingMode;
 	}
@@ -235,13 +309,16 @@
 		if(bean.getSequenceID() != null && !bean.getSequenceID().equals(this.getSequenceID()))
 			match = false;
 		
-		else if(bean.getToEPR() != null && !bean.getToEPR().equals(this.getToEPR()))
+		else if((bean.getToEndpointReference() != null && this.getToEndpointReference()!=null && !bean.getToEndpointReference().getAddress().equals(this.getToEndpointReference().getAddress())) ||
+				(bean.getToEPR() != null && !bean.getToEPR().equals(this.getToEPR())))
 			match = false;
 		
-		else if(bean.getReplyToEPR() != null && !bean.getReplyToEPR().equals(this.getReplyToEPR()))
+		else if((bean.getReplyToEndpointReference() != null && this.getReplyToEndpointReference()!=null && !bean.getReplyToEndpointReference().getAddress().equals(this.getReplyToEndpointReference().getAddress())) ||
+				(bean.getReplyToEPR() != null && !bean.getReplyToEPR().equals(this.getReplyToEPR())))
 			match = false;
 		
-		else if(bean.getAcksToEPR() != null && !bean.getAcksToEPR().equals(this.getAcksToEPR()))
+		else if((bean.getAcksToEndpointReference() != null && this.getAcksToEndpointReference()!=null && !bean.getAcksToEndpointReference().getAddress().equals(this.getAcksToEndpointReference().getAddress())) ||
+				(bean.getAcksToEPR() != null && !bean.getAcksToEPR().equals(this.getAcksToEPR())))
 			match = false;
 		
 		else if(bean.getRMVersion() != null && !bean.getRMVersion().equals(this.getRMVersion()))

Modified: webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/util/AcknowledgementManager.java
URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/util/AcknowledgementManager.java?rev=593494&r1=593493&r2=593494&view=diff
==============================================================================
--- webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/util/AcknowledgementManager.java (original)
+++ webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/util/AcknowledgementManager.java Fri Nov  9 03:30:57 2007
@@ -74,7 +74,7 @@
 				// Search for any sequences that have an acksTo that matches this target, and add an ack
 				// for each of them.
 				RMDBean findBean = new RMDBean();
-				findBean.setAcksToEPR(target.getAddress());
+				findBean.setAcksToEndpointReference(target);
 				findBean.setTerminated(false);
 				Collection rmdBeans = storageManager.getRMDBeanMgr().find(findBean);
 				Iterator sequences = rmdBeans.iterator();
@@ -93,10 +93,9 @@
 				if(inboundSequence != null) {
 					RMDBean inboundBean = SandeshaUtil.getRMDBeanFromSequenceId(storageManager, inboundSequence);
 					if(inboundBean != null && !inboundBean.isTerminated()) {
-						String acksTo = inboundBean.getAcksToEPR();
-						EndpointReference acksToEPR = new EndpointReference(acksTo);
+						EndpointReference acksToEPR = inboundBean.getAcksToEndpointReference();
 						
-						if(acksTo == null || acksToEPR.hasAnonymousAddress()) {
+						if(acksToEPR == null || acksToEPR.hasAnonymousAddress()) {
 							if(log.isDebugEnabled()) log.debug("Piggybacking ack for inbound sequence: " + inboundSequence);
 							RMMsgCreator.addAckMessage(rmMessageContext, inboundSequence, inboundBean);
 						}
@@ -106,48 +105,63 @@
 			if(log.isDebugEnabled()) log.debug("Exit: AcknowledgementManager::piggybackAcksIfPresent, anon");
 			return transaction;
 		}
-	    // From here on, we must be dealing with a real address. Piggyback all sequences that have an
-	    // acksTo that matches the To address, and that have an ackMessage queued up for sending. We
-	    // search for RMDBeans first, to avoid a deadlock.
-	    //
-	    // As a special case, if this is a terminate sequence message then add in ack messages for
-	    // any sequences that have an acksTo that matches the target address. This helps to ensure
-	    // that request-response sequence pairs end cleanly.
-	    RMDBean findRMDBean = new RMDBean();
-	    findRMDBean.setAcksToEPR(target.getAddress());
-	    findRMDBean.setTerminated(false);
-	    Collection rmdBeans = storageManager.getRMDBeanMgr().find(findRMDBean);
-	    Iterator sequences = rmdBeans.iterator();
-	    while(sequences.hasNext()) {
-	      RMDBean sequence = (RMDBean) sequences.next();
-	      String sequenceId = sequence.getSequenceID();
-	      
-	      // Look for the SenderBean that carries the ack, there should be at most one
-	      SenderBean findBean = new SenderBean();
-	      findBean.setMessageType(Sandesha2Constants.MessageTypes.ACK);
-	      findBean.setSend(true);
-	      findBean.setSequenceID(sequenceId);
-	      findBean.setToAddress(target.getAddress());
-	      
-	      SenderBean ackBean = retransmitterBeanMgr.findUnique(findBean);
-	      
-			// Piggybacking will happen only if the end of ack interval (timeToSend) is not reached.
-			long timeNow = System.currentTimeMillis();
-		    if (ackBean != null && ackBean.getTimeToSend() > timeNow) {
-				// Delete the beans that would have sent the ack
-				retransmitterBeanMgr.delete(ackBean.getMessageID());
-				storageManager.removeMessageContext(ackBean.getMessageContextRefKey());
-
-				if (log.isDebugEnabled()) log.debug("Piggybacking ack for sequence: " + sequenceId);
-		        RMMsgCreator.addAckMessage(rmMessageContext, sequenceId, sequence);
-
-		    } else if(rmMessageContext.getMessageType() == Sandesha2Constants.MessageTypes.TERMINATE_SEQ) {
-		        if(log.isDebugEnabled()) log.debug("Adding extra acks, as this is a terminate");
-		          
-		        if(sequence.getHighestInMessageNumber() > 0) {
-					  if(log.isDebugEnabled()) log.debug("Piggybacking ack for sequence: " + sequenceId);
+		else{
+			//an addressable EPR
+			if(SandeshaUtil.hasReferenceParameters(target)){
+				//we should not proceed since we cannot properly compare ref params
+				if(log.isDebugEnabled()) log.debug("Exit: AcknowledgementManager::piggybackAcksIfPresent, target has refParams");
+				return transaction;
+			}
+			
+		    // From here on, we must be dealing with a real address. Piggyback all sequences that have an
+		    // acksTo that matches the To address, and that have an ackMessage queued up for sending. We
+		    // search for RMDBeans first, to avoid a deadlock.
+		    //
+		    // As a special case, if this is a terminate sequence message then add in ack messages for
+		    // any sequences that have an acksTo that matches the target address. This helps to ensure
+		    // that request-response sequence pairs end cleanly.
+		    RMDBean findRMDBean = new RMDBean();
+		    findRMDBean.setAcksToEndpointReference(target);
+		    findRMDBean.setTerminated(false);
+		    Collection rmdBeans = storageManager.getRMDBeanMgr().find(findRMDBean);
+		    Iterator sequences = rmdBeans.iterator();
+		    while(sequences.hasNext()) {
+		      RMDBean sequence = (RMDBean) sequences.next();
+		      if(SandeshaUtil.hasReferenceParameters(sequence.getAcksToEndpointReference())){
+		    	  //we should not piggy back if there are reference parameters in the acksTo EPR since we cannot compare them
+		    	  if(log.isDebugEnabled()) log.debug("Exit: AcknowledgementManager::piggybackAcksIfPresent, target has refParams");
+		    	  break;
+		      }
+					
+		      String sequenceId = sequence.getSequenceID();
+		      
+		      // Look for the SenderBean that carries the ack, there should be at most one
+		      SenderBean findBean = new SenderBean();
+		      findBean.setMessageType(Sandesha2Constants.MessageTypes.ACK);
+		      findBean.setSend(true);
+		      findBean.setSequenceID(sequenceId);
+		      findBean.setToAddress(target.getAddress());
+		      
+		      SenderBean ackBean = retransmitterBeanMgr.findUnique(findBean);
+		      
+				// Piggybacking will happen only if the end of ack interval (timeToSend) is not reached.
+				long timeNow = System.currentTimeMillis();
+			    if (ackBean != null && ackBean.getTimeToSend() > timeNow) {
+					// Delete the beans that would have sent the ack
+					retransmitterBeanMgr.delete(ackBean.getMessageID());
+					storageManager.removeMessageContext(ackBean.getMessageContextRefKey());
+
+					if (log.isDebugEnabled()) log.debug("Piggybacking ack for sequence: " + sequenceId);
+			        RMMsgCreator.addAckMessage(rmMessageContext, sequenceId, sequence);
+
+			    } else if(rmMessageContext.getMessageType() == Sandesha2Constants.MessageTypes.TERMINATE_SEQ) {
+			        if(log.isDebugEnabled()) log.debug("Adding extra acks, as this is a terminate");
+			          
+			        if(sequence.getHighestInMessageNumber() > 0) {
+						  if(log.isDebugEnabled()) log.debug("Piggybacking ack for sequence: " + sequenceId);
 
-					RMMsgCreator.addAckMessage(rmMessageContext, sequenceId, sequence);
+						RMMsgCreator.addAckMessage(rmMessageContext, sequenceId, sequence);
+					}
 				}
 			}
 		}
@@ -182,9 +196,9 @@
 
 		MessageContext referenceMsg = referenceRMMessage.getMessageContext();
 
-		EndpointReference acksTo = new EndpointReference(rmdBean.getAcksToEPR());
+		EndpointReference acksTo = rmdBean.getAcksToEndpointReference();
 
-		if (acksTo.getAddress() == null)
+		if (acksTo==null || acksTo.getAddress() == null)
 			throw new SandeshaException(SandeshaMessageHelper.getMessage(SandeshaMessageKeys.acksToStrNotSet));
 
 		AxisOperation ackOperation = SpecSpecificConstants.getWSRMOperation(

Modified: webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/util/FaultManager.java
URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/util/FaultManager.java?rev=593494&r1=593493&r2=593494&view=diff
==============================================================================
--- webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/util/FaultManager.java (original)
+++ webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/util/FaultManager.java Fri Nov  9 03:30:57 2007
@@ -206,7 +206,7 @@
 				log.debug("Exit: FaultManager::checkForUnknownSequence, Sequence unknown");
 			
 			boolean faultThrowable = !piggybackedMessage;
-			getOrSendFault(rmMessageContext, data, faultThrowable);
+			getOrSendFault(rmMessageContext, data, faultThrowable, null); //unknown sequence so cannot send to acksTo
 			return true;
 		}
 
@@ -254,7 +254,7 @@
 				
 			if (invalidAck) {
 				makeInvalidAcknowledgementFault(ackRMMessageContext, sequenceAcknowledgement, 
-						acknowledgementRange, storageManager, piggybackedMessage);
+						acknowledgementRange, storageManager, piggybackedMessage, rmsBean.getAcksToEndpointReference());
 				return true;
 			}
 		}		
@@ -273,7 +273,7 @@
 	 */
 	public static void makeInvalidAcknowledgementFault(RMMsgContext rmMsgCtx, 
 			SequenceAcknowledgement sequenceAcknowledgement, AcknowledgementRange acknowledgementRange,
-			StorageManager storageManager, boolean piggybackedMessage) throws AxisFault {
+			StorageManager storageManager, boolean piggybackedMessage, EndpointReference acksToEPR) throws AxisFault {
 		FaultData data = new FaultData();
 		int SOAPVersion = SandeshaUtil.getSOAPVersion(rmMsgCtx.getMessageContext().getEnvelope());
 		if (SOAPVersion == Sandesha2Constants.SOAPVersion.v1_1)
@@ -302,17 +302,13 @@
 			log.debug("Exit: FaultManager::checkForInvalidAcknowledgement, invalid ACK");
 		
 		boolean throwable = !piggybackedMessage;
-		getOrSendFault(rmMsgCtx, data, throwable);
+		getOrSendFault(rmMsgCtx, data, throwable, acksToEPR);
   }
 
 	/**
 	 * Makes a Create sequence refused fault
 	 */
-	public static void makeCreateSequenceRefusedFault(RMMsgContext rmMessageContext, 
-																										String detail,
-																										Exception e) 
-	
-	throws AxisFault {
+	public static void makeCreateSequenceRefusedFault(RMMsgContext rmMessageContext, String detail, Exception e, EndpointReference acksToEPR) throws AxisFault {
 		if (log.isDebugEnabled())
 			log.debug("Enter: FaultManager::makeCreateSequenceRefusedFault, " + detail);
 		
@@ -345,7 +341,7 @@
 
 		if (log.isDebugEnabled())
 			log.debug("Exit: FaultManager::makeCreateSequenceRefusedFault");
-		getOrSendFault(rmMessageContext, data, true);
+		getOrSendFault(rmMessageContext, data, true, acksToEPR);
 	}
 	
 	/**
@@ -389,7 +385,7 @@
 				log.debug("Exit: FaultManager::checkForSequenceTerminated, sequence terminated");
 			
 			boolean throwable = !piggybackedMessage;
-			getOrSendFault(referenceRMMessage, data, throwable);
+			getOrSendFault(referenceRMMessage, data, throwable, bean.getAcksToEndpointReference());
 			return true;
 		}
 
@@ -429,7 +425,7 @@
 				log.debug("Exit: FaultManager::checkForSequenceClosed, sequence closed");
 			
 			boolean throwable = !piggybackedMessage;
-			getOrSendFault(referenceRMMessage, data,throwable);
+			getOrSendFault(referenceRMMessage, data,throwable, rmdBean.getAcksToEndpointReference());
 			return true;
 		}
 
@@ -450,11 +446,10 @@
 	 * 
 	 * @throws AxisFault
 	 */
-	public static void getOrSendFault(RMMsgContext referenceRMMsgContext, FaultData data, boolean throwable) throws AxisFault {
+	public static void getOrSendFault(RMMsgContext referenceRMMsgContext, FaultData data, boolean throwable, EndpointReference acksToEPR) throws AxisFault {
 
-		
-		
-		
+		if (log.isDebugEnabled())
+			log.debug("Enter: FaultManager::getOrSendFault: " + referenceRMMsgContext + "," + data + "," + throwable + "," + acksToEPR);
 		SOAPFactory factory = (SOAPFactory) referenceRMMsgContext.getSOAPEnvelope().getOMFactory();
 		
 		SOAPFaultCode faultCode = factory.createSOAPFaultCode();
@@ -492,6 +487,11 @@
 			// Need to send this message as the Axis Layer doesn't set the "SequenceFault" header
 			MessageContext faultMessageContext = 
 				MessageContextBuilder.createFaultMessageContext(referenceRMMsgContext.getMessageContext(), null);
+			if(acksToEPR!=null){
+        		if (log.isDebugEnabled())
+        			log.debug("Debug: FaultManager::getOrSendFault: rewrriting fault destination EPR to " + acksToEPR);
+        		faultMessageContext.setTo(acksToEPR);
+			}
 
 			SOAPFaultEnvelopeCreator.addSOAPFaultEnvelope(faultMessageContext, Sandesha2Constants.SOAPVersion.v1_1, data, referenceRMMsgContext.getRMNamespaceValue());			
 			
@@ -532,15 +532,17 @@
 		
 		if (throwable)
             if (referenceRMMsgContext.getMessageContext().isServerSide()) {
-                throw fault;
+        		if (log.isDebugEnabled())
+        			log.debug("Exit: FaultManager::getOrSendFault: " + fault);
+                throw fault; 
             }
         else
 			log.error("Sandesha2 got a fault when processing the message essage " + referenceRMMsgContext.getMessageId(), fault);
-		
+
+		if (log.isDebugEnabled())
+			log.debug("Exit: FaultManager::getOrSendFault");
 	}
 	
-	
-	
 
 
 	public static boolean isRMFault (String faultSubcodeValue) {
@@ -684,9 +686,7 @@
 	 * Throws and AxisFault, or sends a Fault message if the condition is met.
 	 * @throws AxisFault 
 	 */
-	public static boolean checkForMessageRolledOver(RMMsgContext rmMessageContext, String sequenceId, long msgNo)
-	
-	throws AxisFault {
+	public static boolean checkForMessageRolledOver(RMMsgContext rmMessageContext, String sequenceId, long msgNo, RMDBean bean)throws AxisFault {
 		if (msgNo == Long.MAX_VALUE) {
 			if (log.isDebugEnabled()) 
 				log.debug("Max message number reached " + msgNo);
@@ -716,7 +716,7 @@
 			
 			data.setType(Sandesha2Constants.SOAPFaults.FaultType.MESSAGE_NUMBER_ROLLOVER);
 
-			getOrSendFault(rmMessageContext, data, true);
+			getOrSendFault(rmMessageContext, data, true, bean.getAcksToEndpointReference());
 			
 			return true;
 		}

Modified: webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/util/RMMsgCreator.java
URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/util/RMMsgCreator.java?rev=593494&r1=593493&r2=593494&view=diff
==============================================================================
--- webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/util/RMMsgCreator.java (original)
+++ webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/util/RMMsgCreator.java Fri Nov  9 03:30:57 2007
@@ -128,11 +128,8 @@
 		}
 		
 		// If acksTo has not been set, then default to anonymous, using the correct spec level
-		EndpointReference acksToEPR = null;
-		String acksToAddress = rmsBean.getAcksToEPR();
-		if(acksToAddress != null) {
-			acksToEPR = new EndpointReference(acksToAddress);
-		} else {
+		EndpointReference acksToEPR = rmsBean.getAcksToEndpointReference();
+		if(acksToEPR == null){
 			acksToEPR = new EndpointReference(SpecSpecificConstants.getAddressingAnonymousURI(addressingNamespace));
 		}
 		
@@ -195,22 +192,17 @@
 				offerPart.setEndpoint(endpoint);
 			}
 		}
-		
-		String to = rmsBean.getToEPR();
-		String replyTo = rmsBean.getReplyToEPR();
 
-		if (to == null) {
+		EndpointReference toEPR = rmsBean.getToEndpointReference();
+		if (toEPR == null || toEPR.getAddress()==null) {
 			String message = SandeshaMessageHelper
 					.getMessage(SandeshaMessageKeys.toBeanNotSet);
 			throw new SandeshaException(message);
 		}
-
-		// TODO store and retrieve a full EPR instead of just the address.
-		EndpointReference toEPR = new EndpointReference(to);
 		createSeqRMMsg.setTo(toEPR);
 
-		if(replyTo != null) {
-			EndpointReference replyToEPR = new EndpointReference(replyTo);
+		EndpointReference replyToEPR = rmsBean.getReplyToEndpointReference();
+		if(replyToEPR != null) {
 			replyToEPR = SandeshaUtil.getEPRDecorator(createSeqRMMsg.getConfigurationContext()).decorateEndpointReference(replyToEPR);
 			createSeqRMMsg.setReplyTo(replyToEPR);
 		}
@@ -305,7 +297,7 @@
 		// message. If this is put, sender will look for an response.
 		terminateMessage.setProperty(MessageContext.TRANSPORT_IN, null); 
 
-		terminateMessage.setTo(new EndpointReference (rmsBean.getToEPR()));
+		terminateMessage.setTo(rmsBean.getToEndpointReference());
 		
 		// Ensure the correct token is used to secure the terminate sequence
 		secureOutboundMessage(rmsBean, terminateMessage);

Modified: webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/util/SandeshaUtil.java
URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/util/SandeshaUtil.java?rev=593494&r1=593493&r2=593494&view=diff
==============================================================================
--- webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/util/SandeshaUtil.java (original)
+++ webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/util/SandeshaUtil.java Fri Nov  9 03:30:57 2007
@@ -657,6 +657,16 @@
 
 		return executionChainStr;
 	}
+	
+	public static boolean hasReferenceParameters(EndpointReference epr){
+		Map refParams = epr.getAllReferenceParameters();
+		if(refParams!=null){
+			if(!refParams.isEmpty()){
+				return true;
+			}
+		}
+		return false;
+	}
 
 	public static boolean isAllMsgsAckedUpto(long highestInMsgNo, String internalSequenceId,
 			StorageManager storageManager) throws SandeshaException {

Modified: webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/util/SequenceManager.java
URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/util/SequenceManager.java?rev=593494&r1=593493&r2=593494&view=diff
==============================================================================
--- webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/util/SequenceManager.java (original)
+++ webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/util/SequenceManager.java Fri Nov  9 03:30:57 2007
@@ -90,9 +90,9 @@
 		EndpointReference acksTo = createSequence.getAcksTo().getEPR();
 
 		if (acksTo == null) {
-			FaultManager.makeCreateSequenceRefusedFault(createSequenceMsg, SandeshaMessageHelper.getMessage(SandeshaMessageKeys.noAcksToPartInCreateSequence), new Exception());
+			FaultManager.makeCreateSequenceRefusedFault(createSequenceMsg, SandeshaMessageHelper.getMessage(SandeshaMessageKeys.noAcksToPartInCreateSequence), new Exception(), null);
 		} else if (acksTo.getAddress().equals(AddressingConstants.Final.WSA_NONE_URI)){
-			FaultManager.makeCreateSequenceRefusedFault(createSequenceMsg, "AcksTo can not be " + AddressingConstants.Final.WSA_NONE_URI, new Exception());
+			FaultManager.makeCreateSequenceRefusedFault(createSequenceMsg, "AcksTo can not be " + AddressingConstants.Final.WSA_NONE_URI, new Exception(), null);
 		}
 
 		MessageContext createSeqContext = createSequenceMsg.getMessageContext();
@@ -107,12 +107,12 @@
 
 		rmdBean.setServerCompletedMessages(new RangeString());
 		
-		rmdBean.setReplyToEPR(to.getAddress());
-		rmdBean.setAcksToEPR(acksTo.getAddress());
+		rmdBean.setReplyToEndpointReference(to);
+		rmdBean.setAcksToEndpointReference(acksTo);
 
 		// If no replyTo value. Send responses as sync.
 		if (replyTo != null)
-			rmdBean.setToEPR(replyTo.getAddress());
+			rmdBean.setToEndpointReference(replyTo);
 
 		// Store the security token alongside the sequence
 		if(token != null) {
@@ -194,7 +194,7 @@
 			throw new SandeshaException(message);
 		}
 
-		rmsBean.setToEPR(toEPR.getAddress());
+		rmsBean.setToEndpointReference(toEPR);
 
 		// Discover the correct acksTo and replyTo EPR for this RMSBean
 		EndpointReference acksToEPR = null;
@@ -204,9 +204,9 @@
 			// Server side, we want the replyTo and AcksTo EPRs to point into this server.
 			// We can work that out by looking at the RMD bean that pulled the message in,
 			// and copying its 'ReplyTo' address.
-			if(inboundBean != null && inboundBean.getReplyToEPR() != null) {
-				acksToEPR = new EndpointReference(inboundBean.getReplyToEPR());
-				replyToEPR = new EndpointReference(inboundBean.getReplyToEPR());
+			if(inboundBean != null && inboundBean.getReplyToEndpointReference() != null) {
+				acksToEPR = inboundBean.getReplyToEndpointReference();
+				replyToEPR = inboundBean.getReplyToEndpointReference();
 			} else {
 				String beanInfo = (inboundBean == null) ? "null" : inboundBean.toString();
 				String message = SandeshaMessageHelper.getMessage(
@@ -250,8 +250,8 @@
 		}
 		
 		// Store both the acksTo and replyTo 
-		if(replyToEPR != null) rmsBean.setReplyToEPR(replyToEPR.getAddress());
-		if(acksToEPR  != null) rmsBean.setAcksToEPR(acksToEPR.getAddress());
+		if(replyToEPR != null) rmsBean.setReplyToEndpointReference(replyToEPR);
+		if(acksToEPR  != null) rmsBean.setAcksToEndpointReference(acksToEPR);
 		
 		// New up the client completed message ranges list
 		rmsBean.setClientCompletedMessages(new RangeString());

Modified: webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/util/TerminateManager.java
URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/util/TerminateManager.java?rev=593494&r1=593493&r2=593494&view=diff
==============================================================================
--- webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/util/TerminateManager.java (original)
+++ webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/util/TerminateManager.java Fri Nov  9 03:30:57 2007
@@ -74,13 +74,13 @@
 			//If this is RM 1.1 and RMAnonURI scenario, dont do the termination unless the response side createSequence has been
 			//received (RMDBean has been created) through polling, in this case termination will happen in the create sequence response processor.
 			String rmVersion = rmsBean.getRMVersion();
-			String replyToAddress = rmsBean.getReplyToEPR();
+			EndpointReference replyTo = rmsBean.getReplyToEndpointReference();
 
 			if (complete &&
-					Sandesha2Constants.SPEC_VERSIONS.v1_1.equals(rmVersion) && SandeshaUtil.isWSRMAnonymous(replyToAddress)) {
+					Sandesha2Constants.SPEC_VERSIONS.v1_1.equals(rmVersion) && replyTo!=null && SandeshaUtil.isWSRMAnonymous(replyTo.getAddress())) {
 				RMDBean findBean = new RMDBean ();
 				findBean.setPollingMode(true);
-				findBean.setToAddress(replyToAddress);
+				findBean.setToEndpointReference(replyTo);
 
 				RMDBeanMgr rmdBeanMgr = storageManager.getRMDBeanMgr();
 				List beans = rmdBeanMgr.find(findBean);
@@ -93,9 +93,8 @@
 			
 			// If we are doing sync 2-way over WSRM 1.0 then we may need to keep sending messages,
 			// so check to see if all the senders have been removed
-			EndpointReference replyTo = new EndpointReference (replyToAddress);
 			if (complete &&
-					Sandesha2Constants.SPEC_VERSIONS.v1_0.equals(rmVersion) && (replyToAddress==null || replyTo.hasAnonymousAddress())) {
+					Sandesha2Constants.SPEC_VERSIONS.v1_0.equals(rmVersion) && (replyTo==null || replyTo.hasAnonymousAddress())) {
 				SenderBean matcher = new SenderBean();
 				matcher.setMessageType(Sandesha2Constants.MessageTypes.APPLICATION);
 				matcher.setSequenceID(rmsBean.getSequenceID());
@@ -297,8 +296,8 @@
 		
 		if (toEPR==null) {
 
-			if (rmsBean.getToEPR()!=null) {
-				toEPR = new EndpointReference(rmsBean.getToEPR());
+			if (rmsBean.getToEndpointReference()!=null) {
+				toEPR = rmsBean.getToEndpointReference();
 				if (toEPR == null) {
 					String message = SandeshaMessageHelper.getMessage(SandeshaMessageKeys.toEPRNotValid, null);
 					throw new SandeshaException(message);
@@ -309,8 +308,8 @@
 		if (toEPR!=null)
 			terminateRMMessage.setTo(toEPR);
 		
-		if (rmsBean.getReplyToEPR()!=null) {
-			terminateRMMessage.setReplyTo(new EndpointReference (rmsBean.getReplyToEPR()));
+		if (rmsBean.getReplyToEndpointReference()!=null) {
+			terminateRMMessage.setReplyTo(rmsBean.getReplyToEndpointReference());
 		}
 		
 		String rmVersion = rmsBean.getRMVersion();

Modified: webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/workers/Sender.java
URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/workers/Sender.java?rev=593494&r1=593493&r2=593494&view=diff
==============================================================================
--- webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/workers/Sender.java (original)
+++ webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/workers/Sender.java Fri Nov  9 03:30:57 2007
@@ -432,9 +432,8 @@
 						inbound = SandeshaUtil.getRMDBeanFromSequenceId(manager, inboundSeq);
 					
 					if(inbound != null) {
-						String acksTo = inbound.getAcksToEPR();
-						EndpointReference acksToEPR = new EndpointReference(acksTo);
-						if(acksTo == null || acksToEPR.hasAnonymousAddress())
+						EndpointReference acksToEPR = inbound.getAcksToEndpointReference();
+						if(acksToEPR!=null && acksToEPR.hasAnonymousAddress())
 							sendAck = true;
 					}
 					

Modified: webservices/sandesha/trunk/java/modules/tests/src/test/java/org/apache/sandesha2/faulttests/CreateSequenceRefusedFaultTest.java
URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/java/modules/tests/src/test/java/org/apache/sandesha2/faulttests/CreateSequenceRefusedFaultTest.java?rev=593494&r1=593493&r2=593494&view=diff
==============================================================================
--- webservices/sandesha/trunk/java/modules/tests/src/test/java/org/apache/sandesha2/faulttests/CreateSequenceRefusedFaultTest.java (original)
+++ webservices/sandesha/trunk/java/modules/tests/src/test/java/org/apache/sandesha2/faulttests/CreateSequenceRefusedFaultTest.java Fri Nov  9 03:30:57 2007
@@ -116,8 +116,8 @@
 		// Create an RMSBean so the create sequence message can be created
 		RMSBean rmsBean = new RMSBean();
 		rmsBean.setRMVersion(Sandesha2Constants.SPEC_VERSIONS.v1_1);
-		rmsBean.setToEPR(to);
-		rmsBean.setAcksToEPR(AddressingConstants.Final.WSA_NONE_URI);
+		rmsBean.setToEndpointReference(new EndpointReference(to));
+		rmsBean.setAcksToEndpointReference(new EndpointReference(AddressingConstants.Final.WSA_NONE_URI));
 				
 		// Create a Create Sequence message
 		// generating a new create sequeuce message.
@@ -145,6 +145,7 @@
 		return outputStream.toByteArray();
 	}
 }
+
 
 
 

Modified: webservices/sandesha/trunk/java/modules/tests/src/test/java/org/apache/sandesha2/faulttests/InvalidAcknowledgementTest.java
URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/java/modules/tests/src/test/java/org/apache/sandesha2/faulttests/InvalidAcknowledgementTest.java?rev=593494&r1=593493&r2=593494&view=diff
==============================================================================
--- webservices/sandesha/trunk/java/modules/tests/src/test/java/org/apache/sandesha2/faulttests/InvalidAcknowledgementTest.java (original)
+++ webservices/sandesha/trunk/java/modules/tests/src/test/java/org/apache/sandesha2/faulttests/InvalidAcknowledgementTest.java Fri Nov  9 03:30:57 2007
@@ -25,6 +25,7 @@
 import org.apache.axiom.soap.SOAPFactory;
 import org.apache.axiom.soap.impl.llom.soap11.SOAP11Factory;
 import org.apache.axis2.addressing.AddressingConstants;
+import org.apache.axis2.addressing.EndpointReference;
 import org.apache.axis2.context.ConfigurationContext;
 import org.apache.axis2.context.MessageContext;
 import org.apache.sandesha2.RMMsgContext;
@@ -86,9 +87,9 @@
 		rmsBean.setCreateSeqMsgID(SandeshaUtil.getUUID());
 		rmsBean.setSequenceID(seqID);
 		rmsBean.setInternalSequenceID(SandeshaUtil.getInternalSequenceID(seqID, null));
-		rmsBean.setToEPR(AddressingConstants.Final.WSA_ANONYMOUS_URL);
-		rmsBean.setAcksToEPR(AddressingConstants.Final.WSA_ANONYMOUS_URL);
-		rmsBean.setReplyToEPR(AddressingConstants.Final.WSA_ANONYMOUS_URL);
+		rmsBean.setToEndpointReference(new EndpointReference(AddressingConstants.Final.WSA_ANONYMOUS_URL));
+		rmsBean.setAcksToEndpointReference(new EndpointReference(AddressingConstants.Final.WSA_ANONYMOUS_URL));
+		rmsBean.setReplyToEndpointReference(new EndpointReference(AddressingConstants.Final.WSA_ANONYMOUS_URL));
 		rmsBean.setRMVersion(Sandesha2Constants.SPEC_VERSIONS.v1_1);
 		rmsBean.setClientCompletedMessages(new RangeString());
 		rmsBean.setNextMessageNumber(1);
@@ -157,9 +158,9 @@
 		rmsBean.setCreateSeqMsgID(SandeshaUtil.getUUID());
 		rmsBean.setSequenceID(seqID);
 		rmsBean.setInternalSequenceID(SandeshaUtil.getInternalSequenceID(seqID, null));
-		rmsBean.setToEPR(AddressingConstants.Final.WSA_ANONYMOUS_URL);
-		rmsBean.setAcksToEPR(AddressingConstants.Final.WSA_ANONYMOUS_URL);
-		rmsBean.setReplyToEPR(AddressingConstants.Final.WSA_ANONYMOUS_URL);
+		rmsBean.setToEndpointReference(new EndpointReference(AddressingConstants.Final.WSA_ANONYMOUS_URL));
+		rmsBean.setAcksToEndpointReference(new EndpointReference(AddressingConstants.Final.WSA_ANONYMOUS_URL));
+		rmsBean.setReplyToEndpointReference(new EndpointReference(AddressingConstants.Final.WSA_ANONYMOUS_URL));
 		rmsBean.setRMVersion(Sandesha2Constants.SPEC_VERSIONS.v1_1);
 		rmsBean.setClientCompletedMessages(new RangeString());
 		rmsBean.setNextMessageNumber(4);
@@ -274,6 +275,7 @@
 		return bean;
 	}
 }
+
 
 
 

Modified: webservices/sandesha/trunk/java/modules/tests/src/test/java/org/apache/sandesha2/faulttests/MessageNumberRolloverFaultTest.java
URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/java/modules/tests/src/test/java/org/apache/sandesha2/faulttests/MessageNumberRolloverFaultTest.java?rev=593494&r1=593493&r2=593494&view=diff
==============================================================================
--- webservices/sandesha/trunk/java/modules/tests/src/test/java/org/apache/sandesha2/faulttests/MessageNumberRolloverFaultTest.java (original)
+++ webservices/sandesha/trunk/java/modules/tests/src/test/java/org/apache/sandesha2/faulttests/MessageNumberRolloverFaultTest.java Fri Nov  9 03:30:57 2007
@@ -25,6 +25,7 @@
 import org.apache.axiom.soap.SOAPFactory;
 import org.apache.axiom.soap.impl.llom.soap11.SOAP11Factory;
 import org.apache.axis2.addressing.AddressingConstants;
+import org.apache.axis2.addressing.EndpointReference;
 import org.apache.axis2.context.ConfigurationContext;
 import org.apache.axis2.context.MessageContext;
 import org.apache.axis2.description.AxisOperation;
@@ -87,9 +88,9 @@
 		// Mockup an RMSBean
 		RMDBean rmdBean = new RMDBean();
 		rmdBean.setSequenceID(seqID);
-		rmdBean.setToEPR(AddressingConstants.Final.WSA_ANONYMOUS_URL);
-		rmdBean.setAcksToEPR(AddressingConstants.Final.WSA_ANONYMOUS_URL);
-		rmdBean.setReplyToEPR(AddressingConstants.Final.WSA_ANONYMOUS_URL);
+		rmdBean.setToEndpointReference(new EndpointReference(AddressingConstants.Final.WSA_ANONYMOUS_URL));
+		rmdBean.setAcksToEndpointReference(new EndpointReference(AddressingConstants.Final.WSA_ANONYMOUS_URL));
+		rmdBean.setReplyToEndpointReference(new EndpointReference(AddressingConstants.Final.WSA_ANONYMOUS_URL));
 		rmdBean.setRMVersion(Sandesha2Constants.SPEC_VERSIONS.v1_1);
 		rmdBean.setServerCompletedMessages(new RangeString());
 		rmdBean.getServerCompletedMessages().addRange(new Range(1, Long.MAX_VALUE -1));
@@ -177,4 +178,5 @@
 		return outputStream.toByteArray();
 	}
 }
+
 

Modified: webservices/sandesha/trunk/java/modules/tests/src/test/java/org/apache/sandesha2/faulttests/SequenceClosedFaultTest.java
URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/java/modules/tests/src/test/java/org/apache/sandesha2/faulttests/SequenceClosedFaultTest.java?rev=593494&r1=593493&r2=593494&view=diff
==============================================================================
--- webservices/sandesha/trunk/java/modules/tests/src/test/java/org/apache/sandesha2/faulttests/SequenceClosedFaultTest.java (original)
+++ webservices/sandesha/trunk/java/modules/tests/src/test/java/org/apache/sandesha2/faulttests/SequenceClosedFaultTest.java Fri Nov  9 03:30:57 2007
@@ -25,6 +25,7 @@
 import org.apache.axiom.soap.SOAPFactory;
 import org.apache.axiom.soap.impl.llom.soap11.SOAP11Factory;
 import org.apache.axis2.addressing.AddressingConstants;
+import org.apache.axis2.addressing.EndpointReference;
 import org.apache.axis2.context.ConfigurationContext;
 import org.apache.axis2.context.MessageContext;
 import org.apache.axis2.description.AxisOperation;
@@ -86,9 +87,9 @@
 		// Mockup an RMDBean
 		RMDBean rmdBean = new RMDBean();
 		rmdBean.setSequenceID(seqID);
-		rmdBean.setToEPR(AddressingConstants.Final.WSA_ANONYMOUS_URL);
-		rmdBean.setAcksToEPR(AddressingConstants.Final.WSA_ANONYMOUS_URL);
-		rmdBean.setReplyToEPR(AddressingConstants.Final.WSA_ANONYMOUS_URL);
+		rmdBean.setToEndpointReference(new EndpointReference(AddressingConstants.Final.WSA_ANONYMOUS_URL));
+		rmdBean.setAcksToEndpointReference(new EndpointReference(AddressingConstants.Final.WSA_ANONYMOUS_URL));
+		rmdBean.setReplyToEndpointReference(new EndpointReference(AddressingConstants.Final.WSA_ANONYMOUS_URL));
 		rmdBean.setRMVersion(Sandesha2Constants.SPEC_VERSIONS.v1_1);
 		rmdBean.setServerCompletedMessages(new RangeString());
 		// Flag that the sequence is closed.
@@ -179,4 +180,5 @@
 		return outputStream.toByteArray();
 	}
 }
+
 

Modified: webservices/sandesha/trunk/java/modules/tests/src/test/java/org/apache/sandesha2/faulttests/SequenceTerminatedFaultTest.java
URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/java/modules/tests/src/test/java/org/apache/sandesha2/faulttests/SequenceTerminatedFaultTest.java?rev=593494&r1=593493&r2=593494&view=diff
==============================================================================
--- webservices/sandesha/trunk/java/modules/tests/src/test/java/org/apache/sandesha2/faulttests/SequenceTerminatedFaultTest.java (original)
+++ webservices/sandesha/trunk/java/modules/tests/src/test/java/org/apache/sandesha2/faulttests/SequenceTerminatedFaultTest.java Fri Nov  9 03:30:57 2007
@@ -107,9 +107,9 @@
 		// Mockup an RMDBean
 		RMDBean rmdBean = new RMDBean();
 		rmdBean.setSequenceID(seqID);
-		rmdBean.setToEPR(AddressingConstants.Final.WSA_ANONYMOUS_URL);
-		rmdBean.setAcksToEPR(AddressingConstants.Final.WSA_ANONYMOUS_URL);
-		rmdBean.setReplyToEPR(AddressingConstants.Final.WSA_ANONYMOUS_URL);
+		rmdBean.setToEndpointReference(new EndpointReference(AddressingConstants.Final.WSA_ANONYMOUS_URL));
+		rmdBean.setAcksToEndpointReference(new EndpointReference(AddressingConstants.Final.WSA_ANONYMOUS_URL));
+		rmdBean.setReplyToEndpointReference(new EndpointReference(AddressingConstants.Final.WSA_ANONYMOUS_URL));
 		rmdBean.setRMVersion(Sandesha2Constants.SPEC_VERSIONS.v1_1);
 		rmdBean.setServerCompletedMessages(new RangeString());
 		// Flag that the sequence is terminated.
@@ -169,9 +169,9 @@
 		// Mockup an RMDBean
 		RMDBean rmdBean = new RMDBean();
 		rmdBean.setSequenceID(seqID);
-		rmdBean.setToEPR(AddressingConstants.Final.WSA_ANONYMOUS_URL);
-		rmdBean.setAcksToEPR(AddressingConstants.Final.WSA_ANONYMOUS_URL);
-		rmdBean.setReplyToEPR(AddressingConstants.Final.WSA_ANONYMOUS_URL);
+		rmdBean.setToEndpointReference(new EndpointReference(AddressingConstants.Final.WSA_ANONYMOUS_URL));
+		rmdBean.setAcksToEndpointReference(new EndpointReference(AddressingConstants.Final.WSA_ANONYMOUS_URL));
+		rmdBean.setReplyToEndpointReference(new EndpointReference(AddressingConstants.Final.WSA_ANONYMOUS_URL));
 		rmdBean.setRMVersion(Sandesha2Constants.SPEC_VERSIONS.v1_1);
 		rmdBean.setServerCompletedMessages(new RangeString());
 		// Flag that the sequence is terminated.
@@ -231,9 +231,9 @@
 		// Mockup an RMDBean
 		RMDBean rmdBean = new RMDBean();
 		rmdBean.setSequenceID(seqID);
-		rmdBean.setToEPR(AddressingConstants.Final.WSA_ANONYMOUS_URL);
-		rmdBean.setAcksToEPR(AddressingConstants.Final.WSA_ANONYMOUS_URL);
-		rmdBean.setReplyToEPR(AddressingConstants.Final.WSA_ANONYMOUS_URL);
+		rmdBean.setToEndpointReference(new EndpointReference(AddressingConstants.Final.WSA_ANONYMOUS_URL));
+		rmdBean.setAcksToEndpointReference(new EndpointReference(AddressingConstants.Final.WSA_ANONYMOUS_URL));
+		rmdBean.setReplyToEndpointReference(new EndpointReference(AddressingConstants.Final.WSA_ANONYMOUS_URL));
 		rmdBean.setRMVersion(Sandesha2Constants.SPEC_VERSIONS.v1_1);
 		rmdBean.setServerCompletedMessages(new RangeString());
 		// Flag that the sequence is terminated.
@@ -551,6 +551,7 @@
 	}
 
 }
+
 
 
 



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


Mime
View raw message