Author: gatfora
Date: Thu Feb 8 07:26:30 2007
New Revision: 504929
URL: http://svn.apache.org/viewvc?view=rev&rev=504929
Log:
Match rm spec defined fault reason strings
Modified:
webservices/sandesha/trunk/java/src/org/apache/sandesha2/i18n/SandeshaMessageKeys.java
webservices/sandesha/trunk/java/src/org/apache/sandesha2/i18n/resource.properties
webservices/sandesha/trunk/java/src/org/apache/sandesha2/msgprocessors/AcknowledgementProcessor.java
webservices/sandesha/trunk/java/src/org/apache/sandesha2/util/FaultManager.java
webservices/sandesha/trunk/java/src/org/apache/sandesha2/util/SpecSpecificConstants.java
Modified:
webservices/sandesha/trunk/java/src/org/apache/sandesha2/i18n/SandeshaMessageKeys.java
URL:
http://svn.apache.org/viewvc/webservices/sandesha/trunk/java/src/org/apache/sandesha2/i18n/SandeshaMessageKeys.java?view=diff&rev=504929&r1=504928&r2=504929
==============================================================================
---
webservices/sandesha/trunk/java/src/org/apache/sandesha2/i18n/SandeshaMessageKeys.java
(original)
+++
webservices/sandesha/trunk/java/src/org/apache/sandesha2/i18n/SandeshaMessageKeys.java
Thu Feb 8 07:26:30 2007
@@ -95,12 +95,9 @@
public static final String toEPRNotValid="toEPRNotValid";
public static final String cannotFindSequence="cannotFindSequence";
- public static final String
cannotAcceptMsgAsSequenceClosed="cannotAcceptMsgAsSequenceClosed";
public static final String
msgNumberMustBeLargerThanZero="msgNumberMustBeLargerThanZero";
public static final String
msgNumberLargerThanLastMsg="msgNumberLargerThanLastMsg";
public static final String
msgNumberNotLargerThanLastMsg="msgNumberNotLargerThanLastMsg";
- public static final String ackInvalid="ackInvalid";
- public static final String ackInvalidHighMsg="ackInvalidHighMsg";
public static final String ackInvalidNotSent="ackInvalidNotSent";
public static final String
cannotHaveFinalWithNack="cannotHaveFinalWithNack";
public static final String
accptButNoSequenceOffered="accptButNoSequenceOffered";
@@ -220,6 +217,10 @@
public final static String createSequenceRefused =
"createSequenceRefused";
public final static String referencedMessageNotFound =
"referencedMessageNotFound";
public final static String messageNumberRollover =
"messageNumberRollover";
+ public final static String sequenceTerminatedFault =
"sequenceTerminatedFault";
+ public static final String unknownSequenceFault="unknownSequenceFault";
+ public static final String invalidAckFault="invalidAckFault";
+ public static final String
cannotAcceptMsgAsSequenceClosedFault="cannotAcceptMsgAsSequenceClosedFault";
public final static String policyBeanNotFound = "policyBeanNotFound";
public final static String cloneDoesNotMatchToOriginal =
"cloneDoesNotMatchToOriginal";
Modified:
webservices/sandesha/trunk/java/src/org/apache/sandesha2/i18n/resource.properties
URL:
http://svn.apache.org/viewvc/webservices/sandesha/trunk/java/src/org/apache/sandesha2/i18n/resource.properties?view=diff&rev=504929&r1=504928&r2=504929
==============================================================================
---
webservices/sandesha/trunk/java/src/org/apache/sandesha2/i18n/resource.properties
(original)
+++
webservices/sandesha/trunk/java/src/org/apache/sandesha2/i18n/resource.properties
Thu Feb 8 07:26:30 2007
@@ -28,55 +28,55 @@
storageManagerMustImplement=StorageManager {0} must implement the
org.apache.sandesha2.storage.StorageManager interface.
cannotInitSecurityManager=Cannot initialize the given security manager due to
exception {0}.
securityManagerMustImplement=SecurityManager {0} must implement the
org.apache.sandesha2.storage.StorageManager interface.
-cannotFindModulePolicies=No policies were found in the module.xml at the
module initiation time
+cannotFindModulePolicies=No policies were found in the module.xml at the
module initiation time.
cannotPauseThread=Cannot pause a non-running thread.
-commitError=Exception thrown when trying to commit the transaction: {0}
-rollbackError=Exception thrown when trying to rollback the transaction: {0}
+commitError=Exception thrown when trying to commit the transaction: {0}.
+rollbackError=Exception thrown when trying to rollback the transaction: {0}.
deadlock=Sandesha2 Internal Error: deadlock detected. Transaction details
''{0}'', Bean details ''{1}''.
noTransaction=Sandesha2 Internal Error: current thread does not have a
transaction.
-inMsgError=Sandesha2 got an exception when processing an in message: {0}
-outMsgError=Sandesha2 got an exception when processing an out message: {0}
-invokeMsgError=Sandesha2 got an exception when invoking message: {0}
-sendMsgError=Sandesha2 got an exception when sending a message: {0}
+inMsgError=Sandesha2 got an exception when processing an in message: {0}.
+outMsgError=Sandesha2 got an exception when processing an out message: {0}.
+invokeMsgError=Sandesha2 got an exception when invoking message: {0}.
+sendMsgError=Sandesha2 got an exception when sending a message: {0}.
cannotSendMsgAsSequenceClosed=Sandesha2 could not send the message on sequence
{0} as the sequence has been closed.
cannotSendMsgAsSequenceTerminated=Sandesha2 could not send the message on
sequence {0} as the sequence has been terminated.
cannotSendMsgAsSequenceTimedout=Sandesha2 could not send the message on
sequence {0} as the sequence has timed out.
-noValidSyncResponse=Sandesha2 sender thread has not received a valid
synchronous response...
+noValidSyncResponse=Sandesha2 sender thread has not received a valid
synchronous response.
classLoaderNotFound=Module class loader not found.
defaultPropertyBeanNotSet=Sandesha2 Internal Error: ''DefaultPropertyBean'' is
not set.
propertyBeanNotSet=Sandesha2 Internal Error: ''PropertyBean'' is not set.
optionsObjectNotSet=Sandesha2 Internal Error: ''Options'' object is not set.
-serviceContextNotSet=Sandesha2 Internal Error: ''ServiceContext'' is not set
-sequenceIdBeanNotSet=Sandesha2 Internal Error: ''SequenceIdBean'' is not set
-configContextNotSet=Sandesha2 Internal Error: ''ConfigurationContext'' is not
set
-soapEnvNotSet=Sandesha2 Internal Error: SOAP envelope is not set
+serviceContextNotSet=Sandesha2 Internal Error: ''ServiceContext'' is not set.
+sequenceIdBeanNotSet=Sandesha2 Internal Error: ''SequenceIdBean'' is not set.
+configContextNotSet=Sandesha2 Internal Error: ''ConfigurationContext'' is not
set.
+soapEnvNotSet=Sandesha2 Internal Error: SOAP envelope is not set.
soapBodyNotPresent=Invalid SOAP message: the body is not present.
-unknownSoapVersion=Unknown SOAP version {0}
-axisServiceIsNull=Sandesha2 Internal Error: ''AxisService'' is null
+unknownSoapVersion=Unknown SOAP version {0}.
+axisServiceIsNull=Sandesha2 Internal Error: ''AxisService'' is null.
msgContextNotSet=Sandesha2 Internal Error: ''MessageContext'' is null.
requestMsgContextNull=Request message context is null: cannot find out the
request side sequenceID.
-transportOutNotPresent=Sandesha2 Internal Error: original transport sender is
not present
-workAlreadyAssigned=Work ''{0}'' is already assigned to a different Worker.
Will try the next one
+transportOutNotPresent=Sandesha2 Internal Error: original transport sender is
not present.
+workAlreadyAssigned=Work ''{0}'' is already assigned to a different Worker.
Will try the next one.
couldNotFindOperation=Could not find operation for message type {0} and spec
level {1}.
-invalidMsgNumber=Sandesha2 Internal Error: invalid message number {0}
+invalidMsgNumber=Sandesha2 Internal Error: invalid message number {0}.
cannotStartTransportListenerDueToError=Sandesha2 Internal error: could not
start the transport listener due to error {0}.
cannotStartListenerForIncommingMsgs=Sandesha2 Internal error: cannot start the
listner for incoming messages. You must set the ''transport in'' protocol in
order to get async acknowledgement messages.
nonUniqueResult=Sandesha2 Internal error: A search for a unique object
resulted in several matches. Match 1 {0}, Match 2 {1}.
invalidStringArray=Sandesha2 Internal error: invalid String array : {0}.
-cannotCointinueSender=Sandesha2 Internal error: cannot continue the Sender due
to exception: {0}
+cannotCointinueSender=Sandesha2 Internal error: cannot continue the Sender due
to exception: {0}.
sendHasUnavailableMsgEntry=Sandesha2 Internal error: sender has an unavailable
message entry {0}.
propertyInvalidValue=Sandesha2 Internal error: property {0} contains an
invalid value.
-invalidRange=The specified range was invalid: {0}, {1}
+invalidRange=The specified range was invalid: {0}, {1}.
-policyBeanNotFound=Cant find a Sandesha2 policy bean
-cloneDoesNotMatchToOriginal=The elements of the original and cloned SOAP
Envelopes do not match
-exceptionInFlowCompletion=Got exception in flowCompletion of SandeshaInHandler
-rmdBeanNotFound=RMDBean not available for the sequence:{0}
-policyHasNotBeenSet="WSRM Policy ''{0}'' has not been set for this endpoint
-rmEnforceFailure=The message with MessageID ''{0}'' is not WSRM enabled but
the service enforces WSRM
+policyBeanNotFound=Cant find a Sandesha2 policy bean.
+cloneDoesNotMatchToOriginal=The elements of the original and cloned SOAP
Envelopes do not match.
+exceptionInFlowCompletion=Got exception in flowCompletion of SandeshaInHandler.
+rmdBeanNotFound=RMDBean not available for the sequence:{0}.
+policyHasNotBeenSet="WSRM Policy ''{0}'' has not been set for this endpoint.
+rmEnforceFailure=The message with MessageID ''{0}'' is not WSRM enabled but
the service enforces WSRM.
#-------------------------------------
#
@@ -85,14 +85,14 @@
#-------------------------------------
rmNamespaceNotMatchSequence=Validation failed. The RM namespace value {0} of
the message does not match {1} for sequence {2}.
-unknownWSAVersion=Unknown WS-Addressing version {0}
+unknownWSAVersion=Unknown WS-Addressing version {0}.
emptyAckRequestSpecLevel=Empty AckRequest messages can only be sent with the
v1_1 spec. You are using spec version {0}.
closeSequenceSpecLevel=Close sequence messages can only be sent with the v1_1
spec. You are using spec version {0}.
unknownSpec=Unknown specification version {0}.
unknownRMNamespace=Unknown rm namespace value {0}.
unknownNamespace=Unsupported namespace {0}.
cannotDecideRMVersion=Message does not has a valid RM namespace value - cannot
decide the RM version.
-specDoesNotSupportElement=Spec ''{0}'' does not support the element {1}
+specDoesNotSupportElement=Spec ''{0}'' does not support the element {1}.
couldNotSendCreateSeqResponse=Could not send a CreateSequenceResponse message
due to exception {0}.
couldNotSendTerminate=Could not send the terminate message due to error {0}.
@@ -107,35 +107,32 @@
invalidInternalSequenceID=Sandesha2 Internal Error: The internal sequence ID
{0} is not valid.
createSeqEntryNotFound=''Create Sequence'' entry is not found.
-toEPRNotValid=The ''To'' endpoint reference address is not set correctly: {0}
+toEPRNotValid=The ''To'' endpoint reference address is not set correctly: {0}.
cannotFindSequence=Cannot find the sequence with ID {0}.
-cannotAcceptMsgAsSequenceClosed=Cannot accept message as sequence {0} has been
closed.
msgNumberMustBeLargerThanZero=Message number {0} is invalid: this value has to
be larger than zero.
msgNumberNotLargerThanLastMsg=The message number {0} is not larger than the
last message sent on this sequence {1}.
msgNumberLargerThanLastMsg=The message number {0} is larger than the value
{1}, which was previously declared as the last message.
-ackInvalid=The SequenceAcknowledgement received is invalid as the lower value
{0} is larger than upper value {1}.
-ackInvalidHighMsg=The SequenceAcknowledgement received is invalid as the upper
value {0} is greater than the highest message sent {1}.
ackInvalidNotSent=The SequenceAcknowledgement received is invalid as the
acknowledgement contains messages that have not been sent.
cannotHaveFinalWithNack=The ''Final'' element cannot be present when there are
Nack elements under the SequenceAcknowledgement.
accptButNoSequenceOffered=Error: An ''accept'' was received but there was no
offered sequence entry.
relatesToNotAvailable: Invalid create sequence message: ''RelatesTo'' part is
not available.
-cannotDerriveAckInterval=Cannot derive the ''Acknowledgement Interval'' from
the passed string {0}
-cannotDerriveRetransInterval=Cannot derive the ''Retransmission Interval''
from the passed string {0}
-cannotDerriveInactivityTimeout=Cannot derive the ''Inactivity Timeout'' from
the passed string {0}
-noCreateSeqParts=No ''CreateSequence'' part is present in the create sequence
message
+cannotDerriveAckInterval=Cannot derive the ''Acknowledgement Interval'' from
the passed string {0}.
+cannotDerriveRetransInterval=Cannot derive the ''Retransmission Interval''
from the passed string {0}.
+cannotDerriveInactivityTimeout=Cannot derive the ''Inactivity Timeout'' from
the passed string {0}.
+noCreateSeqParts=No ''CreateSequence'' part is present in the create sequence
message.
noAcceptPart=An ''Accept'' part has not been generated for the ''create
sequence request'' with an offer part.
noAcksToPartInCreateSequence=No ''AcksTo'' part is present in the create
sequence message.
tempSeqIdNotSet=Error: ''TempSequenceId'' is not set.
ackRandDoesNotHaveCorrectValues=The ack range {0} does not have correct values
for Upper and Lower attributes.
cannotSetAckRangeNullElement=Cannot set Ack Range part since element is null.
-acksToStrNotSet=acksToStr Seqeunce property is not set correctly
-invalidSequenceID=invalid sequence ID: {0}
-cantSendMakeConnectionNoTransportOut=Can''t send the MakeConnection reply
since the message does not has a TransportOutDescription
+acksToStrNotSet=acksToStr Seqeunce property is not set correctly.
+invalidSequenceID=invalid sequence ID: {0}.
+cantSendMakeConnectionNoTransportOut=Can''t send the MakeConnection reply
since the message does not has a TransportOutDescription.
makeConnectionDisabled=Cannot handle synchronous 2-way connections because
MakeConnection is not enabled. Either enable MakeConnection or reconfigure your
application to use asynchronous connections.
noCreateSeqResponse=''CreateSequenceResponse'' part is not available.
noTerminateSeqPart=''Terminate Sequence'' part is not available.
-noNackInSeqAckPart=Passed ''sequence ack'' element does not contain a ''nack''
part. {0}
+noNackInSeqAckPart=Passed ''sequence ack'' element does not contain a ''nack''
part. {0}.
nackDoesNotContainValidLongValue=''Nack'' element does not contain a valid
long value {0}.
noneNotAllowedNamespace=The given namespace {0} does not allow the ''None''
part to be added to the ''sequenceAcknowledgement'' element.
noneNotAllowedAckRangesPresent=The ''None'' element cannot be present when
there are acknowledgement range elements under the ''sequenceAcknowledgement''
element.
@@ -158,10 +155,10 @@
noCreateSeqPartInElement=The passed element {0} does not contain a ''create
sequence'' part.
noCreateSeqResponsePartInElement=The passed element {0} does not contain a
''create seqence response'' part.
noFaultCodePart=The passed element {0} does not contain a ''Fault Code'' part.
-cannotFindAddressElement=Cannot find an ''Address'' part in the given element
{0}
+cannotFindAddressElement=Cannot find an ''Address'' part in the given element
{0}.
cannotFindAddressText=The passed element {0} does not have a valid address
text.
nullPassedElement=The passed element is null.
-invalidAckMessageEntry=Invalid ack message entry: {0}
+invalidAckMessageEntry=Invalid ack message entry: {0}.
seqPartIsNull=Sequence part is null.
incomingSequenceNotValidID=The ID for the incoming sequence is not valid:
''{0}''.
@@ -174,8 +171,8 @@
closeSeqResponseCannotBeAddedToNonBody=Cannot add ''close sequence response''
to a non-body element.
createSeqCannotBeAddedToNonBody=Cannot add ''create sequence'' part to a
non-body element.
createSeqResponseCannotBeAddedToNonBody=Cannot get ''create sequnce response''
from a non-body element.
-closeSeqPartNullID=Cannot add ''close sequence'' part since identifier is not
set
-closeSeqResponsePartNullID=Cannot add ''close sequence response'' part since
identifier is not set
+closeSeqPartNullID=Cannot add ''close sequence'' part since identifier is not
set.
+closeSeqResponsePartNullID=Cannot add ''close sequence response'' part since
identifier is not set.
invalidIdentifier=The passed element {0} does not contain a valid identifier
part.
ackRequestNullID=Cannot add ''ack request'' part since the identifier is not
set.
createSeqNullAcksTo=Cannot add a ''create seqeunce part'' since ''acksTo'' is
not set.
@@ -184,12 +181,12 @@
cannotProcessExpires=Cannot process ''Expires'' since the duration value is
not valid.
noFaultCode=Cannot add ''Fault Code'' since the the value is not set correctly.
-cannotSetACksTo=Cannot set the of the AcksTo element address as the value is
not valid {0}
-cannotSetEndpoint=Cannot set the address of the Elndpoint element as the value
is not valid {0}
+cannotSetACksTo=Cannot set the of the AcksTo element address as the value is
not valid {0}.
+cannotSetEndpoint=Cannot set the address of the Elndpoint element as the value
is not valid {0}.
setAValidMsgNumber=Set A Valid Message Number {0}.
-addressNotValid=Cannot set the address - the address value is not valid
+addressNotValid=Cannot set the address - the address value is not valid.
-elementMustForSpec=Element ''{0}'' must be present for the spec ''{1}''
+elementMustForSpec=Element ''{0}'' must be present for the spec ''{1}''.
#-------------------------------------
#
@@ -197,25 +194,25 @@
#
#-------------------------------------
-incommingSequenceReportNotFound=An incoming sequence report is not present for
the given sequenceID {0}
+incommingSequenceReportNotFound=An incoming sequence report is not present for
the given sequenceID {0}.
cannotFindReportForGivenData=Cannnot find a sequence report for the given data
{0}.
-outSeqIDIsNull=''OutSequenceId'' is null
-requestMsgNotPresent=Request message is not present
-requestSeqIsNull=Error: ''RequestSequence'' is null
-newSeqIdIsNull=New sequence Id is null
+outSeqIDIsNull=''OutSequenceId'' is null.
+requestMsgNotPresent=Request message is not present.
+requestSeqIsNull=Error: ''RequestSequence'' is null.
+newSeqIdIsNull=New sequence Id is null.
terminateAddedPreviously=Terminate was added previously.
nullMsgId=Key (MessageId) is null. Cannot insert.
-storageMapNotPresent=Error: storage Map not present
+storageMapNotPresent=Error: storage Map not present.
failedToStoreMessage=Failed to store message due to exception {0}.
failedToLoadMessage=Failed to load message due to exception {0}.
-entryNotPresentForUpdating=Entry is not present for updating
-appMsgIsNull=Application message is null
-cannotFindReqMsgFromOpContext=Cannot find the request message from the
operation context
-toEPRNotSet=To EPR has not been set in the given message
+entryNotPresentForUpdating=Entry is not present for updating.
+appMsgIsNull=Application message is null.
+cannotFindReqMsgFromOpContext=Cannot find the request message from the
operation context.
+toEPRNotSet=To EPR has not been set in the given message.
toBeanNotSet=The 'To' Sequence Property Bean has not been set for the sequence.
-cannotFindTransportInDesc=Cannot find the transport in description {0} in the
ConfigurationContext
-invalidElementFoundWithinElement=Found invalid ''{0}'' element within ''{1}''
element
+cannotFindTransportInDesc=Cannot find the transport in description {0} in the
ConfigurationContext.
+invalidElementFoundWithinElement=Found invalid ''{0}'' element within ''{1}''
element.
invokerNotFound=An invoker thread was not found to dispatch messages on the
inbound sequence {0}.
#------------------
@@ -226,14 +223,18 @@
secureDummyNoSTR ="Dummy security manager cannot parse or write security
token references"
-errorRetrievingSecurityToken = Error retrieving security token from token
storage
-proofOfPossessionNotVerified = Proof of possession not verified
-noSecurityResults = No Security results
-noSecConvTokenInPolicy = No SecureConversationToken in policy
+errorRetrievingSecurityToken = Error retrieving security token from token
storage.
+proofOfPossessionNotVerified = Proof of possession not verified.
+noSecurityResults = No Security results.
+noSecConvTokenInPolicy = No SecureConversationToken in policy.
couldNotLoadModulePolicies=Could not load module policies. Using default
values.
-modulePoliciesLoaded=Module policies were successfully loaded
+modulePoliciesLoaded=Module policies were successfully loaded.
-createSequenceRefused=The Create Sequence request has been refused by the RM
Destination
referencedMessageNotFound = Reference message is not present for the sequence
with property key {0}
+createSequenceRefused=The Create Sequence request has been refused by the RM
Destination
messageNumberRollover=The maximum value for wsrm:MessageNumber has been
exceeded.
+sequenceTerminatedFault=The Sequence has been terminated due to an
unrecoverable error.
+unknownSequenceFault=The value of wsrm:UnknownSequence is not a known Sequence
identifier.
+invalidAckFault=The SequenceAcknowledgement violates the cumulative
Acknowledgement invariant.
+cannotAcceptMsgAsSequenceClosedFault=The Sequence is closed and can not accept
new messages.
Modified:
webservices/sandesha/trunk/java/src/org/apache/sandesha2/msgprocessors/AcknowledgementProcessor.java
URL:
http://svn.apache.org/viewvc/webservices/sandesha/trunk/java/src/org/apache/sandesha2/msgprocessors/AcknowledgementProcessor.java?view=diff&rev=504929&r1=504928&r2=504929
==============================================================================
---
webservices/sandesha/trunk/java/src/org/apache/sandesha2/msgprocessors/AcknowledgementProcessor.java
(original)
+++
webservices/sandesha/trunk/java/src/org/apache/sandesha2/msgprocessors/AcknowledgementProcessor.java
Thu Feb 8 07:26:30 2007
@@ -177,7 +177,7 @@
// Check we haven't got
an Ack for a message that hasn't been sent yet !
if
(retransmitterBean.getSentCount() == 0) {
FaultManager.makeInvalidAcknowledgementFault(rmMsgCtx, sequenceAck, ackRange,
-
storageManager,
SandeshaMessageHelper.getMessage(SandeshaMessageKeys.ackInvalidNotSent));
+
storageManager);
if
(log.isDebugEnabled())
log.debug("Exit: AcknowledgementProcessor::processAckHeader, Invalid Ack");
return;
Modified:
webservices/sandesha/trunk/java/src/org/apache/sandesha2/util/FaultManager.java
URL:
http://svn.apache.org/viewvc/webservices/sandesha/trunk/java/src/org/apache/sandesha2/util/FaultManager.java?view=diff&rev=504929&r1=504928&r2=504929
==============================================================================
---
webservices/sandesha/trunk/java/src/org/apache/sandesha2/util/FaultManager.java
(original)
+++
webservices/sandesha/trunk/java/src/org/apache/sandesha2/util/FaultManager.java
Thu Feb 8 07:26:30 2007
@@ -174,7 +174,7 @@
data.setDetail(identifierElement);
-
data.setReason(SandeshaMessageHelper.getMessage(SandeshaMessageKeys.noSequenceEstablished,
sequenceID));
+
data.setReason(SandeshaMessageHelper.getMessage(SandeshaMessageKeys.unknownSequenceFault,
sequenceID));
data.setType(Sandesha2Constants.SOAPFaults.FaultType.UNKNOWN_SEQUENCE);
@@ -210,7 +210,6 @@
}
boolean invalidAck = false;
- String reason = null;
List sequenceAckList =
sequenceAcknowledgement.getAcknowledgementRanges();
Iterator it = sequenceAckList.iterator();
@@ -221,22 +220,15 @@
long lower = acknowledgementRange.getLowerValue();
if (lower > upper) {
- invalidAck = true;
- reason =
SandeshaMessageHelper.getMessage(SandeshaMessageKeys.ackInvalid,
Long.toString(lower), Long
- .toString(upper));
-
+ invalidAck = true;
// check upper isn't bigger than the highest
out msg number
} else if ( upper >
rmsBean.getHighestOutMessageNumber() ) {
invalidAck = true;
-
- reason =
SandeshaMessageHelper.getMessage(SandeshaMessageKeys.ackInvalidHighMsg,
- Long.toString(upper),
-
Long.toString(rmsBean.getHighestOutMessageNumber()));
}
if (invalidAck) {
makeInvalidAcknowledgementFault(ackRMMessageContext, sequenceAcknowledgement,
- acknowledgementRange,
storageManager, reason);
+ acknowledgementRange,
storageManager);
return true;
}
}
@@ -255,7 +247,7 @@
*/
public static void makeInvalidAcknowledgementFault(RMMsgContext
rmMsgCtx,
SequenceAcknowledgement sequenceAcknowledgement,
AcknowledgementRange acknowledgementRange,
- StorageManager storageManager, String reason) throws
AxisFault {
+ StorageManager storageManager) throws AxisFault {
FaultData data = new FaultData();
int SOAPVersion =
SandeshaUtil.getSOAPVersion(rmMsgCtx.getMessageContext().getEnvelope());
if (SOAPVersion == Sandesha2Constants.SOAPVersion.v1_1)
@@ -265,7 +257,7 @@
data.setType(Sandesha2Constants.SOAPFaults.FaultType.INVALID_ACKNOWLEDGEMENT);
data.setSubcode(Sandesha2Constants.SOAPFaults.Subcodes.INVALID_ACKNOWLEDGEMENT);
- data.setReason(reason);
+
data.setReason(SandeshaMessageHelper.getMessage(SandeshaMessageKeys.invalidAckFault));
SOAPFactory factory =
SOAPAbstractFactory.getSOAPFactory(SOAPVersion);
@@ -351,7 +343,7 @@
data.setCode(SOAP12Constants.FAULT_CODE_SENDER);
data.setSubcode(Sandesha2Constants.SOAPFaults.Subcodes.SEQUENCE_TERMINATED);
-
data.setReason(SandeshaMessageHelper.getMessage(SandeshaMessageKeys.cannotSendMsgAsSequenceTerminated,
sequenceID));
+
data.setReason(SandeshaMessageHelper.getMessage(SandeshaMessageKeys.sequenceTerminatedFault,
sequenceID));
data.setType(Sandesha2Constants.SOAPFaults.FaultType.SEQUENCE_TERMINATED);
SOAPFactory factory =
SOAPAbstractFactory.getSOAPFactory(SOAPVersion);
@@ -388,7 +380,7 @@
data.setCode(SOAP12Constants.FAULT_CODE_SENDER);
data.setSubcode(Sandesha2Constants.SOAPFaults.Subcodes.SEQUENCE_CLOSED);
-
data.setReason(SandeshaMessageHelper.getMessage(SandeshaMessageKeys.cannotAcceptMsgAsSequenceClosed,
sequenceID));
+
data.setReason(SandeshaMessageHelper.getMessage(SandeshaMessageKeys.cannotAcceptMsgAsSequenceClosedFault));
data.setType(Sandesha2Constants.SOAPFaults.FaultType.SEQUENCE_CLOSED);
SOAPFactory factory =
SOAPAbstractFactory.getSOAPFactory(SOAPVersion);
@@ -456,7 +448,8 @@
// Need to send this message as the Axis Layer doesn't
set the "SequenceFault" header
MessageContext faultMessageContext =
MessageContextBuilder.createFaultMessageContext(referenceRMMsgContext.getMessageContext(),
null);
-
SOAPFaultEnvelopeCreator.addSOAPFaultEnvelope(faultMessageContext,
Sandesha2Constants.SOAPVersion.v1_1, data,
referenceRMMsgContext.getRMNamespaceValue());
+
+
SOAPFaultEnvelopeCreator.addSOAPFaultEnvelope(faultMessageContext,
Sandesha2Constants.SOAPVersion.v1_1, data,
referenceRMMsgContext.getRMNamespaceValue());
referenceRMMsgContext.getMessageContext().getOperationContext().setProperty(
org.apache.axis2.Constants.RESPONSE_WRITTEN, Constants.VALUE_TRUE);
@@ -476,58 +469,7 @@
throw fault;
}
-
- /**
- * Adds the necessary Fault elements as properties to the message
context.
- * Returns a dummy Fault which will be throw by this method caller.
- *
- * @param referenceRMMsgContext - Message in reference to which the
fault will be generated.
- * @param data - data for the fault
- * @return - The dummy fault to be thrown out.
- *
- * @throws AxisFault
- */
- public static void getFault (RMMsgContext referenceRMMsgContext,
FaultData data) throws AxisFault {
-
- SOAPFactory factory = (SOAPFactory)
referenceRMMsgContext.getSOAPEnvelope().getOMFactory();
-
- SOAPFaultCode faultCode = factory.createSOAPFaultCode();
- SOAPFaultSubCode faultSubCode =
factory.createSOAPFaultSubCode(faultCode);
-
- SOAPFaultValue faultColdValue =
factory.createSOAPFaultValue(faultCode);
- SOAPFaultValue faultSubcodeValue =
factory.createSOAPFaultValue(faultSubCode);
-
- faultColdValue.setText(data.getCode());
- faultSubcodeValue.setText(data.getSubcode());
- faultCode.setSubCode(faultSubCode);
-
- SOAPFaultReason reason = factory.createSOAPFaultReason();
- SOAPFaultText reasonText = factory.createSOAPFaultText();
- reasonText.setText(data.getReason());
- reason.addSOAPText(reasonText);
-
- SOAPFaultDetail detail = factory.createSOAPFaultDetail();
- detail.addDetailEntry(data.getDetail());
-
- String SOAPNamespaceValue = factory.getSoapVersionURI();
-
- if
(SOAP12Constants.SOAP_ENVELOPE_NAMESPACE_URI.equals(SOAPNamespaceValue)) {
-
referenceRMMsgContext.setProperty(SOAP12Constants.SOAP_FAULT_CODE_LOCAL_NAME,
faultCode);
-
referenceRMMsgContext.setProperty(SOAP12Constants.SOAP_FAULT_REASON_LOCAL_NAME,
reason);
-
referenceRMMsgContext.setProperty(SOAP12Constants.SOAP_FAULT_DETAIL_LOCAL_NAME,
detail);
- } else if (SOAP11Constants.SOAP_ENVELOPE_NAMESPACE_URI.equals
(SOAPNamespaceValue)) {
-
referenceRMMsgContext.setProperty(SOAP11Constants.SOAP_FAULT_CODE_LOCAL_NAME,
faultCode);
-
referenceRMMsgContext.setProperty(SOAP11Constants.SOAP_FAULT_DETAIL_LOCAL_NAME,
detail);
- } else {
- String message =
SandeshaMessageHelper.getMessage(SandeshaMessageKeys.unknownSoapVersion);
- throw new SandeshaException (message);
- }
-
- SandeshaException fault = new SandeshaException("");
- throw fault;
- }
-
public static boolean isRMFault (String faultSubcodeValue) {
if (faultSubcodeValue==null)
return false;
Modified:
webservices/sandesha/trunk/java/src/org/apache/sandesha2/util/SpecSpecificConstants.java
URL:
http://svn.apache.org/viewvc/webservices/sandesha/trunk/java/src/org/apache/sandesha2/util/SpecSpecificConstants.java?view=diff&rev=504929&r1=504928&r2=504929
==============================================================================
---
webservices/sandesha/trunk/java/src/org/apache/sandesha2/util/SpecSpecificConstants.java
(original)
+++
webservices/sandesha/trunk/java/src/org/apache/sandesha2/util/SpecSpecificConstants.java
Thu Feb 8 07:26:30 2007
@@ -295,7 +295,7 @@
public static String getAddressingFaultAction (String addressingNSURI)
throws SandeshaException {
if
(AddressingConstants.Submission.WSA_NAMESPACE.equals(addressingNSURI))
- return
"http://schemas.xmlsoap.org/ws/2004/08/addressing/fault"; //this is not
available in addressing constants )-:
+ return
"http://docs.oasis-open.org/ws-rx/wsrm/200608/fault"; //this is not available
in addressing constants )-:
else if
(AddressingConstants.Final.WSA_NAMESPACE.equals(addressingNSURI))
return AddressingConstants.Final.WSA_FAULT_ACTION;
else
@@ -324,15 +324,6 @@
return Sandesha2Constants.SPEC_2006_08.SEC_NS_URI;
}
- return null;
- }
-
- public static String getFaultAction (String addressingNamespace) {
- if
(AddressingConstants.Final.WSA_NAMESPACE.equals(addressingNamespace))
- return AddressingConstants.Final.WSA_FAULT_ACTION;
- else if
(AddressingConstants.Submission.WSA_NAMESPACE.equals(addressingNamespace))
- return AddressingConstants.Submission.WSA_FAULT_ACTION;
-
return null;
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]