Author: ruchithf
Date: Fri Oct  6 08:55:07 2006
New Revision: 453653

URL: http://svn.apache.org/viewvc?view=rev&rev=453653
Log:
Getting SecRM scenario working with latest rampart

Modified:
    webservices/sandesha/trunk/java/interop/conf/sec-services.xml
    
webservices/sandesha/trunk/java/interop/src/org/apache/sandesha2/interop/rm1_1_clients/Scenario_4_1.java

Modified: webservices/sandesha/trunk/java/interop/conf/sec-services.xml
URL: 
http://svn.apache.org/viewvc/webservices/sandesha/trunk/java/interop/conf/sec-services.xml?view=diff&rev=453653&r1=453652&r2=453653
==============================================================================
--- webservices/sandesha/trunk/java/interop/conf/sec-services.xml (original)
+++ webservices/sandesha/trunk/java/interop/conf/sec-services.xml Fri Oct  6 
08:55:07 2006
@@ -28,18 +28,6 @@
                mep="http://www.w3.org/2004/08/wsdl/in-only";>
                <actionMapping>urn:wsrm:Ping</actionMapping>
        </operation>
-       <operation name="echoString"
-               mep="http://www.w3.org/2004/08/wsdl/in-out";>
-               <actionMapping>urn:wsrm:EchoString</actionMapping>
-               <outputActionMapping>
-                       urn:wsrm:EchoStringResponse
-               </outputActionMapping>
-       </operation>
-       <operation name="ping"
-               mep="http://www.w3.org/2004/08/wsdl/in-only";>
-               <actionMapping>urn:wsrm:Ping</actionMapping>
-       </operation>
-       
        
        <!-- Rampart and Rahas configurations -->
        <wsp:Policy wsu:Id="Scenario51Policy" 
xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd";
 xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy";>

Modified: 
webservices/sandesha/trunk/java/interop/src/org/apache/sandesha2/interop/rm1_1_clients/Scenario_4_1.java
URL: 
http://svn.apache.org/viewvc/webservices/sandesha/trunk/java/interop/src/org/apache/sandesha2/interop/rm1_1_clients/Scenario_4_1.java?view=diff&rev=453653&r1=453652&r2=453653
==============================================================================
--- 
webservices/sandesha/trunk/java/interop/src/org/apache/sandesha2/interop/rm1_1_clients/Scenario_4_1.java
 (original)
+++ 
webservices/sandesha/trunk/java/interop/src/org/apache/sandesha2/interop/rm1_1_clients/Scenario_4_1.java
 Fri Oct  6 08:55:07 2006
@@ -93,8 +93,8 @@
         }
 
 
-//      new Scenario_1_1 ().run();
-        new Scenario_4_1().runStub();
+      new Scenario_4_1 ().run();
+//        new Scenario_4_1().runStub();
     }
     
     private void run () throws Exception {
@@ -104,7 +104,10 @@
         Options clientOptions = new Options ();
         setUpOptions(clientOptions);
         
-        ServiceClient serviceClient = new ServiceClient 
(configurationContext,null);        
+        ServiceClient serviceClient = new ServiceClient 
(configurationContext,null);
+        
+//      engage Rampart
+        serviceClient.engageModule(new QName("rampart"));
         
         serviceClient.setOptions(clientOptions);
         
@@ -114,14 +117,22 @@
         
         terminateSequence(serviceClient);
         
+        Thread.sleep(5000);
+        
+        
serviceClient.getOptions().setProperty(SandeshaClientConstants.UNRELIABLE_MESSAGE,
 Constants.VALUE_TRUE);
+        
serviceClient.getOptions().setProperty(RampartMessageData.CANCEL_REQUEST, 
Constants.VALUE_TRUE);
+        serviceClient.fireAndForget(getPingOMBlock("cancel"));
+        
+        Thread.sleep(10000);
+        
         serviceClient.finalizeInvoke();
     }
     
     private static OMElement getPingOMBlock(String text) {
         OMFactory fac = OMAbstractFactory.getOMFactory();
         OMNamespace namespace = 
fac.createOMNamespace(applicationNamespaceName,"ns1");
-        OMElement pingElem = fac.createOMElement(PingRequest, namespace);
-        OMElement textElem = fac.createOMElement(Text, null);
+        OMElement pingElem = fac.createOMElement("Ping", namespace);
+        OMElement textElem = fac.createOMElement(Text, namespace);
         
         textElem.setText(text);
         pingElem.addChild(textElem);



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to