User: jung    
  Date: 01/01/03 05:54:34

  Modified:    src/org/zoap/soap/meta/string RequestType.java
                        ResponseType.java
  Log:
  exception redesign. Improved null-pointer treatment. coherent environment and 
logging facilities.
  LGPL references.
  
  Revision  Changes    Path
  1.4       +25 -97    zoap/src/org/zoap/soap/meta/string/RequestType.java
  
  Index: RequestType.java
  ===================================================================
  RCS file: /products/cvs/ejboss/zoap/src/org/zoap/soap/meta/string/RequestType.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- RequestType.java  2000/12/22 15:49:43     1.3
  +++ RequestType.java  2001/01/03 13:54:33     1.4
  @@ -1,45 +1,22 @@
   /*
  - *   $Id: RequestType.java,v 1.3 2000/12/22 15:49:43 jung Exp $
  - *   Copyright 2000 (C) infor:business solutions AG, Hauerstrasse 12,
  - *   D-66299 Friedrichsthal, Germany. All Rights Reserved.
  - *
  - *   License Statement
  - *
  - *   Redistribution and use of this software and associated documentation 
("Software"), with or without
  - *   modification, are permitted provided that the following conditions are met:
  - *
  - *   1.      Redistributions of source code must retain copyright statements and 
notices.
  - *           Redistributions must also contain a copy of this document.
  - *
  - *   2.      Redistributions in binary form must reproduce the attached copyright 
notice, this list of
  - *           conditions and the following disclaimer in the documentation and/or 
other materials provided
  - *           with the distribution.
  - *
  - *   3.      The end-user documentation included with the redistribution, if any, 
must include the following
  - *           acknowledgment: "This product includes software developed by infor: 
business solutions AG
  - *           (http://www.infor.de/)." Alternately, this acknowledgment may appear 
in the software itself,
  - *           if and wherever such third-party acknowledgments normally appear.
  - *
  - *   4.      The name "infor" must not be used to endorse or promote products 
derived from this
  - *           Software without prior written permission of infor: business solutions 
AG.
  - *           For written permission, please contact [EMAIL PROTECTED]
  - *
  - *   5.      Products derived from this Software may not be called "infor" nor may 
"infor" appear
  - *           in their names without prior written permission of infor: business 
solutions AG. infor
  - *           is a registered trademark of infor:business solutions AG.
  - *
  - *   Disclaimer
  - *
  - *   THIS SOFTWARE IS PROVIDED BY INFOR: BUSINESS SOLUTIONS AG AND CONTRIBUTORS "AS 
IS" AND ANY
  - *   EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
WARRANTIES OF
  - *   MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
  - *
  - *   IN NO EVENT SHALL INFOR: BUSINESS SOLUTIONS AG OR ITS CONTRIBUTORS BE LIABLE 
FOR ANY DIRECT,
  - *   INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, 
BUT NOT LIMITED TO,
  - *   PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR 
BUSINESS INTERRUPTION)
  - *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 
LIABILITY, OR TORT
  - *   (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
SOFTWARE,
  - *   EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  + * $Source: 
/products/cvs/ejboss/zoap/src/org/zoap/soap/meta/string/RequestType.java,v $
  + * The Zero-effort Object Access Package is a library to support XML/SOAP 
serialisation and invocation.
  + * Copyright (c) 2000 infor business solutions AG, Hauerstrasse 12,
  + * D-66299 Friedrichsthal, Germany. All Rights Reserved.
  + *
  + * This library is free software; you can redistribute it and/or
  + * modify it under the terms of the GNU Lesser General Public
  + * License as published by the Free Software Foundation; either
  + * version 2.1 of the License, or (at your option) any later version.
  + *
  + * This library is distributed in the hope that it will be useful,
  + * but WITHOUT ANY WARRANTY; without even the implied warranty of
  + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  + * Lesser General Public License for more details.
  + *
  + * You should have received a copy of the GNU Lesser General Public
  + * License along with this library; if not, write to the Free Software
  + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
    */
   
   package org.zoap.soap.meta.string;
  @@ -90,8 +67,6 @@
        /** public constructor is responsible for initialising the meta-data */
        public RequestType() {
   
  -             if (Environment.DEBUG_SOAP && Environment.DEBUG_SOAP_META)
  -                     Environment.out.println(toString() + "()\n");
   
                setAssociatedClass(MethodRequest.class);
        }
  @@ -130,8 +105,9 @@
        /** this is to produce the arguments inside this request directly from the 
string-based request structure */
   
        public String getVerboseElements(Object target) throws TypeException {
  -             try {
  -                     MethodRequest methodRequest = (MethodRequest)target;
  +
  +             if(target instanceof MethodRequest) {
  +            MethodRequest methodRequest = (MethodRequest)target;
                        String result = "";
   
                        for (int count = 0; count < 
methodRequest.getArguments().length; count++)
  @@ -139,11 +115,10 @@
                                argumentNames[count], argumentSchemas[count]);
   
                        return result;
  -             } catch (NullPointerException e) {
  -                     throw new TypeException();
  -             } catch (ClassCastException e) {
  -                     throw new TypeException();
  -             }
  +             } else {
  +            throw new TypeException(toString()+".getVerboseElements("+target+
  +                "): could only operate on org.zoap.soap.MethodRequest!");
  +        }
        }
   
        /** setting the content establishes the method inside the request structure */
  @@ -162,53 +137,3 @@
        }
   
   }
  -
  -/*
  - *   $Log: RequestType.java,v $
  - *   Revision 1.3  2000/12/22 15:49:43  jung
  - *   repackaged thread pooling. Coherent environment. Exception extensions.
  - *   
  - *   Revision 1.2  2000/12/04 12:36:18  jung
  - *   adopted to latest jboss container,
  - *   
  - *   added decimal and date
  - *   
  - *   removed some problems due to forward-referencing in meta-data
  - *   
  - *   added serialisation policy
  - *   
  - *   Revision 1.1.1.1  2000/08/10 21:07:21  jung
  - *   Initial import.
  - *   
  - *   
  - *   Revision 1.1.2.1  2000/08/04 17:20:19  jung
  - *   close to beta stadium. Meta-Data import now works.
  - *   
  - *   Revision 1.1.2.2  2000/07/20 14:35:26  jung
  - *   some refactoring inside infor:xml
  - *
  - *   Revision 1.1.2.1  2000/07/17 12:46:17  jung
  - *   refactored package and meta-model
  - *
  - *   Revision 1.1.2.1  2000/07/13 12:46:19  jung
  - *   package renaming, most of the zoap stuff now under org.zoap
  - *   util and http stay infor.ce, containerInvoker etc move to org.jboss
  - *
  - *   changed the makefile, adopted most of the licenses
  - *
  - *   Revision 1.1.2.3  2000/07/11 08:08:34  jung
  - *   added functionality to store retrieve a part of a types elements
  - *   within "ignored" strings. Useful for writing generic handlers that
  - *   just process a part of the XML and transfer the rest.
  - *
  - *   Revision 1.1.2.2  2000/07/07 15:50:02  jung
  - *   Request-Response Structure close to MS-SOAP
  - *
  - *   removed a mega-bug in return element
  - *
  - *   Revision 1.1.2.1  2000/07/07 12:45:21  jung
  - *   changed the method-request and response structure to be more
  - *   explicit instead of just serializable (such that MS-SOAP gets the
  - *   chance ot do something with that stuff).
  - *
  - */
  
  
  
  1.4       +19 -89    zoap/src/org/zoap/soap/meta/string/ResponseType.java
  
  Index: ResponseType.java
  ===================================================================
  RCS file: /products/cvs/ejboss/zoap/src/org/zoap/soap/meta/string/ResponseType.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- ResponseType.java 2000/12/22 15:49:43     1.3
  +++ ResponseType.java 2001/01/03 13:54:33     1.4
  @@ -1,47 +1,25 @@
   /*
  - *   $Id: ResponseType.java,v 1.3 2000/12/22 15:49:43 jung Exp $
  - *   Copyright 2000 (C) infor:business solutions AG, Hauerstrasse 12,
  - *   D-66299 Friedrichsthal, Germany. All Rights Reserved.
  - *
  - *   License Statement
  - *
  - *   Redistribution and use of this software and associated documentation 
("Software"), with or without
  - *   modification, are permitted provided that the following conditions are met:
  - *
  - *   1.      Redistributions of source code must retain copyright statements and 
notices.
  - *           Redistributions must also contain a copy of this document.
  - *
  - *   2.      Redistributions in binary form must reproduce the attached copyright 
notice, this list of
  - *           conditions and the following disclaimer in the documentation and/or 
other materials provided
  - *           with the distribution.
  - *
  - *   3.      The end-user documentation included with the redistribution, if any, 
must include the following
  - *           acknowledgment: "This product includes software developed by infor: 
business solutions AG
  - *           (http://www.infor.de/)." Alternately, this acknowledgment may appear 
in the software itself,
  - *           if and wherever such third-party acknowledgments normally appear.
  - *
  - *   4.      The name "infor" must not be used to endorse or promote products 
derived from this
  - *           Software without prior written permission of infor: business solutions 
AG.
  - *           For written permission, please contact [EMAIL PROTECTED]
  - *
  - *   5.      Products derived from this Software may not be called "infor" nor may 
"infor" appear
  - *           in their names without prior written permission of infor: business 
solutions AG. infor
  - *           is a registered trademark of infor:business solutions AG.
  - *
  - *   Disclaimer
  - *
  - *   THIS SOFTWARE IS PROVIDED BY INFOR: BUSINESS SOLUTIONS AG AND CONTRIBUTORS "AS 
IS" AND ANY
  - *   EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
WARRANTIES OF
  - *   MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
  - *
  - *   IN NO EVENT SHALL INFOR: BUSINESS SOLUTIONS AG OR ITS CONTRIBUTORS BE LIABLE 
FOR ANY DIRECT,
  - *   INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, 
BUT NOT LIMITED TO,
  - *   PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR 
BUSINESS INTERRUPTION)
  - *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 
LIABILITY, OR TORT
  - *   (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
SOFTWARE,
  - *   EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  + * $Source: 
/products/cvs/ejboss/zoap/src/org/zoap/soap/meta/string/ResponseType.java,v $
  + * The Zero-effort Object Access Package is a library to support XML/SOAP 
serialisation and invocation.
  + * Copyright (c) 2000 infor business solutions AG, Hauerstrasse 12,
  + * D-66299 Friedrichsthal, Germany. All Rights Reserved.
  + *
  + * This library is free software; you can redistribute it and/or
  + * modify it under the terms of the GNU Lesser General Public
  + * License as published by the Free Software Foundation; either
  + * version 2.1 of the License, or (at your option) any later version.
  + *
  + * This library is distributed in the hope that it will be useful,
  + * but WITHOUT ANY WARRANTY; without even the implied warranty of
  + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  + * Lesser General Public License for more details.
  + *
  + * You should have received a copy of the GNU Lesser General Public
  + * License along with this library; if not, write to the Free Software
  + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
    */
   
  +
   package org.zoap.soap.meta.string;
   
   import org.zoap.soap.Environment;
  @@ -87,8 +65,6 @@
        /** public constructor is empty */
        public ResponseType() {
   
  -             if (Environment.DEBUG_SOAP && Environment.DEBUG_SOAP_META)
  -                     Environment.out.print(toString() + "()\n");
   
                setAssociatedClass(MethodResponse.class);
        }
  @@ -145,52 +121,3 @@
   
   }
   
  -/*
  - *   $Log: ResponseType.java,v $
  - *   Revision 1.3  2000/12/22 15:49:43  jung
  - *   repackaged thread pooling. Coherent environment. Exception extensions.
  - *   
  - *   Revision 1.2  2000/12/04 12:36:18  jung
  - *   adopted to latest jboss container,
  - *   
  - *   added decimal and date
  - *   
  - *   removed some problems due to forward-referencing in meta-data
  - *   
  - *   added serialisation policy
  - *   
  - *   Revision 1.1.1.1  2000/08/10 21:07:22  jung
  - *   Initial import.
  - *   
  - *   
  - *   Revision 1.1.2.1  2000/08/04 17:20:19  jung
  - *   close to beta stadium. Meta-Data import now works.
  - *   
  - *   Revision 1.1.2.2  2000/07/20 14:35:26  jung
  - *   some refactoring inside infor:xml
  - *
  - *   Revision 1.1.2.1  2000/07/17 12:46:17  jung
  - *   refactored package and meta-model
  - *
  - *   Revision 1.1.2.1  2000/07/13 12:46:19  jung
  - *   package renaming, most of the zoap stuff now under org.zoap
  - *   util and http stay infor.ce, containerInvoker etc move to org.jboss
  - *
  - *   changed the makefile, adopted most of the licenses
  - *
  - *   Revision 1.1.2.2  2000/07/11 08:08:34  jung
  - *   added functionality to store retrieve a part of a types elements
  - *   within "ignored" strings. Useful for writing generic handlers that
  - *   just process a part of the XML and transfer the rest.
  - *
  - *   Revision 1.1.2.1  2000/07/07 15:50:54  jung
  - *   Request-Response Structure close to MS-SOAP
  - *
  - *   removed a mega-bug in return element
  - *
  - *   Revision 1.1.2.1  2000/07/07 12:45:21  jung
  - *   changed the method-request and response structure to be more
  - *   explicit instead of just serializable (such that MS-SOAP gets the
  - *   chance ot do something with that stuff).
  - *
  - */
  
  
  

Reply via email to