axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From davidills...@apache.org
Subject svn commit: r470429 - /webservices/axis2/trunk/java/modules/addressing/src/org/apache/axis2/handlers/addressing/AddressingFinalInHandler.java
Date Thu, 02 Nov 2006 17:24:28 GMT
Author: davidillsley
Date: Thu Nov  2 09:24:26 2006
New Revision: 470429

URL: http://svn.apache.org/viewvc?view=rev&rev=470429
Log:
Replace cast to SOAPHeaderBlock with cast to OMElement to
protect against an incorrectly populated SOAPHeader

Modified:
    webservices/axis2/trunk/java/modules/addressing/src/org/apache/axis2/handlers/addressing/AddressingFinalInHandler.java

Modified: webservices/axis2/trunk/java/modules/addressing/src/org/apache/axis2/handlers/addressing/AddressingFinalInHandler.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/addressing/src/org/apache/axis2/handlers/addressing/AddressingFinalInHandler.java?view=diff&rev=470429&r1=470428&r2=470429
==============================================================================
--- webservices/axis2/trunk/java/modules/addressing/src/org/apache/axis2/handlers/addressing/AddressingFinalInHandler.java
(original)
+++ webservices/axis2/trunk/java/modules/addressing/src/org/apache/axis2/handlers/addressing/AddressingFinalInHandler.java
Thu Nov  2 09:24:26 2006
@@ -1,6 +1,7 @@
 package org.apache.axis2.handlers.addressing;
 
 import org.apache.axiom.om.OMAttribute;
+import org.apache.axiom.om.OMElement;
 import org.apache.axiom.soap.SOAPHeader;
 import org.apache.axiom.soap.SOAPHeaderBlock;
 import org.apache.axis2.AxisFault;
@@ -47,15 +48,15 @@
     protected void extractToEprReferenceParameters(EndpointReference toEPR, SOAPHeader header,
String namespace) {
         Iterator headerBlocks = header.getChildElements();
         while (headerBlocks.hasNext()) {
-            SOAPHeaderBlock soapHeaderBlock = (SOAPHeaderBlock) headerBlocks.next();
-            OMAttribute isRefParamAttr = soapHeaderBlock.getAttribute(new QName(namespace,
"IsReferenceParameter"));
+            OMElement headerElement = (OMElement) headerBlocks.next();
+            OMAttribute isRefParamAttr = headerElement.getAttribute(new QName(namespace,
"IsReferenceParameter"));
             if (log.isTraceEnabled()){
-                log.trace("extractToEprReferenceParameters: Checking header: "+soapHeaderBlock.getQName());
+                log.trace("extractToEprReferenceParameters: Checking header: "+headerElement.getQName());
             }
             if (isRefParamAttr != null && "true".equals(isRefParamAttr.getAttributeValue()))
{
-                toEPR.addReferenceParameter(soapHeaderBlock.getQName(), soapHeaderBlock.getText());
+                toEPR.addReferenceParameter(headerElement.getQName(), headerElement.getText());
                 if (log.isTraceEnabled()){
-                    log.trace("extractToEprReferenceParameters: Header: "+soapHeaderBlock.getQName()+"
has IsReferenceParameter attribute. Adding to toEPR.");
+                    log.trace("extractToEprReferenceParameters: Header: "+headerElement.getQName()+"
has IsReferenceParameter attribute. Adding to toEPR.");
                 }
             }
         }



---------------------------------------------------------------------
To unsubscribe, e-mail: axis-cvs-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-cvs-help@ws.apache.org


Mime
View raw message