ws-sandesha-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gatf...@apache.org
Subject svn commit: r599377 - in /webservices/sandesha/trunk/java/modules: core/src/main/java/org/apache/sandesha2/ core/src/main/java/org/apache/sandesha2/i18n/ core/src/main/java/org/apache/sandesha2/msgprocessors/ core/src/main/java/org/apache/sandesha2/pol...
Date Thu, 29 Nov 2007 11:05:17 GMT
Author: gatfora
Date: Thu Nov 29 03:05:14 2007
New Revision: 599377

URL: http://svn.apache.org/viewvc?rev=599377&view=rev
Log:
Add MissingSelectionFault and UnsupportedSelectionFault as described in SANDESHA2-73

Added:
    webservices/sandesha/trunk/java/modules/tests/src/test/java/org/apache/sandesha2/faulttests/MissingSelectionFaultTest.java
    webservices/sandesha/trunk/java/modules/tests/src/test/java/org/apache/sandesha2/faulttests/UnsupportedSelectionFaultTest.java
Modified:
    webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/Sandesha2Constants.java
    webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/i18n/SandeshaMessageKeys.java
    webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/msgprocessors/MakeConnectionProcessor.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/util/FaultManager.java
    webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/util/MsgInitializer.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/SpecSpecificConstants.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/wsrm/MakeConnection.java
    webservices/sandesha/trunk/java/modules/core/src/main/resources/org/apache/sandesha2/i18n/resource.properties
    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/FaultTestUtils.java
    webservices/sandesha/trunk/java/modules/tests/src/test/java/org/apache/sandesha2/scenarios/UnsupportedScenariosTest.java

Modified: webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/Sandesha2Constants.java
URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/Sandesha2Constants.java?rev=599377&r1=599376&r2=599377&view=diff
==============================================================================
--- webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/Sandesha2Constants.java
(original)
+++ webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/Sandesha2Constants.java
Thu Nov 29 03:05:14 2007
@@ -123,6 +123,7 @@
 			
 			// WS-MC actions
 			public static final String ACTION_MAKE_CONNECTION             = SPEC_2007_02.MC_NS_URI
+ "/MakeConnection";
+			public static final String MC_FAULT                           = SPEC_2007_02.MC_NS_URI
+ "/fault";
 
 			public static final String SOAP_ACTION_CREATE_SEQUENCE             = ACTION_CREATE_SEQUENCE;
 			public static final String SOAP_ACTION_CREATE_SEQUENCE_RESPONSE    = ACTION_CREATE_SEQUENCE_RESPONSE;
@@ -165,6 +166,8 @@
 			QName LastMessageNoExceeded = new QName(NS_URI, SOAPFaults.Subcodes.LAST_MESSAGE_NO_EXCEEDED);
 			QName SequenceClosed = new QName(NS_URI, SOAPFaults.Subcodes.SEQUENCE_CLOSED);
 			QName SequenceTerminated = new QName(NS_URI, SOAPFaults.Subcodes.SEQUENCE_TERMINATED);
+			QName UnsupportedSelection = new QName(MC_NS_URI, SOAPFaults.Subcodes.UNSUPPORTED_SELECTION);
+			QName MissingSelection = new QName(MC_NS_URI, SOAPFaults.Subcodes.MISSING_SELECTION);
 		}
 	}
 	
@@ -239,6 +242,8 @@
 		String USES_SEQUENCE_STR = "UsesSequenceSTR";
 		
 		String ENDPOINT = "Endpoint";
+		
+		String UNSUPPORTED_ELEMENT = "UnsupportedElement";
 	}
 
 	public interface WSA {
@@ -380,6 +385,9 @@
 
 			String CREATE_SEQUENCE_REFUSED = "CreateSequenceRefused";
 			
+			String MISSING_SELECTION = "MissingSelection";
+
+			String UNSUPPORTED_SELECTION = "UnsupportedSelection";
 
 		}
 
@@ -398,6 +406,10 @@
 			public static final int SEQUENCE_CLOSED = 6;
 
 			public static final int SEQUENCE_TERMINATED = 7;
+
+			public static final int UNSUPPORTED_SELECTION = 8;
+			
+			public static final int MISSING_SELECTION = 9;
 		}
 	}
 

Modified: webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/i18n/SandeshaMessageKeys.java
URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/i18n/SandeshaMessageKeys.java?rev=599377&r1=599376&r2=599377&view=diff
==============================================================================
--- webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/i18n/SandeshaMessageKeys.java
(original)
+++ webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/i18n/SandeshaMessageKeys.java
Thu Nov 29 03:05:14 2007
@@ -226,6 +226,8 @@
 	public static final String unknownSequenceFault="unknownSequenceFault";
 	public static final String invalidAckFault="invalidAckFault";
 	public static final String cannotAcceptMsgAsSequenceClosedFault="cannotAcceptMsgAsSequenceClosedFault";

+	public static final String unsuportedSelectionFault="unsuportedSelectionFault";
+	public static final String missingSelectionFault="missingSelectionFault";
 	
 	public final static String policyBeanNotFound = "policyBeanNotFound";
 	public final static String cloneDoesNotMatchToOriginal = "cloneDoesNotMatchToOriginal";

Modified: webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/msgprocessors/MakeConnectionProcessor.java
URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/msgprocessors/MakeConnectionProcessor.java?rev=599377&r1=599376&r2=599377&view=diff
==============================================================================
--- webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/msgprocessors/MakeConnectionProcessor.java
(original)
+++ webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/msgprocessors/MakeConnectionProcessor.java
Thu Nov 29 03:05:14 2007
@@ -49,6 +49,7 @@
 import org.apache.sandesha2.storage.beans.RMSBean;
 import org.apache.sandesha2.storage.beans.RMSequenceBean;
 import org.apache.sandesha2.storage.beans.SenderBean;
+import org.apache.sandesha2.util.FaultManager;
 import org.apache.sandesha2.util.MsgInitializer;
 import org.apache.sandesha2.util.SandeshaUtil;
 import org.apache.sandesha2.util.SpecSpecificConstants;
@@ -76,10 +77,17 @@
 	public boolean processInMessage(RMMsgContext rmMsgCtx, Transaction transaction) throws AxisFault
{
 		if(log.isDebugEnabled()) log.debug("Enter: MakeConnectionProcessor::processInMessage "
+ rmMsgCtx.getSOAPEnvelope().getBody());
 
-		MakeConnection makeConnection = (MakeConnection) rmMsgCtx.getMakeConnection();
+		MakeConnection makeConnection = rmMsgCtx.getMakeConnection();
 		
 		Address address = makeConnection.getAddress();
 		Identifier identifier = makeConnection.getIdentifier();
+		
+		// If there is no address or identifier - make the MissingSelection Fault.
+		if (address == null && identifier == null)
+			FaultManager.makeMissingSelectionFault(rmMsgCtx);
+		
+		if (makeConnection.getUnexpectedElement() != null)
+			FaultManager.makeUnsupportedSelectionFault(rmMsgCtx, makeConnection.getUnexpectedElement());
 		
 		//some initial setup
 		ConfigurationContext configurationContext = rmMsgCtx.getConfigurationContext();

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=599377&r1=599376&r2=599377&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
Thu Nov 29 03:05:14 2007
@@ -233,7 +233,7 @@
 		if(referenceMessage!=null){
 			RMMsgContext referenceRMMessage = MsgInitializer.initializeMessage(referenceMessage);
 			RMMsgContext makeConnectionRMMessage = RMMsgCreator.createMakeConnectionMessage(referenceRMMessage,
-					rmBean, wireSeqId, wireAddress, storageManager);
+					rmBean, wireSeqId, wireAddress);
 			
 			
 			//we must set serverSide to false. Having serverSide as true (I.e. when polling for RMD)
will cause the SenderWorker to ignore

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=599377&r1=599376&r2=599377&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
Thu Nov 29 03:05:14 2007
@@ -345,6 +345,118 @@
 	}
 	
 	/**
+	 * Makes the WSMC UnsupportedSelectionFault
+	 */
+	public static void makeUnsupportedSelectionFault(RMMsgContext rmMessageContext, QName unsupportedElement)
throws AxisFault {
+		if (log.isDebugEnabled())
+			log.debug("Enter: FaultManager::makeUnsupportedSelectionFault, " + unsupportedElement);
+		
+		// Return a UnsupportedSelectionFault error
+
+		int SOAPVersion = SandeshaUtil.getSOAPVersion(rmMessageContext.getMessageContext().getEnvelope());
+
+		FaultData data = new FaultData();
+		if (SOAPVersion == Sandesha2Constants.SOAPVersion.v1_1)
+			data.setCode(SOAP11Constants.FAULT_CODE_RECEIVER);
+		else
+			data.setCode(SOAP12Constants.FAULT_CODE_RECEIVER);
+
+		data.setSubcode(SpecSpecificConstants.getFaultSubcode(Sandesha2Constants.SPEC_2007_02.MC_NS_URI,

+				Sandesha2Constants.SOAPFaults.FaultType.UNSUPPORTED_SELECTION ));
+
+		SOAPFactory factory = SOAPAbstractFactory.getSOAPFactory(SOAPVersion);
+		OMElement element = factory.createOMElement(Sandesha2Constants.WSRM_COMMON.UNSUPPORTED_ELEMENT,
+				Sandesha2Constants.SPEC_2007_02.MC_NS_URI, Sandesha2Constants.WSRM_COMMON.NS_PREFIX_MC);
+		element.setText(unsupportedElement);
+		data.setDetail(element);
+
+		data.setReason(SandeshaMessageHelper.getMessage(SandeshaMessageKeys.unsuportedSelectionFault));
+		
+		data.setType(Sandesha2Constants.SOAPFaults.FaultType.UNSUPPORTED_SELECTION);
+
+		makeMakeConnectionFault(rmMessageContext, data);
+		if (log.isDebugEnabled())
+			log.debug("Exit: FaultManager::makeUnsupportedSelectionFault");
+	}
+
+	/**
+	 * Makes WSMC MissingSelectionFault
+	 */
+	public static void makeMissingSelectionFault(RMMsgContext rmMessageContext) throws AxisFault
{
+		if (log.isDebugEnabled())
+			log.debug("Enter: FaultManager::makeMissingSelectionFault");
+		
+		int SOAPVersion = SandeshaUtil.getSOAPVersion(rmMessageContext.getMessageContext().getEnvelope());
+
+		FaultData data = new FaultData();
+		if (SOAPVersion == Sandesha2Constants.SOAPVersion.v1_1)
+			data.setCode(SOAP11Constants.FAULT_CODE_RECEIVER);
+		else
+			data.setCode(SOAP12Constants.FAULT_CODE_RECEIVER);
+
+		data.setSubcode(SpecSpecificConstants.getFaultSubcode(Sandesha2Constants.SPEC_2007_02.MC_NS_URI,

+				Sandesha2Constants.SOAPFaults.FaultType.MISSING_SELECTION ));
+
+		data.setDetail(null);
+
+		data.setReason(SandeshaMessageHelper.getMessage(SandeshaMessageKeys.missingSelectionFault));
+		
+		data.setType(Sandesha2Constants.SOAPFaults.FaultType.MISSING_SELECTION);
+
+		makeMakeConnectionFault(rmMessageContext, data);
+		
+		if (log.isDebugEnabled())
+			log.debug("Exit: FaultManager::makeMissingSelectionFault");
+	}
+
+	private static void makeMakeConnectionFault(RMMsgContext referenceRMMsgContext, FaultData
data) throws AxisFault {
+		SOAPFactory factory = (SOAPFactory) referenceRMMsgContext.getSOAPEnvelope().getOMFactory();
+		
+		SOAPFaultCode faultCode = factory.createSOAPFaultCode();
+		SOAPFaultSubCode faultSubCode = factory.createSOAPFaultSubCode(faultCode);
+		
+		SOAPFaultValue faultColdValue = factory.createSOAPFaultValue(faultCode);
+		SOAPFaultValue faultSubcodeValue = factory.createSOAPFaultValue(faultSubCode);
+		
+		faultSubcodeValue.setText(data.getSubcode());
+
+		faultCode.setSubCode(faultSubCode);
+		
+		SOAPFaultReason reason = factory.createSOAPFaultReason();
+		SOAPFaultText reasonText = factory.createSOAPFaultText();
+		reasonText.setText(data.getReason());
+		
+		SOAPFaultDetail detail = factory.createSOAPFaultDetail();
+		if (data.getDetail() != null)
+			detail.addDetailEntry(data.getDetail());
+		
+		String SOAPNamespaceValue = factory.getSoapVersionURI();
+		
+		if (SOAP12Constants.SOAP_ENVELOPE_NAMESPACE_URI.equals(SOAPNamespaceValue)) {
+                        reasonText.setLang(Sandesha2Constants.LANG_EN);
+			reason.addSOAPText(reasonText);
+			referenceRMMsgContext.setProperty(SOAP12Constants.SOAP_FAULT_CODE_LOCAL_NAME, faultCode);
+			referenceRMMsgContext.setProperty(SOAP12Constants.SOAP_FAULT_REASON_LOCAL_NAME, reason);
+			referenceRMMsgContext.setProperty(SOAP12Constants.SOAP_FAULT_DETAIL_LOCAL_NAME, detail);
+			faultColdValue.setText(data.getCode());
+			
+		} else if (SOAP11Constants.SOAP_ENVELOPE_NAMESPACE_URI.equals (SOAPNamespaceValue)) {
+			reason.setText(data.getReason());
+			referenceRMMsgContext.setProperty(SOAP11Constants.SOAP_FAULT_CODE_LOCAL_NAME, faultCode);
+			referenceRMMsgContext.setProperty(SOAP11Constants.SOAP_FAULT_DETAIL_LOCAL_NAME, detail);
+			referenceRMMsgContext.setProperty(SOAP11Constants.SOAP_FAULT_STRING_LOCAL_NAME, reason);
+			faultColdValue.setText(data.getSubcode());
+			
+		}
+		
+		AxisFault fault = new AxisFault(faultColdValue.getTextAsQName(), data.getReason(), "",
"", data.getDetail());
+		fault.setFaultAction(Sandesha2Constants.SPEC_2007_02.Actions.MC_FAULT);
+		
+		//if this is throwable throwing it out, else we will log here.
+		throw fault; 
+	}
+	
+	/**
 	 * Checks if a sequence is terminated and returns a SequenceTerminated fault.
 	 * @param referenceRMMessage
 	 * @param sequenceID
@@ -433,7 +545,7 @@
 			log.debug("Exit: FaultManager::checkForSequenceClosed");
 		return false;
 	}
-	
+		
 	/**
 	 * Adds the necessary Fault elements as properties to the message context.
 	 * Or if this is a SOAP11 Fault, generates the correct RM Fault and sends.
@@ -495,7 +607,7 @@
 
 			SOAPFaultEnvelopeCreator.addSOAPFaultEnvelope(faultMessageContext, Sandesha2Constants.SOAPVersion.v1_1,
data, referenceRMMsgContext.getRMNamespaceValue());			
 			
-			// Set the action
+			// Set the action // TODO SET THE ACTION BASED ON THE SPEC
 			faultMessageContext.setWSAAction(
 					SpecSpecificConstants.getAddressingFaultAction(referenceRMMsgContext.getRMSpecVersion()));
 			
@@ -536,8 +648,9 @@
         			log.debug("Exit: FaultManager::getOrSendFault: " + fault);
                 throw fault; 
             }
-        else
-			log.error("Sandesha2 got a fault when processing the message essage " + referenceRMMsgContext.getMessageId(),
fault);
+        
+		// TODO - Remove console written strings
+		log.error("Sandesha2 got a fault when processing the message " + referenceRMMsgContext.getMessageId(),
fault);
 
 		if (log.isDebugEnabled())
 			log.debug("Exit: FaultManager::getOrSendFault");
@@ -588,7 +701,7 @@
 			if (log.isDebugEnabled()) 
 		    	log.debug("soap11");
 //			try {
-				SequenceFault sequenceFault = (SequenceFault)rmMsgCtx.getSequenceFault();
+				SequenceFault sequenceFault = rmMsgCtx.getSequenceFault();
 	      
 				// If the sequence fault part is not null, then we have an RM specific fault.
 				if (sequenceFault != null) {

Modified: webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/util/MsgInitializer.java
URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/util/MsgInitializer.java?rev=599377&r1=599376&r2=599377&view=diff
==============================================================================
--- webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/util/MsgInitializer.java
(original)
+++ webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/util/MsgInitializer.java
Thu Nov 29 03:05:14 2007
@@ -208,10 +208,7 @@
 				sequenceID = makeConnection.getIdentifier().getIdentifier();
 			} else if (makeConnection.getAddress()!=null){
 				//TODO get sequenceId based on the anonymous address.
-			} else {
-				throw new SandeshaException (
-						"Invalid MakeConnection message. Either Address or Identifier must be present");
-			}
+			} 
 		} else
 			rmMsgContext.setMessageType(Sandesha2Constants.MessageTypes.UNKNOWN);
 		

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=599377&r1=599376&r2=599377&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
Thu Nov 29 03:05:14 2007
@@ -319,7 +319,7 @@
 	 */
 	public static RMMsgContext createCreateSeqResponseMsg(RMMsgContext createSeqMessage, RMSequenceBean
rmSequenceBean) throws AxisFault {
 
-		CreateSequence cs = (CreateSequence) createSeqMessage.getCreateSequence();
+		CreateSequence cs = createSeqMessage.getCreateSequence();
 		String namespace = createSeqMessage.getRMNamespaceValue();
 
 		CreateSequenceResponse response = new CreateSequenceResponse(namespace);
@@ -361,8 +361,7 @@
 
 	public static RMMsgContext createTerminateSeqResponseMsg(RMMsgContext terminateSeqRMMsg,
RMSequenceBean rmSequenceBean) throws AxisFault {
         
-		TerminateSequence terminateSequence = (TerminateSequence) terminateSeqRMMsg
-				.getTerminateSequence();
+		TerminateSequence terminateSequence = terminateSeqRMMsg.getTerminateSequence();
 		String sequenceID = terminateSequence.getIdentifier().getIdentifier();
 
 		String namespace = terminateSeqRMMsg.getRMNamespaceValue();
@@ -381,8 +380,7 @@
 
 	public static RMMsgContext createCloseSeqResponseMsg(RMMsgContext closeSeqRMMsg, RMSequenceBean
rmSequenceBean) throws AxisFault {
 
-		CloseSequence closeSequence = (CloseSequence) closeSeqRMMsg
-				.getCloseSequence();
+		CloseSequence closeSequence = closeSeqRMMsg.getCloseSequence();
 		String sequenceID = closeSequence.getIdentifier().getIdentifier();
 
 		String namespace = closeSeqRMMsg.getRMNamespaceValue();
@@ -508,8 +506,7 @@
 	public static RMMsgContext createMakeConnectionMessage (RMMsgContext referenceRMMessage,
 															RMSequenceBean bean,
 															String makeConnectionSeqId,
-															String makeConnectionAnonURI,
-															StorageManager storageManager)
+															String makeConnectionAnonURI)
 	throws AxisFault
 	{
 		

Modified: webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/util/SpecSpecificConstants.java
URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/util/SpecSpecificConstants.java?rev=599377&r1=599376&r2=599377&view=diff
==============================================================================
--- webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/util/SpecSpecificConstants.java
(original)
+++ webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/util/SpecSpecificConstants.java
Thu Nov 29 03:05:14 2007
@@ -96,9 +96,9 @@
 	public static String getTerminateSequenceResponseAction (String specVersion) throws SandeshaException
{
 		if (Sandesha2Constants.SPEC_VERSIONS.v1_1.equals(specVersion)) 
 			return Sandesha2Constants.SPEC_2007_02.Actions.ACTION_TERMINATE_SEQUENCE_RESPONSE;
-		else 
-			throw new SandeshaException (SandeshaMessageHelper.getMessage(
-					SandeshaMessageKeys.unknownSpec));
+		 
+		throw new SandeshaException (SandeshaMessageHelper.getMessage(
+				SandeshaMessageKeys.unknownSpec));
 	}
 	
 	public static String getCloseSequenceAction (String specVersion) throws SandeshaException
{
@@ -193,10 +193,10 @@
 	public static String getTerminateSequenceResponseSOAPAction (String specVersion) throws
SandeshaException {
 		if (Sandesha2Constants.SPEC_VERSIONS.v1_1.equals(specVersion)) 
 			return Sandesha2Constants.SPEC_2007_02.Actions.SOAP_ACTION_TERMINATE_SEQUENCE_RESPONSE;
-		else 
-			throw new SandeshaException (SandeshaMessageHelper.getMessage(
-					SandeshaMessageKeys.unknownSpec,
-					specVersion));
+		 
+		throw new SandeshaException (SandeshaMessageHelper.getMessage(
+				SandeshaMessageKeys.unknownSpec,
+				specVersion));
 	}
 	
 	public static String getAckRequestSOAPAction (String specVersion) throws SandeshaException
{
@@ -439,6 +439,16 @@
 				case Sandesha2Constants.SOAPFaults.FaultType.SEQUENCE_TERMINATED:
 					result = Sandesha2Constants.SPEC_2007_02.QNames.SequenceTerminated;
 					break;
+			}
+		}
+		else if (Sandesha2Constants.SPEC_2007_02.MC_NS_URI.equals(namespaceValue)) {			
+			switch (faultType) {			
+				case Sandesha2Constants.SOAPFaults.FaultType.UNSUPPORTED_SELECTION:
+					result = Sandesha2Constants.SPEC_2007_02.QNames.UnsupportedSelection;
+					break;
+				case Sandesha2Constants.SOAPFaults.FaultType.MISSING_SELECTION:
+					result = Sandesha2Constants.SPEC_2007_02.QNames.MissingSelection;
+					break;			
 			}
 		}
 		else

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=599377&r1=599376&r2=599377&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
Thu Nov 29 03:05:14 2007
@@ -28,8 +28,6 @@
 import org.apache.axis2.AxisFault;
 import org.apache.axis2.Constants;
 import org.apache.axis2.addressing.EndpointReference;
-import org.apache.axis2.client.Options;
-import org.apache.axis2.client.ServiceClient;
 import org.apache.axis2.context.ConfigurationContext;
 import org.apache.axis2.context.MessageContext;
 import org.apache.commons.logging.Log;
@@ -37,8 +35,6 @@
 import org.apache.sandesha2.RMMsgContext;
 import org.apache.sandesha2.Sandesha2Constants;
 import org.apache.sandesha2.SandeshaException;
-import org.apache.sandesha2.client.SandeshaClient;
-import org.apache.sandesha2.client.SandeshaClientConstants;
 import org.apache.sandesha2.i18n.SandeshaMessageHelper;
 import org.apache.sandesha2.i18n.SandeshaMessageKeys;
 import org.apache.sandesha2.storage.SandeshaStorageException;
@@ -50,8 +46,6 @@
 import org.apache.sandesha2.storage.beans.InvokerBean;
 import org.apache.sandesha2.storage.beans.RMDBean;
 import org.apache.sandesha2.storage.beans.SenderBean;
-
-import com.ibm.xslt4j.bcel.generic.RETURN;
 
 /**
  * Contains logic to remove all the storad data of a sequence. Methods of this

Modified: webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/wsrm/MakeConnection.java
URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/wsrm/MakeConnection.java?rev=599377&r1=599376&r2=599377&view=diff
==============================================================================
--- webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/wsrm/MakeConnection.java
(original)
+++ webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/wsrm/MakeConnection.java
Thu Nov 29 03:05:14 2007
@@ -19,6 +19,8 @@
 
 package org.apache.sandesha2.wsrm;
 
+import java.util.Iterator;
+
 import javax.xml.namespace.QName;
 
 import org.apache.axiom.om.OMElement;
@@ -41,6 +43,8 @@
 	
 	Address address = null;
 	
+	QName unexpectedElement = null;
+	
 	public MakeConnection (String namespaceValue) throws SandeshaException {
 		
 		if (!isNamespaceSupported(namespaceValue))
@@ -64,17 +68,22 @@
 
 	public Object fromOMElement(OMElement makeConnectionElement) throws OMException, AxisFault
{
 
-		OMElement identifierElement = makeConnectionElement.getFirstChildWithName(Sandesha2Constants.SPEC_2007_02.QNames.Identifier);
-		if(identifierElement == null) {
-			identifierElement = makeConnectionElement.getFirstChildWithName(Sandesha2Constants.SPEC_2005_02.QNames.Identifier);
-		}
-		OMElement addressElement = makeConnectionElement.getFirstChildWithName(new QName(namespaceValue,Sandesha2Constants.WSA.ADDRESS));
-		
-		if (identifierElement==null && addressElement==null) {
-			String message = "MakeConnection element should have at lease one of Address and Identifier
subelements";
-			throw new SandeshaException (message);
-		}
+		Iterator childElements = makeConnectionElement.getChildElements();
 		
+		OMElement identifierElement = null;
+		OMElement addressElement = null;
+		
+		while (childElements.hasNext()) {
+			OMElement element = (OMElement)childElements.next();
+			if (Sandesha2Constants.SPEC_2007_02.QNames.Identifier.getLocalPart().equals(element.getLocalName()))
+				identifierElement = element;
+			else if (Sandesha2Constants.WSA.ADDRESS.equals(element.getLocalName()))
+				addressElement = element;
+			else 
+				unexpectedElement = element.getQName();
+			
+		}
+
 		if (identifierElement!=null) {
 			identifier = new Identifier (identifierElement.getNamespace().getNamespaceURI());
 			identifier.fromOMElement(identifierElement);
@@ -107,10 +116,6 @@
 					SandeshaMessageHelper.getMessage(message));
 		}
 
-	/*	if (identifier==null && address==null) {
-			String message = "Invalid MakeConnection object. Both Identifier and Address are null";
-		}
-		*/
 		OMFactory factory = body.getOMFactory();
 		OMNamespace rmNamespace = factory.createOMNamespace(namespaceValue,Sandesha2Constants.WSRM_COMMON.NS_PREFIX_MC);
 		OMElement makeConnectionElement = factory.createOMElement(Sandesha2Constants.WSRM_COMMON.MAKE_CONNECTION,rmNamespace);
@@ -120,6 +125,14 @@
 		if (address!=null)
 			address.toOMElement(makeConnectionElement);
 
+		// Added to test Invalid MakeConnection messages
+		if (unexpectedElement != null)
+		{
+			OMElement unexElement = factory.createOMElement(unexpectedElement);
+
+			makeConnectionElement.addChild(unexElement);
+		}
+			
 		body.addChild(makeConnectionElement);
 		
 		return body;
@@ -141,4 +154,11 @@
 		this.identifier = identifier;
 	}
 
+	public void setUnexpectedElement(QName unexpectedElement) {
+		  this.unexpectedElement = unexpectedElement;	
+		}
+
+	public QName getUnexpectedElement() {
+		return unexpectedElement;
+	}	
 }

Modified: webservices/sandesha/trunk/java/modules/core/src/main/resources/org/apache/sandesha2/i18n/resource.properties
URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/java/modules/core/src/main/resources/org/apache/sandesha2/i18n/resource.properties?rev=599377&r1=599376&r2=599377&view=diff
==============================================================================
--- webservices/sandesha/trunk/java/modules/core/src/main/resources/org/apache/sandesha2/i18n/resource.properties
(original)
+++ webservices/sandesha/trunk/java/modules/core/src/main/resources/org/apache/sandesha2/i18n/resource.properties
Thu Nov 29 03:05:14 2007
@@ -248,3 +248,5 @@
 unknownSequenceFault=The value of wsrm:Identifier is not a known Sequence identifier.
 invalidAckFault=The SequenceAcknowledgement violates the cumulative Acknowledgement invariant.
 cannotAcceptMsgAsSequenceClosedFault=The Sequence is closed and can not accept new messages.

+unsuportedSelectionFault=The extension element used in the message is not supported by the
MakeConnection receiver.
+missingSelectionFault=The MakeConnection element did not contain any selection criteria.
\ No newline at end of file

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=599377&r1=599376&r2=599377&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
Thu Nov 29 03:05:14 2007
@@ -125,7 +125,7 @@
 		messageContext = createSeqRMMessage.getMessageContext();
 		messageContext.setWSAAction(SpecSpecificConstants.getCreateSequenceAction(Sandesha2Constants.SPEC_VERSIONS.v1_1));
 
-		CreateSequence createSeqResPart = (CreateSequence) createSeqRMMessage.getCreateSequence();
+		CreateSequence createSeqResPart = createSeqRMMessage.getCreateSequence();
 
 		createSeqResPart.setAcksTo(
 				new AcksTo(new EndpointReference(AddressingConstants.Final.WSA_NONE_URI), 

Modified: webservices/sandesha/trunk/java/modules/tests/src/test/java/org/apache/sandesha2/faulttests/FaultTestUtils.java
URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/java/modules/tests/src/test/java/org/apache/sandesha2/faulttests/FaultTestUtils.java?rev=599377&r1=599376&r2=599377&view=diff
==============================================================================
--- webservices/sandesha/trunk/java/modules/tests/src/test/java/org/apache/sandesha2/faulttests/FaultTestUtils.java
(original)
+++ webservices/sandesha/trunk/java/modules/tests/src/test/java/org/apache/sandesha2/faulttests/FaultTestUtils.java
Thu Nov 29 03:05:14 2007
@@ -49,9 +49,13 @@
 	 * @return
 	 * @throws IOException 
 	 */
-	public static final String retrieveResponseMessage(HttpURLConnection connection) throws
IOException {
-		
-		InputStream tmpIn2 = connection.getInputStream();
+	public static final String retrieveResponseMessage(HttpURLConnection connection) {
+		InputStream tmpIn2 = null;
+		try {
+			tmpIn2 = connection.getInputStream();
+		} catch (IOException e) {
+			tmpIn2 = connection.getErrorStream();
+		}
 
 		// Read the sync response
 		boolean done = false;

Added: webservices/sandesha/trunk/java/modules/tests/src/test/java/org/apache/sandesha2/faulttests/MissingSelectionFaultTest.java
URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/java/modules/tests/src/test/java/org/apache/sandesha2/faulttests/MissingSelectionFaultTest.java?rev=599377&view=auto
==============================================================================
--- webservices/sandesha/trunk/java/modules/tests/src/test/java/org/apache/sandesha2/faulttests/MissingSelectionFaultTest.java
(added)
+++ webservices/sandesha/trunk/java/modules/tests/src/test/java/org/apache/sandesha2/faulttests/MissingSelectionFaultTest.java
Thu Nov 29 03:05:14 2007
@@ -0,0 +1,152 @@
+/*
+ * Copyright 2004,2005 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.sandesha2.faulttests;
+
+import java.io.ByteArrayOutputStream;
+import java.io.File;
+import java.io.OutputStream;
+import java.net.HttpURLConnection;
+
+import org.apache.axiom.soap.SOAPEnvelope;
+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;
+import org.apache.sandesha2.Sandesha2Constants;
+import org.apache.sandesha2.SandeshaTestCase;
+import org.apache.sandesha2.storage.beans.RMSBean;
+import org.apache.sandesha2.util.RMMsgCreator;
+import org.apache.sandesha2.util.SpecSpecificConstants;
+import org.apache.sandesha2.wsrm.MakeConnection;
+
+public class MissingSelectionFaultTest extends SandeshaTestCase {
+
+	private static final String server_repoPath = "target" + File.separator
+	        + "repos" + File.separator + "server";
+
+	private static final String server_axis2_xml = "target" + File.separator
+	        + "repos" + File.separator + "server" + File.separator
+	        + "server_axis2.xml";
+
+	private static ConfigurationContext serverConfigContext;
+
+	public MissingSelectionFaultTest() {
+		super("MissingSelectionFaultTest");
+	}
+
+	public void setUp() throws Exception {
+		super.setUp();
+		serverConfigContext = startServer(server_repoPath, server_axis2_xml);
+	}
+
+	/**
+	 * Sends a MakeConnection message to an RM Destination without a Address or Identifier element.
+	 * refused.
+	 * 
+	 * @throws Exception
+	 */
+	public void testMissingSelectionFault() throws Exception {
+
+		// Open a connection to the endpoint
+		HttpURLConnection connection = FaultTestUtils.getHttpURLConnection(
+		        "http://127.0.0.1:" + serverPort
+		                + "/axis2/services/RMSampleService",
+		        "http://docs.oasis-open.org/ws-rx/wsmc/200702/MakeConnection");
+
+		OutputStream tmpOut2 = connection.getOutputStream();
+
+		byte ar[] = getMessageAsBytes();
+
+		// Send the message to the socket.
+		tmpOut2.write(ar);
+		tmpOut2.flush();
+
+		// Get the response message from the connection
+		String message = FaultTestUtils.retrieveResponseMessage(connection);
+
+		// Check that the fault message isn't null
+		assertNotNull(message);
+
+		// Check that the response contains the wsrm:CreateSequenceRefused tag
+		assertTrue(message.indexOf("MissingSelection") > -1);
+
+		// Disconnect at the end of the test
+		connection.disconnect();
+	}
+
+	/**
+	 * Get a MakeConnection message as bytes
+	 * 
+	 * This generates a MakeConnection that has missing values
+	 * which will generate a Fault from the service.
+	 * 
+	 * @return
+	 */
+	private byte[] getMessageAsBytes() throws Exception {
+		String to = "http://127.0.0.1:" + 9999 //serverPort
+		        + "/axis2/services/RMSampleService";
+
+		SOAPFactory factory = new SOAP11Factory();
+		SOAPEnvelope dummyEnvelope = factory.getDefaultEnvelope();
+
+		// Create a "new" application message
+		MessageContext messageContext = new MessageContext();
+		messageContext.setConfigurationContext(serverConfigContext);
+		messageContext.setAxisService(serverConfigContext
+		        .getAxisConfiguration().getService("RMSampleService"));
+		messageContext.setEnvelope(dummyEnvelope);
+
+		RMMsgContext applicationRMMsg = new RMMsgContext(messageContext);
+		EndpointReference toEPR = new EndpointReference(to);
+		applicationRMMsg.setTo(toEPR);
+
+		// Create an RMSBean so the create sequence message can be created
+		RMSBean rmsBean = new RMSBean();
+		rmsBean.setRMVersion(Sandesha2Constants.SPEC_VERSIONS.v1_1);
+		rmsBean.setToEndpointReference(toEPR);
+		rmsBean.setAcksToEndpointReference(new EndpointReference(
+		        AddressingConstants.Final.WSA_NONE_URI));
+
+		// Create a Create Sequence message
+		// generating a new create sequeuce message.
+		RMMsgContext makeConnectionRMMessage = RMMsgCreator.createMakeConnectionMessage(applicationRMMsg,
rmsBean, "TempSeqId", "ANON URI");
+		messageContext = makeConnectionRMMessage.getMessageContext();
+		messageContext
+		        .setWSAAction(SpecSpecificConstants
+		                .getCreateSequenceAction(Sandesha2Constants.SPEC_VERSIONS.v1_1));
+
+		MakeConnection makeConnectionPart = makeConnectionRMMessage.getMakeConnection();
+
+		makeConnectionPart.setIdentifier(null);
+		makeConnectionPart.setAddress(null);
+
+		// Update the SOAP Envelope of the message
+		makeConnectionRMMessage.addSOAPEnvelope();
+
+		SOAPEnvelope envelope = makeConnectionRMMessage.getMessageContext()
+		        .getEnvelope();
+
+		ByteArrayOutputStream outputStream = new ByteArrayOutputStream();
+
+		envelope.serialize(outputStream);
+
+		return outputStream.toByteArray();
+	}
+}

Added: webservices/sandesha/trunk/java/modules/tests/src/test/java/org/apache/sandesha2/faulttests/UnsupportedSelectionFaultTest.java
URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/java/modules/tests/src/test/java/org/apache/sandesha2/faulttests/UnsupportedSelectionFaultTest.java?rev=599377&view=auto
==============================================================================
--- webservices/sandesha/trunk/java/modules/tests/src/test/java/org/apache/sandesha2/faulttests/UnsupportedSelectionFaultTest.java
(added)
+++ webservices/sandesha/trunk/java/modules/tests/src/test/java/org/apache/sandesha2/faulttests/UnsupportedSelectionFaultTest.java
Thu Nov 29 03:05:14 2007
@@ -0,0 +1,154 @@
+/*
+ * Copyright 2004,2005 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.sandesha2.faulttests;
+
+import java.io.ByteArrayOutputStream;
+import java.io.File;
+import java.io.OutputStream;
+import java.net.HttpURLConnection;
+
+import javax.xml.namespace.QName;
+
+import org.apache.axiom.soap.SOAPEnvelope;
+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;
+import org.apache.sandesha2.Sandesha2Constants;
+import org.apache.sandesha2.SandeshaTestCase;
+import org.apache.sandesha2.storage.beans.RMSBean;
+import org.apache.sandesha2.util.RMMsgCreator;
+import org.apache.sandesha2.util.SpecSpecificConstants;
+import org.apache.sandesha2.wsrm.MakeConnection;
+
+public class UnsupportedSelectionFaultTest extends SandeshaTestCase {
+
+	private static final String server_repoPath = "target" + File.separator
+	        + "repos" + File.separator + "server";
+
+	private static final String server_axis2_xml = "target" + File.separator
+	        + "repos" + File.separator + "server" + File.separator
+	        + "server_axis2.xml";
+
+	private static ConfigurationContext serverConfigContext;
+
+	public UnsupportedSelectionFaultTest() {
+		super("UnsupportedSelectionFaultTest");
+	}
+
+	public void setUp() throws Exception {
+		super.setUp();
+		serverConfigContext = startServer(server_repoPath, server_axis2_xml);
+	}
+
+	/**
+	 * Sends a MakeConnection message to an RM Destination which contains an unsupported selector
+	 * refused.
+	 * 
+	 * @throws Exception
+	 */
+	public void testUnsupportedSelectionFault() throws Exception {
+
+		// Open a connection to the endpoint
+		HttpURLConnection connection = FaultTestUtils.getHttpURLConnection(
+		        "http://127.0.0.1:" + serverPort
+		                + "/axis2/services/RMSampleService",
+		        "http://docs.oasis-open.org/ws-rx/wsmc/200702/MakeConnection");
+
+		OutputStream tmpOut2 = connection.getOutputStream();
+
+		byte ar[] = getMessageAsBytes();
+
+		// Send the message to the socket.
+		tmpOut2.write(ar);
+		tmpOut2.flush();
+
+		// Get the response message from the connection
+		String message = FaultTestUtils.retrieveResponseMessage(connection);
+
+		// Check that the fault message isn't null
+		assertNotNull(message);
+
+		// Check that the response contains the UnsupportedSelection tag
+		assertTrue(message.indexOf("UnsupportedElement") > -1);
+
+		// Disconnect at the end of the test
+		connection.disconnect();
+	}
+
+	/**
+	 * Get a MakeConnection message as bytes
+	 * 
+	 * This generates a MakeConnection that has missing values
+	 * which will generate a Fault from the service.
+	 * 
+	 * @return
+	 */
+	private byte[] getMessageAsBytes() throws Exception {
+		String to = "http://127.0.0.1:" + serverPort
+		        + "/axis2/services/RMSampleService";
+
+		SOAPFactory factory = new SOAP11Factory();
+		SOAPEnvelope dummyEnvelope = factory.getDefaultEnvelope();
+
+		// Create a "new" application message
+		MessageContext messageContext = new MessageContext();
+		messageContext.setConfigurationContext(serverConfigContext);
+		messageContext.setAxisService(serverConfigContext
+		        .getAxisConfiguration().getService("RMSampleService"));
+		messageContext.setEnvelope(dummyEnvelope);
+
+		RMMsgContext applicationRMMsg = new RMMsgContext(messageContext);
+		EndpointReference toEPR = new EndpointReference(to);
+		applicationRMMsg.setTo(toEPR);
+
+		// Create an RMSBean so the create sequence message can be created
+		RMSBean rmsBean = new RMSBean();
+		rmsBean.setRMVersion(Sandesha2Constants.SPEC_VERSIONS.v1_1);
+		rmsBean.setToEndpointReference(toEPR);
+		rmsBean.setAcksToEndpointReference(new EndpointReference(
+		        AddressingConstants.Final.WSA_NONE_URI));
+
+		// Create a Create Sequence message
+		// generating a new create sequeuce message.
+		RMMsgContext makeConnectionRMMessage = RMMsgCreator.createMakeConnectionMessage(applicationRMMsg,
rmsBean, "TempSeqId", "ANON URI");
+		messageContext = makeConnectionRMMessage.getMessageContext();
+		messageContext
+		        .setWSAAction(SpecSpecificConstants
+		                .getCreateSequenceAction(Sandesha2Constants.SPEC_VERSIONS.v1_1));
+
+		MakeConnection makeConnectionPart = makeConnectionRMMessage.getMakeConnection();
+
+		QName name = new QName(AddressingConstants.Final.WSA_NAMESPACE, "BAD_ONE");
+		makeConnectionPart.setUnexpectedElement(name);
+
+		// Update the SOAP Envelope of the message
+		makeConnectionRMMessage.addSOAPEnvelope();
+
+		SOAPEnvelope envelope = makeConnectionRMMessage.getMessageContext()
+		        .getEnvelope();
+
+		ByteArrayOutputStream outputStream = new ByteArrayOutputStream();
+
+		envelope.serialize(outputStream);
+
+		return outputStream.toByteArray();
+	}
+}

Modified: webservices/sandesha/trunk/java/modules/tests/src/test/java/org/apache/sandesha2/scenarios/UnsupportedScenariosTest.java
URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/java/modules/tests/src/test/java/org/apache/sandesha2/scenarios/UnsupportedScenariosTest.java?rev=599377&r1=599376&r2=599377&view=diff
==============================================================================
--- webservices/sandesha/trunk/java/modules/tests/src/test/java/org/apache/sandesha2/scenarios/UnsupportedScenariosTest.java
(original)
+++ webservices/sandesha/trunk/java/modules/tests/src/test/java/org/apache/sandesha2/scenarios/UnsupportedScenariosTest.java
Thu Nov 29 03:05:14 2007
@@ -26,7 +26,7 @@
 public class UnsupportedScenariosTest extends RMScenariosTest {
 
 	public UnsupportedScenariosTest () {
-		super ("RMScenariosTest");
+		super ("UnsupportedScenariosTest");
 	}
 	
 	public void setUp () throws Exception {



---------------------------------------------------------------------
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