You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fx-dev@ws.apache.org by ch...@apache.org on 2005/09/23 05:54:41 UTC

svn commit: r291067 [3/3] - in /webservices/sandesha/trunk/src/org/apache/sandesha2: ./ handlers/ msgprocessors/ msgreceivers/ storage/ storage/beanmanagers/ storage/beans/ storage/inmemory/ util/ wsrm/

Modified: webservices/sandesha/trunk/src/org/apache/sandesha2/wsrm/Expires.java
URL: http://svn.apache.org/viewcvs/webservices/sandesha/trunk/src/org/apache/sandesha2/wsrm/Expires.java?rev=291067&r1=291066&r2=291067&view=diff
==============================================================================
--- webservices/sandesha/trunk/src/org/apache/sandesha2/wsrm/Expires.java (original)
+++ webservices/sandesha/trunk/src/org/apache/sandesha2/wsrm/Expires.java Thu Sep 22 20:52:54 2005
@@ -34,29 +34,34 @@
 
 public class Expires implements IOMRMElement {
 
-	OMNamespace rmNamespace = SOAPAbstractFactory.getSOAPFactory(Constants.DEFAULT_SOAP_VERSION).createOMNamespace(
-			Constants.WSRM.NS_URI_RM,Constants.WSRM.NS_PREFIX_RM);
-	
-	OMElement expiresElement=null;
-	String duration=null;
-	
-	public Expires () {
-		expiresElement = SOAPAbstractFactory.getSOAPFactory(Constants.DEFAULT_SOAP_VERSION).createOMElement(
-				Constants.WSRM.EXPIRES , rmNamespace);
+	OMNamespace rmNamespace = SOAPAbstractFactory.getSOAPFactory(
+			Constants.DEFAULT_SOAP_VERSION).createOMNamespace(
+			Constants.WSRM.NS_URI_RM, Constants.WSRM.NS_PREFIX_RM);
+
+	OMElement expiresElement = null;
+
+	String duration = null;
+
+	public Expires() {
+		expiresElement = SOAPAbstractFactory.getSOAPFactory(
+				Constants.DEFAULT_SOAP_VERSION).createOMElement(
+				Constants.WSRM.EXPIRES, rmNamespace);
 	}
-	
+
 	public Object fromOMElement(OMElement element) throws OMException {
-		OMElement expiresPart = element.getFirstChildWithName(new QName (
-				Constants.WSRM.NS_URI_RM,Constants.WSRM.EXPIRES));
-		if (expiresPart==null)
-			throw new OMException ("Passed elemenet does not have a Expires part");
+		OMElement expiresPart = element.getFirstChildWithName(new QName(
+				Constants.WSRM.NS_URI_RM, Constants.WSRM.EXPIRES));
+		if (expiresPart == null)
+			throw new OMException(
+					"Passed elemenet does not have a Expires part");
 		String expiresText = expiresPart.getText();
-		if (expiresText==null || expiresText=="")
-			throw new OMException ("The duration value is not valid");
-		
-		expiresElement = SOAPAbstractFactory.getSOAPFactory(Constants.DEFAULT_SOAP_VERSION).createOMElement(
-				Constants.WSRM.EXPIRES , rmNamespace);
-		
+		if (expiresText == null || expiresText == "")
+			throw new OMException("The duration value is not valid");
+
+		expiresElement = SOAPAbstractFactory.getSOAPFactory(
+				Constants.DEFAULT_SOAP_VERSION).createOMElement(
+				Constants.WSRM.EXPIRES, rmNamespace);
+
 		duration = expiresText;
 		return element;
 	}
@@ -67,20 +72,22 @@
 	}
 
 	public OMElement toOMElement(OMElement element) throws OMException {
-		if (expiresElement==null)
-			throw new OMException ("Cant set Expires. It is null");
-		if (duration==null || duration=="")
-			throw new OMException ("Cant set Expires. The duration value is not set");
-		
+		if (expiresElement == null)
+			throw new OMException("Cant set Expires. It is null");
+		if (duration == null || duration == "")
+			throw new OMException(
+					"Cant set Expires. The duration value is not set");
+
 		expiresElement.setText(duration);
 		element.addChild(expiresElement);
-		
-		expiresElement = SOAPAbstractFactory.getSOAPFactory(Constants.DEFAULT_SOAP_VERSION).createOMElement(
-				Constants.WSRM.EXPIRES , rmNamespace);
-		
+
+		expiresElement = SOAPAbstractFactory.getSOAPFactory(
+				Constants.DEFAULT_SOAP_VERSION).createOMElement(
+				Constants.WSRM.EXPIRES, rmNamespace);
+
 		return element;
 	}
-	
+
 	public String getDuration() {
 		return duration;
 	}
@@ -96,4 +103,4 @@
 	public void setExpiresElement(OMElement expiresElement) {
 		this.expiresElement = expiresElement;
 	}
-}
+}
\ No newline at end of file

Modified: webservices/sandesha/trunk/src/org/apache/sandesha2/wsrm/FaultCode.java
URL: http://svn.apache.org/viewcvs/webservices/sandesha/trunk/src/org/apache/sandesha2/wsrm/FaultCode.java?rev=291067&r1=291066&r2=291067&view=diff
==============================================================================
--- webservices/sandesha/trunk/src/org/apache/sandesha2/wsrm/FaultCode.java (original)
+++ webservices/sandesha/trunk/src/org/apache/sandesha2/wsrm/FaultCode.java Thu Sep 22 20:52:54 2005
@@ -33,60 +33,67 @@
  */
 
 public class FaultCode implements IOMRMElement {
-	
+
 	private OMElement faultCodeElement;
+
 	String faultCode = null;
-	
-	OMNamespace rmNameSpace = 
-		SOAPAbstractFactory.getSOAPFactory(Constants.DEFAULT_SOAP_VERSION).createOMNamespace(
-				Constants.WSRM.NS_URI_RM, Constants.WSRM.NS_PREFIX_RM);
-	
-	
-	public FaultCode(){
-		faultCodeElement = SOAPAbstractFactory.getSOAPFactory(Constants.DEFAULT_SOAP_VERSION).createOMElement(
-				Constants.WSRM.FAULT_CODE,rmNameSpace);
+
+	OMNamespace rmNameSpace = SOAPAbstractFactory.getSOAPFactory(
+			Constants.DEFAULT_SOAP_VERSION).createOMNamespace(
+			Constants.WSRM.NS_URI_RM, Constants.WSRM.NS_PREFIX_RM);
+
+	public FaultCode() {
+		faultCodeElement = SOAPAbstractFactory.getSOAPFactory(
+				Constants.DEFAULT_SOAP_VERSION).createOMElement(
+				Constants.WSRM.FAULT_CODE, rmNameSpace);
 	}
-	
+
 	public OMElement getOMElement() throws OMException {
 		return faultCodeElement;
 	}
 
 	public Object fromOMElement(OMElement sequenceFault) throws OMException {
-		
-		if (sequenceFault==null)
-			throw new OMException ("Can't add Fault Code part since the passed element is null");
-		
-		OMElement faultCodePart = sequenceFault.getFirstChildWithName( 
-				new QName (Constants.WSRM.NS_PREFIX_RM,Constants.WSRM.FAULT_CODE));
-		
-		if  (faultCodePart==null) 
-			throw new OMException ("Passed element does not contain a Fauld Code part");
-		
+
+		if (sequenceFault == null)
+			throw new OMException(
+					"Can't add Fault Code part since the passed element is null");
+
+		OMElement faultCodePart = sequenceFault
+				.getFirstChildWithName(new QName(Constants.WSRM.NS_PREFIX_RM,
+						Constants.WSRM.FAULT_CODE));
+
+		if (faultCodePart == null)
+			throw new OMException(
+					"Passed element does not contain a Fauld Code part");
+
 		this.faultCode = faultCodePart.getText();
-		
-		faultCodeElement = SOAPAbstractFactory.getSOAPFactory(Constants.DEFAULT_SOAP_VERSION).createOMElement(
-				Constants.WSRM.FAULT_CODE,rmNameSpace);
-		
+
+		faultCodeElement = SOAPAbstractFactory.getSOAPFactory(
+				Constants.DEFAULT_SOAP_VERSION).createOMElement(
+				Constants.WSRM.FAULT_CODE, rmNameSpace);
+
 		return sequenceFault;
-		
+
 	}
 
 	public OMElement toOMElement(OMElement sequenceFault) throws OMException {
 
-		if (sequenceFault==null)
-			throw new OMException ("Can't add Fault Code part since the passed element is null");
-		
-		if (faultCode==null || faultCode=="")
-			throw new OMException ("Cant add fault code since the the value is not set correctly.");
-		
-		if (faultCodeElement==null)
-			throw new OMException ("Cant add the fault code since the internal element is null");
-		
+		if (sequenceFault == null)
+			throw new OMException(
+					"Can't add Fault Code part since the passed element is null");
+
+		if (faultCode == null || faultCode == "")
+			throw new OMException(
+					"Cant add fault code since the the value is not set correctly.");
+
+		if (faultCodeElement == null)
+			throw new OMException(
+					"Cant add the fault code since the internal element is null");
+
 		faultCodeElement.setText(faultCode);
 		sequenceFault.addChild(faultCodeElement);
-		
+
 		return sequenceFault;
 	}
 
-	
-}
+}
\ No newline at end of file

Modified: webservices/sandesha/trunk/src/org/apache/sandesha2/wsrm/Identifier.java
URL: http://svn.apache.org/viewcvs/webservices/sandesha/trunk/src/org/apache/sandesha2/wsrm/Identifier.java?rev=291067&r1=291066&r2=291067&view=diff
==============================================================================
--- webservices/sandesha/trunk/src/org/apache/sandesha2/wsrm/Identifier.java (original)
+++ webservices/sandesha/trunk/src/org/apache/sandesha2/wsrm/Identifier.java Thu Sep 22 20:52:54 2005
@@ -36,15 +36,18 @@
 import org.apache.sandesha2.SOAPAbstractFactory;
 
 public class Identifier implements Constants, IOMRMElement {
-	
+
 	private OMElement identifierElement;
-	private String identifier=null;
 
-	OMNamespace wsuNamespace = SOAPAbstractFactory.getSOAPFactory(Constants.DEFAULT_SOAP_VERSION).createOMNamespace(
+	private String identifier = null;
+
+	OMNamespace wsuNamespace = SOAPAbstractFactory.getSOAPFactory(
+			Constants.DEFAULT_SOAP_VERSION).createOMNamespace(
 			Constants.WSRM.NS_URI_RM, Constants.WSRM.NS_PREFIX_RM);
 
 	public Identifier() {
-		identifierElement = SOAPAbstractFactory.getSOAPFactory(Constants.DEFAULT_SOAP_VERSION).createOMElement(
+		identifierElement = SOAPAbstractFactory.getSOAPFactory(
+				Constants.DEFAULT_SOAP_VERSION).createOMElement(
 				Constants.WSRM.IDENTIFIER, wsuNamespace);
 	}
 
@@ -56,39 +59,41 @@
 		return identifier;
 	}
 
-	public OMElement getOMElement () throws OMException {
+	public OMElement getOMElement() throws OMException {
 		return identifierElement;
 	}
 
 	public Object fromOMElement(OMElement element) throws OMException {
-		OMElement identifierPart = element.getFirstChildWithName(
-				new QName (Constants.WSRM.NS_URI_RM,Constants.WSRM.IDENTIFIER));
-		if (identifierPart==null)
-			throw new OMException ("The parsed element does not contain an identifier part");
-		identifierElement = SOAPAbstractFactory.getSOAPFactory(Constants.DEFAULT_SOAP_VERSION).createOMElement(
+		OMElement identifierPart = element.getFirstChildWithName(new QName(
+				Constants.WSRM.NS_URI_RM, Constants.WSRM.IDENTIFIER));
+		if (identifierPart == null)
+			throw new OMException(
+					"The parsed element does not contain an identifier part");
+		identifierElement = SOAPAbstractFactory.getSOAPFactory(
+				Constants.DEFAULT_SOAP_VERSION).createOMElement(
 				Constants.WSRM.IDENTIFIER, wsuNamespace);
-		
+
 		String identifierText = identifierPart.getText();
-		if (identifierText==null || identifierText=="")
-			throw new OMException ("The identifier value is not valid");
-		
+		if (identifierText == null || identifierText == "")
+			throw new OMException("The identifier value is not valid");
+
 		identifier = identifierText;
 		return this;
 	}
 
-	public OMElement toOMElement(OMElement element)
-			throws OMException {
-		
+	public OMElement toOMElement(OMElement element) throws OMException {
+
 		if (identifier == null || identifier == "") {
 			throw new OMException("identifier is not set .. ");
 		}
-		
+
 		identifierElement.setText(identifier);
 		element.addChild(identifierElement);
-		
-		identifierElement = SOAPAbstractFactory.getSOAPFactory(Constants.DEFAULT_SOAP_VERSION).createOMElement(
+
+		identifierElement = SOAPAbstractFactory.getSOAPFactory(
+				Constants.DEFAULT_SOAP_VERSION).createOMElement(
 				Constants.WSRM.IDENTIFIER, wsuNamespace);
-		
+
 		return element;
 	}
 
@@ -99,4 +104,4 @@
 	public int hashCode() {
 		return identifier.hashCode();
 	}
-}
+}
\ No newline at end of file

Modified: webservices/sandesha/trunk/src/org/apache/sandesha2/wsrm/LastMessage.java
URL: http://svn.apache.org/viewcvs/webservices/sandesha/trunk/src/org/apache/sandesha2/wsrm/LastMessage.java?rev=291067&r1=291066&r2=291067&view=diff
==============================================================================
--- webservices/sandesha/trunk/src/org/apache/sandesha2/wsrm/LastMessage.java (original)
+++ webservices/sandesha/trunk/src/org/apache/sandesha2/wsrm/LastMessage.java Thu Sep 22 20:52:54 2005
@@ -38,53 +38,58 @@
 public class LastMessage implements IOMRMElement {
 
 	private OMElement lastMessageElement;
-	OMNamespace lastMsgNamespace =
-		SOAPAbstractFactory.getSOAPFactory(Constants.DEFAULT_SOAP_VERSION).createOMNamespace(Constants.WSRM.NS_URI_RM, Constants.WSRM.NS_PREFIX_RM);
-	
-	public LastMessage(){
-		lastMessageElement = SOAPAbstractFactory.getSOAPFactory(Constants.DEFAULT_SOAP_VERSION).createOMElement(
-				Constants.WSRM.LAST_MSG,lastMsgNamespace);	
+
+	OMNamespace lastMsgNamespace = SOAPAbstractFactory.getSOAPFactory(
+			Constants.DEFAULT_SOAP_VERSION).createOMNamespace(
+			Constants.WSRM.NS_URI_RM, Constants.WSRM.NS_PREFIX_RM);
+
+	public LastMessage() {
+		lastMessageElement = SOAPAbstractFactory.getSOAPFactory(
+				Constants.DEFAULT_SOAP_VERSION).createOMElement(
+				Constants.WSRM.LAST_MSG, lastMsgNamespace);
 	}
-	
+
 	public OMElement getOMElement() throws OMException {
 		return lastMessageElement;
 	}
-	
+
 	public Object fromOMElement(OMElement element) throws OMException {
-		OMElement lastMessagePart = element.getFirstChildWithName( 
-				new QName (Constants.WSRM.NS_URI_RM,Constants.WSRM.LAST_MSG));
-		if (lastMessagePart==null)
-			throw new OMException ("The passed element does not contain a Last Message part");
-		
-		lastMessageElement = SOAPAbstractFactory.getSOAPFactory(Constants.DEFAULT_SOAP_VERSION).createOMElement(
-				Constants.WSRM.LAST_MSG,lastMsgNamespace);
-		
+		OMElement lastMessagePart = element.getFirstChildWithName(new QName(
+				Constants.WSRM.NS_URI_RM, Constants.WSRM.LAST_MSG));
+		if (lastMessagePart == null)
+			throw new OMException(
+					"The passed element does not contain a Last Message part");
+
+		lastMessageElement = SOAPAbstractFactory.getSOAPFactory(
+				Constants.DEFAULT_SOAP_VERSION).createOMElement(
+				Constants.WSRM.LAST_MSG, lastMsgNamespace);
+
 		return this;
 	}
 
-	
 	public OMElement toOMElement(OMElement sequenceElement) throws OMException {
 		//soapheaderblock element will be given
-		if(lastMessageElement==null)
-			throw new OMException ("Cant set last message element. It is null");
-		
+		if (lastMessageElement == null)
+			throw new OMException("Cant set last message element. It is null");
+
 		sequenceElement.addChild(lastMessageElement);
-		
-		lastMessageElement = SOAPAbstractFactory.getSOAPFactory(Constants.DEFAULT_SOAP_VERSION).createOMElement(
-				Constants.WSRM.LAST_MSG,lastMsgNamespace);
-		
+
+		lastMessageElement = SOAPAbstractFactory.getSOAPFactory(
+				Constants.DEFAULT_SOAP_VERSION).createOMElement(
+				Constants.WSRM.LAST_MSG, lastMsgNamespace);
+
 		return sequenceElement;
 	}
-	
-	public void setLastMessageElement(OMElement lastMsgElement){
+
+	public void setLastMessageElement(OMElement lastMsgElement) {
 		lastMessageElement = lastMsgElement;
 	}
-	
-	public OMElement getLastMessageElement(){
+
+	public OMElement getLastMessageElement() {
 		return lastMessageElement;
 	}
-	
-	public boolean isPresent(){
-		return (lastMessageElement != null) ? true:false;
+
+	public boolean isPresent() {
+		return (lastMessageElement != null) ? true : false;
 	}
-}
+}
\ No newline at end of file

Modified: webservices/sandesha/trunk/src/org/apache/sandesha2/wsrm/RMElements.java
URL: http://svn.apache.org/viewcvs/webservices/sandesha/trunk/src/org/apache/sandesha2/wsrm/RMElements.java?rev=291067&r1=291066&r2=291067&view=diff
==============================================================================
--- webservices/sandesha/trunk/src/org/apache/sandesha2/wsrm/RMElements.java (original)
+++ webservices/sandesha/trunk/src/org/apache/sandesha2/wsrm/RMElements.java Thu Sep 22 20:52:54 2005
@@ -35,121 +35,140 @@
  * @author sanka
  */
 
-public class RMElements{
-	
+public class RMElements {
+
 	private Sequence sequence = null;
+
 	private SequenceAcknowledgement sequenceAcknowledgement = null;
+
 	private CreateSequence createSequence = null;
+
 	private CreateSequenceResponse createSequenceResponse = null;
+
 	private TerminateSequence terminateSequence = null;
+
 	private AckRequested ackRequested = null;
-	
+
 	public void fromSOAPEnvelope(SOAPEnvelope envelope) {
-		
-		if (envelope==null)
-			throw new OMException ("The passed envelope is null");
-		
+
+		if (envelope == null)
+			throw new OMException("The passed envelope is null");
+
 		OMElement sequenceElement = envelope.getHeader().getFirstChildWithName(
-				new QName (Constants.WSRM.NS_URI_RM,Constants.WSRM.SEQUENCE));
-		if (sequenceElement!=null) {
-			sequence = new Sequence ();
+				new QName(Constants.WSRM.NS_URI_RM, Constants.WSRM.SEQUENCE));
+		if (sequenceElement != null) {
+			sequence = new Sequence();
 			sequence.fromOMElement(envelope.getHeader());
 		}
-		
-		OMElement sequenceAckElement = envelope.getHeader().getFirstChildWithName(
-				new QName (Constants.WSRM.NS_URI_RM,Constants.WSRM.SEQUENCE_ACK));
-		if (sequenceAckElement!=null) {
-			sequenceAcknowledgement  = new SequenceAcknowledgement ();
+
+		OMElement sequenceAckElement = envelope.getHeader()
+				.getFirstChildWithName(
+						new QName(Constants.WSRM.NS_URI_RM,
+								Constants.WSRM.SEQUENCE_ACK));
+		if (sequenceAckElement != null) {
+			sequenceAcknowledgement = new SequenceAcknowledgement();
 			sequence.fromOMElement(envelope.getHeader());
 		}
-		
+
 		OMElement createSeqElement = envelope.getBody().getFirstChildWithName(
-				new QName (Constants.WSRM.NS_URI_RM,Constants.WSRM.CREATE_SEQUENCE));
-		if (createSeqElement!=null) {
-			createSequence  = new CreateSequence ();
+				new QName(Constants.WSRM.NS_URI_RM,
+						Constants.WSRM.CREATE_SEQUENCE));
+		if (createSeqElement != null) {
+			createSequence = new CreateSequence();
 			createSequence.fromOMElement(envelope.getBody());
 		}
-		
-		OMElement createSeqResElement = envelope.getBody().getFirstChildWithName(
-				new QName (Constants.WSRM.NS_URI_RM,Constants.WSRM.CREATE_SEQUENCE_RESPONSE));
-		if (createSeqResElement!=null) {
-			createSequenceResponse  = new CreateSequenceResponse ();
+
+		OMElement createSeqResElement = envelope.getBody()
+				.getFirstChildWithName(
+						new QName(Constants.WSRM.NS_URI_RM,
+								Constants.WSRM.CREATE_SEQUENCE_RESPONSE));
+		if (createSeqResElement != null) {
+			createSequenceResponse = new CreateSequenceResponse();
 			createSequenceResponse.fromOMElement(envelope.getBody());
 		}
-		
-		OMElement terminateSeqElement = envelope.getBody().getFirstChildWithName(
-				new QName (Constants.WSRM.NS_URI_RM,Constants.WSRM.TERMINATE_SEQUENCE));
-		if (terminateSeqElement!=null) {
-			terminateSequence = new TerminateSequence ();
+
+		OMElement terminateSeqElement = envelope.getBody()
+				.getFirstChildWithName(
+						new QName(Constants.WSRM.NS_URI_RM,
+								Constants.WSRM.TERMINATE_SEQUENCE));
+		if (terminateSeqElement != null) {
+			terminateSequence = new TerminateSequence();
 			terminateSequence.fromOMElement(envelope.getBody());
 		}
-		
-		OMElement ackRequestedElement = envelope.getHeader().getFirstChildWithName(
-				new QName (Constants.WSRM.NS_URI_RM,Constants.WSRM.ACK_REQUESTED));
-		if (ackRequestedElement!=null) {
-			ackRequested = new AckRequested ();
+
+		OMElement ackRequestedElement = envelope.getHeader()
+				.getFirstChildWithName(
+						new QName(Constants.WSRM.NS_URI_RM,
+								Constants.WSRM.ACK_REQUESTED));
+		if (ackRequestedElement != null) {
+			ackRequested = new AckRequested();
 			ackRequested.fromOMElement(envelope.getHeader());
-		}	
+		}
 	}
 
-	public SOAPEnvelope toSOAPEnvelope(SOAPEnvelope envelope)  {
-		if(sequence != null){
+	public SOAPEnvelope toSOAPEnvelope(SOAPEnvelope envelope) {
+		if (sequence != null) {
 			sequence.toOMElement(envelope.getHeader());
 		}
-		if ( sequenceAcknowledgement != null) {
+		if (sequenceAcknowledgement != null) {
 			sequenceAcknowledgement.toOMElement(envelope.getHeader());
 		}
-		if ( createSequence != null){
+		if (createSequence != null) {
 			createSequence.toOMElement(envelope.getBody());
 		}
-		if (createSequenceResponse != null){
+		if (createSequenceResponse != null) {
 			createSequenceResponse.toOMElement(envelope.getBody());
 		}
-		if (terminateSequence != null){
+		if (terminateSequence != null) {
 			terminateSequence.toOMElement(envelope.getBody());
 		}
-		if (ackRequested != null){
+		if (ackRequested != null) {
 			ackRequested.toOMElement(envelope.getBody());
 		}
 		return envelope;
 	}
-	
-	public CreateSequence getCreateSequence(){
+
+	public CreateSequence getCreateSequence() {
 		return createSequence;
 	}
-	public CreateSequenceResponse getCreateSequenceResponse(){
+
+	public CreateSequenceResponse getCreateSequenceResponse() {
 		return createSequenceResponse;
 	}
-	public Sequence getSequence(){
+
+	public Sequence getSequence() {
 		return sequence;
 	}
-	public SequenceAcknowledgement getSequenceAcknowledgement(){
+
+	public SequenceAcknowledgement getSequenceAcknowledgement() {
 		return sequenceAcknowledgement;
 	}
-	public TerminateSequence getTerminateSequence(){
+
+	public TerminateSequence getTerminateSequence() {
 		return terminateSequence;
 	}
-	
-	public void setCreateSequence(CreateSequence createSequence){
+
+	public void setCreateSequence(CreateSequence createSequence) {
 		this.createSequence = createSequence;
 	}
-	
-	public void setCreateSequenceResponse(CreateSequenceResponse createSequenceResponse){
+
+	public void setCreateSequenceResponse(
+			CreateSequenceResponse createSequenceResponse) {
 		this.createSequenceResponse = createSequenceResponse;
 	}
-	
-	public void setSequence(Sequence sequence){
+
+	public void setSequence(Sequence sequence) {
 		this.sequence = sequence;
 	}
-	
-	public void setSequenceAcknowledgement(SequenceAcknowledgement sequenceAcknowledgement){
+
+	public void setSequenceAcknowledgement(
+			SequenceAcknowledgement sequenceAcknowledgement) {
 		this.sequenceAcknowledgement = sequenceAcknowledgement;
 	}
-	
-	public void setTerminateSequence(TerminateSequence terminateSequence){
+
+	public void setTerminateSequence(TerminateSequence terminateSequence) {
 		this.terminateSequence = terminateSequence;
 	}
-	
 
 	public AckRequested getAckRequested() {
 		return ackRequested;
@@ -158,4 +177,4 @@
 	public void setAckRequested(AckRequested ackRequested) {
 		this.ackRequested = ackRequested;
 	}
-}
+}
\ No newline at end of file

Modified: webservices/sandesha/trunk/src/org/apache/sandesha2/wsrm/Sequence.java
URL: http://svn.apache.org/viewcvs/webservices/sandesha/trunk/src/org/apache/sandesha2/wsrm/Sequence.java?rev=291067&r1=291066&r2=291067&view=diff
==============================================================================
--- webservices/sandesha/trunk/src/org/apache/sandesha2/wsrm/Sequence.java (original)
+++ webservices/sandesha/trunk/src/org/apache/sandesha2/wsrm/Sequence.java Thu Sep 22 20:52:54 2005
@@ -37,114 +37,131 @@
  * @author sanka
  */
 
-
 public class Sequence implements IOMRMPart {
 
 	private OMElement sequenceElement;
-	
+
 	private Identifier identifier;
+
 	private MessageNumber messageNumber;
+
 	private LastMessage lastMessage = null;
-	
-	OMNamespace seqNoNamespace =
-		SOAPAbstractFactory.getSOAPFactory(Constants.DEFAULT_SOAP_VERSION).createOMNamespace(Constants.WSRM.NS_URI_RM, Constants.WSRM.NS_PREFIX_RM);
-	
-	public Sequence(){
-		sequenceElement = SOAPAbstractFactory.getSOAPFactory(Constants.DEFAULT_SOAP_VERSION)
-						.createOMElement(Constants.WSRM.SEQUENCE,seqNoNamespace);
+
+	OMNamespace seqNoNamespace = SOAPAbstractFactory.getSOAPFactory(
+			Constants.DEFAULT_SOAP_VERSION).createOMNamespace(
+			Constants.WSRM.NS_URI_RM, Constants.WSRM.NS_PREFIX_RM);
+
+	public Sequence() {
+		sequenceElement = SOAPAbstractFactory.getSOAPFactory(
+				Constants.DEFAULT_SOAP_VERSION).createOMElement(
+				Constants.WSRM.SEQUENCE, seqNoNamespace);
 	}
-	
+
 	public OMElement getOMElement() throws OMException {
 		return sequenceElement;
 	}
 
 	public Object fromOMElement(OMElement headerElement) throws OMException {
-		
+
 		SOAPHeader header = (SOAPHeader) headerElement;
-		if (header==null)
-			throw new OMException ("Sequence element cannot be added to non-header element");
-		
-		OMElement sequencePart = sequenceElement=headerElement.getFirstChildWithName(
-				new QName (Constants.WSRM.NS_URI_RM,Constants.WSRM.SEQUENCE));
-		if (sequencePart==null)
-			throw new OMException ("Cannot find Sequence element in the given element");
-		
-		sequenceElement = SOAPAbstractFactory.getSOAPFactory(Constants.DEFAULT_SOAP_VERSION)
-							.createOMElement(Constants.WSRM.SEQUENCE,seqNoNamespace);
-		
+		if (header == null)
+			throw new OMException(
+					"Sequence element cannot be added to non-header element");
+
+		OMElement sequencePart = sequenceElement = headerElement
+				.getFirstChildWithName(new QName(Constants.WSRM.NS_URI_RM,
+						Constants.WSRM.SEQUENCE));
+		if (sequencePart == null)
+			throw new OMException(
+					"Cannot find Sequence element in the given element");
+
+		sequenceElement = SOAPAbstractFactory.getSOAPFactory(
+				Constants.DEFAULT_SOAP_VERSION).createOMElement(
+				Constants.WSRM.SEQUENCE, seqNoNamespace);
+
 		identifier = new Identifier();
 		messageNumber = new MessageNumber();
 		identifier.fromOMElement(sequencePart);
 		messageNumber.fromOMElement(sequencePart);
 
-		OMElement lastMessageElement = sequencePart.getFirstChildWithName(
-				new QName (Constants.WSRM.NS_URI_RM,Constants.WSRM.LAST_MSG));
-		
-		if (lastMessageElement!=null){
-			lastMessage = new LastMessage(); 
+		OMElement lastMessageElement = sequencePart
+				.getFirstChildWithName(new QName(Constants.WSRM.NS_URI_RM,
+						Constants.WSRM.LAST_MSG));
+
+		if (lastMessageElement != null) {
+			lastMessage = new LastMessage();
 			lastMessage.fromOMElement(sequencePart);
 		}
-		
+
 		return this;
 	}
-	
+
 	public OMElement toOMElement(OMElement headerElement) throws OMException {
-		
-		if (headerElement==null || !(headerElement instanceof SOAPHeader))
-			throw new OMException ("Cant add Sequence Part to a non-header element");
+
+		if (headerElement == null || !(headerElement instanceof SOAPHeader))
+			throw new OMException(
+					"Cant add Sequence Part to a non-header element");
 
 		SOAPHeader soapHeader = (SOAPHeader) headerElement;
-		if (soapHeader==null)
-			throw new OMException ("cant add the sequence part to a non-header element");
-		if (sequenceElement==null)
-			throw new OMException ("cant add Sequence Part since Sequence is null");
-		if (identifier==null)
-			throw new OMException ("Cant add Sequence part since identifier is null");
-		if (messageNumber==null)
-			throw new OMException ("Cant add Sequence part since MessageNumber is null");
-		
-		
-        identifier.toOMElement(sequenceElement);
-        messageNumber.toOMElement(sequenceElement);
-		if (lastMessage != null) 
-            lastMessage.toOMElement (sequenceElement);
+		if (soapHeader == null)
+			throw new OMException(
+					"cant add the sequence part to a non-header element");
+		if (sequenceElement == null)
+			throw new OMException(
+					"cant add Sequence Part since Sequence is null");
+		if (identifier == null)
+			throw new OMException(
+					"Cant add Sequence part since identifier is null");
+		if (messageNumber == null)
+			throw new OMException(
+					"Cant add Sequence part since MessageNumber is null");
+
+		identifier.toOMElement(sequenceElement);
+		messageNumber.toOMElement(sequenceElement);
+		if (lastMessage != null)
+			lastMessage.toOMElement(sequenceElement);
 
 		SOAPHeaderBlock soapHeaderBlock = soapHeader.addHeaderBlock(
-				Constants.WSRM.SEQUENCE,seqNoNamespace);
+				Constants.WSRM.SEQUENCE, seqNoNamespace);
 		soapHeaderBlock.setMustUnderstand(true);
 		soapHeaderBlock.addChild(sequenceElement);
-		
-		//resetting the element. So that subsequest toOMElement calls will attach a different object.
-		sequenceElement = SOAPAbstractFactory.getSOAPFactory(Constants.DEFAULT_SOAP_VERSION)
-							.createOMElement(Constants.WSRM.SEQUENCE,seqNoNamespace); 
-		
+
+		//resetting the element. So that subsequest toOMElement calls will
+		// attach a different object.
+		sequenceElement = SOAPAbstractFactory.getSOAPFactory(
+				Constants.DEFAULT_SOAP_VERSION).createOMElement(
+				Constants.WSRM.SEQUENCE, seqNoNamespace);
+
 		return headerElement;
 	}
-	
-	
-	public Identifier getIdentifier(){
+
+	public Identifier getIdentifier() {
 		return identifier;
 	}
-	public LastMessage getLastMessage(){
+
+	public LastMessage getLastMessage() {
 		return lastMessage;
 	}
-	public MessageNumber getMessageNumber(){
+
+	public MessageNumber getMessageNumber() {
 		return messageNumber;
 	}
-	public void setIdentifier(Identifier identifier){
+
+	public void setIdentifier(Identifier identifier) {
 		this.identifier = identifier;
 	}
-	public void setLastMessage(LastMessage lastMessage){
+
+	public void setLastMessage(LastMessage lastMessage) {
 		this.lastMessage = lastMessage;
 	}
-	public void setMessageNumber(MessageNumber messageNumber){
+
+	public void setMessageNumber(MessageNumber messageNumber) {
 		this.messageNumber = messageNumber;
 	}
-	
+
 	public void toSOAPEnvelope(SOAPEnvelope envelope) {
 		SOAPHeader header = envelope.getHeader();
 		toOMElement(header);
 	}
-	
 
-}
+}
\ No newline at end of file

Modified: webservices/sandesha/trunk/src/org/apache/sandesha2/wsrm/SequenceAcknowledgement.java
URL: http://svn.apache.org/viewcvs/webservices/sandesha/trunk/src/org/apache/sandesha2/wsrm/SequenceAcknowledgement.java?rev=291067&r1=291066&r2=291067&view=diff
==============================================================================
--- webservices/sandesha/trunk/src/org/apache/sandesha2/wsrm/SequenceAcknowledgement.java (original)
+++ webservices/sandesha/trunk/src/org/apache/sandesha2/wsrm/SequenceAcknowledgement.java Thu Sep 22 20:52:54 2005
@@ -43,143 +43,151 @@
 
 public class SequenceAcknowledgement implements IOMRMPart {
 	private OMElement sequenceAcknowledgementElement;
+
 	private Identifier identifier;
+
 	private List acknowledgementRangeList;
+
 	private List nackList;
-	
-	OMNamespace rmNamespace =
-		SOAPAbstractFactory.getSOAPFactory(Constants.DEFAULT_SOAP_VERSION).createOMNamespace(Constants.WSRM.NS_URI_RM, Constants.WSRM.NS_PREFIX_RM);
-	
-	public SequenceAcknowledgement(){
-		sequenceAcknowledgementElement = SOAPAbstractFactory.getSOAPFactory(Constants.DEFAULT_SOAP_VERSION).createOMElement(
-				Constants.WSRM.SEQUENCE_ACK,rmNamespace);
+
+	OMNamespace rmNamespace = SOAPAbstractFactory.getSOAPFactory(
+			Constants.DEFAULT_SOAP_VERSION).createOMNamespace(
+			Constants.WSRM.NS_URI_RM, Constants.WSRM.NS_PREFIX_RM);
+
+	public SequenceAcknowledgement() {
+		sequenceAcknowledgementElement = SOAPAbstractFactory.getSOAPFactory(
+				Constants.DEFAULT_SOAP_VERSION).createOMElement(
+				Constants.WSRM.SEQUENCE_ACK, rmNamespace);
 		acknowledgementRangeList = new LinkedList();
 		nackList = new LinkedList();
 	}
-	
+
 	public OMElement getOMElement() throws OMException {
 		return sequenceAcknowledgementElement;
 	}
 
 	public Object fromOMElement(OMElement element) throws OMException {
-		
 
-		
-		if (element==null || !(element instanceof SOAPHeader)) 
-			throw new OMException ("Cant get sequence acknowlegement from a non-header element");
-		
+		if (element == null || !(element instanceof SOAPHeader))
+			throw new OMException(
+					"Cant get sequence acknowlegement from a non-header element");
+
 		SOAPHeader header = (SOAPHeader) element;
-		OMElement sequenceAckPart = header.getFirstChildWithName(
-				new QName (Constants.WSRM.NS_URI_RM,Constants.WSRM.SEQUENCE_ACK));
-		
-		if (sequenceAckPart==null)
-			throw new OMException ("The passed element does not contain a seqence ackknowledgement Part");
-		
+		OMElement sequenceAckPart = header.getFirstChildWithName(new QName(
+				Constants.WSRM.NS_URI_RM, Constants.WSRM.SEQUENCE_ACK));
 
-		
-		identifier = new Identifier ();
+		if (sequenceAckPart == null)
+			throw new OMException(
+					"The passed element does not contain a seqence ackknowledgement Part");
+
+		identifier = new Identifier();
 		identifier.fromOMElement(sequenceAckPart);
-		
 
-		Iterator ackRangeParts = sequenceAckPart.getChildrenWithName(
-				new QName (Constants.WSRM.NS_URI_RM,Constants.WSRM.ACK_RANGE));
-		
+		Iterator ackRangeParts = sequenceAckPart.getChildrenWithName(new QName(
+				Constants.WSRM.NS_URI_RM, Constants.WSRM.ACK_RANGE));
+
 		while (ackRangeParts.hasNext()) {
-			OMElement ackRangePart = (OMElement) ackRangeParts.next();	
-			
-			AcknowledgementRange ackRange = new AcknowledgementRange ();
-			ackRange.fromOMElement (ackRangePart);
+			OMElement ackRangePart = (OMElement) ackRangeParts.next();
+
+			AcknowledgementRange ackRange = new AcknowledgementRange();
+			ackRange.fromOMElement(ackRangePart);
 			acknowledgementRangeList.add(ackRange);
 		}
-		
-		Iterator nackParts = sequenceAckPart.getChildrenWithName(
-				new QName (Constants.WSRM.NS_URI_RM,Constants.WSRM.NACK));
-		
+
+		Iterator nackParts = sequenceAckPart.getChildrenWithName(new QName(
+				Constants.WSRM.NS_URI_RM, Constants.WSRM.NACK));
+
 		while (nackParts.hasNext()) {
-			OMElement nackPart = (OMElement) nackParts.next();	
-			Nack nack = new Nack ();
-			nack.fromOMElement (nackPart);
+			OMElement nackPart = (OMElement) nackParts.next();
+			Nack nack = new Nack();
+			nack.fromOMElement(nackPart);
 			nackList.add(nack);
 		}
-		
-		sequenceAcknowledgementElement = SOAPAbstractFactory.getSOAPFactory(Constants.DEFAULT_SOAP_VERSION).createOMElement(
-				Constants.WSRM.SEQUENCE_ACK,rmNamespace);
-		
+
+		sequenceAcknowledgementElement = SOAPAbstractFactory.getSOAPFactory(
+				Constants.DEFAULT_SOAP_VERSION).createOMElement(
+				Constants.WSRM.SEQUENCE_ACK, rmNamespace);
+
 		return this;
 	}
 
 	public OMElement toOMElement(OMElement header) throws OMException {
-		
-		if (header==null || !(header instanceof SOAPHeader))
-			throw new OMException ();
-		
+
+		if (header == null || !(header instanceof SOAPHeader))
+			throw new OMException();
+
 		SOAPHeader SOAPHeader = (SOAPHeader) header;
-		
-		if (sequenceAcknowledgementElement==null)
-			throw new OMException ("Cant set sequence acknowledgement since the element is null");
-		
-		if (identifier==null)
-			throw new OMException ("Cant set the sequence since Identifier is null");
-		
+
+		if (sequenceAcknowledgementElement == null)
+			throw new OMException(
+					"Cant set sequence acknowledgement since the element is null");
+
+		if (identifier == null)
+			throw new OMException(
+					"Cant set the sequence since Identifier is null");
+
 		identifier.toOMElement(sequenceAcknowledgementElement);
-		
+
 		Iterator ackRangeIt = acknowledgementRangeList.iterator();
 		while (ackRangeIt.hasNext()) {
-			AcknowledgementRange ackRange = (AcknowledgementRange) ackRangeIt.next();
-			ackRange.toOMElement (sequenceAcknowledgementElement);
+			AcknowledgementRange ackRange = (AcknowledgementRange) ackRangeIt
+					.next();
+			ackRange.toOMElement(sequenceAcknowledgementElement);
 		}
-		
+
 		Iterator nackIt = nackList.iterator();
 		while (nackIt.hasNext()) {
 			Nack nack = (Nack) nackIt.next();
-			nack.toOMElement (sequenceAcknowledgementElement);
+			nack.toOMElement(sequenceAcknowledgementElement);
 		}
-		
+
 		SOAPHeader.addChild(sequenceAcknowledgementElement);
-		
-		sequenceAcknowledgementElement = SOAPAbstractFactory.getSOAPFactory(Constants.DEFAULT_SOAP_VERSION).createOMElement(
-				Constants.WSRM.SEQUENCE_ACK,rmNamespace);
-		
+
+		sequenceAcknowledgementElement = SOAPAbstractFactory.getSOAPFactory(
+				Constants.DEFAULT_SOAP_VERSION).createOMElement(
+				Constants.WSRM.SEQUENCE_ACK, rmNamespace);
+
 		return header;
 	}
-	
-	public void setIdentifier(Identifier identifier){
+
+	public void setIdentifier(Identifier identifier) {
 		this.identifier = identifier;
 	}
-	
-	public void setAckRanges(List acknowledgementRagngesList){
+
+	public void setAckRanges(List acknowledgementRagngesList) {
 		acknowledgementRangeList = acknowledgementRagngesList;
 	}
-	
-	public Nack addNackRangges(Nack nack){
+
+	public Nack addNackRangges(Nack nack) {
 		nackList.add(nack);
 		return nack;
 	}
-	
-	public AcknowledgementRange addAcknowledgementRanges(AcknowledgementRange ackRange){
+
+	public AcknowledgementRange addAcknowledgementRanges(
+			AcknowledgementRange ackRange) {
 		acknowledgementRangeList.add(ackRange);
 		return ackRange;
 	}
-	
-	public Identifier getIdentifier(){
+
+	public Identifier getIdentifier() {
 		return identifier;
 	}
-	
-	public List getAcknowledgementRanges(){
+
+	public List getAcknowledgementRanges() {
 		return acknowledgementRangeList;
 	}
-	
-	public List getNackList(){
+
+	public List getNackList() {
 		return nackList;
 	}
-	
-	public void addChildElement(OMElement element){
+
+	public void addChildElement(OMElement element) {
 		acknowledgementRangeList.add(element);
 	}
-	
+
 	public void toSOAPEnvelope(SOAPEnvelope envelope) {
 		SOAPHeader header = envelope.getHeader();
 		toOMElement(header);
 	}
 
-}
+}
\ No newline at end of file

Modified: webservices/sandesha/trunk/src/org/apache/sandesha2/wsrm/SequenceFault.java
URL: http://svn.apache.org/viewcvs/webservices/sandesha/trunk/src/org/apache/sandesha2/wsrm/SequenceFault.java?rev=291067&r1=291066&r2=291067&view=diff
==============================================================================
--- webservices/sandesha/trunk/src/org/apache/sandesha2/wsrm/SequenceFault.java (original)
+++ webservices/sandesha/trunk/src/org/apache/sandesha2/wsrm/SequenceFault.java Thu Sep 22 20:52:54 2005
@@ -40,78 +40,89 @@
 
 public class SequenceFault implements IOMRMElement {
 	private OMElement sequenceFaultElement;
+
 	private FaultCode faultCode;
-	
-	OMNamespace rmNamespace = 
-		SOAPAbstractFactory.getSOAPFactory(Constants.DEFAULT_SOAP_VERSION).createOMNamespace(
-				Constants.WSRM.NS_URI_RM, Constants.WSRM.NS_PREFIX_RM);
-	
-	public SequenceFault(){
-		sequenceFaultElement = SOAPAbstractFactory.getSOAPFactory(Constants.DEFAULT_SOAP_VERSION).createOMElement(
-				Constants.WSRM.SEQUENCE_FAULT,rmNamespace);
+
+	OMNamespace rmNamespace = SOAPAbstractFactory.getSOAPFactory(
+			Constants.DEFAULT_SOAP_VERSION).createOMNamespace(
+			Constants.WSRM.NS_URI_RM, Constants.WSRM.NS_PREFIX_RM);
+
+	public SequenceFault() {
+		sequenceFaultElement = SOAPAbstractFactory.getSOAPFactory(
+				Constants.DEFAULT_SOAP_VERSION).createOMElement(
+				Constants.WSRM.SEQUENCE_FAULT, rmNamespace);
 	}
-	
+
 	public OMElement getOMElement() throws OMException {
 		return sequenceFaultElement;
 	}
 
 	public Object fromOMElement(OMElement body) throws OMException {
-		
-		if (body==null || !(body instanceof SOAPBody))
-			throw new OMException ("Cant get Sequence Fault part from a non-header element");
-		
-		OMElement sequenceFaultPart = body.getFirstChildWithName( 
-				new QName (Constants.WSRM.NS_URI_RM,Constants.WSRM.SEQUENCE_FAULT));
-		
-		if (sequenceFaultPart==null)
-			throw new OMException ("The passed element does not contain a Sequence Fault element");
-		
-		OMElement faultCodePart = sequenceFaultPart.getFirstChildWithName( 
-				new QName (Constants.WSRM.NS_URI_RM,Constants.WSRM.FAULT_CODE));
-		
-		if (faultCodePart!=null) {
-		    faultCode = new FaultCode ();
-		    faultCode.fromOMElement(sequenceFaultPart);
+
+		if (body == null || !(body instanceof SOAPBody))
+			throw new OMException(
+					"Cant get Sequence Fault part from a non-header element");
+
+		OMElement sequenceFaultPart = body.getFirstChildWithName(new QName(
+				Constants.WSRM.NS_URI_RM, Constants.WSRM.SEQUENCE_FAULT));
+
+		if (sequenceFaultPart == null)
+			throw new OMException(
+					"The passed element does not contain a Sequence Fault element");
+
+		OMElement faultCodePart = sequenceFaultPart
+				.getFirstChildWithName(new QName(Constants.WSRM.NS_URI_RM,
+						Constants.WSRM.FAULT_CODE));
+
+		if (faultCodePart != null) {
+			faultCode = new FaultCode();
+			faultCode.fromOMElement(sequenceFaultPart);
 		}
-		
-		sequenceFaultElement = SOAPAbstractFactory.getSOAPFactory(Constants.DEFAULT_SOAP_VERSION).createOMElement(
-				Constants.WSRM.SEQUENCE_FAULT,rmNamespace);
-		
+
+		sequenceFaultElement = SOAPAbstractFactory.getSOAPFactory(
+				Constants.DEFAULT_SOAP_VERSION).createOMElement(
+				Constants.WSRM.SEQUENCE_FAULT, rmNamespace);
+
 		return this;
-		
+
 	}
 
 	public OMElement toOMElement(OMElement body) throws OMException {
 
-		if (body==null || !(body instanceof SOAPBody))
-			throw new OMException ("Cant get Sequence Fault part from a non-header element");
+		if (body == null || !(body instanceof SOAPBody))
+			throw new OMException(
+					"Cant get Sequence Fault part from a non-header element");
+
+		if (sequenceFaultElement == null)
+			throw new OMException(
+					"Cant add the sequnce fault since the internal element is null");
 
-		if (sequenceFaultElement==null)
-			throw new OMException ("Cant add the sequnce fault since the internal element is null");
-		
-		if (faultCode!=null) 
+		if (faultCode != null)
 			faultCode.toOMElement(sequenceFaultElement);
-		
+
 		body.addChild(sequenceFaultElement);
 
-		sequenceFaultElement = SOAPAbstractFactory.getSOAPFactory(Constants.DEFAULT_SOAP_VERSION).createOMElement(
-				Constants.WSRM.SEQUENCE_FAULT,rmNamespace);
-		
+		sequenceFaultElement = SOAPAbstractFactory.getSOAPFactory(
+				Constants.DEFAULT_SOAP_VERSION).createOMElement(
+				Constants.WSRM.SEQUENCE_FAULT, rmNamespace);
+
 		return body;
 	}
-	
-	public void setFaultCode(FaultCode faultCode){
+
+	public void setFaultCode(FaultCode faultCode) {
 		this.faultCode = faultCode;
 	}
-	
-	public FaultCode getFaultCode(){
+
+	public FaultCode getFaultCode() {
 		return faultCode;
 	}
-	public void setSequenceFaultElement(OMElement sequenceFault){
+
+	public void setSequenceFaultElement(OMElement sequenceFault) {
 		sequenceFaultElement = sequenceFault;
 	}
-	public OMElement getSequenceFaultElement(){
+
+	public OMElement getSequenceFaultElement() {
 		return sequenceFaultElement;
 	}
 
-}
+}
\ No newline at end of file

Modified: webservices/sandesha/trunk/src/org/apache/sandesha2/wsrm/SequenceOffer.java
URL: http://svn.apache.org/viewcvs/webservices/sandesha/trunk/src/org/apache/sandesha2/wsrm/SequenceOffer.java?rev=291067&r1=291066&r2=291067&view=diff
==============================================================================
--- webservices/sandesha/trunk/src/org/apache/sandesha2/wsrm/SequenceOffer.java (original)
+++ webservices/sandesha/trunk/src/org/apache/sandesha2/wsrm/SequenceOffer.java Thu Sep 22 20:52:54 2005
@@ -34,72 +34,82 @@
 
 public class SequenceOffer implements IOMRMElement {
 	private OMElement sequenceOfferElement;
-	private Identifier identifier=null;
-	private Expires expires=null;
-	
-	OMNamespace rmNamespace = 
-		SOAPAbstractFactory.getSOAPFactory(Constants.DEFAULT_SOAP_VERSION).createOMNamespace(
-				Constants.WSRM.NS_URI_RM, Constants.WSRM.NS_PREFIX_RM);
-	
-	public SequenceOffer(){
-		sequenceOfferElement = SOAPAbstractFactory.getSOAPFactory(Constants.DEFAULT_SOAP_VERSION)
-									.createOMElement(Constants.WSRM.SEQUENCE_OFFER,rmNamespace);
+
+	private Identifier identifier = null;
+
+	private Expires expires = null;
+
+	OMNamespace rmNamespace = SOAPAbstractFactory.getSOAPFactory(
+			Constants.DEFAULT_SOAP_VERSION).createOMNamespace(
+			Constants.WSRM.NS_URI_RM, Constants.WSRM.NS_PREFIX_RM);
+
+	public SequenceOffer() {
+		sequenceOfferElement = SOAPAbstractFactory.getSOAPFactory(
+				Constants.DEFAULT_SOAP_VERSION).createOMElement(
+				Constants.WSRM.SEQUENCE_OFFER, rmNamespace);
 	}
-	
+
 	public OMElement getOMElement() throws OMException {
 		return sequenceOfferElement;
 	}
 
-	public Object fromOMElement(OMElement createSequenceElement) throws OMException {
-		OMElement sequenceOfferPart = createSequenceElement.getFirstChildWithName(
-				new QName (Constants.WSRM.NS_URI_RM,Constants.WSRM.SEQUENCE_OFFER));
-		if (sequenceOfferPart==null)
-			throw new OMException("The passed element does not contain a SequenceOffer part");
-		
-		sequenceOfferElement = SOAPAbstractFactory.getSOAPFactory(Constants.DEFAULT_SOAP_VERSION).createOMElement( 
-									Constants.WSRM.SEQUENCE_OFFER,rmNamespace);
-		
+	public Object fromOMElement(OMElement createSequenceElement)
+			throws OMException {
+		OMElement sequenceOfferPart = createSequenceElement
+				.getFirstChildWithName(new QName(Constants.WSRM.NS_URI_RM,
+						Constants.WSRM.SEQUENCE_OFFER));
+		if (sequenceOfferPart == null)
+			throw new OMException(
+					"The passed element does not contain a SequenceOffer part");
+
+		sequenceOfferElement = SOAPAbstractFactory.getSOAPFactory(
+				Constants.DEFAULT_SOAP_VERSION).createOMElement(
+				Constants.WSRM.SEQUENCE_OFFER, rmNamespace);
+
 		identifier = new Identifier();
 		identifier.fromOMElement(sequenceOfferPart);
-		
-		OMElement expiresPart = sequenceOfferPart.getFirstChildWithName(
-				new QName (Constants.WSRM.NS_URI_RM,Constants.WSRM.EXPIRES));
-		if(expiresPart!=null){
-			expires = new Expires ();
+
+		OMElement expiresPart = sequenceOfferPart
+				.getFirstChildWithName(new QName(Constants.WSRM.NS_URI_RM,
+						Constants.WSRM.EXPIRES));
+		if (expiresPart != null) {
+			expires = new Expires();
 			expires.fromOMElement(sequenceOfferElement);
 		}
-		
+
 		return this;
 	}
 
-	public OMElement toOMElement(OMElement createSequenceElement) throws OMException {
-		if(sequenceOfferElement==null)
-			throw new OMException ("Cant set sequnceoffer. Offer element is null");
-		if (identifier==null)
-			throw new OMException ("Cant set sequnceOffer since identifier is null");
-
-		
-	    identifier.toOMElement(sequenceOfferElement);
-	    
-		if(expires!=null) {
+	public OMElement toOMElement(OMElement createSequenceElement)
+			throws OMException {
+		if (sequenceOfferElement == null)
+			throw new OMException(
+					"Cant set sequnceoffer. Offer element is null");
+		if (identifier == null)
+			throw new OMException(
+					"Cant set sequnceOffer since identifier is null");
+
+		identifier.toOMElement(sequenceOfferElement);
+
+		if (expires != null) {
 			expires.toOMElement(sequenceOfferElement);
 		}
-		
+
 		createSequenceElement.addChild(sequenceOfferElement);
-			
-		sequenceOfferElement = SOAPAbstractFactory.getSOAPFactory(Constants.DEFAULT_SOAP_VERSION).createOMElement(
-									Constants.WSRM.SEQUENCE_OFFER,rmNamespace);
-		
+
+		sequenceOfferElement = SOAPAbstractFactory.getSOAPFactory(
+				Constants.DEFAULT_SOAP_VERSION).createOMElement(
+				Constants.WSRM.SEQUENCE_OFFER, rmNamespace);
+
 		return createSequenceElement;
 	}
-	
-	public Identifier getIdentifer(){
+
+	public Identifier getIdentifer() {
 		return identifier;
 	}
-	
-	public void setIdentifier(Identifier identifier){
-		this.identifier = identifier;		
+
+	public void setIdentifier(Identifier identifier) {
+		this.identifier = identifier;
 	}
-	
 
-}
+}
\ No newline at end of file

Modified: webservices/sandesha/trunk/src/org/apache/sandesha2/wsrm/TerminateSequence.java
URL: http://svn.apache.org/viewcvs/webservices/sandesha/trunk/src/org/apache/sandesha2/wsrm/TerminateSequence.java?rev=291067&r1=291066&r2=291067&view=diff
==============================================================================
--- webservices/sandesha/trunk/src/org/apache/sandesha2/wsrm/TerminateSequence.java (original)
+++ webservices/sandesha/trunk/src/org/apache/sandesha2/wsrm/TerminateSequence.java Thu Sep 22 20:52:54 2005
@@ -34,69 +34,77 @@
  */
 
 public class TerminateSequence implements IOMRMPart {
-    
+
 	private OMElement terminateSequenceElement;
+
 	private Identifier identifier;
-	
-	OMNamespace rmNameSpace = 
-		SOAPAbstractFactory.getSOAPFactory(Constants.DEFAULT_SOAP_VERSION).createOMNamespace(
-				Constants.WSRM.NS_URI_RM, Constants.WSRM.NS_PREFIX_RM);
-	
-	public TerminateSequence(){
-		terminateSequenceElement = SOAPAbstractFactory.getSOAPFactory(Constants.DEFAULT_SOAP_VERSION)
-									.createOMElement(Constants.WSRM.TERMINATE_SEQUENCE,rmNameSpace);
+
+	OMNamespace rmNameSpace = SOAPAbstractFactory.getSOAPFactory(
+			Constants.DEFAULT_SOAP_VERSION).createOMNamespace(
+			Constants.WSRM.NS_URI_RM, Constants.WSRM.NS_PREFIX_RM);
+
+	public TerminateSequence() {
+		terminateSequenceElement = SOAPAbstractFactory.getSOAPFactory(
+				Constants.DEFAULT_SOAP_VERSION).createOMElement(
+				Constants.WSRM.TERMINATE_SEQUENCE, rmNameSpace);
 	}
-	
+
 	public OMElement getOMElement() throws OMException {
 		return terminateSequenceElement;
 	}
-	
+
 	public Object fromOMElement(OMElement body) throws OMException {
-	    
-	    if (!(body instanceof SOAPBody))
-	        throw new OMException ("Cant add terminate sequence to a non body element");
-	    
-	    OMElement terminateSeqPart = body.getFirstChildWithName(
-	            new QName (Constants.WSRM.NS_URI_RM,Constants.WSRM.TERMINATE_SEQUENCE));
-	    
-	    if (terminateSeqPart==null)
-	        throw new OMException ("passed element does not contain a terminate sequence part");
-	    
+
+		if (!(body instanceof SOAPBody))
+			throw new OMException(
+					"Cant add terminate sequence to a non body element");
+
+		OMElement terminateSeqPart = body.getFirstChildWithName(new QName(
+				Constants.WSRM.NS_URI_RM, Constants.WSRM.TERMINATE_SEQUENCE));
+
+		if (terminateSeqPart == null)
+			throw new OMException(
+					"passed element does not contain a terminate sequence part");
+
 		identifier = new Identifier();
 		identifier.fromOMElement(terminateSeqPart);
-		
-		terminateSequenceElement = SOAPAbstractFactory.getSOAPFactory(Constants.DEFAULT_SOAP_VERSION)
-									.createOMElement(Constants.WSRM.TERMINATE_SEQUENCE,rmNameSpace);
-		
+
+		terminateSequenceElement = SOAPAbstractFactory.getSOAPFactory(
+				Constants.DEFAULT_SOAP_VERSION).createOMElement(
+				Constants.WSRM.TERMINATE_SEQUENCE, rmNameSpace);
+
 		return this;
 	}
-	
+
 	public OMElement toOMElement(OMElement body) throws OMException {
-	    
-	    if (body==null || !(body instanceof SOAPBody))
-	        throw new OMException ("Cant add terminate sequence to a nonbody element");
-
-	    if (terminateSequenceElement==null)
-	        throw new OMException ("Cant add terminate sequnce since the internal element is null");
-	    
-	    if (identifier==null)
-	        throw new OMException ("Cant add terminate sequence since identifier is not set");
-	    
-		
+
+		if (body == null || !(body instanceof SOAPBody))
+			throw new OMException(
+					"Cant add terminate sequence to a nonbody element");
+
+		if (terminateSequenceElement == null)
+			throw new OMException(
+					"Cant add terminate sequnce since the internal element is null");
+
+		if (identifier == null)
+			throw new OMException(
+					"Cant add terminate sequence since identifier is not set");
+
 		identifier.toOMElement(terminateSequenceElement);
 		body.addChild(terminateSequenceElement);
-		
-		terminateSequenceElement = SOAPAbstractFactory.getSOAPFactory(Constants.DEFAULT_SOAP_VERSION)
-							.createOMElement(Constants.WSRM.TERMINATE_SEQUENCE,rmNameSpace);
+
+		terminateSequenceElement = SOAPAbstractFactory.getSOAPFactory(
+				Constants.DEFAULT_SOAP_VERSION).createOMElement(
+				Constants.WSRM.TERMINATE_SEQUENCE, rmNameSpace);
 
 		return body;
 	}
-	
-	public Identifier getIdentifier(){
+
+	public Identifier getIdentifier() {
 		return identifier;
 	}
-	
-	public void setIdentifier(Identifier identifier){
+
+	public void setIdentifier(Identifier identifier) {
 		this.identifier = identifier;
 	}
 
@@ -104,4 +112,4 @@
 		SOAPBody body = envelope.getBody();
 		toOMElement(body);
 	}
-}
+}
\ No newline at end of file



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