Author: chamikara
Date: Mon Mar 26 22:23:38 2007
New Revision: 522758
URL: http://svn.apache.org/viewvc?view=rev&rev=522758
Log:
Moved the TerminateSequence action mapping to the InOnly group.
Added a ServiceClient.setPolicyBean method. Using this users can set their
policy beans through the client API.
Modified:
webservices/sandesha/trunk/java/config/module.xml
webservices/sandesha/trunk/java/src/org/apache/sandesha2/client/SandeshaClient.java
webservices/sandesha/trunk/java/src/org/apache/sandesha2/i18n/SandeshaMessageKeys.java
webservices/sandesha/trunk/java/src/org/apache/sandesha2/i18n/resource.properties
Modified: webservices/sandesha/trunk/java/config/module.xml
URL:
http://svn.apache.org/viewvc/webservices/sandesha/trunk/java/config/module.xml?view=diff&rev=522758&r1=522757&r2=522758
==============================================================================
--- webservices/sandesha/trunk/java/config/module.xml (original)
+++ webservices/sandesha/trunk/java/config/module.xml Mon Mar 26 22:23:38 2007
@@ -48,7 +48,8 @@
<!-- For interoparability perposes. Some WSRM implementations tend to
send this as the LastMessage -->
<actionMapping>http://schemas.xmlsoap.org/ws/2005/02/rm/LastMessage</actionMapping>
-
+
+
<actionMapping>http://schemas.xmlsoap.org/ws/2005/02/rm/TerminateSequence</actionMapping>
</operation>
<operation name="Sandesha2OperationInOut"
mep="http://www.w3.org/2006/01/wsdl/in-out">
@@ -59,9 +60,6 @@
<actionMapping>http://schemas.xmlsoap.org/ws/2005/02/rm/AckRequested</actionMapping>
<actionMapping>http://docs.oasis-open.org/ws-rx/wsrm/200702/AckRequested</actionMapping>
-
- <!-- TerminateSequence works as a InOut in RM 1.0 anonymous scenario
-->
-
<actionMapping>http://schemas.xmlsoap.org/ws/2005/02/rm/TerminateSequence</actionMapping>
<!-- namespaces for the 2007-02 spec -->
<actionMapping>http://docs.oasis-open.org/ws-rx/wsrm/200702/CreateSequence</actionMapping>
Modified:
webservices/sandesha/trunk/java/src/org/apache/sandesha2/client/SandeshaClient.java
URL:
http://svn.apache.org/viewvc/webservices/sandesha/trunk/java/src/org/apache/sandesha2/client/SandeshaClient.java?view=diff&rev=522758&r1=522757&r2=522758
==============================================================================
---
webservices/sandesha/trunk/java/src/org/apache/sandesha2/client/SandeshaClient.java
(original)
+++
webservices/sandesha/trunk/java/src/org/apache/sandesha2/client/SandeshaClient.java
Mon Mar 26 22:23:38 2007
@@ -39,6 +39,7 @@
import org.apache.axis2.description.AxisOperation;
import org.apache.axis2.description.AxisOperationFactory;
import org.apache.axis2.description.AxisService;
+import org.apache.axis2.description.Parameter;
import org.apache.axis2.wsdl.WSDLConstants;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
@@ -46,12 +47,15 @@
import org.apache.sandesha2.SandeshaException;
import org.apache.sandesha2.i18n.SandeshaMessageHelper;
import org.apache.sandesha2.i18n.SandeshaMessageKeys;
+import org.apache.sandesha2.msgprocessors.SequenceProcessor;
+import org.apache.sandesha2.policy.SandeshaPolicyBean;
import org.apache.sandesha2.storage.SandeshaStorageException;
import org.apache.sandesha2.storage.StorageManager;
import org.apache.sandesha2.storage.Transaction;
import org.apache.sandesha2.storage.beanmanagers.RMSBeanMgr;
import org.apache.sandesha2.storage.beans.RMSBean;
import org.apache.sandesha2.storage.beans.RMDBean;
+import org.apache.sandesha2.storage.beans.RMSequenceBean;
import org.apache.sandesha2.util.SandeshaUtil;
import org.apache.sandesha2.util.SpecSpecificConstants;
import org.apache.sandesha2.workers.Invoker;
@@ -1318,9 +1322,7 @@
* @return
* @throws SandeshaException
*/
- private static String
getInternalSequenceIdFromServiceClient(ServiceClient serviceClient)
-
- throws SandeshaException
+ private static String
getInternalSequenceIdFromServiceClient(ServiceClient serviceClient) throws
SandeshaException
{
Options options = serviceClient.getOptions();
if (options == null)
@@ -1339,4 +1341,31 @@
return internalSequenceID;
}
+
+
+ public static void setPolicyBean (ServiceClient serviceClient,
SandeshaPolicyBean policyBean) throws SandeshaException {
+ try {
+ AxisService axisService =
serviceClient.getAxisService();
+ if (axisService!=null) {
+ Parameter parameter =
axisService.getParameter(Sandesha2Constants.SANDESHA_PROPERTY_BEAN);
+ SandeshaPolicyBean parent = null;
+ if (parameter==null) {
+ parameter = new Parameter ();
+
parameter.setName(Sandesha2Constants.SANDESHA_PROPERTY_BEAN);
+ } else {
+ parent = (SandeshaPolicyBean)
parameter.getValue();
+ policyBean.setParent(parent);
+ }
+
+ parameter.setValue(policyBean);
+ axisService.addParameter(parameter);
+ } else {
+ String message =
SandeshaMessageHelper.getMessage(SandeshaMessageKeys.cannotSetPolicyBeanServiceNull);
+ throw new SandeshaException (message);
+ }
+ } catch (AxisFault e) {
+ throw new SandeshaException (e);
+ }
+ }
+
}
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=522758&r1=522757&r2=522758
==============================================================================
---
webservices/sandesha/trunk/java/src/org/apache/sandesha2/i18n/SandeshaMessageKeys.java
(original)
+++
webservices/sandesha/trunk/java/src/org/apache/sandesha2/i18n/SandeshaMessageKeys.java
Mon Mar 26 22:23:38 2007
@@ -227,4 +227,5 @@
public final static String policyHasNotBeenSet = "policyHasNotBeenSet";
public final static String referenceMessageNotSetForSequence =
"referenceMessageNotSetForSequence";
public final static String moduleNotSet = "moduleNotSet";
+ public final static String cannotSetPolicyBeanServiceNull =
"cannotSetPolicyBeanServiceNull";
}
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=522758&r1=522757&r2=522758
==============================================================================
---
webservices/sandesha/trunk/java/src/org/apache/sandesha2/i18n/resource.properties
(original)
+++
webservices/sandesha/trunk/java/src/org/apache/sandesha2/i18n/resource.properties
Mon Mar 26 22:23:38 2007
@@ -212,6 +212,7 @@
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}.
+cannotSetPolicyBeanServiceNull=Cannot set the given SandeshaPolicyBean since
the AxisService is not present
#------------------
# Security messages
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]