ws-axis-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dee...@apache.org
Subject svn commit: r384748 - in /webservices/axis2/trunk/java/modules: codegen/src/org/apache/axis2/wsdl/template/java/ core/src/org/apache/axis2/client/ core/src/org/apache/axis2/description/ integration/test-resources/security/ integration/test/org/apache/a...
Date Fri, 10 Mar 2006 10:08:47 GMT
Author: deepal
Date: Fri Mar 10 02:08:44 2006
New Revision: 384748

URL: http://svn.apache.org/viewcvs?rev=384748&view=rev
Log:
- revert security changes back. 
- Ajith I had to move static block into private method in stub (generated stub) , so if we
create two instance of some stub at each time axisService will be created . And if you have
two instance of same stub in one JVM you may have some problem due to static variable in Stub
class. (we have to decide this)

Ajith and Ruchith pls check whether I have done any mistake 

Removed:
    webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/security/AddressingMTOMSecurityWithDynamicConfigTest.java
    webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/security/InteropTestBaseWithDynamicConfig.java
    webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/security/MTOMOptimizedSecurityWithDynamicConfigTest.java
    webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/security/Scenario1WithDynamicConfigTest.java
    webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/security/Scenario2ayWithDynamicConfigTest.java
    webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/security/Scenario2yWithDynamicConfigTest.java
    webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/security/Scenario3yWithDynamicConfigTest.java
    webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/security/Scenario4WithDynamicConfigTest.java
    webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/security/Scenario5WithDynamicConfigTest.java
    webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/security/Scenario6WithDynamicConfigTest.java
    webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/security/Scenario7WithDynamicConfigTest.java
Modified:
    webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/template/java/InterfaceImplementationTemplate.xsl
    webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/client/ServiceClient.java
    webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/description/AxisService.java
    webservices/axis2/trunk/java/modules/integration/test-resources/security/complete.client.axis2.xml
    webservices/axis2/trunk/java/modules/integration/test-resources/security/s1.client.axis2.xml
    webservices/axis2/trunk/java/modules/integration/test-resources/security/s2.client.axis2.xml
    webservices/axis2/trunk/java/modules/integration/test-resources/security/s2a.client.axis2.xml
    webservices/axis2/trunk/java/modules/integration/test-resources/security/s3.client.axis2.xml
    webservices/axis2/trunk/java/modules/integration/test-resources/security/s4.client.axis2.xml
    webservices/axis2/trunk/java/modules/integration/test-resources/security/s5.client.axis2.xml
    webservices/axis2/trunk/java/modules/integration/test-resources/security/s6.client.axis2.xml
    webservices/axis2/trunk/java/modules/integration/test-resources/security/s7.client.axis2.xml
    webservices/axis2/trunk/java/modules/integration/test-resources/security/sST1.client.axis2.xml
    webservices/axis2/trunk/java/modules/integration/test-resources/security/secMtom.client.axis2.xml
    webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/security/InteropTestBase.java
    webservices/axis2/trunk/java/modules/security/interop/org/apache/axis2/security/InteropScenarioClient.java

Modified: webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/template/java/InterfaceImplementationTemplate.xsl
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/template/java/InterfaceImplementationTemplate.xsl?rev=384748&r1=384747&r2=384748&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/template/java/InterfaceImplementationTemplate.xsl
(original)
+++ webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/template/java/InterfaceImplementationTemplate.xsl
Fri Mar 10 02:08:44 2006
@@ -39,29 +39,29 @@
         public static final java.lang.String AXIS2_HOME = null;
         protected static org.apache.axis2.description.AxisOperation[] _operations;
 	
-	static{
+	private void populateAxisService(){
 
         //creating the Service
-        _service = new org.apache.axis2.description.AxisService("<xsl:value-of select="@servicename"/>");

-	<xsl:if test="@policy"> 
+        _service = new org.apache.axis2.description.AxisService("<xsl:value-of select="@servicename"/>");
+	<xsl:if test="@policy">
 	/*
 	 * setting the endpont policy
 	 */
 	 java.lang.String _service_policy_string = "<xsl:value-of select="@policy"/>";
-	 org.apache.axis2.description.PolicyInclude servicePolicyInclude 
+	 org.apache.axis2.description.PolicyInclude servicePolicyInclude
 	 	= _service.getPolicyInclude();
 	 servicePolicyInclude.addPolicyElement(
-	 		org.apache.axis2.description.PolicyInclude.SERVICE_POLICY, 
+	 		org.apache.axis2.description.PolicyInclude.SERVICE_POLICY,
 	 		getPolicyFromString(_service_policy_string));
 	</xsl:if>
-	
+
         //creating the operations
         org.apache.axis2.description.AxisOperation __operation;
 	<xsl:if test="//method[@policy]">
 	java.lang.String __operation_policy_string;
 	</xsl:if>
-	
-	
+
+
         _operations = new org.apache.axis2.description.AxisOperation[<xsl:value-of select="count(method)"/>];
         <xsl:for-each select="method">
             <xsl:choose>
@@ -74,7 +74,7 @@
             </xsl:choose>
 
             __operation.setName(new javax.xml.namespace.QName("<xsl:value-of select="@namespace"/>",
"<xsl:value-of select="@name"/>"));
-	    
+
 	    <xsl:if test="@policy">
 	    __operation_policy_string = "<xsl:value-of select="@policy"/>";
 	    org.apache.ws.policy.Policy __operation_policy
@@ -83,9 +83,9 @@
 	    		= __operation.getPolicyInclude();
 	    include.addPolicyElement(org.apache.axis2.description.PolicyInclude.ANON_POLICY,
 	    		__operation_policy);
-	    
+
 	    </xsl:if>
-	    
+
             _operations[<xsl:value-of select="position()-1"/>]=__operation;
             _service.addOperation(__operation);
         </xsl:for-each>
@@ -96,7 +96,8 @@
      public <xsl:value-of select="@name"/>(org.apache.axis2.context.ConfigurationContext
configurationContext,
         java.lang.String targetEndpoint)
         throws java.lang.Exception {
-	
+       //To populate AxisService
+       populateAxisService();
 	<xsl:if test="//@policy">
 	
 	////////////////////////////////////////////////////////////////////////

Modified: webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/client/ServiceClient.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/client/ServiceClient.java?rev=384748&r1=384747&r2=384748&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/client/ServiceClient.java
(original)
+++ webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/client/ServiceClient.java
Fri Mar 10 02:08:44 2006
@@ -281,7 +281,15 @@
      * @throws AxisFault if something goes wrong
      */
     public void engageModule(QName moduleName) throws AxisFault {
+        System.out.println("axisService = " + axisService);
         axisService.engageModule(axisConfig.getModule(moduleName), axisConfig);
+    }
+
+    public void disEngageModule(QName moduleName) {
+        AxisModule module = axisConfig.getModule(moduleName);
+        if (module != null) {
+            axisService.disEngageModule(module);
+        }
     }
 
     /**

Modified: webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/description/AxisService.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/description/AxisService.java?rev=384748&r1=384747&r2=384748&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/description/AxisService.java
(original)
+++ webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/description/AxisService.java
Fri Mar 10 02:08:44 2006
@@ -74,10 +74,10 @@
 //    private HashMap operations = new HashMap();
 
     // to store module ref at deploy time parsing
-    private ArrayList moduleRefs = new ArrayList();
+    private ArrayList moduleRefs = null;
 
     // to store engaged mdodules
-    private ArrayList engagedModules = new ArrayList();
+    private ArrayList engagedModules = null;
     private String serviceDescription;
 
     // to store the wsdl definition , which is build at the deployment time
@@ -125,6 +125,8 @@
         //by dafault service scope is for the request
         scope = Constants.SCOPE_REQUEST;
         messageReceivers = new HashMap();
+        moduleRefs = new ArrayList();
+        engagedModules = new ArrayList();
     }
 
     /**

Modified: webservices/axis2/trunk/java/modules/integration/test-resources/security/complete.client.axis2.xml
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/integration/test-resources/security/complete.client.axis2.xml?rev=384748&r1=384747&r2=384748&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/integration/test-resources/security/complete.client.axis2.xml
(original)
+++ webservices/axis2/trunk/java/modules/integration/test-resources/security/complete.client.axis2.xml
Fri Mar 10 02:08:44 2006
@@ -7,7 +7,7 @@
     <module ref="addressing"/>
 
     <!-- Engage the security module -->
-    <module ref="security"/>
+    <!--<module ref="security"/>-->
 
     <!-- Test with addressing and MTOM: Client's Configuration:START-->
 

Modified: webservices/axis2/trunk/java/modules/integration/test-resources/security/s1.client.axis2.xml
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/integration/test-resources/security/s1.client.axis2.xml?rev=384748&r1=384747&r2=384748&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/integration/test-resources/security/s1.client.axis2.xml
(original)
+++ webservices/axis2/trunk/java/modules/integration/test-resources/security/s1.client.axis2.xml
Fri Mar 10 02:08:44 2006
@@ -5,7 +5,7 @@
     <messageReceiver mep="INOUT" class="org.apache.axis2.receivers.RawXMLINOutMessageReceiver"/>
 
     <!-- Engage the security module -->
-    <module ref="security"/>
+    <!--<module ref="security"/>-->
 
     <!-- Scenario 1: Client's Configuration:START-->
     <parameter name="OutflowSecurity">

Modified: webservices/axis2/trunk/java/modules/integration/test-resources/security/s2.client.axis2.xml
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/integration/test-resources/security/s2.client.axis2.xml?rev=384748&r1=384747&r2=384748&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/integration/test-resources/security/s2.client.axis2.xml
(original)
+++ webservices/axis2/trunk/java/modules/integration/test-resources/security/s2.client.axis2.xml
Fri Mar 10 02:08:44 2006
@@ -5,7 +5,7 @@
     <messageReceiver mep="INOUT" class="org.apache.axis2.receivers.RawXMLINOutMessageReceiver"/>
 
     <!-- Engage the security module -->
-    <module ref="security"/>
+    <!--<module ref="security"/>-->
 
     <!-- Scenario 2: Client's Configuration:START-->
 

Modified: webservices/axis2/trunk/java/modules/integration/test-resources/security/s2a.client.axis2.xml
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/integration/test-resources/security/s2a.client.axis2.xml?rev=384748&r1=384747&r2=384748&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/integration/test-resources/security/s2a.client.axis2.xml
(original)
+++ webservices/axis2/trunk/java/modules/integration/test-resources/security/s2a.client.axis2.xml
Fri Mar 10 02:08:44 2006
@@ -5,7 +5,7 @@
     <messageReceiver mep="INOUT" class="org.apache.axis2.receivers.RawXMLINOutMessageReceiver"/>
 
     <!-- Engage the security module -->
-    <module ref="security"/>
+    <!--<module ref="security"/>-->
 
     <!-- Scenario 2: Client's Configuration:START-->
 

Modified: webservices/axis2/trunk/java/modules/integration/test-resources/security/s3.client.axis2.xml
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/integration/test-resources/security/s3.client.axis2.xml?rev=384748&r1=384747&r2=384748&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/integration/test-resources/security/s3.client.axis2.xml
(original)
+++ webservices/axis2/trunk/java/modules/integration/test-resources/security/s3.client.axis2.xml
Fri Mar 10 02:08:44 2006
@@ -5,7 +5,7 @@
     <messageReceiver mep="INOUT" class="org.apache.axis2.receivers.RawXMLINOutMessageReceiver"/>
 
     <!-- Engage the security module -->
-    <module ref="security"/>
+    <!--<module ref="security"/>-->
 
     <!-- Scenario 3: Client's Configuration:START-->
 

Modified: webservices/axis2/trunk/java/modules/integration/test-resources/security/s4.client.axis2.xml
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/integration/test-resources/security/s4.client.axis2.xml?rev=384748&r1=384747&r2=384748&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/integration/test-resources/security/s4.client.axis2.xml
(original)
+++ webservices/axis2/trunk/java/modules/integration/test-resources/security/s4.client.axis2.xml
Fri Mar 10 02:08:44 2006
@@ -5,7 +5,7 @@
     <messageReceiver mep="INOUT" class="org.apache.axis2.receivers.RawXMLINOutMessageReceiver"/>
 
     <!-- Engage the security module -->
-    <module ref="security"/>
+    <!--<module ref="security"/>-->
 
     <!-- Scenario 4: Client's Configuration:START-->
 

Modified: webservices/axis2/trunk/java/modules/integration/test-resources/security/s5.client.axis2.xml
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/integration/test-resources/security/s5.client.axis2.xml?rev=384748&r1=384747&r2=384748&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/integration/test-resources/security/s5.client.axis2.xml
(original)
+++ webservices/axis2/trunk/java/modules/integration/test-resources/security/s5.client.axis2.xml
Fri Mar 10 02:08:44 2006
@@ -5,7 +5,7 @@
     <messageReceiver mep="INOUT" class="org.apache.axis2.receivers.RawXMLINOutMessageReceiver"/>
 
     <!-- Engage the security module -->
-    <module ref="security"/>
+    <!--<module ref="security"/>-->
 
     <!-- Scenario 5: Client's Configuration:START-->
 

Modified: webservices/axis2/trunk/java/modules/integration/test-resources/security/s6.client.axis2.xml
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/integration/test-resources/security/s6.client.axis2.xml?rev=384748&r1=384747&r2=384748&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/integration/test-resources/security/s6.client.axis2.xml
(original)
+++ webservices/axis2/trunk/java/modules/integration/test-resources/security/s6.client.axis2.xml
Fri Mar 10 02:08:44 2006
@@ -5,7 +5,7 @@
     <messageReceiver mep="INOUT" class="org.apache.axis2.receivers.RawXMLINOutMessageReceiver"/>
 
     <!-- Engage the security module -->
-    <module ref="security"/>
+    <!--<module ref="security"/>-->
 
     <!-- Scenario 6: Client's Configuration:START-->
 

Modified: webservices/axis2/trunk/java/modules/integration/test-resources/security/s7.client.axis2.xml
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/integration/test-resources/security/s7.client.axis2.xml?rev=384748&r1=384747&r2=384748&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/integration/test-resources/security/s7.client.axis2.xml
(original)
+++ webservices/axis2/trunk/java/modules/integration/test-resources/security/s7.client.axis2.xml
Fri Mar 10 02:08:44 2006
@@ -5,7 +5,7 @@
     <messageReceiver mep="INOUT" class="org.apache.axis2.receivers.RawXMLINOutMessageReceiver"/>
 
     <!-- Engage the security module -->
-    <module ref="security"/>
+    <!--<module ref="security"/>-->
 
     <!-- Scenario 7: Client's Configuration:START-->
 

Modified: webservices/axis2/trunk/java/modules/integration/test-resources/security/sST1.client.axis2.xml
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/integration/test-resources/security/sST1.client.axis2.xml?rev=384748&r1=384747&r2=384748&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/integration/test-resources/security/sST1.client.axis2.xml
(original)
+++ webservices/axis2/trunk/java/modules/integration/test-resources/security/sST1.client.axis2.xml
Fri Mar 10 02:08:44 2006
@@ -5,7 +5,7 @@
     <messageReceiver mep="INOUT" class="org.apache.axis2.receivers.RawXMLINOutMessageReceiver"/>
 
     <!-- Engage the security module -->
-    <module ref="security"/>
+    <!--<module ref="security"/>-->
 
     <!-- Scenario ST1: Client's Configuration:START-->
 

Modified: webservices/axis2/trunk/java/modules/integration/test-resources/security/secMtom.client.axis2.xml
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/integration/test-resources/security/secMtom.client.axis2.xml?rev=384748&r1=384747&r2=384748&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/integration/test-resources/security/secMtom.client.axis2.xml
(original)
+++ webservices/axis2/trunk/java/modules/integration/test-resources/security/secMtom.client.axis2.xml
Fri Mar 10 02:08:44 2006
@@ -5,7 +5,7 @@
     <messageReceiver mep="INOUT" class="org.apache.axis2.receivers.RawXMLINOutMessageReceiver"/>
 
     <!-- Engage the security module -->
-    <module ref="security"/>
+    <!--<module ref="security"/>-->
 
     <!-- Scenario 3 with MTOM: Client's Configuration:START-->
 

Modified: webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/security/InteropTestBase.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/security/InteropTestBase.java?rev=384748&r1=384747&r2=384748&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/security/InteropTestBase.java
(original)
+++ webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/security/InteropTestBase.java
Fri Mar 10 02:08:44 2006
@@ -172,6 +172,32 @@
         }
     }
 
+    public void testInteropWithDynamicConfig() {
+        try {
+            Class interopScenarioClientClass = Class
+                    .forName("org.apache.axis2.security.InteropScenarioClient");
+            Constructor c = interopScenarioClientClass
+                    .getConstructor(new Class[]{boolean.class});
+            Object clientObj = c.newInstance(new Object[]{this
+                    .isUseSOAP12InStaticConfigTest() ? Boolean.TRUE
+                    : Boolean.FALSE});
+            Method m = interopScenarioClientClass.getMethod(
+                    "invokeWithGivenConfig", new Class[]{String.class,
+                    String.class, OutflowConfiguration.class,
+                    InflowConfiguration.class});
+            m.invoke(clientObj, new Object[]{
+                    Constants.TESTING_PATH + DEFAULT_CLIENT_REPOSITORY,
+                    targetEpr, getOutflowConfiguration(),
+                    getInflowConfiguration()});
+
+        } catch (Exception e) {
+            e.printStackTrace();
+            fail("Error in introperating with " + targetEpr
+                    + ", client configuration: " + getClientRepo());
+        }
+
+    }
+
 
     protected abstract OutflowConfiguration getOutflowConfiguration();
 

Modified: webservices/axis2/trunk/java/modules/security/interop/org/apache/axis2/security/InteropScenarioClient.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/security/interop/org/apache/axis2/security/InteropScenarioClient.java?rev=384748&r1=384747&r2=384748&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/security/interop/org/apache/axis2/security/InteropScenarioClient.java
(original)
+++ webservices/axis2/trunk/java/modules/security/interop/org/apache/axis2/security/InteropScenarioClient.java
Fri Mar 10 02:08:44 2006
@@ -59,6 +59,8 @@
         //<optimizeParts>xpathExpression</optimizeParts>
         stub._getServiceClient().getOptions().setProperty(Constants.Configuration.ENABLE_MTOM,
Constants.VALUE_TRUE);
         stub._getServiceClient().getOptions().setSoapVersionURI(soapNsURI);
+        stub._getServiceClient().engageModule(new javax.xml.namespace.QName("security"));
+
 
         PingResponseDocument pingResDoc = stub.Ping(pingDoc);
 
@@ -86,9 +88,9 @@
         //Enable MTOM to those scenarios where they are configured using:
         //<optimizeParts>xpathExpression</optimizeParts>
         stub._getServiceClient().getOptions().setProperty(Constants.Configuration.ENABLE_MTOM,
Constants.VALUE_TRUE);
-
         //Engage the security module
         stub._getServiceClient().engageModule(new javax.xml.namespace.QName("security"));
+
 
         if (outflowConfig != null) {
             stub._getServiceClient().getOptions().setProperty(WSSHandlerConstants.OUTFLOW_SECURITY,
outflowConfig.getProperty());



Mime
View raw message