axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ruchi...@apache.org
Subject svn commit: r372460 - in /webservices/axis2/trunk/java/modules: security/src/org/apache/axis2/security/handler/config/ xml/src/org/apache/axis2/om/impl/llom/serialize/
Date Thu, 26 Jan 2006 06:43:18 GMT
Author: ruchithf
Date: Wed Jan 25 22:43:04 2006
New Revision: 372460

URL: http://svn.apache.org/viewcvs?rev=372460&view=rev
Log:
- Preventing an NPE in StreamingOMSerializer.serializeElement(XMLStreamReader reader, XMLStreamWriter
writer)
- Generate the proper prameter element from InflowConfiguration and OutflowConfiguration


Modified:
    webservices/axis2/trunk/java/modules/security/src/org/apache/axis2/security/handler/config/InflowConfiguration.java
    webservices/axis2/trunk/java/modules/security/src/org/apache/axis2/security/handler/config/OutflowConfiguration.java
    webservices/axis2/trunk/java/modules/xml/src/org/apache/axis2/om/impl/llom/serialize/StreamingOMSerializer.java

Modified: webservices/axis2/trunk/java/modules/security/src/org/apache/axis2/security/handler/config/InflowConfiguration.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/security/src/org/apache/axis2/security/handler/config/InflowConfiguration.java?rev=372460&r1=372459&r2=372460&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/security/src/org/apache/axis2/security/handler/config/InflowConfiguration.java
(original)
+++ webservices/axis2/trunk/java/modules/security/src/org/apache/axis2/security/handler/config/InflowConfiguration.java
Wed Jan 25 22:43:04 2006
@@ -43,8 +43,9 @@
 	public Parameter getProperty() {
 		OMFactory fac = OMAbstractFactory.getOMFactory();
 		OMNamespace ns = fac.createOMNamespace("", null);
-		OMElement propertyElement = fac.createOMElement(
-				WSSHandlerConstants.INFLOW_SECURITY, ns);
+        //TODO: Find the constants for "Parameter" and "name"
+        OMElement paramElement = fac.createOMElement("Parameter",ns);
+        paramElement.addAttribute(fac.createOMAttribute("name", null ,WSSHandlerConstants.INFLOW_SECURITY));
 		
 		OMElement actionElem = fac.createOMElement(
 				WSSHandlerConstants.ACTION, ns);
@@ -65,10 +66,11 @@
             }
 		}
 		
-		propertyElement.addChild(actionElem);
+		paramElement.addChild(actionElem);
 		
 		ParameterImpl param = new ParameterImpl();
-		param.setParameterElement(propertyElement);
+		param.setParameterElement(paramElement);
+        param.setName(WSSHandlerConstants.INFLOW_SECURITY);
 		
 		return param;
 	}

Modified: webservices/axis2/trunk/java/modules/security/src/org/apache/axis2/security/handler/config/OutflowConfiguration.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/security/src/org/apache/axis2/security/handler/config/OutflowConfiguration.java?rev=372460&r1=372459&r2=372460&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/security/src/org/apache/axis2/security/handler/config/OutflowConfiguration.java
(original)
+++ webservices/axis2/trunk/java/modules/security/src/org/apache/axis2/security/handler/config/OutflowConfiguration.java
Wed Jan 25 22:43:04 2006
@@ -68,8 +68,9 @@
 		
 		OMFactory fac = OMAbstractFactory.getOMFactory();
 		OMNamespace ns = fac.createOMNamespace("", null);
-		OMElement propertyElement = fac.createOMElement(
-				WSSHandlerConstants.OUTFLOW_SECURITY, ns);
+        //TODO: Find the constants for "Parameter" and "name"
+        OMElement paramElement = fac.createOMElement("Parameter",ns);
+		paramElement.addAttribute(fac.createOMAttribute("name", null ,WSSHandlerConstants.OUTFLOW_SECURITY));
 
 		
 		for (int i = 0; i < this.actionList.length; i++) {
@@ -96,11 +97,12 @@
                 }
 			}
 			
-			propertyElement.addChild(actionElem);
+			paramElement.addChild(actionElem);
 		}
 		
 		ParameterImpl param = new ParameterImpl();
-		param.setParameterElement(propertyElement);
+		param.setParameterElement(paramElement);
+        param.setName(WSSHandlerConstants.OUTFLOW_SECURITY);
 		return param;
 	}
 

Modified: webservices/axis2/trunk/java/modules/xml/src/org/apache/axis2/om/impl/llom/serialize/StreamingOMSerializer.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/xml/src/org/apache/axis2/om/impl/llom/serialize/StreamingOMSerializer.java?rev=372460&r1=372459&r2=372460&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/xml/src/org/apache/axis2/om/impl/llom/serialize/StreamingOMSerializer.java
(original)
+++ webservices/axis2/trunk/java/modules/xml/src/org/apache/axis2/om/impl/llom/serialize/StreamingOMSerializer.java
Wed Jan 25 22:43:04 2006
@@ -117,8 +117,8 @@
             throws XMLStreamException {
         String prefix = reader.getPrefix();
         String nameSpaceName = reader.getNamespaceURI();
-        String writer_prefix = writer.getPrefix(nameSpaceName);
         if (nameSpaceName != null) {
+            String writer_prefix = writer.getPrefix(nameSpaceName);
             if (writer_prefix != null) {
                 writer.writeStartElement(nameSpaceName, reader.getLocalName());
             } else {



Mime
View raw message