ws-sandesha-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chamik...@apache.org
Subject svn commit: r331136 [2/2] - in /webservices/sandesha/trunk/src/org/apache/sandesha2: ./ handlers/ msgprocessors/ policy/ storage/inmemory/ util/ workers/ wsrm/
Date Sun, 06 Nov 2005 18:59:29 GMT
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=331136&r1=331135&r2=331136&view=diff
==============================================================================
--- webservices/sandesha/trunk/src/org/apache/sandesha2/wsrm/SequenceFault.java (original)
+++ webservices/sandesha/trunk/src/org/apache/sandesha2/wsrm/SequenceFault.java Sun Nov  6
10:57:13 2005
@@ -22,6 +22,7 @@
 import org.apache.axis2.om.OMException;
 import org.apache.axis2.om.OMNamespace;
 import org.apache.axis2.soap.SOAPBody;
+import org.apache.axis2.soap.SOAPFactory;
 import org.apache.sandesha2.Constants;
 import org.apache.sandesha2.util.SOAPAbstractFactory;
 
@@ -35,14 +36,16 @@
 	private OMElement sequenceFaultElement;
 
 	private FaultCode faultCode;
+	
+	SOAPFactory factory;
 
-	OMNamespace rmNamespace = SOAPAbstractFactory.getSOAPFactory(
-			Constants.SOAPVersion.DEFAULT).createOMNamespace(
-			Constants.WSRM.NS_URI_RM, Constants.WSRM.NS_PREFIX_RM);
-
-	public SequenceFault() {
-		sequenceFaultElement = SOAPAbstractFactory.getSOAPFactory(
-				Constants.SOAPVersion.DEFAULT).createOMElement(
+	OMNamespace rmNamespace = null;
+
+	public SequenceFault(SOAPFactory factory) {
+		this.factory = factory;
+		rmNamespace = factory.createOMNamespace(
+				Constants.WSRM.NS_URI_RM, Constants.WSRM.NS_PREFIX_RM);
+		sequenceFaultElement = factory.createOMElement(
 				Constants.WSRM.SEQUENCE_FAULT, rmNamespace);
 	}
 
@@ -68,12 +71,11 @@
 						Constants.WSRM.FAULT_CODE));
 
 		if (faultCodePart != null) {
-			faultCode = new FaultCode();
+			faultCode = new FaultCode(factory);
 			faultCode.fromOMElement(sequenceFaultPart);
 		}
 
-		sequenceFaultElement = SOAPAbstractFactory.getSOAPFactory(
-				Constants.SOAPVersion.DEFAULT).createOMElement(
+		sequenceFaultElement = factory.createOMElement(
 				Constants.WSRM.SEQUENCE_FAULT, rmNamespace);
 
 		return this;
@@ -95,8 +97,7 @@
 
 		body.addChild(sequenceFaultElement);
 
-		sequenceFaultElement = SOAPAbstractFactory.getSOAPFactory(
-				Constants.SOAPVersion.DEFAULT).createOMElement(
+		sequenceFaultElement = factory.createOMElement(
 				Constants.WSRM.SEQUENCE_FAULT, rmNamespace);
 
 		return body;

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=331136&r1=331135&r2=331136&view=diff
==============================================================================
--- webservices/sandesha/trunk/src/org/apache/sandesha2/wsrm/SequenceOffer.java (original)
+++ webservices/sandesha/trunk/src/org/apache/sandesha2/wsrm/SequenceOffer.java Sun Nov  6
10:57:13 2005
@@ -21,6 +21,7 @@
 import org.apache.axis2.om.OMElement;
 import org.apache.axis2.om.OMException;
 import org.apache.axis2.om.OMNamespace;
+import org.apache.axis2.soap.SOAPFactory;
 import org.apache.sandesha2.Constants;
 import org.apache.sandesha2.util.SOAPAbstractFactory;
 
@@ -36,14 +37,16 @@
 	private Identifier identifier = null;
 
 	private Expires expires = null;
+	
+	SOAPFactory factory;
 
-	OMNamespace rmNamespace = SOAPAbstractFactory.getSOAPFactory(
-			Constants.SOAPVersion.DEFAULT).createOMNamespace(
-			Constants.WSRM.NS_URI_RM, Constants.WSRM.NS_PREFIX_RM);
-
-	public SequenceOffer() {
-		sequenceOfferElement = SOAPAbstractFactory.getSOAPFactory(
-				Constants.SOAPVersion.DEFAULT).createOMElement(
+	OMNamespace rmNamespace = null; 
+
+	public SequenceOffer(SOAPFactory factory) {
+		this.factory = factory;
+		rmNamespace = factory.createOMNamespace(
+				Constants.WSRM.NS_URI_RM, Constants.WSRM.NS_PREFIX_RM);
+		sequenceOfferElement = factory.createOMElement(
 				Constants.WSRM.SEQUENCE_OFFER, rmNamespace);
 	}
 
@@ -60,18 +63,17 @@
 			throw new OMException(
 					"The passed element does not contain a SequenceOffer part");
 
-		sequenceOfferElement = SOAPAbstractFactory.getSOAPFactory(
-				Constants.SOAPVersion.DEFAULT).createOMElement(
+		sequenceOfferElement = factory.createOMElement(
 				Constants.WSRM.SEQUENCE_OFFER, rmNamespace);
 
-		identifier = new Identifier();
+		identifier = new Identifier(factory);
 		identifier.fromOMElement(sequenceOfferPart);
 
 		OMElement expiresPart = sequenceOfferPart
 				.getFirstChildWithName(new QName(Constants.WSRM.NS_URI_RM,
 						Constants.WSRM.EXPIRES));
 		if (expiresPart != null) {
-			expires = new Expires();
+			expires = new Expires(factory);
 			expires.fromOMElement(sequenceOfferElement);
 		}
 
@@ -95,8 +97,7 @@
 
 		createSequenceElement.addChild(sequenceOfferElement);
 
-		sequenceOfferElement = SOAPAbstractFactory.getSOAPFactory(
-				Constants.SOAPVersion.DEFAULT).createOMElement(
+		sequenceOfferElement = factory.createOMElement(
 				Constants.WSRM.SEQUENCE_OFFER, rmNamespace);
 
 		return createSequenceElement;

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=331136&r1=331135&r2=331136&view=diff
==============================================================================
--- webservices/sandesha/trunk/src/org/apache/sandesha2/wsrm/TerminateSequence.java (original)
+++ webservices/sandesha/trunk/src/org/apache/sandesha2/wsrm/TerminateSequence.java Sun Nov
 6 10:57:13 2005
@@ -23,6 +23,7 @@
 import org.apache.axis2.om.OMNamespace;
 import org.apache.axis2.soap.SOAPBody;
 import org.apache.axis2.soap.SOAPEnvelope;
+import org.apache.axis2.soap.SOAPFactory;
 import org.apache.sandesha2.Constants;
 import org.apache.sandesha2.util.SOAPAbstractFactory;
 
@@ -38,13 +39,15 @@
 
 	private Identifier identifier;
 
-	OMNamespace rmNameSpace = SOAPAbstractFactory.getSOAPFactory(
-			Constants.SOAPVersion.DEFAULT).createOMNamespace(
-			Constants.WSRM.NS_URI_RM, Constants.WSRM.NS_PREFIX_RM);
-
-	public TerminateSequence() {
-		terminateSequenceElement = SOAPAbstractFactory.getSOAPFactory(
-				Constants.SOAPVersion.DEFAULT).createOMElement(
+	OMNamespace rmNameSpace = null;
+	
+	SOAPFactory factory;
+
+	public TerminateSequence(SOAPFactory factory) {
+		this.factory = factory;
+		rmNameSpace = factory.createOMNamespace(
+				Constants.WSRM.NS_URI_RM, Constants.WSRM.NS_PREFIX_RM);
+		terminateSequenceElement = factory.createOMElement(
 				Constants.WSRM.TERMINATE_SEQUENCE, rmNameSpace);
 	}
 
@@ -65,11 +68,10 @@
 			throw new OMException(
 					"passed element does not contain a terminate sequence part");
 
-		identifier = new Identifier();
+		identifier = new Identifier(factory);
 		identifier.fromOMElement(terminateSeqPart);
 
-		terminateSequenceElement = SOAPAbstractFactory.getSOAPFactory(
-				Constants.SOAPVersion.DEFAULT).createOMElement(
+		terminateSequenceElement = factory.createOMElement(
 				Constants.WSRM.TERMINATE_SEQUENCE, rmNameSpace);
 
 		return this;
@@ -92,8 +94,7 @@
 		identifier.toOMElement(terminateSequenceElement);
 		body.addChild(terminateSequenceElement);
 
-		terminateSequenceElement = SOAPAbstractFactory.getSOAPFactory(
-				Constants.SOAPVersion.DEFAULT).createOMElement(
+		terminateSequenceElement = factory.createOMElement(
 				Constants.WSRM.TERMINATE_SEQUENCE, rmNameSpace);
 
 		return body;



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