[prev in list] [next in list] [prev in thread] [next in thread] 

List:       wsf-javascript-dev
Subject:    [wsf-javascript-dev] svn commit r17965 -
From:       keith () wso2 ! com
Date:       2008-06-05 7:36:09
Message-ID: E1K4A12-0001aQ-SP () wso2 ! org
[Download RAW message or body]

Author: keith
Date: Thu Jun  5 00:35:56 2008
New Revision: 17965
URL: http://wso2.org/svn/browse/wso2?view=rev&revision=17965

Log:
Changed the way of Fixing Mashup-845. Initially passed in a parameter to indicate \
weather http access is allowed but that seemed troublecome. So noe setting it as a \
parameter in the axis  configuration


Modified:
   trunk/wsf/javascript/rhino/message_receiver/src/org/wso2/javascript/rhino/JavaScriptEngineConstants.java
  trunk/wsf/javascript/rhino/message_receiver/src/org/wso2/javascript/rhino/JavaScriptEngineUtils.java


Modified: trunk/wsf/javascript/rhino/message_receiver/src/org/wso2/javascript/rhino/JavaScriptEngineConstants.java
                
URL: http://wso2.org/svn/browse/wso2/trunk/wsf/javascript/rhino/message_receiver/src/o \
rg/wso2/javascript/rhino/JavaScriptEngineConstants.java?rev=17965&r1=17964&r2=17965&view=diff
 ==============================================================================
--- trunk/wsf/javascript/rhino/message_receiver/src/org/wso2/javascript/rhino/JavaScriptEngineConstants.java	(original)
                
+++ trunk/wsf/javascript/rhino/message_receiver/src/org/wso2/javascript/rhino/JavaScriptEngineConstants.java	Thu \
Jun  5 00:35:56 2008 @@ -44,4 +44,7 @@
 
     // Used to keep track of the presence of annotation of the types 
     public static final String ANNOTATED = "annotated";
+
+    // Refers to username of the mashup Author
+    public static final String ALLOW_HTTP_TRAFFIC_TO_MASHUPS ="allowHTTPAccess";
 }

Modified: trunk/wsf/javascript/rhino/message_receiver/src/org/wso2/javascript/rhino/JavaScriptEngineUtils.java
                
URL: http://wso2.org/svn/browse/wso2/trunk/wsf/javascript/rhino/message_receiver/src/o \
rg/wso2/javascript/rhino/JavaScriptEngineUtils.java?rev=17965&r1=17964&r2=17965&view=diff
 ==============================================================================
--- trunk/wsf/javascript/rhino/message_receiver/src/org/wso2/javascript/rhino/JavaScriptEngineUtils.java	(original)
                
+++ trunk/wsf/javascript/rhino/message_receiver/src/org/wso2/javascript/rhino/JavaScriptEngineUtils.java	Thu \
Jun  5 00:35:56 2008 @@ -109,19 +109,18 @@
     }
 
     public static void loadGlobalPropertyObjects(JavaScriptEngine engine,
-                                                 AxisConfiguration axisConfig, \
                String serviceName,
-                                                 boolean allowHttpAccess) {
+                                                 AxisConfiguration axisConfig, \
String serviceName) {  Parameter propertyObjectParameter = axisConfig
                 .getParameter("javascript.global.propertyobjects");
         if ((propertyObjectParameter != null) &&
                 (propertyObjectParameter.getParameterType() == 2)) {
             OMElement paraElement = propertyObjectParameter.getParameterElement();
-            loadGlobalProperties(paraElement, engine, serviceName, allowHttpAccess);
+            loadGlobalProperties(paraElement, engine, serviceName);
         }
     }
 
     private static void loadGlobalProperties(OMElement hostObjectElement, \
                JavaScriptEngine engine,
-                                             String serviceName, boolean \
allowHttpAccess) { +                                             String serviceName) \
                {
         Iterator iterator = hostObjectElement.getChildrenWithName(new \
QName("global.property"));  while (iterator.hasNext()) {
             OMElement element = (OMElement) iterator.next();
@@ -143,6 +142,8 @@
                     if (object instanceof ConfigurationContext) {
                         ConfigurationContext configurationContext = \
                (ConfigurationContext) object;
                         AxisConfiguration configuration = \
configurationContext.getAxisConfiguration(); +                        Boolean \
allowHttpAccess = (Boolean) configuration.getParameterValue( +                        \
JavaScriptEngineConstants.ALLOW_HTTP_TRAFFIC_TO_MASHUPS);  
                         // The Mashup server may be running behind a proxy so the \
                best way to get
                         // the http address would be to get it from the http \
transport listener @@ -151,7 +152,7 @@
                         // If httpAccess is allowed we take the http transport else \
we switch to the  // https transport
                         TransportInDescription inDescription;
-                        if (allowHttpAccess) {
+                        if (allowHttpAccess.booleanValue()) {
                             inDescription = configuration
                                         .getTransportIn("http");
                         } else {

_______________________________________________
Wsf-javascript-dev mailing list
Wsf-javascript-dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/wsf-javascript-dev


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic