You are viewing a plain text version of this content. The canonical link for it is here.
Posted to sandesha-dev@ws.apache.org by ch...@apache.org on 2006/05/08 05:14:25 UTC
svn commit: r404901 - in
/webservices/sandesha/trunk/src/org/apache/sandesha2: ./ client/ handlers/
msgprocessors/ policy/ util/ wsrm/
Author: chamikara
Date: Sun May 7 20:14:22 2006
New Revision: 404901
URL: http://svn.apache.org/viewcvs?rev=404901&view=rev
Log:
Changed the Spec selection property to V1_0 and v1_1 (instead of WSRM and WSRX)
A minor bug fix.
Modified:
webservices/sandesha/trunk/src/org/apache/sandesha2/RMMsgContext.java
webservices/sandesha/trunk/src/org/apache/sandesha2/Sandesha2Constants.java
webservices/sandesha/trunk/src/org/apache/sandesha2/client/SandeshaClient.java
webservices/sandesha/trunk/src/org/apache/sandesha2/handlers/SandeshaOutHandler.java
webservices/sandesha/trunk/src/org/apache/sandesha2/msgprocessors/AcknowledgementProcessor.java
webservices/sandesha/trunk/src/org/apache/sandesha2/msgprocessors/ApplicationMsgProcessor.java
webservices/sandesha/trunk/src/org/apache/sandesha2/msgprocessors/CreateSeqMsgProcessor.java
webservices/sandesha/trunk/src/org/apache/sandesha2/policy/RMPolicyProcessor.java
webservices/sandesha/trunk/src/org/apache/sandesha2/util/AcknowledgementManager.java
webservices/sandesha/trunk/src/org/apache/sandesha2/util/MsgInitializer.java
webservices/sandesha/trunk/src/org/apache/sandesha2/util/RMMsgCreator.java
webservices/sandesha/trunk/src/org/apache/sandesha2/util/SOAPFaultEnvelopeCreator.java
webservices/sandesha/trunk/src/org/apache/sandesha2/util/SandeshaUtil.java
webservices/sandesha/trunk/src/org/apache/sandesha2/util/SequenceManager.java
webservices/sandesha/trunk/src/org/apache/sandesha2/util/SpecSpecificConstants.java
webservices/sandesha/trunk/src/org/apache/sandesha2/wsrm/RMElements.java
Modified: webservices/sandesha/trunk/src/org/apache/sandesha2/RMMsgContext.java
URL: http://svn.apache.org/viewcvs/webservices/sandesha/trunk/src/org/apache/sandesha2/RMMsgContext.java?rev=404901&r1=404900&r2=404901&view=diff
==============================================================================
--- webservices/sandesha/trunk/src/org/apache/sandesha2/RMMsgContext.java (original)
+++ webservices/sandesha/trunk/src/org/apache/sandesha2/RMMsgContext.java Sun May 7 20:14:22 2006
@@ -254,9 +254,9 @@
this.rmNamespaceValue = rmNamespaceValue;
if (Sandesha2Constants.SPEC_2005_02.NS_URI.equals(rmNamespaceValue)) {
- rmSpecVersion = Sandesha2Constants.SPEC_VERSIONS.WSRM;
+ rmSpecVersion = Sandesha2Constants.SPEC_VERSIONS.v1_0;
} else if (Sandesha2Constants.SPEC_2005_10.NS_URI.equals(rmNamespaceValue)) {
- rmSpecVersion = Sandesha2Constants.SPEC_VERSIONS.WSRX;
+ rmSpecVersion = Sandesha2Constants.SPEC_VERSIONS.v1_1;
}
}
Modified: webservices/sandesha/trunk/src/org/apache/sandesha2/Sandesha2Constants.java
URL: http://svn.apache.org/viewcvs/webservices/sandesha/trunk/src/org/apache/sandesha2/Sandesha2Constants.java?rev=404901&r1=404900&r2=404901&view=diff
==============================================================================
--- webservices/sandesha/trunk/src/org/apache/sandesha2/Sandesha2Constants.java (original)
+++ webservices/sandesha/trunk/src/org/apache/sandesha2/Sandesha2Constants.java Sun May 7 20:14:22 2006
@@ -32,8 +32,8 @@
public interface SPEC_VERSIONS {
- String WSRM = "Spec_2005_02";
- String WSRX = "Spec_2005_10";
+ String v1_0 = "Spec_2005_02";
+ String v1_1 = "Spec_2005_10";
}
public interface SPEC_2005_02 {
Modified: webservices/sandesha/trunk/src/org/apache/sandesha2/client/SandeshaClient.java
URL: http://svn.apache.org/viewcvs/webservices/sandesha/trunk/src/org/apache/sandesha2/client/SandeshaClient.java?rev=404901&r1=404900&r2=404901&view=diff
==============================================================================
--- webservices/sandesha/trunk/src/org/apache/sandesha2/client/SandeshaClient.java (original)
+++ webservices/sandesha/trunk/src/org/apache/sandesha2/client/SandeshaClient.java Sun May 7 20:14:22 2006
@@ -528,10 +528,10 @@
String rmSpecVersion = (String) options.getProperty(SandeshaClientConstants.RM_SPEC_VERSION);
if (rmSpecVersion==null)
- rmSpecVersion = Sandesha2Constants.SPEC_VERSIONS.WSRM;
+ rmSpecVersion = Sandesha2Constants.SPEC_VERSIONS.v1_0;
- if (Sandesha2Constants.SPEC_VERSIONS.WSRM.equals(rmSpecVersion)) {
- throw new SandeshaException ("Empty AckRequest messages can only be sent with the WSRX spec");
+ if (Sandesha2Constants.SPEC_VERSIONS.v1_0.equals(rmSpecVersion)) {
+ throw new SandeshaException ("Empty AckRequest messages can only be sent with the v1_1 spec");
}
String internalSequenceID = getInternalSequenceID(to,sequenceKey);
Modified: webservices/sandesha/trunk/src/org/apache/sandesha2/handlers/SandeshaOutHandler.java
URL: http://svn.apache.org/viewcvs/webservices/sandesha/trunk/src/org/apache/sandesha2/handlers/SandeshaOutHandler.java?rev=404901&r1=404900&r2=404901&view=diff
==============================================================================
--- webservices/sandesha/trunk/src/org/apache/sandesha2/handlers/SandeshaOutHandler.java (original)
+++ webservices/sandesha/trunk/src/org/apache/sandesha2/handlers/SandeshaOutHandler.java Sun May 7 20:14:22 2006
@@ -20,6 +20,7 @@
import javax.xml.namespace.QName;
import org.apache.axis2.AxisFault;
+import org.apache.axis2.addressing.AddressingConstants;
import org.apache.axis2.context.ConfigurationContext;
import org.apache.axis2.context.MessageContext;
import org.apache.axis2.context.OperationContextFactory;
@@ -63,7 +64,7 @@
log.debug(message);
throw new AxisFault(message);
}
-
+
// getting rm message
RMMsgContext rmMsgCtx = MsgInitializer.initializeMessage(msgCtx);
Modified: webservices/sandesha/trunk/src/org/apache/sandesha2/msgprocessors/AcknowledgementProcessor.java
URL: http://svn.apache.org/viewcvs/webservices/sandesha/trunk/src/org/apache/sandesha2/msgprocessors/AcknowledgementProcessor.java?rev=404901&r1=404900&r2=404901&view=diff
==============================================================================
--- webservices/sandesha/trunk/src/org/apache/sandesha2/msgprocessors/AcknowledgementProcessor.java (original)
+++ webservices/sandesha/trunk/src/org/apache/sandesha2/msgprocessors/AcknowledgementProcessor.java Sun May 7 20:14:22 2006
@@ -147,7 +147,7 @@
rmMsgCtx.getMessageContext()
.setProperty(Sandesha2Constants.ACK_PROCSSED, "true");
- //Removing relatesTo - Some WSRM endpoints tend to set relatesTo value for ack messages.
+ //Removing relatesTo - Some v1_0 endpoints tend to set relatesTo value for ack messages.
//Because of this dispatching may go wrong. So we set relatesTo value to null for ackMessages.
//(this happens in the SandeshaGlobal handler). Do this only if this is a standalone ACK.
// if (rmMsgCtx.getMessageType() == Sandesha2Constants.MessageTypes.ACK)
Modified: webservices/sandesha/trunk/src/org/apache/sandesha2/msgprocessors/ApplicationMsgProcessor.java
URL: http://svn.apache.org/viewcvs/webservices/sandesha/trunk/src/org/apache/sandesha2/msgprocessors/ApplicationMsgProcessor.java?rev=404901&r1=404900&r2=404901&view=diff
==============================================================================
--- webservices/sandesha/trunk/src/org/apache/sandesha2/msgprocessors/ApplicationMsgProcessor.java (original)
+++ webservices/sandesha/trunk/src/org/apache/sandesha2/msgprocessors/ApplicationMsgProcessor.java Sun May 7 20:14:22 2006
@@ -611,7 +611,7 @@
}
if (specVersion==null)
- specVersion = SpecSpecificConstants.getDefaultSpecVersion(); //TODO change the default to WSRX.
+ specVersion = SpecSpecificConstants.getDefaultSpecVersion(); //TODO change the default to v1_1.
if (messageNumber == 1) {
if (outSeqBean == null) { // out sequence will be set for the server side, in the case of an offer.
Modified: webservices/sandesha/trunk/src/org/apache/sandesha2/msgprocessors/CreateSeqMsgProcessor.java
URL: http://svn.apache.org/viewcvs/webservices/sandesha/trunk/src/org/apache/sandesha2/msgprocessors/CreateSeqMsgProcessor.java?rev=404901&r1=404900&r2=404901&view=diff
==============================================================================
--- webservices/sandesha/trunk/src/org/apache/sandesha2/msgprocessors/CreateSeqMsgProcessor.java (original)
+++ webservices/sandesha/trunk/src/org/apache/sandesha2/msgprocessors/CreateSeqMsgProcessor.java Sun May 7 20:14:22 2006
@@ -20,6 +20,7 @@
import java.util.Collection;
import org.apache.axis2.AxisFault;
+import org.apache.axis2.addressing.AddressingConstants;
import org.apache.axis2.addressing.EndpointReference;
import org.apache.axis2.context.ConfigurationContext;
import org.apache.axis2.context.MessageContext;
Modified: webservices/sandesha/trunk/src/org/apache/sandesha2/policy/RMPolicyProcessor.java
URL: http://svn.apache.org/viewcvs/webservices/sandesha/trunk/src/org/apache/sandesha2/policy/RMPolicyProcessor.java?rev=404901&r1=404900&r2=404901&view=diff
==============================================================================
--- webservices/sandesha/trunk/src/org/apache/sandesha2/policy/RMPolicyProcessor.java (original)
+++ webservices/sandesha/trunk/src/org/apache/sandesha2/policy/RMPolicyProcessor.java Sun May 7 20:14:22 2006
@@ -157,7 +157,7 @@
}
/*
* We need to pick only the primitive assertions which contain a
- * WSRM policy assertion. For that we'll check the namespace of
+ * v1_0 policy assertion. For that we'll check the namespace of
* the primitive assertion
*/
PrimitiveAssertion pa = (PrimitiveAssertion) assertion;
Modified: webservices/sandesha/trunk/src/org/apache/sandesha2/util/AcknowledgementManager.java
URL: http://svn.apache.org/viewcvs/webservices/sandesha/trunk/src/org/apache/sandesha2/util/AcknowledgementManager.java?rev=404901&r1=404900&r2=404901&view=diff
==============================================================================
--- webservices/sandesha/trunk/src/org/apache/sandesha2/util/AcknowledgementManager.java (original)
+++ webservices/sandesha/trunk/src/org/apache/sandesha2/util/AcknowledgementManager.java Sun May 7 20:14:22 2006
@@ -257,6 +257,8 @@
String addressingNamespaceURI = SandeshaUtil.getSequenceProperty(sequenceID,Sandesha2Constants.SequenceProperties.ADDRESSING_NAMESPACE_VALUE,configurationContext);
String anonymousURI = SpecSpecificConstants.getAddressingAnonymousURI(addressingNamespaceURI);
+ ackMsgCtx.setProperty(AddressingConstants.WS_ADDRESSING_VERSION,addressingNamespaceURI);
+
if (anonymousURI.equals(acksTo.getAddress())) {
// AxisEngine engine = new AxisEngine(ackRMMsgCtx.getMessageContext()
Modified: webservices/sandesha/trunk/src/org/apache/sandesha2/util/MsgInitializer.java
URL: http://svn.apache.org/viewcvs/webservices/sandesha/trunk/src/org/apache/sandesha2/util/MsgInitializer.java?rev=404901&r1=404900&r2=404901&view=diff
==============================================================================
--- webservices/sandesha/trunk/src/org/apache/sandesha2/util/MsgInitializer.java (original)
+++ webservices/sandesha/trunk/src/org/apache/sandesha2/util/MsgInitializer.java Sun May 7 20:14:22 2006
@@ -23,6 +23,7 @@
import org.apache.sandesha2.RMMsgContext;
import org.apache.sandesha2.Sandesha2Constants;
import org.apache.sandesha2.SandeshaException;
+import org.apache.sandesha2.Sandesha2Constants.WSA;
import org.apache.sandesha2.storage.StorageManager;
import org.apache.sandesha2.storage.beanmanagers.SequencePropertyBeanMgr;
import org.apache.sandesha2.storage.beans.SequencePropertyBean;
@@ -76,8 +77,11 @@
private static void populateRMMsgContext(MessageContext msgCtx,
RMMsgContext rmMsgContext) throws SandeshaException {
+ //if client side and the addressing version is not set. assuming the default addressing version
String addressingNamespace = (String) msgCtx.getProperty(AddressingConstants.WS_ADDRESSING_VERSION);
-
+ if (addressingNamespace==null && !msgCtx.isServerSide())
+ addressingNamespace = AddressingConstants.Final.WSA_NAMESPACE;
+
RMElements elements = new RMElements(addressingNamespace);
elements.fromSOAPEnvelope(msgCtx.getEnvelope(), msgCtx.getWSAAction());
Modified: webservices/sandesha/trunk/src/org/apache/sandesha2/util/RMMsgCreator.java
URL: http://svn.apache.org/viewcvs/webservices/sandesha/trunk/src/org/apache/sandesha2/util/RMMsgCreator.java?rev=404901&r1=404900&r2=404901&view=diff
==============================================================================
--- webservices/sandesha/trunk/src/org/apache/sandesha2/util/RMMsgCreator.java (original)
+++ webservices/sandesha/trunk/src/org/apache/sandesha2/util/RMMsgCreator.java Sun May 7 20:14:22 2006
@@ -26,6 +26,7 @@
import org.apache.axiom.soap.SOAPEnvelope;
import org.apache.axiom.soap.SOAPFactory;
import org.apache.axis2.AxisFault;
+import org.apache.axis2.addressing.AddressingConstants;
import org.apache.axis2.addressing.EndpointReference;
import org.apache.axis2.client.Options;
import org.apache.axis2.context.ConfigurationContext;
@@ -508,7 +509,8 @@
response.toOMElement(envelope.getBody());
outMessage.setWSAAction(SpecSpecificConstants.getCreateSequenceResponseAction(SandeshaUtil.getRMVersion(newSequenceID,configurationContext)));
outMessage.setSoapAction(SpecSpecificConstants.getCreateSequenceResponseSOAPAction(SandeshaUtil.getRMVersion(newSequenceID,configurationContext)));
-
+ outMessage.setProperty(AddressingConstants.WS_ADDRESSING_VERSION,addressingNamespaceValue);
+
String newMessageId = SandeshaUtil.getUUID();
outMessage.setMessageID(newMessageId);
@@ -520,7 +522,7 @@
try {
createSeqResponse = MsgInitializer.initializeMessage(outMessage);
} catch (SandeshaException ex) {
- throw new AxisFault("Cant initialize the message");
+ throw new AxisFault("Cant initialize the message",ex);
}
createSeqResponse.setMessagePart(Sandesha2Constants.MessageParts.CREATE_SEQ_RESPONSE,response);
Modified: webservices/sandesha/trunk/src/org/apache/sandesha2/util/SOAPFaultEnvelopeCreator.java
URL: http://svn.apache.org/viewcvs/webservices/sandesha/trunk/src/org/apache/sandesha2/util/SOAPFaultEnvelopeCreator.java?rev=404901&r1=404900&r2=404901&view=diff
==============================================================================
--- webservices/sandesha/trunk/src/org/apache/sandesha2/util/SOAPFaultEnvelopeCreator.java (original)
+++ webservices/sandesha/trunk/src/org/apache/sandesha2/util/SOAPFaultEnvelopeCreator.java Sun May 7 20:14:22 2006
@@ -29,9 +29,12 @@
import org.apache.axiom.soap.SOAPFaultSubCode;
import org.apache.axiom.soap.SOAPFaultText;
import org.apache.axiom.soap.SOAPFaultValue;
+import org.apache.axiom.soap.impl.dom.soap11.SOAP11Factory;
+import org.apache.axiom.soap.impl.dom.soap12.SOAP12Factory;
import org.apache.axis2.AxisFault;
import org.apache.axis2.addressing.AddressingConstants;
import org.apache.axis2.context.MessageContext;
+import org.apache.axis2.databinding.ADBSOAPModelBuilder.Envelope;
import org.apache.sandesha2.FaultData;
import org.apache.sandesha2.Sandesha2Constants;
import org.apache.sandesha2.SandeshaException;
@@ -153,7 +156,11 @@
faultReason.setText(data.getReason());
faultCode.getValue().setText(data.getSubcode());
- faultReason.getSOAPFaultText("en").setText(data.getReason());
+ SOAPFaultText faultText = faultReason.getSOAPFaultText("en");
+ if (faultText==null)
+ faultText = factory.createSOAPFaultText();
+
+ faultText.setText(data.getReason());
//SequenceFault header is added only for SOAP 1.1
if (isSequenceFault(data))
@@ -195,7 +202,13 @@
SOAPFaultReason faultReason = fault.getReason();
SOAPFaultText faultText = faultReason.getSOAPFaultText("en");
- faultText.setText(data.getReason());
+
+ if (faultText==null) {
+ faultText = factory.createSOAPFaultText();
+ }
+
+ if (data!=null && data.getReason()!=null)
+ faultText.setText(data.getReason());
SOAPFaultDetail faultDetail = fault.getDetail();
Modified: webservices/sandesha/trunk/src/org/apache/sandesha2/util/SandeshaUtil.java
URL: http://svn.apache.org/viewcvs/webservices/sandesha/trunk/src/org/apache/sandesha2/util/SandeshaUtil.java?rev=404901&r1=404900&r2=404901&view=diff
==============================================================================
--- webservices/sandesha/trunk/src/org/apache/sandesha2/util/SandeshaUtil.java (original)
+++ webservices/sandesha/trunk/src/org/apache/sandesha2/util/SandeshaUtil.java Sun May 7 20:14:22 2006
@@ -453,8 +453,15 @@
if (referenceMessage.getAxisServiceGroup() != null) {
newMessageContext.setAxisServiceGroup(referenceMessage.getAxisServiceGroup());
- newMessageContext.setServiceGroupContext(referenceMessage.getServiceGroupContext());
- newMessageContext.setServiceGroupContextId(referenceMessage.getServiceGroupContextId());
+
+ if (referenceMessage.getServiceGroupContext()!=null) {
+ newMessageContext.setServiceGroupContext(referenceMessage.getServiceGroupContext());
+ newMessageContext.setServiceGroupContextId(referenceMessage.getServiceGroupContextId());
+ } else {
+ ServiceGroupContext serviceGroupContext = new ServiceGroupContext (
+ configContext,referenceMessage.getAxisServiceGroup());
+ newMessageContext.setServiceGroupContext(serviceGroupContext);
+ }
} else {
AxisServiceGroup axisServiceGroup = new AxisServiceGroup(axisConfiguration);
ServiceGroupContext serviceGroupContext = new ServiceGroupContext(configContext, axisServiceGroup);
@@ -463,10 +470,16 @@
newMessageContext.setServiceGroupContext(serviceGroupContext);
}
- if (referenceMessage.getServiceContext() != null) {
+ if (referenceMessage.getAxisService() != null) {
newMessageContext.setAxisService(referenceMessage.getAxisService());
- newMessageContext.setServiceContext(referenceMessage.getServiceContext());
- newMessageContext.setServiceContextID(referenceMessage.getServiceContextID());
+
+ if (referenceMessage.getServiceContext()!=null) {
+ newMessageContext.setServiceContext(referenceMessage.getServiceContext());
+ newMessageContext.setServiceContextID(referenceMessage.getServiceContextID());
+ } else {
+ ServiceContext serviceContext = new ServiceContext (referenceMessage.getAxisService(),newMessageContext.getServiceGroupContext());
+ newMessageContext.setServiceContext(serviceContext);
+ }
} else {
AxisService axisService = new AxisService("AnonymousRMService");
Modified: webservices/sandesha/trunk/src/org/apache/sandesha2/util/SequenceManager.java
URL: http://svn.apache.org/viewcvs/webservices/sandesha/trunk/src/org/apache/sandesha2/util/SequenceManager.java?rev=404901&r1=404900&r2=404901&view=diff
==============================================================================
--- webservices/sandesha/trunk/src/org/apache/sandesha2/util/SequenceManager.java (original)
+++ webservices/sandesha/trunk/src/org/apache/sandesha2/util/SequenceManager.java Sun May 7 20:14:22 2006
@@ -142,9 +142,9 @@
String specVersion = null;
if (Sandesha2Constants.SPEC_2005_02.NS_URI.equals(messageRMNamespace)) {
- specVersion = Sandesha2Constants.SPEC_VERSIONS.WSRM;
+ specVersion = Sandesha2Constants.SPEC_VERSIONS.v1_0;
}else if (Sandesha2Constants.SPEC_2005_10.NS_URI.equals(messageRMNamespace)) {
- specVersion = Sandesha2Constants.SPEC_VERSIONS.WSRX;
+ specVersion = Sandesha2Constants.SPEC_VERSIONS.v1_1;
} else {
throw new SandeshaException ("Create sequence message does not has a valid RM namespace value. Cant decide the RM version");
}
Modified: webservices/sandesha/trunk/src/org/apache/sandesha2/util/SpecSpecificConstants.java
URL: http://svn.apache.org/viewcvs/webservices/sandesha/trunk/src/org/apache/sandesha2/util/SpecSpecificConstants.java?rev=404901&r1=404900&r2=404901&view=diff
==============================================================================
--- webservices/sandesha/trunk/src/org/apache/sandesha2/util/SpecSpecificConstants.java (original)
+++ webservices/sandesha/trunk/src/org/apache/sandesha2/util/SpecSpecificConstants.java Sun May 7 20:14:22 2006
@@ -10,191 +10,191 @@
public static String getSpecVersionString (String namespaceValue) throws SandeshaException {
if (Sandesha2Constants.SPEC_2005_02.NS_URI.equals(namespaceValue))
- return Sandesha2Constants.SPEC_VERSIONS.WSRM;
+ return Sandesha2Constants.SPEC_VERSIONS.v1_0;
else if (Sandesha2Constants.SPEC_2005_10.NS_URI.equals(namespaceValue))
- return Sandesha2Constants.SPEC_VERSIONS.WSRX;
+ return Sandesha2Constants.SPEC_VERSIONS.v1_1;
else
throw new SandeshaException ("Unknows rm namespace value");
}
public static String getRMNamespaceValue (String specVersion) throws SandeshaException {
- if (Sandesha2Constants.SPEC_VERSIONS.WSRM.equals(specVersion))
+ if (Sandesha2Constants.SPEC_VERSIONS.v1_0.equals(specVersion))
return Sandesha2Constants.SPEC_2005_02.NS_URI;
- else if (Sandesha2Constants.SPEC_VERSIONS.WSRX.equals(specVersion))
+ else if (Sandesha2Constants.SPEC_VERSIONS.v1_1.equals(specVersion))
return Sandesha2Constants.SPEC_2005_10.NS_URI;
else
throw new SandeshaException (unknownSpecErrorMessage);
}
public static String getCreateSequenceAction (String specVersion) throws SandeshaException {
- if (Sandesha2Constants.SPEC_VERSIONS.WSRM.equals(specVersion))
+ if (Sandesha2Constants.SPEC_VERSIONS.v1_0.equals(specVersion))
return Sandesha2Constants.SPEC_2005_02.Actions.ACTION_CREATE_SEQUENCE;
- else if (Sandesha2Constants.SPEC_VERSIONS.WSRX.equals(specVersion))
+ else if (Sandesha2Constants.SPEC_VERSIONS.v1_1.equals(specVersion))
return Sandesha2Constants.SPEC_2005_10.Actions.ACTION_CREATE_SEQUENCE;
else
throw new SandeshaException (unknownSpecErrorMessage);
}
public static String getCreateSequenceResponseAction (String specVersion) throws SandeshaException {
- if (Sandesha2Constants.SPEC_VERSIONS.WSRM.equals(specVersion))
+ if (Sandesha2Constants.SPEC_VERSIONS.v1_0.equals(specVersion))
return Sandesha2Constants.SPEC_2005_02.Actions.ACTION_CREATE_SEQUENCE_RESPONSE;
- else if (Sandesha2Constants.SPEC_VERSIONS.WSRX.equals(specVersion))
+ else if (Sandesha2Constants.SPEC_VERSIONS.v1_1.equals(specVersion))
return Sandesha2Constants.SPEC_2005_10.Actions.ACTION_CREATE_SEQUENCE_RESPONSE;
else
throw new SandeshaException (unknownSpecErrorMessage);
}
public static String getTerminateSequenceAction (String specVersion) throws SandeshaException {
- if (Sandesha2Constants.SPEC_VERSIONS.WSRM.equals(specVersion))
+ if (Sandesha2Constants.SPEC_VERSIONS.v1_0.equals(specVersion))
return Sandesha2Constants.SPEC_2005_02.Actions.ACTION_TERMINATE_SEQUENCE;
- else if (Sandesha2Constants.SPEC_VERSIONS.WSRX.equals(specVersion))
+ else if (Sandesha2Constants.SPEC_VERSIONS.v1_1.equals(specVersion))
return Sandesha2Constants.SPEC_2005_10.Actions.ACTION_TERMINATE_SEQUENCE;
else
throw new SandeshaException (unknownSpecErrorMessage);
}
public static String getTerminateSequenceResponseAction (String specVersion) throws SandeshaException {
- if (Sandesha2Constants.SPEC_VERSIONS.WSRX.equals(specVersion))
+ if (Sandesha2Constants.SPEC_VERSIONS.v1_1.equals(specVersion))
return Sandesha2Constants.SPEC_2005_10.Actions.ACTION_TERMINATE_SEQUENCE_RESPONSE;
else
throw new SandeshaException (unknownSpecErrorMessage);
}
public static String getCloseSequenceAction (String specVersion) throws SandeshaException {
- if (Sandesha2Constants.SPEC_VERSIONS.WSRM.equals(specVersion))
+ if (Sandesha2Constants.SPEC_VERSIONS.v1_0.equals(specVersion))
throw new SandeshaException ("This rm spec version does not define a sequenceClose action");
- else if (Sandesha2Constants.SPEC_VERSIONS.WSRX.equals(specVersion))
+ else if (Sandesha2Constants.SPEC_VERSIONS.v1_1.equals(specVersion))
return Sandesha2Constants.SPEC_2005_10.Actions.ACTION_CLOSE_SEQUENCE;
else
throw new SandeshaException (unknownSpecErrorMessage);
}
public static String getCloseSequenceResponseAction (String specVersion) throws SandeshaException {
- if (Sandesha2Constants.SPEC_VERSIONS.WSRM.equals(specVersion))
+ if (Sandesha2Constants.SPEC_VERSIONS.v1_0.equals(specVersion))
throw new SandeshaException ("This rm spec version does not define a sequenceClose action");
- else if (Sandesha2Constants.SPEC_VERSIONS.WSRX.equals(specVersion))
+ else if (Sandesha2Constants.SPEC_VERSIONS.v1_1.equals(specVersion))
return Sandesha2Constants.SPEC_2005_10.Actions.ACTION_CLOSE_SEQUENCE_RESPONSE;
else
throw new SandeshaException (unknownSpecErrorMessage);
}
public static String getAckRequestAction (String specVersion) throws SandeshaException {
- if (Sandesha2Constants.SPEC_VERSIONS.WSRM.equals(specVersion))
+ if (Sandesha2Constants.SPEC_VERSIONS.v1_0.equals(specVersion))
throw new SandeshaException ("this spec version does not define a ackRequest action");
- else if (Sandesha2Constants.SPEC_VERSIONS.WSRX.equals(specVersion))
+ else if (Sandesha2Constants.SPEC_VERSIONS.v1_1.equals(specVersion))
return Sandesha2Constants.SPEC_2005_10.Actions.ACTION_ACK_REQUEST;
else
throw new SandeshaException (unknownSpecErrorMessage);
}
public static String getSequenceAcknowledgementAction (String specVersion) throws SandeshaException {
- if (Sandesha2Constants.SPEC_VERSIONS.WSRM.equals(specVersion))
+ if (Sandesha2Constants.SPEC_VERSIONS.v1_0.equals(specVersion))
return Sandesha2Constants.SPEC_2005_02.Actions.ACTION_SEQUENCE_ACKNOWLEDGEMENT;
- else if (Sandesha2Constants.SPEC_VERSIONS.WSRX.equals(specVersion))
+ else if (Sandesha2Constants.SPEC_VERSIONS.v1_1.equals(specVersion))
return Sandesha2Constants.SPEC_2005_10.Actions.ACTION_SEQUENCE_ACKNOWLEDGEMENT;
else
throw new SandeshaException (unknownSpecErrorMessage);
}
public static String getCreateSequenceSOAPAction (String specVersion) throws SandeshaException {
- if (Sandesha2Constants.SPEC_VERSIONS.WSRM.equals(specVersion))
+ if (Sandesha2Constants.SPEC_VERSIONS.v1_0.equals(specVersion))
return Sandesha2Constants.SPEC_2005_02.Actions.SOAP_ACTION_CREATE_SEQUENCE;
- else if (Sandesha2Constants.SPEC_VERSIONS.WSRX.equals(specVersion))
+ else if (Sandesha2Constants.SPEC_VERSIONS.v1_1.equals(specVersion))
return Sandesha2Constants.SPEC_2005_10.Actions.SOAP_ACTION_CREATE_SEQUENCE;
else
throw new SandeshaException (unknownSpecErrorMessage);
}
public static String getCreateSequenceResponseSOAPAction (String specVersion) throws SandeshaException {
- if (Sandesha2Constants.SPEC_VERSIONS.WSRM.equals(specVersion))
+ if (Sandesha2Constants.SPEC_VERSIONS.v1_0.equals(specVersion))
return Sandesha2Constants.SPEC_2005_02.Actions.SOAP_ACTION_CREATE_SEQUENCE_RESPONSE;
- else if (Sandesha2Constants.SPEC_VERSIONS.WSRX.equals(specVersion))
+ else if (Sandesha2Constants.SPEC_VERSIONS.v1_1.equals(specVersion))
return Sandesha2Constants.SPEC_2005_10.Actions.SOAP_ACTION_CREATE_SEQUENCE_RESPONSE;
else
throw new SandeshaException (unknownSpecErrorMessage);
}
public static String getTerminateSequenceSOAPAction (String specVersion) throws SandeshaException {
- if (Sandesha2Constants.SPEC_VERSIONS.WSRM.equals(specVersion))
+ if (Sandesha2Constants.SPEC_VERSIONS.v1_0.equals(specVersion))
return Sandesha2Constants.SPEC_2005_02.Actions.SOAP_ACTION_TERMINATE_SEQUENCE;
- else if (Sandesha2Constants.SPEC_VERSIONS.WSRX.equals(specVersion))
+ else if (Sandesha2Constants.SPEC_VERSIONS.v1_1.equals(specVersion))
return Sandesha2Constants.SPEC_2005_10.Actions.SOAP_ACTION_TERMINATE_SEQUENCE;
else
throw new SandeshaException (unknownSpecErrorMessage);
}
public static String getTerminateSequenceResponseSOAPAction (String specVersion) throws SandeshaException {
- if (Sandesha2Constants.SPEC_VERSIONS.WSRX.equals(specVersion))
+ if (Sandesha2Constants.SPEC_VERSIONS.v1_1.equals(specVersion))
return Sandesha2Constants.SPEC_2005_10.Actions.SOAP_ACTION_TERMINATE_SEQUENCE_RESPONSE;
else
throw new SandeshaException (unknownSpecErrorMessage);
}
public static String getAckRequestSOAPAction (String specVersion) throws SandeshaException {
- if (Sandesha2Constants.SPEC_VERSIONS.WSRM.equals(specVersion))
+ if (Sandesha2Constants.SPEC_VERSIONS.v1_0.equals(specVersion))
throw new SandeshaException ("this spec version does not define a ackRequest SOAP action");
- else if (Sandesha2Constants.SPEC_VERSIONS.WSRX.equals(specVersion))
+ else if (Sandesha2Constants.SPEC_VERSIONS.v1_1.equals(specVersion))
return Sandesha2Constants.SPEC_2005_10.Actions.SOAP_ACTION_ACK_REQUEST;
else
throw new SandeshaException (unknownSpecErrorMessage);
}
public static String getSequenceAcknowledgementSOAPAction (String specVersion) throws SandeshaException {
- if (Sandesha2Constants.SPEC_VERSIONS.WSRM.equals(specVersion))
+ if (Sandesha2Constants.SPEC_VERSIONS.v1_0.equals(specVersion))
return Sandesha2Constants.SPEC_2005_02.Actions.SOAP_ACTION_SEQUENCE_ACKNOWLEDGEMENT;
- else if (Sandesha2Constants.SPEC_VERSIONS.WSRX.equals(specVersion))
+ else if (Sandesha2Constants.SPEC_VERSIONS.v1_1.equals(specVersion))
return Sandesha2Constants.SPEC_2005_10.Actions.SOAP_ACTION_SEQUENCE_ACKNOWLEDGEMENT;
else
throw new SandeshaException (unknownSpecErrorMessage);
}
public static boolean isTerminateSequenceResponseRequired (String specVersion) throws SandeshaException {
- if (Sandesha2Constants.SPEC_VERSIONS.WSRM.equals(specVersion))
+ if (Sandesha2Constants.SPEC_VERSIONS.v1_0.equals(specVersion))
return false;
- else if (Sandesha2Constants.SPEC_VERSIONS.WSRX.equals(specVersion))
+ else if (Sandesha2Constants.SPEC_VERSIONS.v1_1.equals(specVersion))
return true;
else
throw new SandeshaException (unknownSpecErrorMessage);
}
public static boolean isLastMessageIndicatorRequired (String specVersion) throws SandeshaException {
- if (Sandesha2Constants.SPEC_VERSIONS.WSRM.equals(specVersion))
+ if (Sandesha2Constants.SPEC_VERSIONS.v1_0.equals(specVersion))
return true;
- else if (Sandesha2Constants.SPEC_VERSIONS.WSRX.equals(specVersion))
+ else if (Sandesha2Constants.SPEC_VERSIONS.v1_1.equals(specVersion))
return false;
else
throw new SandeshaException (unknownSpecErrorMessage);
}
public static boolean isAckFinalAllowed (String specVersion) throws SandeshaException {
- if (Sandesha2Constants.SPEC_VERSIONS.WSRM.equals(specVersion))
+ if (Sandesha2Constants.SPEC_VERSIONS.v1_0.equals(specVersion))
return false;
- else if (Sandesha2Constants.SPEC_VERSIONS.WSRX.equals(specVersion))
+ else if (Sandesha2Constants.SPEC_VERSIONS.v1_1.equals(specVersion))
return true;
else
throw new SandeshaException (unknownSpecErrorMessage);
}
public static boolean isAckNoneAllowed (String specVersion) throws SandeshaException {
- if (Sandesha2Constants.SPEC_VERSIONS.WSRM.equals(specVersion))
+ if (Sandesha2Constants.SPEC_VERSIONS.v1_0.equals(specVersion))
return false;
- else if (Sandesha2Constants.SPEC_VERSIONS.WSRX.equals(specVersion))
+ else if (Sandesha2Constants.SPEC_VERSIONS.v1_1.equals(specVersion))
return true;
else
throw new SandeshaException (unknownSpecErrorMessage);
}
public static boolean isSequenceClosingAllowed (String specVersion) throws SandeshaException {
- if (Sandesha2Constants.SPEC_VERSIONS.WSRM.equals(specVersion))
+ if (Sandesha2Constants.SPEC_VERSIONS.v1_0.equals(specVersion))
return false;
- else if (Sandesha2Constants.SPEC_VERSIONS.WSRX.equals(specVersion))
+ else if (Sandesha2Constants.SPEC_VERSIONS.v1_1.equals(specVersion))
return true;
else
throw new SandeshaException (unknownSpecErrorMessage);
}
public static String getDefaultSpecVersion () {
- return Sandesha2Constants.SPEC_VERSIONS.WSRM;
+ return Sandesha2Constants.SPEC_VERSIONS.v1_0;
}
public static String getAddressingAnonymousURI (String addressingNSURI) throws SandeshaException {
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=404901&r1=404900&r2=404901&view=diff
==============================================================================
--- webservices/sandesha/trunk/src/org/apache/sandesha2/wsrm/RMElements.java (original)
+++ webservices/sandesha/trunk/src/org/apache/sandesha2/wsrm/RMElements.java Sun May 7 20:14:22 2006
@@ -84,8 +84,15 @@
if (addressingNamespaceTmp!=null) {
addressingNamespaceValue = addressingNamespaceTmp;
}
- if (addressingNamespaceValue==null)
- addressingNamespaceValue = AddressingConstants.Final.WSA_NAMESPACE; //Final is the default version for addressing
+
+ if (addressingNamespaceValue==null) {
+ String message = "Cant find the addressing version";
+ throw new SandeshaException (message);
+// return;
+ }
+
+// if (addressingNamespaceValue==null)
+// addressingNamespaceValue = AddressingConstants.Final.WSA_NAMESPACE; //Final is the default version for addressing
OMElement sequenceElement = envelope.getHeader().getFirstChildWithName(
new QName(rmNamespaceValue, Sandesha2Constants.WSRM_COMMON.SEQUENCE));
---------------------------------------------------------------------
To unsubscribe, e-mail: sandesha-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: sandesha-dev-help@ws.apache.org