beehive-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Eddie O'Neil" <ekon...@bea.com>
Subject Re: svn commit: r331277 - /beehive/trunk/wsm/src/core/org/apache/beehive/wsm/util/HandlerChainParser.java
Date Tue, 08 Nov 2005 04:13:55 GMT

   Excellent!  That's great progress -- I'd not written any tests yet to 
verify the behavior of the handler config file.

   Thanks for making it namespace aware.

Eddie



Changshin Lee wrote:
> With this fix, now wsm-samples, particularly the handler sample works fine.
> 
> Ias
> 
> On Nov 8, 2005, at 12:05 AM, ias@apache.org wrote:
> 
>> Author: ias
>> Date: Mon Nov  7 07:05:51 2005
>> New Revision: 331277
>>
>> URL: http://svn.apache.org/viewcvs?rev=331277&view=rev
>> Log:
>> Make this parser aware of J2EE namespace when it comes to handler 
>> element.
>>
>> Modified:
>>     
>> beehive/trunk/wsm/src/core/org/apache/beehive/wsm/util/HandlerChainParser.java 
>>
>>
>> Modified: 
>> beehive/trunk/wsm/src/core/org/apache/beehive/wsm/util/HandlerChainParser.java 
>>
>> URL: 
>> http://svn.apache.org/viewcvs/beehive/trunk/wsm/src/core/org/apache/beehive/wsm/util/HandlerChainParser.java?rev=331277&r1=331276&r2=331277&view=diff

>>
>> ============================================================================== 
>>
>> --- 
>> beehive/trunk/wsm/src/core/org/apache/beehive/wsm/util/HandlerChainParser.java 
>> (original)
>> +++ 
>> beehive/trunk/wsm/src/core/org/apache/beehive/wsm/util/HandlerChainParser.java 
>> Mon Nov  7 07:05:51 2005
>> @@ -42,6 +42,7 @@
>>   */
>>  public class HandlerChainParser {
>>
>> +    private static final String NAMESPACE_J2EE = 
>> "http://java.sun.com/xml/ns/j2ee";
>>      private static final String W3C_XML_SCHEMA = 
>> "http://www.w3.org/2001/XMLSchema";
>>      private static final String JAXP_SCHEMA_LANGUAGE = 
>> "http://java.sun.com/xml/jaxp/properties/schemaLanguage";
>>      private static final String JAXP_SCHEMA_SOURCE = 
>> "http://java.sun.com/xml/jaxp/properties/schemaSource";
>> @@ -110,25 +111,25 @@
>>              NodeList portComponentArray = 
>> handlerChain.getElementsByTagName("handler");
>>              for(int k = 0; k < portComponentArray.getLength(); k++) {
>>                  Element parent = (Element)portComponentArray.item(k);
>> -                String handlerName = 
>> DomUtils.getChildElementText(parent, "handler-name");
>> -                String handlerClassName = 
>> DomUtils.getChildElementText(parent, "handler-class");
>> +                String handlerName = 
>> DomUtils.getChildElementText(parent, NAMESPACE_J2EE, "handler-name");
>> +                String handlerClassName = 
>> DomUtils.getChildElementText(parent, NAMESPACE_J2EE, "handler-class");
>>
>>                  HashMap<String, String> initParams = new 
>> HashMap<String, String>();
>>                  ArrayList<String> roles = new ArrayList<String>();
>>                  ArrayList<String> headers = new ArrayList<String>();
>>
>> -                NodeList initParamList = 
>> parent.getElementsByTagName("init-param");
>> +                NodeList initParamList = 
>> parent.getElementsByTagNameNS(NAMESPACE_J2EE, "init-param");
>>                  if(initParamList != null) {
>>                      for(int i = 0; i < initParamList.getLength(); i++) {
>>                          Element initParam = 
>> (Element)initParamList.item(i);
>>                          initParams.put(
>> -                            DomUtils.getChildElementText(initParam, 
>> "param-name"),
>> -                            DomUtils.getChildElementText(initParam, 
>> "param-value")
>> +                            DomUtils.getChildElementText(initParam, 
>> NAMESPACE_J2EE, "param-name"),
>> +                            DomUtils.getChildElementText(initParam, 
>> NAMESPACE_J2EE, "param-value")
>>                          );
>>                      }
>>                  }
>>
>> -                NodeList soapHeaderList = 
>> parent.getElementsByTagName("soap-header");
>> +                NodeList soapHeaderList = 
>> parent.getElementsByTagNameNS(NAMESPACE_J2EE, "soap-header");
>>                  if(soapHeaderList != null) {
>>                      for(int i = 0; i < soapHeaderList.getLength(); i++)
>>                          headers.add(
>> @@ -136,7 +137,7 @@
>>                          );
>>                  }
>>
>> -                NodeList soapRoleList = 
>> parent.getElementsByTagName("soap-role");
>> +                NodeList soapRoleList = 
>> parent.getElementsByTagNameNS(NAMESPACE_J2EE, "soap-role");
>>                  if(soapRoleList != null) {
>>                      for(int i = 0; i < soapRoleList.getLength(); i++)
>>                          headers.add(
>>
>>
> 
> 


Mime
View raw message