You are viewing a plain text version of this content. The canonical link for it is here.
Posted to axis-cvs@ws.apache.org by di...@apache.org on 2004/06/15 19:26:34 UTC

cvs commit: ws-axis/java/src/org/apache/axis/message MessageElement.java

dims        2004/06/15 10:26:34

  Modified:    java/src/org/apache/axis/message MessageElement.java
  Log:
  Ensure getFirstChild on SOAPBody works fine.
  
  Revision  Changes    Path
  1.168     +3 -2      ws-axis/java/src/org/apache/axis/message/MessageElement.java
  
  Index: MessageElement.java
  ===================================================================
  RCS file: /home/cvs/ws-axis/java/src/org/apache/axis/message/MessageElement.java,v
  retrieving revision 1.167
  retrieving revision 1.168
  diff -u -r1.167 -r1.168
  --- MessageElement.java	18 Apr 2004 18:07:36 -0000	1.167
  +++ MessageElement.java	15 Jun 2004 17:26:34 -0000	1.168
  @@ -295,8 +295,9 @@
       public Attributes getAttributesEx() { return attributes; }
   
       public Node getFirstChild() {
  -        if(children != null && !children.isEmpty()){
  -            return (Node)children.get(0);
  +        Iterator iterator = getChildElements();
  +        if(iterator != null && iterator.hasNext()){
  +            return (Node)iterator.next();
           }else{
               return null;
           }