Env: Struts 1.2.9, Axis 1.4
Where should the number of rooms (bed, bath, etc.) be calculated
so that the roomCount can be accessed in a Struts Action and displayed on a jsp page?

public class Property implements Serializable {
        private Set rooms = null;
....
}

public class Room implements Serializable {
        private Type type = null;
....
}

The following doesn't work in an Axis web client environment

        public Integer getRoomCount() {
                return roomCount;
        }
        public void setRoomCount(Integer typeId) {
                Integer count = 0;
                Set rooms = this.getRooms();
                for (Iterator itr=rooms.iterator(); itr.hasNext(); )
                {
                        Room room = (Room)itr.next();
                        Type type = room.getType();
                        if(type.getId().equals(typeId)) {
                                ++count;
                        }
                }
                this.roomCount = count;
        }
because the code auto-generated from WSDL looks like this
   public java.lang.Integer getRoomCount() {
       return roomCount;
   }
   public void setRoomCount(java.lang.Integer roomCount) {
       this.roomCount = roomCount;
   }

Any suggestions would be greatly appreciated.

_________________________________________________________________
Download now! Visit http://www.telusmobility.com/msnxbox/ to enter and see how cool it is to get Messenger with you on your cell phone. http://www.telusmobility.com/msnxbox/


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to