User: jung
Date: 00/12/04 04:35:50
Modified: src/de/infor/ce/http BodyException.java Command.java
Environment.java HeaderException.java
HeaderFormatException.java HttpException.java
ProcessException.java Request.java Response.java
Server.java StartLineException.java
StatusCodeException.java
UnknownHeaderFieldException.java
UnknownRequestMethodException.java http.dfPackage
Log:
adopted to latest jboss container,
added decimal and date
removed some problems due to forward-referencing in meta-data
added serialisation policy
Revision Changes Path
1.2 +92 -88 zoap/src/de/infor/ce/http/BodyException.java
Index: BodyException.java
===================================================================
RCS file: /products/cvs/ejboss/zoap/src/de/infor/ce/http/BodyException.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- BodyException.java 2000/08/10 21:06:38 1.1
+++ BodyException.java 2000/12/04 12:35:46 1.2
@@ -1,91 +1,101 @@
-/*
- * $Id: BodyException.java,v 1.1 2000/08/10 21:06:38 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.
- */
-
-package de.infor.ce.http;
-
-/**
- * This exception is thrown if some error occurred when outputting or
- * reading the body of a command.
- *
- * @see <related>
- * @author $Author: jung $
- * @version $Revision: 1.1 $
- */
-
-public class BodyException extends HttpException {
-}
-
-/*
+/*
+ * $Id: BodyException.java,v 1.2 2000/12/04 12:35:46 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.
+ */
+
+package de.infor.ce.http;
+
+/**
+ * This exception is thrown if some error occurred when outputting or
+ * reading the body of a command.
+ *
+ * @see <related>
+ * @author $Author: jung $
+ * @version $Revision: 1.2 $
+ */
+
+public class BodyException extends HttpException {
+}
+
+/*
* $Log: BodyException.java,v $
- * Revision 1.1 2000/08/10 21:06:38 jung
- * Initial revision
- *
- * Revision 1.1.1.1.2.1 2000/07/13 12:46:14 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.1.1 2000/07/06 14:11:25 jung
- * Import of a pre beta version of ZOAP source with a new directory structure,
- * ant-based make, apache-kind of license, etc.
- *
- * jars are coming later because of cvs-history reasons.
- *
- * Revision 1.1.2.1 2000/06/13 15:01:42 jung
- * SOAP support begins to run
- *
- * Revision 1.2 2000/06/07 10:18:58 jung
- * added some service functionality to llokup other
- * beans and yourself as a bean. extended the test case
- * for that purpose.
- *
- * added a lookup service.
- *
- * Revision 1.1.1.1 2000/05/15 10:38:34 jung
- * Initial import of the directory structure. Contains templates and a batch file
to
- * create API documentation. Also contains the not yet
- * fully running directory service (AFDS).
- *
- */
+ * Revision 1.2 2000/12/04 12:35:46 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:06:38 jung
+ * Initial import.
+ *
+ *
+ * Revision 1.1.1.1.2.1 2000/07/13 12:46:14 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.1.1 2000/07/06 14:11:25 jung
+ * Import of a pre beta version of ZOAP source with a new directory structure,
+ * ant-based make, apache-kind of license, etc.
+ *
+ * jars are coming later because of cvs-history reasons.
+ *
+ * Revision 1.1.2.1 2000/06/13 15:01:42 jung
+ * SOAP support begins to run
+ *
+ * Revision 1.2 2000/06/07 10:18:58 jung
+ * added some service functionality to llokup other
+ * beans and yourself as a bean. extended the test case
+ * for that purpose.
+ *
+ * added a lookup service.
+ *
+ * Revision 1.1.1.1 2000/05/15 10:38:34 jung
+ * Initial import of the directory structure. Contains templates and a batch file
to
+ * create API documentation. Also contains the not yet
+ * fully running directory service (AFDS).
+ *
+ */
1.2 +545 -557 zoap/src/de/infor/ce/http/Command.java
Index: Command.java
===================================================================
RCS file: /products/cvs/ejboss/zoap/src/de/infor/ce/http/Command.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- Command.java 2000/08/10 21:06:40 1.1
+++ Command.java 2000/12/04 12:35:46 1.2
@@ -1,560 +1,554 @@
-/*
- * $Id: Command.java,v 1.1 2000/08/10 21:06:40 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.
- */
-
-package de.infor.ce.http;
-
-import java.util.Hashtable;
-import java.io.IOException;
-import java.io.PrintWriter;
-import java.io.BufferedReader;
-
-/**
- * Java representation of a single, abstract http command.
- *
- * Each command belongs to a version of the http protocol stored in the
minor.major format.
- * It has a header stored in a hashtable and a body stored in a Java string,
- * depending on the concrete usage of that command.
- *
- * As for the header, there are
- * general and entitity header options that each command is able to support.
Further
- * headers can be extended in subclasses of Command.
- *
- * As for the body, it must be nun-null in order to be legal
- *
- * @see <related>
- * @author $Author: jung $
- * @version $Revision: 1.1 $
- */
-
-public abstract class Command {
-
- /**
- * the minor protocol version
- */
-
- private int protocolMinorVersion=1;
-
- /**
- * the major protocol version
- */
-
- private int protocolMajorVersion=1;
-
- /**
- * the length of this command, -1 if not indicated
- */
-
- private int length=-1;
-
- /**
- * whether the connection should be closed
- */
-
- private boolean connectionClose;
-
- /**
- * description of the understood general headers
- *
- * Connection is handled "natively"
- */
-
- public static String[] GENERAL_HEADERS= new String[] {
- "Cache-Control", "Date", "Pragma", "Trailer", "Transfer-Encoding",
- "Upgrade", "Via", "Warning"};
-
- /**
- * description of the understood entity headers
- *
- * Content-Length is handled "natively"
- */
-
- public static String[] ENTITY_HEADERS= new String[] {
- "Allow", "Content-Encoding", "Content-Language", "Content-Location",
- "Content-MD5", "Content-Range", "Content-Type", "Expires", "Last-Modified"
- };
-
- /**
- * a hashtable to store the header contents
- */
-
- private Hashtable header;
-
- /**
- * the content of the command
- */
-
- private String body;
-
- /**
- * constructor: initially set the header (copy semantics), the protocol version
- * and the body
- */
-
- public Command(Hashtable theHeader,int theMinor, int theMajor, String theBody,
boolean close) {
-
- if(Environment.DEBUG_HTTP)
-
Environment.out.println("Command("+theHeader+","+theMinor+","+theMajor+","+theBody+","+close+")");
-
- // null allowed in copying hashtable?
- if(theHeader!=null)
- header=new Hashtable(theHeader);
- else
- header=new Hashtable();
-
- // set protocol
- protocolMinorVersion=theMinor;
- protocolMajorVersion=theMajor;
-
- // set body
- setBody(theBody);
-
- // set the connection close flag
- connectionClose=close;
- }
-
- /**
- * writes this http command to an output-writer @arg writer
- * @throws IOException if some IO things are broken
- * @throws HttpException if some internal structure of the command is broken.
- *
- * This method is final since the general structure of a command is fixed: It
consists
- * of a start line, a header section and a body, hence this method calls the
- * writeStartLine(), writeHeaders() and writeBody() methods in turn
- */
-
- final public void write(PrintWriter writer) throws IOException, HttpException {
-
- if(Environment.DEBUG_HTTP)
- Environment.out.println("Command.write("+writer+")");
-
- // first the initial line which differs depending on the proper subtype of
command
- writeStartLine(writer);
-
- // next the header
- writeHeader(writer);
-
- // a crlf line is left between header and content
- writer.println();
-
- // next the body
- writeBody(writer);
- }
-
- /**
- * the abstract method to write the start line of an http command
- * should be implemented by the proper subtypes. It is not exposed publically.
- */
-
- abstract protected void writeStartLine(PrintWriter writer) throws IOException,
StartLineException;
-
- /**
- * private method to write the header of this command to the writer @arg writer
- * it is private, because the header structure is fixed. It calls the extendible
method
- * writeHeaderLine() which can be overwritten in order to enforce more
- * specific format restrictions.
- */
-
- protected void writeHeader(PrintWriter writer) throws IOException,
HeaderException {
-
- if(Environment.DEBUG_HTTP)
- Environment.out.println("Command.writeHeader("+writer+")");
-
- //simply take all the keys out of the hashtable
- java.util.Enumeration allHeaders=header.keys();
-
- // and write them in the correct format to the stream
- while(allHeaders.hasMoreElements()) {
- String fieldName=(String) allHeaders.nextElement();
- Object fieldValue=header.get(fieldName);
- writeHeaderLine(fieldName,fieldValue,writer);
- }
-
- // utter the length if correctly set
- if(length!=-1)
- writer.println("Content-Length:"+length);
-
- if(connectionClose)
- writer.println("Connection:Close");
- else
- writer.println("Connection:Keep-Alive");
-
- }
-
- /**
- * this method is called to output a single line of the header that is determined
by
- * its string-based name and its arbitrary fieldValue
- *
- * the default behaviour is to use the toString method on the value to reach
- * some pattern like fieldName:fieldValue
- *
- * overwrite this to implement more specific header formats.
- */
-
- protected void writeHeaderLine(String fieldName, Object fieldValue, PrintWriter
writer)
- throws IOException, HeaderException {
-
- if(Environment.DEBUG_HTTP)
-
Environment.out.println("Command.writeHeaderLine("+fieldName+","+fieldValue+","+writer+")");
-
- writer.println(fieldName+":"+fieldValue);
- }
-
- /**
- * the writeBody outputs the body of the command.
- *
- * the default implementation prints the body via toString.
- *
- * overwrite this to get more reasonable formats.
- */
-
- protected void writeBody(PrintWriter writer) throws IOException, BodyException {
-
- if(Environment.DEBUG_HTTP)
- Environment.out.println("Command.writeBody("+writer+")");
-
- if(getBody()!=null)
- writer.print(getBody());
- }
-
- /**
- * parses an incoming command from a character stream. Is final because of the
fixed structure
- * of a command, because it always starts by parsing the start line, parsing the
headers and
- * parsing the body, afterwards.
- */
-
- final public void read(BufferedReader reader)
- throws IOException, HttpException {
-
- if(Environment.DEBUG_HTTP)
- Environment.out.println("Command.read("+reader+")");
-
- // reinitialise length
- length=-1;
-
- // first the startline
- readStartLine(reader);
-
- // then the headers including a trailing crlf
- readHeader(reader);
-
- // then the body
- readBody(reader);
-
- }
-
- /**
- * an abstract method to read the start line, must be implemented by the proper
- * subtypes of command
- */
-
- abstract protected void readStartLine(BufferedReader reader) throws IOException,
StartLineException;
-
- /**
- * a private method that can be called from within read to
- * parse the header of a command
- * @throws HeaderException if the header format is violated
- */
-
- protected void readHeader(BufferedReader reader) throws IOException,
HeaderException {
-
- if(Environment.DEBUG_HTTP)
- Environment.out.println("Command.readHeader("+reader+")");
-
- // read until a single crlf is encountered
- String line=reader.readLine();
-
- if(line==null)
- throw new IOException();
-
- while(!line.equals("")) {
-
- try{
-
- // sepearate the fieldname from the value
- readHeaderLine(line.substring(0,line.indexOf(":")),
- line.substring(line.indexOf(":")+1));
-
- } catch(IndexOutOfBoundsException e) {
-
- if(Environment.DEBUG_HTTP)
- Environment.err.println("Command.readHeader("+reader+"): encountered
formatting error "+e);
-
- throw new HeaderException();
-
- } // try
-
- // get the next line and loop
- line=reader.readLine();
-
- } // while
-
- } // readHeader
-
- /**
- * this method processes a single headerentry wrt general and entity header
- * options. At the moment just checks whether they are understood and
- * adds the unprocessed values to the hashtable. Overwrite to add features
- */
-
- protected void readHeaderLine(String fieldName, String fieldValue)
- throws UnknownHeaderFieldException, HeaderFormatException {
-
- if(Environment.DEBUG_HTTP)
-
Environment.out.println("Command.readHeaderLine("+fieldName+","+fieldValue+")");
-
- // first check whether it is the content-length thing
- try{
-
- if("Content-Length".equalsIgnoreCase(fieldName)) {
-
- while(fieldValue.startsWith(" "))
- fieldValue=fieldValue.substring(1);
-
- length=Integer.parseInt(fieldValue);
-
- return;
- }
-
- } catch(java.lang.NumberFormatException e) {
-
- if(Environment.DEBUG_HTTP)
- Environment.err.println("Command.readHeaderLine("+fieldName+";"+fieldValue+
- "): encountered number format exception"+e);
-
- throw new HeaderFormatException();
- }
-
- if("Connection".equalsIgnoreCase(fieldName)) {
-
- while(fieldValue.startsWith(" "))
- fieldValue=fieldValue.substring(1);
-
- if("Close".equalsIgnoreCase(fieldValue))
- connectionClose=true;
- else if("Keep-Alive".equalsIgnoreCase(fieldValue))
- connectionClose=false;
- else
- throw new HeaderFormatException();
-
- return;
- }
-
- // next check whether it belongs to a general heading
- for(int count=0;count<GENERAL_HEADERS.length;count++)
- if(GENERAL_HEADERS[count].equalsIgnoreCase(fieldName)) {
- header.put(GENERAL_HEADERS[count],fieldValue);
- return;
- }
-
- // could also be an entity heading
- for(int count=0;count<ENTITY_HEADERS.length;count++)
- if(ENTITY_HEADERS[count].equalsIgnoreCase(fieldName)) {
- header.put(ENTITY_HEADERS[count],fieldValue);
- return;
- }
-
- throw new UnknownHeaderFieldException();
-
- } // readHeaderLine
-
- /**
- * a method to read the body of a message, default does just
- * get the content as a big string until EOF is reached
- *
- * note that this presumes either a http/1.0-close connectionless behaviour
- * or a decent reader implementation that is able to simulate EOF depending on
- * the given encoding.
- */
-
- protected void readBody(BufferedReader reader) throws IOException, BodyException {
-
- if(Environment.DEBUG_HTTP)
- Environment.out.println("Command.readBody("+reader+")");
-
- // see whether we have a content-length encoding
- if(length!=-1) {
-
- int count=0;
-
- char[] bodyBuffer=new char[length];
-
- while(count<length)
- count+=reader.read(bodyBuffer,count,length-count);
-
- setBody(new String(bodyBuffer));
-
- } else {
-
- // else we do it line by line
- String line=reader.readLine();
- // and put it incrementally to the body
- String newBody=new String();
-
- while(line!=null) {
- newBody=(String) body+"\r\n"+line;
- line=reader.readLine();
- }
-
- // determine the length of the body posthum
- setBody(newBody);
-
- } // if
-
- } // readBody
-
- /**
- * accessor to minor protocol version
- */
-
- public int getProtocolMinorVersion() {
- return protocolMinorVersion;
- }
-
- /**
- * accessor to major protocol version
- */
-
- public int getProtocolMajorVersion() {
- return protocolMajorVersion;
- }
-
- /**
- * accessor to minor protocol version
- */
-
- public void setProtocolMinorVersion(int theMinor) {
- protocolMinorVersion=theMinor;
- }
-
- /**
- * accessor to major protocol version
- */
-
- public void setProtocolMajorVersion(int theMajor) {
- protocolMajorVersion=theMajor;
- }
-
- /**
- * reconstruct protocol number string
- */
-
- public String getProtocolVersion() {
- return getProtocolMinorVersion()+"."+getProtocolMajorVersion();
- }
-
- /**
- * accessor to private hashtable
- */
-
- protected void putHeader(String key, Object value) {
- header.put(key,value);
- }
-
- /**
- * accessor to body
- */
-
- public String getBody() {
- return body;
- }
-
- /**
- * accessor to body
- */
-
- public void setBody(String theBody) {
- body=theBody;
-
- if(body!=null)
- length=theBody.length();
- else
- length=-1;
- }
-
- public void setConnectionClose(boolean flag) {
- connectionClose=flag;
- }
-
- public boolean isConnectionClose() {
- return connectionClose;
- }
-
-} // Command
-
-/*
+/*
+ * $Id: Command.java,v 1.2 2000/12/04 12:35:46 jung Exp $
+ * Copyright (c) 2000 infor:business solutions AG, Hauerstrasse 12,
+ * D-66299 Friedrichsthal, Germany. All Rights Reserved.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program 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 General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+package de.infor.ce.http;
+
+import java.util.Hashtable;
+import java.io.IOException;
+import java.io.PrintWriter;
+import java.io.BufferedReader;
+
+/**
+ * Java representation of a single, abstract http command.
+ *
+ * Each command belongs to a version of the http protocol stored in the
minor.major format.
+ * It has a header stored in a hashtable and a body stored in a Java string,
+ * depending on the concrete usage of that command.
+ *
+ * As for the header, there are
+ * general and entitity header options that each command is able to support.
Further
+ * headers can be extended in subclasses of Command.
+ *
+ * As for the body, it must be nun-null in order to be legal
+ *
+ * @see <related>
+ * @author $Author: jung $
+ * @version $Revision: 1.2 $
+ */
+
+public abstract class Command {
+
+ /**
+ * the minor protocol version
+ */
+
+ private int protocolMinorVersion=1;
+
+ /**
+ * the major protocol version
+ */
+
+ private int protocolMajorVersion=1;
+
+ /**
+ * the length of this command, -1 if not indicated
+ */
+
+ private int length=-1;
+
+ /**
+ * whether the connection should be closed
+ */
+
+ private boolean connectionClose;
+
+ /**
+ * description of the understood general headers
+ *
+ * Connection is handled "natively"
+ */
+
+ public static String[] GENERAL_HEADERS= new String[] {
+ "Cache-Control", "Date", "Pragma", "Trailer", "Transfer-Encoding",
+ "Upgrade", "Via", "Warning"};
+
+ /**
+ * description of the understood entity headers
+ *
+ * Content-Length is handled "natively"
+ */
+
+ public static String[] ENTITY_HEADERS= new String[] {
+ "Allow", "Content-Encoding", "Content-Language", "Content-Location",
+ "Content-MD5", "Content-Range", "Content-Type", "Expires", "Last-Modified"
+ };
+
+ /**
+ * a hashtable to store the header contents
+ */
+
+ private Hashtable header;
+
+ /**
+ * the content of the command
+ */
+
+ private String body;
+
+ /**
+ * constructor: initially set the header (copy semantics), the protocol version
+ * and the body
+ */
+
+ public Command(Hashtable theHeader,int theMinor, int theMajor, String theBody,
boolean close) {
+
+ if(Environment.DEBUG_HTTP)
+
Environment.out.println("Command("+theHeader+","+theMinor+","+theMajor+","+theBody+","+close+")");
+
+ // null allowed in copying hashtable?
+ if(theHeader!=null)
+ header=new Hashtable(theHeader);
+ else
+ header=new Hashtable();
+
+ // set protocol
+ protocolMinorVersion=theMinor;
+ protocolMajorVersion=theMajor;
+
+ // set body
+ setBody(theBody);
+
+ // set the connection close flag
+ connectionClose=close;
+ }
+
+ /**
+ * writes this http command to an output-writer @arg writer
+ * @throws IOException if some IO things are broken
+ * @throws HttpException if some internal structure of the command is broken.
+ *
+ * This method is final since the general structure of a command is fixed: It
consists
+ * of a start line, a header section and a body, hence this method calls the
+ * writeStartLine(), writeHeaders() and writeBody() methods in turn
+ */
+
+ final public void write(PrintWriter writer) throws IOException, HttpException {
+
+ if(Environment.DEBUG_HTTP)
+ Environment.out.println("Command.write("+writer+")");
+
+ // first the initial line which differs depending on the proper subtype of
command
+ writeStartLine(writer);
+
+ // next the header
+ writeHeader(writer);
+
+ // a crlf line is left between header and content
+ writer.println();
+
+ // next the body
+ writeBody(writer);
+ }
+
+ /**
+ * the abstract method to write the start line of an http command
+ * should be implemented by the proper subtypes. It is not exposed publically.
+ */
+
+ abstract protected void writeStartLine(PrintWriter writer) throws IOException,
StartLineException;
+
+ /**
+ * private method to write the header of this command to the writer @arg writer
+ * it is private, because the header structure is fixed. It calls the extendible
method
+ * writeHeaderLine() which can be overwritten in order to enforce more
+ * specific format restrictions.
+ */
+
+ protected void writeHeader(PrintWriter writer) throws IOException,
HeaderException {
+
+ if(Environment.DEBUG_HTTP)
+ Environment.out.println("Command.writeHeader("+writer+")");
+
+ //simply take all the keys out of the hashtable
+ java.util.Enumeration allHeaders=header.keys();
+
+ // and write them in the correct format to the stream
+ while(allHeaders.hasMoreElements()) {
+ String fieldName=(String) allHeaders.nextElement();
+ Object fieldValue=header.get(fieldName);
+ writeHeaderLine(fieldName,fieldValue,writer);
+ }
+
+ // utter the length if correctly set
+ if(length!=-1)
+ writer.println("Content-Length:"+length);
+
+ if(connectionClose)
+ writer.println("Connection:Close");
+ else
+ writer.println("Connection:Keep-Alive");
+
+ }
+
+ /**
+ * this method is called to output a single line of the header that is determined
by
+ * its string-based name and its arbitrary fieldValue
+ *
+ * the default behaviour is to use the toString method on the value to reach
+ * some pattern like fieldName:fieldValue
+ *
+ * overwrite this to implement more specific header formats.
+ */
+
+ protected void writeHeaderLine(String fieldName, Object fieldValue, PrintWriter
writer)
+ throws IOException, HeaderException {
+
+ if(Environment.DEBUG_HTTP)
+
Environment.out.println("Command.writeHeaderLine("+fieldName+","+fieldValue+","+writer+")");
+
+ writer.println(fieldName+":"+fieldValue.toString());
+ }
+
+ /**
+ * the writeBody outputs the body of the command.
+ *
+ * the default implementation prints the body via toString.
+ *
+ * overwrite this to get more reasonable formats.
+ */
+
+ protected void writeBody(PrintWriter writer) throws IOException, BodyException {
+
+ if(Environment.DEBUG_HTTP)
+ Environment.out.println("Command.writeBody("+writer+")");
+
+ if(getBody()!=null)
+ writer.print(getBody());
+ }
+
+ /**
+ * parses an incoming command from a character stream. Is final because of the
fixed structure
+ * of a command, because it always starts by parsing the start line, parsing the
headers and
+ * parsing the body, afterwards.
+ */
+
+ final public void read(BufferedReader reader)
+ throws IOException, HttpException {
+
+ if(Environment.DEBUG_HTTP)
+ Environment.out.println("Command.read("+reader+")");
+
+ // reinitialise length
+ length=-1;
+
+ // first the startline
+ readStartLine(reader);
+
+ // then the headers including a trailing crlf
+ readHeader(reader);
+
+ // then the body
+ readBody(reader);
+
+ }
+
+ /**
+ * an abstract method to read the start line, must be implemented by the proper
+ * subtypes of command
+ */
+
+ abstract protected void readStartLine(BufferedReader reader) throws IOException,
StartLineException;
+
+ /**
+ * a private method that can be called from within read to
+ * parse the header of a command
+ * @throws HeaderException if the header format is violated
+ */
+
+ protected void readHeader(BufferedReader reader) throws IOException,
HeaderException {
+
+ if(Environment.DEBUG_HTTP)
+ Environment.out.println("Command.readHeader("+reader+")");
+
+ // read until a single crlf is encountered
+ String line=reader.readLine();
+
+ if(line==null)
+ throw new IOException();
+
+ while(!line.equals("")) {
+
+ try{
+
+ // sepearate the fieldname from the value
+ readHeaderLine(line.substring(0,line.indexOf(":")),
+ line.substring(line.indexOf(":")+1));
+
+ } catch(IndexOutOfBoundsException e) {
+
+ if(Environment.DEBUG_HTTP)
+ Environment.err.println("Command.readHeader("+reader+"): encountered
formatting error "+e);
+
+ throw new HeaderException();
+
+ } // try
+
+ // get the next line and loop
+ line=reader.readLine();
+
+ } // while
+
+ } // readHeader
+
+ /**
+ * this method processes a single headerentry wrt general and entity header
+ * options. At the moment just checks whether they are understood and
+ * adds the unprocessed values to the hashtable. Overwrite to add features
+ */
+
+ protected void readHeaderLine(String fieldName, String fieldValue)
+ throws UnknownHeaderFieldException, HeaderFormatException {
+
+ if(Environment.DEBUG_HTTP)
+
Environment.out.println("Command.readHeaderLine("+fieldName+","+fieldValue+")");
+
+ // first check whether it is the content-length thing
+ try{
+
+ if("Content-Length".equalsIgnoreCase(fieldName)) {
+
+ while(fieldValue.startsWith(" "))
+ fieldValue=fieldValue.substring(1);
+
+ length=Integer.parseInt(fieldValue);
+
+ return;
+ }
+
+ } catch(java.lang.NumberFormatException e) {
+
+ if(Environment.DEBUG_HTTP)
+ Environment.err.println("Command.readHeaderLine("+fieldName+";"+fieldValue+
+ "): encountered number format exception"+e);
+
+ throw new HeaderFormatException();
+ }
+
+ if("Connection".equalsIgnoreCase(fieldName)) {
+
+ while(fieldValue.startsWith(" "))
+ fieldValue=fieldValue.substring(1);
+
+ if("Close".equalsIgnoreCase(fieldValue))
+ connectionClose=true;
+ else if("Keep-Alive".equalsIgnoreCase(fieldValue))
+ connectionClose=false;
+ else
+ throw new HeaderFormatException();
+
+ return;
+ }
+
+ // next check whether it belongs to a general heading
+ for(int count=0;count<GENERAL_HEADERS.length;count++)
+ if(GENERAL_HEADERS[count].equalsIgnoreCase(fieldName)) {
+ header.put(GENERAL_HEADERS[count],fieldValue);
+ return;
+ }
+
+ // could also be an entity heading
+ for(int count=0;count<ENTITY_HEADERS.length;count++)
+ if(ENTITY_HEADERS[count].equalsIgnoreCase(fieldName)) {
+ header.put(ENTITY_HEADERS[count],fieldValue);
+ return;
+ }
+
+ throw new UnknownHeaderFieldException();
+
+ } // readHeaderLine
+
+ /**
+ * a method to read the body of a message, default does just
+ * get the content as a big string until EOF is reached
+ *
+ * note that this presumes either a http/1.0-close connectionless behaviour
+ * or a decent reader implementation that is able to simulate EOF depending on
+ * the given encoding.
+ */
+
+ protected void readBody(BufferedReader reader) throws IOException, BodyException {
+
+ if(Environment.DEBUG_HTTP)
+ Environment.out.println("Command.readBody("+reader+")");
+
+ // see whether we have a content-length encoding
+ if(length!=-1) {
+
+ int count=0;
+
+ char[] bodyBuffer=new char[length];
+
+ while(count<length)
+ count+=reader.read(bodyBuffer,count,length-count);
+
+ setBody(new String(bodyBuffer));
+
+ } else {
+
+ // else we do it line by line
+ String line=reader.readLine();
+ // and put it incrementally to the body
+ String newBody=new String();
+
+ while(line!=null) {
+ newBody=(String) body+"\r\n"+line;
+ line=reader.readLine();
+ }
+
+ // determine the length of the body posthum
+ setBody(newBody);
+
+ } // if
+
+ } // readBody
+
+ /**
+ * accessor to minor protocol version
+ */
+
+ public int getProtocolMinorVersion() {
+ return protocolMinorVersion;
+ }
+
+ /**
+ * accessor to major protocol version
+ */
+
+ public int getProtocolMajorVersion() {
+ return protocolMajorVersion;
+ }
+
+ /**
+ * accessor to minor protocol version
+ */
+
+ public void setProtocolMinorVersion(int theMinor) {
+ protocolMinorVersion=theMinor;
+ }
+
+ /**
+ * accessor to major protocol version
+ */
+
+ public void setProtocolMajorVersion(int theMajor) {
+ protocolMajorVersion=theMajor;
+ }
+
+ /**
+ * reconstruct protocol number string
+ */
+
+ public String getProtocolVersion() {
+ return getProtocolMinorVersion()+"."+getProtocolMajorVersion();
+ }
+
+ /**
+ * accessor to private hashtable
+ */
+
+ public void putHeader(String key, Object value) {
+ header.put(key,value);
+ }
+
+ /**
+ * accessor to private hashtable
+ */
+
+ public Object getHeader(String key) {
+ return header.get(key);
+ }
+
+ /**
+ * accessor to body
+ */
+
+ public String getBody() {
+ return body;
+ }
+
+ /**
+ * accessor to body
+ */
+
+ public void setBody(String theBody) {
+ body=theBody;
+
+ if(body!=null)
+ length=theBody.length();
+ else
+ length=-1;
+ }
+
+ public void setConnectionClose(boolean flag) {
+ connectionClose=flag;
+ }
+
+ public boolean isConnectionClose() {
+ return connectionClose;
+ }
+
+} // Command
+
+/*
* $Log: Command.java,v $
- * Revision 1.1 2000/08/10 21:06:40 jung
- * Initial revision
- *
- * Revision 1.1.1.1.2.2 2000/07/17 12:46:14 jung
- * refactored package and meta-model
- *
- * Revision 1.1.1.1.2.1 2000/07/13 12:46:14 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.1.1 2000/07/06 14:11:26 jung
- * Import of a pre beta version of ZOAP source with a new directory structure,
- * ant-based make, apache-kind of license, etc.
- *
- * jars are coming later because of cvs-history reasons.
- *
- * Revision 1.1.2.1 2000/06/13 15:01:42 jung
- * SOAP support begins to run
- *
- * Revision 1.2 2000/06/07 10:18:58 jung
- * added some service functionality to llokup other
- * beans and yourself as a bean. extended the test case
- * for that purpose.
- *
- * added a lookup service.
- *
- * Revision 1.1.1.1 2000/05/15 10:38:34 jung
- * Initial import of the directory structure. Contains templates and a batch file
to
- * create API documentation. Also contains the not yet
- * fully running directory service (AFDS).
- *
- */
+ * Revision 1.2 2000/12/04 12:35:46 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:06:40 jung
+ * Initial import.
+ *
+ *
+ * Revision 1.1.1.1.2.2 2000/07/17 12:46:14 jung
+ * refactored package and meta-model
+ *
+ * Revision 1.1.1.1.2.1 2000/07/13 12:46:14 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.1.1 2000/07/06 14:11:26 jung
+ * Import of a pre beta version of ZOAP source with a new directory structure,
+ * ant-based make, apache-kind of license, etc.
+ *
+ * jars are coming later because of cvs-history reasons.
+ *
+ * Revision 1.1.2.1 2000/06/13 15:01:42 jung
+ * SOAP support begins to run
+ *
+ * Revision 1.2 2000/06/07 10:18:58 jung
+ * added some service functionality to llokup other
+ * beans and yourself as a bean. extended the test case
+ * for that purpose.
+ *
+ * added a lookup service.
+ *
+ * Revision 1.1.1.1 2000/05/15 10:38:34 jung
+ * Initial import of the directory structure. Contains templates and a batch file
to
+ * create API documentation. Also contains the not yet
+ * fully running directory service (AFDS).
+ *
+ */
1.2 +150 -146 zoap/src/de/infor/ce/http/Environment.java
Index: Environment.java
===================================================================
RCS file: /products/cvs/ejboss/zoap/src/de/infor/ce/http/Environment.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- Environment.java 2000/08/10 21:06:40 1.1
+++ Environment.java 2000/12/04 12:35:46 1.2
@@ -1,149 +1,159 @@
-/*
- * $Id: Environment.java,v 1.1 2000/08/10 21:06:40 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.
- */
-
-package de.infor.ce.http;
-
-import java.util.Properties;
-
-import java.io.PrintStream;
-import java.io.InputStream;
-
-/**
- * Environment collects all package-local configurations and provides an
- * interface for file-based and method-based access.
- *
- * @see <related>
- * @author $Author: jung $
- * @version $Revision: 1.1 $
- */
-
-public abstract class Environment {
-
- /**
- * whether DEBUG messages are produced
- */
-
- public static final boolean DEBUG_HTTP=false;
-
- /**
- * runtime logging settings
- */
-
- public static int LOG_HTTP=1;
-
- /**
- * compile-time constants
- */
-
- public final static String PROPERTY="http";
- public final static String CONFIG_FILE=PROPERTY+".conf";
-
- /**
- * runtime streams
- */
-
- public final static PrintStream out=System.out;
- public final static InputStream in=System.in;
- public final static PrintStream err=System.err;
-
- /**
- * usual pool size for the http server
- */
-
- static int serverPoolSize=10;
-
- /**
- * whether the server uses to block on too much connections
- */
-
- static boolean serverBlocks=true;
-
-}
-
-/*
+/*
+ * $Id: Environment.java,v 1.2 2000/12/04 12:35:46 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.
+ */
+
+package de.infor.ce.http;
+
+import java.util.Properties;
+
+import java.io.PrintStream;
+import java.io.InputStream;
+
+/**
+ * Environment collects all package-local configurations and provides an
+ * interface for file-based and method-based access.
+ *
+ * @see <related>
+ * @author $Author: jung $
+ * @version $Revision: 1.2 $
+ */
+
+public abstract class Environment {
+
+ /**
+ * whether DEBUG messages are produced
+ */
+
+ public static final boolean DEBUG_HTTP=false;
+
+ /**
+ * runtime logging settings
+ */
+
+ public static int LOG_HTTP=1;
+
+ /**
+ * compile-time constants
+ */
+
+ public final static String PROPERTY="http";
+ public final static String CONFIG_FILE=PROPERTY+".conf";
+
+ /**
+ * runtime streams
+ */
+
+ public final static PrintStream out=System.out;
+ public final static InputStream in=System.in;
+ public final static PrintStream err=System.err;
+
+ /**
+ * usual pool size for the http server
+ */
+
+ static int serverPoolSize=10;
+
+ /**
+ * whether the server uses to block on too much connections
+ */
+
+ static boolean serverBlocks=false;
+
+}
+
+/*
* $Log: Environment.java,v $
- * Revision 1.1 2000/08/10 21:06:40 jung
- * Initial revision
- *
- * Revision 1.1.1.1.2.3 2000/08/04 17:20:18 jung
- * close to beta stadium. Meta-Data import now works.
- *
- * Revision 1.1.1.1.2.2 2000/07/17 12:46:14 jung
- * refactored package and meta-model
- *
- * Revision 1.1.1.1.2.1 2000/07/13 12:46:14 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.1.1 2000/07/06 14:11:26 jung
- * Import of a pre beta version of ZOAP source with a new directory structure,
- * ant-based make, apache-kind of license, etc.
- *
- * jars are coming later because of cvs-history reasons.
- *
- * Revision 1.1.2.1 2000/06/13 15:01:42 jung
- * SOAP support begins to run
- *
- * Revision 1.1.2.1 2000/06/08 17:15:47 jung
- * added initial soap service that uses the infor:X framework.
- *
- * Revision 1.1 2000/06/05 09:16:55 jung
- * added an initial revision of infor:X, the
- * XML (de-)serialisation service of infor:CE.
- *
- * supports meta-data structures, namespaces, schemas.
- *
- * lacks collection support, forward-references, multiple roots
- * and external resolution.
- *
- * Revision 1.2 2000/05/16 15:29:33 jung
- * added initial vbsf support
- *
- * Revision 1.1.1.1 2000/05/15 10:38:34 jung
- * Initial import of the directory structure. Contains templates and a batch file to
- * create API documentation. Also contains the not yet
- * fully running directory service (AFDS).
- */
+ * Revision 1.2 2000/12/04 12:35:46 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:06:40 jung
+ * Initial import.
+ *
+ *
+ * Revision 1.1.1.1.2.3 2000/08/04 17:20:18 jung
+ * close to beta stadium. Meta-Data import now works.
+ *
+ * Revision 1.1.1.1.2.2 2000/07/17 12:46:14 jung
+ * refactored package and meta-model
+ *
+ * Revision 1.1.1.1.2.1 2000/07/13 12:46:14 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.1.1 2000/07/06 14:11:26 jung
+ * Import of a pre beta version of ZOAP source with a new directory structure,
+ * ant-based make, apache-kind of license, etc.
+ *
+ * jars are coming later because of cvs-history reasons.
+ *
+ * Revision 1.1.2.1 2000/06/13 15:01:42 jung
+ * SOAP support begins to run
+ *
+ * Revision 1.1.2.1 2000/06/08 17:15:47 jung
+ * added initial soap service that uses the infor:X framework.
+ *
+ * Revision 1.1 2000/06/05 09:16:55 jung
+ * added an initial revision of infor:X, the
+ * XML (de-)serialisation service of infor:CE.
+ *
+ * supports meta-data structures, namespaces, schemas.
+ *
+ * lacks collection support, forward-references, multiple roots
+ * and external resolution.
+ *
+ * Revision 1.2 2000/05/16 15:29:33 jung
+ * added initial vbsf support
+ *
+ * Revision 1.1.1.1 2000/05/15 10:38:34 jung
+ * Initial import of the directory structure. Contains templates and a batch file to
+ * create API documentation. Also contains the not yet
+ * fully running directory service (AFDS).
+ */
1.2 +92 -88 zoap/src/de/infor/ce/http/HeaderException.java
Index: HeaderException.java
===================================================================
RCS file: /products/cvs/ejboss/zoap/src/de/infor/ce/http/HeaderException.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- HeaderException.java 2000/08/10 21:06:40 1.1
+++ HeaderException.java 2000/12/04 12:35:47 1.2
@@ -1,91 +1,101 @@
-/*
- * $Id: HeaderException.java,v 1.1 2000/08/10 21:06:40 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.
- */
-
-package de.infor.ce.http;
-
-/**
- * This exception is thrown when something has gone wrong while outputting or
- * processing the header of an http command.
- *
- * @see <related>
- * @author $Author: jung $
- * @version $Revision: 1.1 $
- */
-
-public class HeaderException extends HttpException {
-}
-
-/*
+/*
+ * $Id: HeaderException.java,v 1.2 2000/12/04 12:35:47 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.
+ */
+
+package de.infor.ce.http;
+
+/**
+ * This exception is thrown when something has gone wrong while outputting or
+ * processing the header of an http command.
+ *
+ * @see <related>
+ * @author $Author: jung $
+ * @version $Revision: 1.2 $
+ */
+
+public class HeaderException extends HttpException {
+}
+
+/*
* $Log: HeaderException.java,v $
- * Revision 1.1 2000/08/10 21:06:40 jung
- * Initial revision
- *
- * Revision 1.1.1.1.2.1 2000/07/13 12:46:14 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.1.1 2000/07/06 14:11:26 jung
- * Import of a pre beta version of ZOAP source with a new directory structure,
- * ant-based make, apache-kind of license, etc.
- *
- * jars are coming later because of cvs-history reasons.
- *
- * Revision 1.1.2.1 2000/06/13 15:01:42 jung
- * SOAP support begins to run
- *
- * Revision 1.2 2000/06/07 10:18:58 jung
- * added some service functionality to llokup other
- * beans and yourself as a bean. extended the test case
- * for that purpose.
- *
- * added a lookup service.
- *
- * Revision 1.1.1.1 2000/05/15 10:38:34 jung
- * Initial import of the directory structure. Contains templates and a batch file
to
- * create API documentation. Also contains the not yet
- * fully running directory service (AFDS).
- *
- */
+ * Revision 1.2 2000/12/04 12:35:47 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:06:40 jung
+ * Initial import.
+ *
+ *
+ * Revision 1.1.1.1.2.1 2000/07/13 12:46:14 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.1.1 2000/07/06 14:11:26 jung
+ * Import of a pre beta version of ZOAP source with a new directory structure,
+ * ant-based make, apache-kind of license, etc.
+ *
+ * jars are coming later because of cvs-history reasons.
+ *
+ * Revision 1.1.2.1 2000/06/13 15:01:42 jung
+ * SOAP support begins to run
+ *
+ * Revision 1.2 2000/06/07 10:18:58 jung
+ * added some service functionality to llokup other
+ * beans and yourself as a bean. extended the test case
+ * for that purpose.
+ *
+ * added a lookup service.
+ *
+ * Revision 1.1.1.1 2000/05/15 10:38:34 jung
+ * Initial import of the directory structure. Contains templates and a batch file
to
+ * create API documentation. Also contains the not yet
+ * fully running directory service (AFDS).
+ *
+ */
1.2 +86 -82 zoap/src/de/infor/ce/http/HeaderFormatException.java
Index: HeaderFormatException.java
===================================================================
RCS file: /products/cvs/ejboss/zoap/src/de/infor/ce/http/HeaderFormatException.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- HeaderFormatException.java 2000/08/10 21:06:41 1.1
+++ HeaderFormatException.java 2000/12/04 12:35:47 1.2
@@ -1,85 +1,95 @@
-/*
- * $Id: HeaderFormatException.java,v 1.1 2000/08/10 21:06:41 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.
- */
-package de.infor.ce.http;
-
-/**
- * <Description>
- * @see <related>
- * @author $Author: jung $
- * @version $Revision: 1.1 $
- */
-
-public class HeaderFormatException extends HeaderException {
-}
-
-/*
+/*
+ * $Id: HeaderFormatException.java,v 1.2 2000/12/04 12:35:47 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.
+ */
+package de.infor.ce.http;
+
+/**
+ * <Description>
+ * @see <related>
+ * @author $Author: jung $
+ * @version $Revision: 1.2 $
+ */
+
+public class HeaderFormatException extends HeaderException {
+}
+
+/*
* $Log: HeaderFormatException.java,v $
- * Revision 1.1 2000/08/10 21:06:41 jung
- * Initial revision
- *
- * Revision 1.1.1.1.2.1 2000/07/13 12:46:14 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.1.1 2000/07/06 14:11:26 jung
- * Import of a pre beta version of ZOAP source with a new directory structure,
- * ant-based make, apache-kind of license, etc.
- *
- * jars are coming later because of cvs-history reasons.
- *
- * Revision 1.2 2000/06/07 10:18:58 jung
- * added some service functionality to llokup other
- * beans and yourself as a bean. extended the test case
- * for that purpose.
- *
- * added a lookup service.
- *
- * Revision 1.1.1.1 2000/05/15 10:38:34 jung
- * Initial import of the directory structure. Contains templates and a batch file
to
- * create API documentation. Also contains the not yet
- * fully running directory service (AFDS).
- *
- */
+ * Revision 1.2 2000/12/04 12:35:47 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:06:41 jung
+ * Initial import.
+ *
+ *
+ * Revision 1.1.1.1.2.1 2000/07/13 12:46:14 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.1.1 2000/07/06 14:11:26 jung
+ * Import of a pre beta version of ZOAP source with a new directory structure,
+ * ant-based make, apache-kind of license, etc.
+ *
+ * jars are coming later because of cvs-history reasons.
+ *
+ * Revision 1.2 2000/06/07 10:18:58 jung
+ * added some service functionality to llokup other
+ * beans and yourself as a bean. extended the test case
+ * for that purpose.
+ *
+ * added a lookup service.
+ *
+ * Revision 1.1.1.1 2000/05/15 10:38:34 jung
+ * Initial import of the directory structure. Contains templates and a batch file
to
+ * create API documentation. Also contains the not yet
+ * fully running directory service (AFDS).
+ *
+ */
1.2 +92 -88 zoap/src/de/infor/ce/http/HttpException.java
Index: HttpException.java
===================================================================
RCS file: /products/cvs/ejboss/zoap/src/de/infor/ce/http/HttpException.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- HttpException.java 2000/08/10 21:06:41 1.1
+++ HttpException.java 2000/12/04 12:35:47 1.2
@@ -1,91 +1,101 @@
-/*
- * $Id: HttpException.java,v 1.1 2000/08/10 21:06:41 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.
- */
-
-package de.infor.ce.http;
-
-/**
- * The most general exception thrown in this package. Something must have been
wrong. Catch
- * this if you are an ignorant or just lazy.
- *
- * @see <related>
- * @author $Author: jung $
- * @version $Revision: 1.1 $
- */
-
-public class HttpException extends Exception {
-}
-
-/*
+/*
+ * $Id: HttpException.java,v 1.2 2000/12/04 12:35:47 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.
+ */
+
+package de.infor.ce.http;
+
+/**
+ * The most general exception thrown in this package. Something must have been
wrong. Catch
+ * this if you are an ignorant or just lazy.
+ *
+ * @see <related>
+ * @author $Author: jung $
+ * @version $Revision: 1.2 $
+ */
+
+public class HttpException extends Exception {
+}
+
+/*
* $Log: HttpException.java,v $
- * Revision 1.1 2000/08/10 21:06:41 jung
- * Initial revision
- *
- * Revision 1.1.1.1.2.1 2000/07/13 12:46:14 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.1.1 2000/07/06 14:11:26 jung
- * Import of a pre beta version of ZOAP source with a new directory structure,
- * ant-based make, apache-kind of license, etc.
- *
- * jars are coming later because of cvs-history reasons.
- *
- * Revision 1.1.2.1 2000/06/13 15:01:42 jung
- * SOAP support begins to run
- *
- * Revision 1.2 2000/06/07 10:18:58 jung
- * added some service functionality to llokup other
- * beans and yourself as a bean. extended the test case
- * for that purpose.
- *
- * added a lookup service.
- *
- * Revision 1.1.1.1 2000/05/15 10:38:34 jung
- * Initial import of the directory structure. Contains templates and a batch file
to
- * create API documentation. Also contains the not yet
- * fully running directory service (AFDS).
- *
- */
+ * Revision 1.2 2000/12/04 12:35:47 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:06:41 jung
+ * Initial import.
+ *
+ *
+ * Revision 1.1.1.1.2.1 2000/07/13 12:46:14 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.1.1 2000/07/06 14:11:26 jung
+ * Import of a pre beta version of ZOAP source with a new directory structure,
+ * ant-based make, apache-kind of license, etc.
+ *
+ * jars are coming later because of cvs-history reasons.
+ *
+ * Revision 1.1.2.1 2000/06/13 15:01:42 jung
+ * SOAP support begins to run
+ *
+ * Revision 1.2 2000/06/07 10:18:58 jung
+ * added some service functionality to llokup other
+ * beans and yourself as a bean. extended the test case
+ * for that purpose.
+ *
+ * added a lookup service.
+ *
+ * Revision 1.1.1.1 2000/05/15 10:38:34 jung
+ * Initial import of the directory structure. Contains templates and a batch file
to
+ * create API documentation. Also contains the not yet
+ * fully running directory service (AFDS).
+ *
+ */
1.2 +92 -88 zoap/src/de/infor/ce/http/ProcessException.java
Index: ProcessException.java
===================================================================
RCS file: /products/cvs/ejboss/zoap/src/de/infor/ce/http/ProcessException.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- ProcessException.java 2000/08/10 21:06:42 1.1
+++ ProcessException.java 2000/12/04 12:35:47 1.2
@@ -1,91 +1,101 @@
-/*
- * $Id: ProcessException.java,v 1.1 2000/08/10 21:06:42 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.
- */
-
-package de.infor.ce.http;
-
-/**
- * An exception that is thrown when the processing of some http request has
produced
- * a failure.
- *
- * @see <related>
- * @author $Author: jung $
- * @version $Revision: 1.1 $
- */
-
-public class ProcessException extends HttpException {
-}
-
-/*
+/*
+ * $Id: ProcessException.java,v 1.2 2000/12/04 12:35:47 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.
+ */
+
+package de.infor.ce.http;
+
+/**
+ * An exception that is thrown when the processing of some http request has
produced
+ * a failure.
+ *
+ * @see <related>
+ * @author $Author: jung $
+ * @version $Revision: 1.2 $
+ */
+
+public class ProcessException extends HttpException {
+}
+
+/*
* $Log: ProcessException.java,v $
- * Revision 1.1 2000/08/10 21:06:42 jung
- * Initial revision
- *
- * Revision 1.1.1.1.2.1 2000/07/13 12:46:14 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.1.1 2000/07/06 14:11:26 jung
- * Import of a pre beta version of ZOAP source with a new directory structure,
- * ant-based make, apache-kind of license, etc.
- *
- * jars are coming later because of cvs-history reasons.
- *
- * Revision 1.1.2.1 2000/06/13 15:01:42 jung
- * SOAP support begins to run
- *
- * Revision 1.2 2000/06/07 10:18:58 jung
- * added some service functionality to llokup other
- * beans and yourself as a bean. extended the test case
- * for that purpose.
- *
- * added a lookup service.
- *
- * Revision 1.1.1.1 2000/05/15 10:38:34 jung
- * Initial import of the directory structure. Contains templates and a batch file
to
- * create API documentation. Also contains the not yet
- * fully running directory service (AFDS).
- *
- */
+ * Revision 1.2 2000/12/04 12:35:47 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:06:42 jung
+ * Initial import.
+ *
+ *
+ * Revision 1.1.1.1.2.1 2000/07/13 12:46:14 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.1.1 2000/07/06 14:11:26 jung
+ * Import of a pre beta version of ZOAP source with a new directory structure,
+ * ant-based make, apache-kind of license, etc.
+ *
+ * jars are coming later because of cvs-history reasons.
+ *
+ * Revision 1.1.2.1 2000/06/13 15:01:42 jung
+ * SOAP support begins to run
+ *
+ * Revision 1.2 2000/06/07 10:18:58 jung
+ * added some service functionality to llokup other
+ * beans and yourself as a bean. extended the test case
+ * for that purpose.
+ *
+ * added a lookup service.
+ *
+ * Revision 1.1.1.1 2000/05/15 10:38:34 jung
+ * Initial import of the directory structure. Contains templates and a batch file
to
+ * create API documentation. Also contains the not yet
+ * fully running directory service (AFDS).
+ *
+ */
1.2 +483 -479 zoap/src/de/infor/ce/http/Request.java
Index: Request.java
===================================================================
RCS file: /products/cvs/ejboss/zoap/src/de/infor/ce/http/Request.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- Request.java 2000/08/10 21:06:43 1.1
+++ Request.java 2000/12/04 12:35:47 1.2
@@ -1,482 +1,492 @@
-/*
- * $Id: Request.java,v 1.1 2000/08/10 21:06: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.
- */
-
-package de.infor.ce.http;
-
-import java.net.URL;
-import java.net.Socket;
-import java.util.Hashtable;
-import java.io.PrintWriter;
-import java.io.BufferedReader;
-import java.io.InputStreamReader;
-import java.io.IOException;
-
-/**
- * Request is the implementation of a http/1.1 request command that is either
received
- * by some external entity or is created to connect some external entity.
- *
- * Request understands the usual http-request methods and the corresponding headers
- * It comes with a send() method to connect to a remote http-server using this
request as the payload. Request comes
- * with an extensible response factory to deliver appropriate response structures
upon
- * being sent.
- *
- * In the near future, we would like to add support for establishing persistent
connections
- * from the client-side through reusing one request.
- *
- * @see <related>
- * @author $Author: jung $
- * @version $Revision: 1.1 $
- */
-
-public class Request extends Command {
-
- /**
- * special request headers that extend the general command headers
- */
-
- static String[] REQUEST_HEADERS= new String[] {
- "Cache-Control", "Connection", "Date", "Pragma", "Trailer", "Transfer-Encoding",
- "Upgrade", "Via", "Warning", "Accept", "Accept-Charset", "Accept-Encoding",
- "Accept-Language", "Authorization", "Expect", "From", "Host", "If-Match",
- "If-Modified-Since", "If-None-Match", "If-Range", "If-Unmodified-Since",
"Max-Forwards",
- "Proxy-Authorization", "Range", "Referer", "TE", "User-Agent" };
-
- /**
- * each request has a set of methods at its disposal
- */
-
- static String[] METHODS = new String [] {
- "OPTIONS","GET","HEAD","POST","PUT","DELETE","TRACE","CONNECT"
- };
-
- /**
- * the method that has been assigned to this request
- * encoded as an integer
- */
-
- int method=-1;
-
- /**
- * the list of method to integer encodings
- */
-
- static int METHOD_OPTIONS=0;
- static int METHOD_GET=1;
- static int METHOD_HEAD=2;
- static int METHOD_POST=3;
- static int METHOD_PUT=4;
- static int METHOD_DELETE=5;
- static int METHOD_TRACE=6;
- static int METHOD_CONNECT=7;
-
- /**
- * each request has a proxy url to which it is sent to
- */
-
- URL proxyUrl;
-
- /**
- * each request has a destination url that is interpreted
- * relative to the proxy url
- */
-
- URL url;
-
- /**
- * the open socket to the other side
- */
-
- Socket connection;
-
- /**
- * the streams sitting on the connection
- */
-
- PrintWriter outputWriter;
- BufferedReader inputReader;
-
- /**
- * constructor
- */
-
- public Request(Hashtable theHeader,int theMinor, int theMajor, String theBody,
boolean close, URL theProxyUrl, URL theUrl, String theMethod)
- throws UnknownRequestMethodException {
-
- // call super constructor immediately
- super(theHeader,theMinor,theMajor,theBody,close);
-
- // give out some message
- if(Environment.DEBUG_HTTP)
-
Environment.out.println("Request("+theHeader+","+theMinor+","+theMajor+","+theBody+","+close+","+theProxyUrl+
- ","+theUrl+","+theMethod+")");
-
- // and set the url
- url=theUrl;
- // set the proxy url
- proxyUrl=theProxyUrl;
- // the method
- setMethod(theMethod);
- }
-
- /**
- * how to write the start line of the request
- */
-
- protected void writeStartLine(PrintWriter writer) throws IOException {
-
- if(Environment.DEBUG_HTTP)
- Environment.out.println("Request.writeStartLine("+writer+")");
-
- writer.println(getMethod(method)+" "+url.toString()+"
HTTP/"+getProtocolVersion());
- }
-
- /**
- * this method converts the integer method encoding back into
- * strings
- */
-
- protected String getMethod(int method) {
- return METHODS[method];
- }
-
- /**
- * this method converts the string method encoding back into
- * integers
- */
-
- protected void setMethod(String theMethod) throws UnknownRequestMethodException {
-
- if(Environment.DEBUG_HTTP)
- Environment.out.println("Request.setMethod("+theMethod+")");
-
- for(int count=0;count<METHODS.length;count++)
- if(METHODS[count].equals(theMethod)) {
- method=count;
- return;
- }
-
- throw new UnknownRequestMethodException();
- }
-
- /**
- * read the starting line of the command
- */
-
- protected void readStartLine(BufferedReader reader) throws IOException,
StartLineException {
-
- if(Environment.DEBUG_HTTP)
- Environment.out.println("Request.readStartLine("+reader+")");
-
- // read the next line
- String line=reader.readLine();
-
- if(line==null)
- throw new IOException();
-
- try{
-
- // get the first token which should be the method of this request
- String firstToken=line.substring(0,line.indexOf(" "));
-
- // and interpret it as a method
- setMethod(firstToken);
-
- // ok we have got the request, now get the URI
- String secondToken=
- line.substring(line.indexOf(" ")+1,line.indexOf(" ",line.indexOf(" ")+1));
-
- // it could be a "*", a path, or an authority, but we suspect it
- // the final url that is tried to obtain
- // is parsed in relation to the proxyUrl
- url=new URL(proxyUrl,secondToken);
-
- // now get the protocol version
- String thirdToken=line.substring(line.indexOf(" ",line.indexOf("
")+1)+1,line.length());
-
- // must start with HTTP/
- if(!thirdToken.startsWith("HTTP/"))
- throw new StartLineException();
-
- // followed by x.y
- String pureVersionNumber=thirdToken.substring(5);
-
- int theMinor=Integer.parseInt(pureVersionNumber.
- substring(0,pureVersionNumber.indexOf(".")));
-
- int theMajor=Integer.parseInt(pureVersionNumber.
- substring(pureVersionNumber.indexOf(".")+1));
-
- // set the protocol versions
- setProtocolMinorVersion(theMinor);
- setProtocolMajorVersion(theMajor);
-
- } catch(IndexOutOfBoundsException e) {
-
- if(Environment.DEBUG_HTTP)
- Environment.err.println("Request.readStartLine("+reader+
- "): encountered a format exception "+e);
-
- throw new StartLineException();
-
- } catch(NumberFormatException e) {
-
- if(Environment.DEBUG_HTTP)
- Environment.err.println("Request.readStartLine("+reader+
- "): encountered a format exception "+e);
-
- throw new StartLineException();
-
- } // try
-
- } // readStartLine
-
- /**
- * overloads the readHeaderLine from Command to cater for extended settings
- */
-
- protected void readHeaderLine(String fieldName, String fieldValue)
- throws UnknownHeaderFieldException, HeaderFormatException {
-
- if(Environment.DEBUG_HTTP)
-
Environment.out.println("Request.readHeaderLine("+fieldName+","+fieldValue+")");
-
- for(int count=0;count<REQUEST_HEADERS.length;count++)
- if(REQUEST_HEADERS[count].equalsIgnoreCase(fieldName)) {
- putHeader(fieldName,fieldValue);
- return;
- }
-
- super.readHeaderLine(fieldName,fieldValue);
-
- }
-
- /**
- * this method sends the request across the network to the builtin URL
- * and gets a default response for it, overwrite to do more useful things
- */
-
- public Response send() throws IOException, HttpException {
-
- if(Environment.DEBUG_HTTP)
- Environment.out.println("Request.send()");
-
- if(url==null)
- throw new HttpException();
-
- return send(proxyUrl.getHost(),proxyUrl.getPort());
- }
-
- /**
- * this method sends the request to a dedicated proxy and gets a response for
- * it. If not yet established the connection, it will create a persistent
connection
- * to the server and leave it open until the connection is closed.
- */
-
- public synchronized Response send(String host, int port) throws IOException,
HttpException {
-
- if(Environment.DEBUG_HTTP)
- Environment.out.println("Request.send("+host+","+port+")");
-
- try{
-
- if(connection==null) {
-
- if(Environment.DEBUG_HTTP)
- Environment.out.println("Request.send("+host+","+port+"): Establishing
new connection.");
-
- // open a new TCP/IP socket to the given URL
- connection=new Socket (host, port);
- // construct the ios
- outputWriter = new PrintWriter (connection.getOutputStream ());
- inputReader = new BufferedReader (new InputStreamReader
(connection.getInputStream ()));
- }
-
- // output the request structure to the other side
- write(outputWriter);
-
- // flush it
- outputWriter.flush();
-
- // and close the output from your side if connection:close is send
- if(isConnectionClose()) {
-
- if(Environment.DEBUG_HTTP)
- Environment.out.println("Request.send("+host+","+port+"): Closing
Intendedly OutputStream.");
-
- connection.shutdownOutput();
- }
-
- // create a response using the factory method
- Response result=createResponse();
-
- // and fill it with the incoming buffer
- result.read(inputReader);
-
- // close the socket silently
- if(result.isConnectionClose() || isConnectionClose()) {
- try{
-
- if(Environment.DEBUG_HTTP)
- Environment.out.println("Request.send("+host+","+port+"): Closing
Intendedly Socket.");
-
- connection.close();
- } catch(IOException e) {}
- connection=null;
- }
-
- return result;
-
- } catch(IOException e) {
-
- try{
-
- if(Environment.DEBUG_HTTP)
- Environment.out.println("Request.send("+host+","+port+"): Closing
Socket because of io exception."+e);
-
- connection.close();
- } catch(IOException e2) {
- }
-
- connection=null;
-
- throw e;
-
- } catch(HttpException e) {
-
- try{
-
- if(Environment.DEBUG_HTTP)
- Environment.out.println("Request.send("+host+","+port+"): Closing
Socket because of http exception."+e);
-
- connection.close();
- } catch(IOException e2) {
- }
-
- connection=null;
-
- throw e;
- }
-
- } // send
-
- /**
- * factory method for responses
- */
-
- protected Response createResponse() throws StatusCodeException {
-
- if(Environment.DEBUG_HTTP)
- Environment.out.println("Request.createResponse()");
-
- return new Response(null,1,1,null,false,100,"OK");
-
- }
-
- /**
- * access the url
- */
-
- public URL getURL() {
- return url;
- }
-
- public synchronized void finalize() {
-
- if(Environment.DEBUG_HTTP)
- Environment.out.println("Request.finalize()");
-
- if(connection!=null) {
- try {
- connection.close();
- } catch(IOException e) {}
- connection=null;
- }
- }
-
-} // Request
-
-/*
+/*
+ * $Id: Request.java,v 1.2 2000/12/04 12:35:47 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.
+ */
+
+package de.infor.ce.http;
+
+import java.net.URL;
+import java.net.Socket;
+import java.util.Hashtable;
+import java.io.PrintWriter;
+import java.io.BufferedReader;
+import java.io.InputStreamReader;
+import java.io.IOException;
+
+/**
+ * Request is the implementation of a http/1.1 request command that is either
received
+ * by some external entity or is created to connect some external entity.
+ *
+ * Request understands the usual http-request methods and the corresponding headers
+ * It comes with a send() method to connect to a remote http-server using this
request as the payload. Request comes
+ * with an extensible response factory to deliver appropriate response structures
upon
+ * being sent.
+ *
+ * In the near future, we would like to add support for establishing persistent
connections
+ * from the client-side through reusing one request.
+ *
+ * @see <related>
+ * @author $Author: jung $
+ * @version $Revision: 1.2 $
+ */
+
+public class Request extends Command {
+
+ /**
+ * special request headers that extend the general command headers
+ */
+
+ static String[] REQUEST_HEADERS= new String[] {
+ "Cache-Control", "Connection", "Date", "Pragma", "Trailer", "Transfer-Encoding",
+ "Upgrade", "Via", "Warning", "Accept", "Accept-Charset", "Accept-Encoding",
+ "Accept-Language", "Authorization", "Expect", "From", "Host", "If-Match",
+ "If-Modified-Since", "If-None-Match", "If-Range", "If-Unmodified-Since",
"Max-Forwards",
+ "Proxy-Authorization", "Range", "Referer", "TE", "User-Agent" };
+
+ /**
+ * each request has a set of methods at its disposal
+ */
+
+ static String[] METHODS = new String [] {
+ "OPTIONS","GET","HEAD","POST","PUT","DELETE","TRACE","CONNECT"
+ };
+
+ /**
+ * the method that has been assigned to this request
+ * encoded as an integer
+ */
+
+ int method=-1;
+
+ /**
+ * the list of method to integer encodings
+ */
+
+ static int METHOD_OPTIONS=0;
+ static int METHOD_GET=1;
+ static int METHOD_HEAD=2;
+ static int METHOD_POST=3;
+ static int METHOD_PUT=4;
+ static int METHOD_DELETE=5;
+ static int METHOD_TRACE=6;
+ static int METHOD_CONNECT=7;
+
+ /**
+ * each request has a proxy url to which it is sent to
+ */
+
+ URL proxyUrl;
+
+ /**
+ * each request has a destination url that is interpreted
+ * relative to the proxy url
+ */
+
+ URL url;
+
+ /**
+ * the open socket to the other side
+ */
+
+ Socket connection;
+
+ /**
+ * the streams sitting on the connection
+ */
+
+ PrintWriter outputWriter;
+ BufferedReader inputReader;
+
+ /**
+ * constructor
+ */
+
+ public Request(Hashtable theHeader,int theMinor, int theMajor, String theBody,
boolean close, URL theProxyUrl, URL theUrl, String theMethod)
+ throws UnknownRequestMethodException {
+
+ // call super constructor immediately
+ super(theHeader,theMinor,theMajor,theBody,close);
+
+ // give out some message
+ if(Environment.DEBUG_HTTP)
+
Environment.out.println("Request("+theHeader+","+theMinor+","+theMajor+","+theBody+","+close+","+theProxyUrl+
+ ","+theUrl+","+theMethod+")");
+
+ // and set the url
+ url=theUrl;
+ // set the proxy url
+ proxyUrl=theProxyUrl;
+ // the method
+ setMethod(theMethod);
+ }
+
+ /**
+ * how to write the start line of the request
+ */
+
+ protected void writeStartLine(PrintWriter writer) throws IOException {
+
+ if(Environment.DEBUG_HTTP)
+ Environment.out.println("Request.writeStartLine("+writer+")");
+
+ writer.println(getMethod(method)+" "+url.toString()+"
HTTP/"+getProtocolVersion());
+ }
+
+ /**
+ * this method converts the integer method encoding back into
+ * strings
+ */
+
+ protected String getMethod(int method) {
+ return METHODS[method];
+ }
+
+ /**
+ * this method converts the string method encoding back into
+ * integers
+ */
+
+ protected void setMethod(String theMethod) throws UnknownRequestMethodException {
+
+ if(Environment.DEBUG_HTTP)
+ Environment.out.println("Request.setMethod("+theMethod+")");
+
+ for(int count=0;count<METHODS.length;count++)
+ if(METHODS[count].equals(theMethod)) {
+ method=count;
+ return;
+ }
+
+ throw new UnknownRequestMethodException();
+ }
+
+ /**
+ * read the starting line of the command
+ */
+
+ protected void readStartLine(BufferedReader reader) throws IOException,
StartLineException {
+
+ if(Environment.DEBUG_HTTP)
+ Environment.out.println("Request.readStartLine("+reader+")");
+
+ // read the next line
+ String line=reader.readLine();
+
+ if(line==null)
+ throw new IOException();
+
+ try{
+
+ // get the first token which should be the method of this request
+ String firstToken=line.substring(0,line.indexOf(" "));
+
+ // and interpret it as a method
+ setMethod(firstToken);
+
+ // ok we have got the request, now get the URI
+ String secondToken=
+ line.substring(line.indexOf(" ")+1,line.indexOf(" ",line.indexOf(" ")+1));
+
+ // it could be a "*", a path, or an authority, but we suspect it
+ // the final url that is tried to obtain
+ // is parsed in relation to the proxyUrl
+ url=new URL(proxyUrl,secondToken);
+
+ // now get the protocol version
+ String thirdToken=line.substring(line.indexOf(" ",line.indexOf("
")+1)+1,line.length());
+
+ // must start with HTTP/
+ if(!thirdToken.startsWith("HTTP/"))
+ throw new StartLineException();
+
+ // followed by x.y
+ String pureVersionNumber=thirdToken.substring(5);
+
+ int theMinor=Integer.parseInt(pureVersionNumber.
+ substring(0,pureVersionNumber.indexOf(".")));
+
+ int theMajor=Integer.parseInt(pureVersionNumber.
+ substring(pureVersionNumber.indexOf(".")+1));
+
+ // set the protocol versions
+ setProtocolMinorVersion(theMinor);
+ setProtocolMajorVersion(theMajor);
+
+ } catch(IndexOutOfBoundsException e) {
+
+ if(Environment.DEBUG_HTTP)
+ Environment.err.println("Request.readStartLine("+reader+
+ "): encountered a format exception "+e);
+
+ throw new StartLineException();
+
+ } catch(NumberFormatException e) {
+
+ if(Environment.DEBUG_HTTP)
+ Environment.err.println("Request.readStartLine("+reader+
+ "): encountered a format exception "+e);
+
+ throw new StartLineException();
+
+ } // try
+
+ } // readStartLine
+
+ /**
+ * overloads the readHeaderLine from Command to cater for extended settings
+ */
+
+ protected void readHeaderLine(String fieldName, String fieldValue)
+ throws UnknownHeaderFieldException, HeaderFormatException {
+
+ if(Environment.DEBUG_HTTP)
+
Environment.out.println("Request.readHeaderLine("+fieldName+","+fieldValue+")");
+
+ for(int count=0;count<REQUEST_HEADERS.length;count++)
+ if(REQUEST_HEADERS[count].equalsIgnoreCase(fieldName)) {
+ putHeader(fieldName,fieldValue);
+ return;
+ }
+
+ super.readHeaderLine(fieldName,fieldValue);
+
+ }
+
+ /**
+ * this method sends the request across the network to the builtin URL
+ * and gets a default response for it, overwrite to do more useful things
+ */
+
+ public Response send() throws IOException, HttpException {
+
+ if(Environment.DEBUG_HTTP)
+ Environment.out.println("Request.send()");
+
+ if(url==null)
+ throw new HttpException();
+
+ return send(proxyUrl.getHost(),proxyUrl.getPort());
+ }
+
+ /**
+ * this method sends the request to a dedicated proxy and gets a response for
+ * it. If not yet established the connection, it will create a persistent
connection
+ * to the server and leave it open until the connection is closed.
+ */
+
+ public synchronized Response send(String host, int port) throws IOException,
HttpException {
+
+ if(Environment.DEBUG_HTTP)
+ Environment.out.println("Request.send("+host+","+port+")");
+
+ try{
+
+ if(connection==null) {
+
+ if(Environment.DEBUG_HTTP)
+ Environment.out.println("Request.send("+host+","+port+"): Establishing
new connection.");
+
+ // open a new TCP/IP socket to the given URL
+ connection=new Socket (host, port);
+ // construct the ios
+ outputWriter = new PrintWriter (connection.getOutputStream ());
+ inputReader = new BufferedReader (new InputStreamReader
(connection.getInputStream ()));
+ }
+
+ // output the request structure to the other side
+ write(outputWriter);
+
+ // flush it
+ outputWriter.flush();
+
+ // and close the output from your side if connection:close is send
+ if(isConnectionClose()) {
+
+ if(Environment.DEBUG_HTTP)
+ Environment.out.println("Request.send("+host+","+port+"): Closing
Intendedly OutputStream.");
+
+ connection.shutdownOutput();
+ }
+
+ // create a response using the factory method
+ Response result=createResponse();
+
+ // and fill it with the incoming buffer
+ result.read(inputReader);
+
+ // close the socket silently
+ if(result.isConnectionClose() || isConnectionClose()) {
+ try{
+
+ if(Environment.DEBUG_HTTP)
+ Environment.out.println("Request.send("+host+","+port+"): Closing
Intendedly Socket.");
+
+ connection.close();
+ } catch(IOException e) {}
+ connection=null;
+ }
+
+ return result;
+
+ } catch(IOException e) {
+
+ try{
+
+ if(Environment.DEBUG_HTTP)
+ Environment.out.println("Request.send("+host+","+port+"): Closing
Socket because of io exception."+e);
+
+ connection.close();
+ } catch(IOException e2) {
+ }
+
+ connection=null;
+
+ throw e;
+
+ } catch(HttpException e) {
+
+ try{
+
+ if(Environment.DEBUG_HTTP)
+ Environment.out.println("Request.send("+host+","+port+"): Closing
Socket because of http exception."+e);
+
+ connection.close();
+ } catch(IOException e2) {
+ }
+
+ connection=null;
+
+ throw e;
+ }
+
+ } // send
+
+ /**
+ * factory method for responses
+ */
+
+ protected Response createResponse() throws StatusCodeException {
+
+ if(Environment.DEBUG_HTTP)
+ Environment.out.println("Request.createResponse()");
+
+ return new Response(null,1,1,null,false,100,"OK");
+
+ }
+
+ /**
+ * access the url
+ */
+
+ public URL getURL() {
+ return url;
+ }
+
+ public synchronized void finalize() {
+
+ if(Environment.DEBUG_HTTP)
+ Environment.out.println("Request.finalize()");
+
+ if(connection!=null) {
+ try {
+ connection.close();
+ } catch(IOException e) {}
+ connection=null;
+ }
+ }
+
+} // Request
+
+/*
* $Log: Request.java,v $
- * Revision 1.1 2000/08/10 21:06:43 jung
- * Initial revision
- *
- * Revision 1.1.1.1.2.2 2000/07/17 12:46:14 jung
- * refactored package and meta-model
- *
- * Revision 1.1.1.1.2.1 2000/07/13 12:46:14 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.1.1 2000/07/06 14:11:26 jung
- * Import of a pre beta version of ZOAP source with a new directory structure,
- * ant-based make, apache-kind of license, etc.
- *
- * jars are coming later because of cvs-history reasons.
- *
- * Revision 1.1.2.2 2000/06/16 08:03:03 jung
- * removed the bug that expected a fully-qualified url
- * in a request.
- *
- * requests now have two urls: one (fully-qualified) of the proxy that they talk
to
- * and one (relative to the first one) that identifies the file that you
- * addess.
- *
- * Revision 1.1.2.1 2000/06/13 15:01:42 jung
- * SOAP support begins to run
- *
- * Revision 1.2 2000/06/07 10:18:58 jung
- * added some service functionality to llokup other
- * beans and yourself as a bean. extended the test case
- * for that purpose.
- *
- * added a lookup service.
- *
- * Revision 1.1.1.1 2000/05/15 10:38:34 jung
- * Initial import of the directory structure. Contains templates and a batch file
to
- * create API documentation. Also contains the not yet
- * fully running directory service (AFDS).
- *
- */
+ * Revision 1.2 2000/12/04 12:35:47 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:06:43 jung
+ * Initial import.
+ *
+ *
+ * Revision 1.1.1.1.2.2 2000/07/17 12:46:14 jung
+ * refactored package and meta-model
+ *
+ * Revision 1.1.1.1.2.1 2000/07/13 12:46:14 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.1.1 2000/07/06 14:11:26 jung
+ * Import of a pre beta version of ZOAP source with a new directory structure,
+ * ant-based make, apache-kind of license, etc.
+ *
+ * jars are coming later because of cvs-history reasons.
+ *
+ * Revision 1.1.2.2 2000/06/16 08:03:03 jung
+ * removed the bug that expected a fully-qualified url
+ * in a request.
+ *
+ * requests now have two urls: one (fully-qualified) of the proxy that they talk
to
+ * and one (relative to the first one) that identifies the file that you
+ * addess.
+ *
+ * Revision 1.1.2.1 2000/06/13 15:01:42 jung
+ * SOAP support begins to run
+ *
+ * Revision 1.2 2000/06/07 10:18:58 jung
+ * added some service functionality to llokup other
+ * beans and yourself as a bean. extended the test case
+ * for that purpose.
+ *
+ * added a lookup service.
+ *
+ * Revision 1.1.1.1 2000/05/15 10:38:34 jung
+ * Initial import of the directory structure. Contains templates and a batch file
to
+ * create API documentation. Also contains the not yet
+ * fully running directory service (AFDS).
+ *
+ */
1.2 +245 -241 zoap/src/de/infor/ce/http/Response.java
Index: Response.java
===================================================================
RCS file: /products/cvs/ejboss/zoap/src/de/infor/ce/http/Response.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- Response.java 2000/08/10 21:06:43 1.1
+++ Response.java 2000/12/04 12:35:47 1.2
@@ -1,244 +1,254 @@
-/*
- * $Id: Response.java,v 1.1 2000/08/10 21:06: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.
- */
-
-package de.infor.ce.http;
-
-import java.util.Hashtable;
-import java.io.PrintWriter;
-import java.io.BufferedReader;
-import java.io.IOException;
-
-
-/**
- * Response is the implementation of a http/1.1 response command that is either
received
- * by some external entity or is created to reply to some requesting entity.
- *
- * Response understands the usual error codes and the corresponding headers.
- *
- * @see <related>
- * @author $Author: jung $
- * @version $Revision: 1.1 $
- */
-
-public class Response extends Command {
-
- /**
- * response headers that extend the command headers
- */
-
- public static String[] RESPONSE_HEADERS=new String[] {
- "Accept-Ranges", "Age", "ETag", "Location", "Proxy-Authenticate",
- "Retry-After", "Server", "Vary", "WWW-Authenticate"
- };
-
- /**
- * Status code encodings
- */
-
- public static int[] STATUS_CODES=new int[] {
- 100,101,200,201,202,203,204,205,206,300,301,302,303,304,305,307,400,
- 401,402,403,404,405,406,407,408,409,410,411,412,413,414,415,416,417,500,
- 501,502,503,504,505};
-
- /**
- * a response has a status code
- */
-
- int statusCode=-1;
-
- /**
- * an arbitrary reason phrase, normally its "OK"
- */
-
- String reasonPhrase;
-
- /**
- * constructor
- */
-
- public Response(Hashtable theHeader,int theMinor, int theMajor, String theBody,
boolean close, int theStatus,
- String theReason) throws StatusCodeException {
-
- super(theHeader,theMinor,theMajor,theBody,close);
-
- if(Environment.DEBUG_HTTP)
-
Environment.out.println("Reponse("+theHeader+","+theMinor+","+theMajor+","+theBody+","+close+","+theStatus+","+
- theReason+")");
-
- setStatusCode(theStatus);
- reasonPhrase=theReason;
- }
-
- /**
- * output the startLine
- */
-
- protected void writeStartLine(PrintWriter writer) throws IOException {
-
- if(Environment.DEBUG_HTTP)
- Environment.out.println("Response.writeStartLine("+writer+")");
-
- writer.println("HTTP/"+getProtocolVersion()+" "+statusCode+" "+reasonPhrase);
- }
-
- /**
- * read the start line
- */
-
- protected void readStartLine(BufferedReader reader) throws IOException,
StartLineException {
-
- if(Environment.DEBUG_HTTP)
- Environment.out.println("Response.readStartLine("+reader+")");
-
- String line=reader.readLine();
-
- if(line==null)
- throw new IOException();
-
- try{
-
- String firstToken=line.substring(0,line.indexOf(" "));
-
- if(!firstToken.startsWith("HTTP/"))
- throw new StartLineException();
-
- String protocolVersionNumber=firstToken.substring(5);
-
- int theMinor=Integer.parseInt(protocolVersionNumber.
- substring(0,protocolVersionNumber.indexOf(".")));
-
- int theMajor=Integer.parseInt(protocolVersionNumber.
- substring(protocolVersionNumber.indexOf(".")+1));
-
- setProtocolMinorVersion(theMinor);
- setProtocolMajorVersion(theMajor);
-
- setStatusCode(Integer.parseInt(line.substring(line.indexOf("
")+1,line.indexOf(" ",line.indexOf(" ")+1))));
-
- reasonPhrase=line.substring(line.indexOf(" ",line.indexOf(" ")+1));
-
- } catch(IndexOutOfBoundsException e) {
-
- if(Environment.DEBUG_HTTP)
- Environment.err.println("Response.readStartLine("+reader+"): encountered
format error "+e);
-
- throw new StartLineException();
-
- }
-
- } // readStartLine
-
- /**
- * set the status code
- */
-
- public void setStatusCode(int code) throws StatusCodeException {
-
- for(int count=0;count<STATUS_CODES.length;count++)
- if(STATUS_CODES[count]==code) {
- statusCode=code;
- return;
- }
-
- throw new StatusCodeException();
- }
-
- /**
- * overloads the readHeaderLine from Command to cater for extended settings
- */
-
- protected void readHeaderLine(String fieldName, String fieldValue)
- throws UnknownHeaderFieldException, HeaderFormatException {
-
- if(Environment.DEBUG_HTTP)
-
Environment.out.println("Response.readHeaderLine("+fieldName+","+fieldValue+")");
-
- for(int count=0;count<RESPONSE_HEADERS.length;count++)
- if(RESPONSE_HEADERS[count].equalsIgnoreCase(fieldName)) {
- putHeader(RESPONSE_HEADERS[count],fieldValue);
- return;
- }
-
- super.readHeaderLine(fieldName,fieldValue);
-
- }
-
-} // response
-
-/*
+/*
+ * $Id: Response.java,v 1.2 2000/12/04 12:35:47 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.
+ */
+
+package de.infor.ce.http;
+
+import java.util.Hashtable;
+import java.io.PrintWriter;
+import java.io.BufferedReader;
+import java.io.IOException;
+
+
+/**
+ * Response is the implementation of a http/1.1 response command that is either
received
+ * by some external entity or is created to reply to some requesting entity.
+ *
+ * Response understands the usual error codes and the corresponding headers.
+ *
+ * @see <related>
+ * @author $Author: jung $
+ * @version $Revision: 1.2 $
+ */
+
+public class Response extends Command {
+
+ /**
+ * response headers that extend the command headers
+ */
+
+ public static String[] RESPONSE_HEADERS=new String[] {
+ "Accept-Ranges", "Age", "ETag", "Location", "Proxy-Authenticate",
+ "Retry-After", "Server", "Vary", "WWW-Authenticate"
+ };
+
+ /**
+ * Status code encodings
+ */
+
+ public static int[] STATUS_CODES=new int[] {
+ 100,101,200,201,202,203,204,205,206,300,301,302,303,304,305,307,400,
+ 401,402,403,404,405,406,407,408,409,410,411,412,413,414,415,416,417,500,
+ 501,502,503,504,505};
+
+ /**
+ * a response has a status code
+ */
+
+ int statusCode=-1;
+
+ /**
+ * an arbitrary reason phrase, normally its "OK"
+ */
+
+ String reasonPhrase;
+
+ /**
+ * constructor
+ */
+
+ public Response(Hashtable theHeader,int theMinor, int theMajor, String theBody,
boolean close, int theStatus,
+ String theReason) throws StatusCodeException {
+
+ super(theHeader,theMinor,theMajor,theBody,close);
+
+ if(Environment.DEBUG_HTTP)
+
Environment.out.println("Reponse("+theHeader+","+theMinor+","+theMajor+","+theBody+","+close+","+theStatus+","+
+ theReason+")");
+
+ setStatusCode(theStatus);
+ reasonPhrase=theReason;
+ }
+
+ /**
+ * output the startLine
+ */
+
+ protected void writeStartLine(PrintWriter writer) throws IOException {
+
+ if(Environment.DEBUG_HTTP)
+ Environment.out.println("Response.writeStartLine("+writer+")");
+
+ writer.println("HTTP/"+getProtocolVersion()+" "+statusCode+" "+reasonPhrase);
+ }
+
+ /**
+ * read the start line
+ */
+
+ protected void readStartLine(BufferedReader reader) throws IOException,
StartLineException {
+
+ if(Environment.DEBUG_HTTP)
+ Environment.out.println("Response.readStartLine("+reader+")");
+
+ String line=reader.readLine();
+
+ if(line==null)
+ throw new IOException();
+
+ try{
+
+ String firstToken=line.substring(0,line.indexOf(" "));
+
+ if(!firstToken.startsWith("HTTP/"))
+ throw new StartLineException();
+
+ String protocolVersionNumber=firstToken.substring(5);
+
+ int theMinor=Integer.parseInt(protocolVersionNumber.
+ substring(0,protocolVersionNumber.indexOf(".")));
+
+ int theMajor=Integer.parseInt(protocolVersionNumber.
+ substring(protocolVersionNumber.indexOf(".")+1));
+
+ setProtocolMinorVersion(theMinor);
+ setProtocolMajorVersion(theMajor);
+
+ setStatusCode(Integer.parseInt(line.substring(line.indexOf("
")+1,line.indexOf(" ",line.indexOf(" ")+1))));
+
+ reasonPhrase=line.substring(line.indexOf(" ",line.indexOf(" ")+1));
+
+ } catch(IndexOutOfBoundsException e) {
+
+ if(Environment.DEBUG_HTTP)
+ Environment.err.println("Response.readStartLine("+reader+"): encountered
format error "+e);
+
+ throw new StartLineException();
+
+ }
+
+ } // readStartLine
+
+ /**
+ * set the status code
+ */
+
+ public void setStatusCode(int code) throws StatusCodeException {
+
+ for(int count=0;count<STATUS_CODES.length;count++)
+ if(STATUS_CODES[count]==code) {
+ statusCode=code;
+ return;
+ }
+
+ throw new StatusCodeException();
+ }
+
+ /**
+ * overloads the readHeaderLine from Command to cater for extended settings
+ */
+
+ protected void readHeaderLine(String fieldName, String fieldValue)
+ throws UnknownHeaderFieldException, HeaderFormatException {
+
+ if(Environment.DEBUG_HTTP)
+
Environment.out.println("Response.readHeaderLine("+fieldName+","+fieldValue+")");
+
+ for(int count=0;count<RESPONSE_HEADERS.length;count++)
+ if(RESPONSE_HEADERS[count].equalsIgnoreCase(fieldName)) {
+ putHeader(RESPONSE_HEADERS[count],fieldValue);
+ return;
+ }
+
+ super.readHeaderLine(fieldName,fieldValue);
+
+ }
+
+} // response
+
+/*
* $Log: Response.java,v $
- * Revision 1.1 2000/08/10 21:06:43 jung
- * Initial revision
- *
- * Revision 1.1.1.1.2.2 2000/07/17 12:46:14 jung
- * refactored package and meta-model
- *
- * Revision 1.1.1.1.2.1 2000/07/13 12:46:14 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.1.1 2000/07/06 14:11:26 jung
- * Import of a pre beta version of ZOAP source with a new directory structure,
- * ant-based make, apache-kind of license, etc.
- *
- * jars are coming later because of cvs-history reasons.
- *
- * Revision 1.1.2.1 2000/06/13 15:01:42 jung
- * SOAP support begins to run
- *
- * Revision 1.2 2000/06/07 10:18:58 jung
- * added some service functionality to llokup other
- * beans and yourself as a bean. extended the test case
- * for that purpose.
- *
- * added a lookup service.
- *
- * Revision 1.1.1.1 2000/05/15 10:38:34 jung
- * Initial import of the directory structure. Contains templates and a batch file
to
- * create API documentation. Also contains the not yet
- * fully running directory service (AFDS).
- *
- */
+ * Revision 1.2 2000/12/04 12:35:47 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:06:43 jung
+ * Initial import.
+ *
+ *
+ * Revision 1.1.1.1.2.2 2000/07/17 12:46:14 jung
+ * refactored package and meta-model
+ *
+ * Revision 1.1.1.1.2.1 2000/07/13 12:46:14 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.1.1 2000/07/06 14:11:26 jung
+ * Import of a pre beta version of ZOAP source with a new directory structure,
+ * ant-based make, apache-kind of license, etc.
+ *
+ * jars are coming later because of cvs-history reasons.
+ *
+ * Revision 1.1.2.1 2000/06/13 15:01:42 jung
+ * SOAP support begins to run
+ *
+ * Revision 1.2 2000/06/07 10:18:58 jung
+ * added some service functionality to llokup other
+ * beans and yourself as a bean. extended the test case
+ * for that purpose.
+ *
+ * added a lookup service.
+ *
+ * Revision 1.1.1.1 2000/05/15 10:38:34 jung
+ * Initial import of the directory structure. Contains templates and a batch file
to
+ * create API documentation. Also contains the not yet
+ * fully running directory service (AFDS).
+ *
+ */
1.2 +425 -424 zoap/src/de/infor/ce/http/Server.java
Index: Server.java
===================================================================
RCS file: /products/cvs/ejboss/zoap/src/de/infor/ce/http/Server.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- Server.java 2000/08/10 21:06:44 1.1
+++ Server.java 2000/12/04 12:35:47 1.2
@@ -1,424 +1,425 @@
-/*
- * $Id: Server.java,v 1.1 2000/08/10 21:06:44 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.
- */
-
-package de.infor.ce.http;
-
-import de.infor.ce.util.ThreadPool;
-
-import java.net.ServerSocket;
-import java.net.Socket;
-import java.net.URL;
-import java.net.MalformedURLException;
-import java.net.UnknownHostException;
-import java.net.InetAddress;
-import java.io.IOException;
-import java.io.Reader;
-import java.io.BufferedReader;
-import java.io.PrintWriter;
-import java.io.InputStreamReader;
-import java.util.Hashtable;
-
-/**
- * An HTTP/1.1-compliant server with dummy functionality that can be extended
in order
- * to derive useful web services, such as class-loading, file-serving or
messaging.
- *
- * It is implemented after the pattern of com.dreambean.dynaserver.DynaServer
where
- * we have a single runnable that spawns multiple threads going through it
- * to handle a bunch of connections.
- *
- * It currently lacks support for sophisticated tranfer-encodings and
- * multiple-commands per connection which should be incorporated in the near
- * future.
- *
- * @see <related>
- * @author $Author: jung $
- * @version $Revision: 1.1 $
- */
-
-public class Server implements Runnable
-{
-
- /**
- * the server socket that this Server is listening to
- */
-
- private ServerSocket server;
-
- /**
- * the url that this server has
- */
-
- private URL url;
-
- /**
- * the all-embracing error response
- */
-
- private static Response GENERAL_ERROR;
-
- // is statically initialised as follows
- static {
-
- if(Environment.DEBUG_HTTP)
- Environment.out.println("Server.static initializer");
-
- try{
- GENERAL_ERROR=new Response(null,1,1,null,true,500,"ERROR");
- } catch(StatusCodeException e) {
-
- if(Environment.DEBUG_HTTP)
- Environment.err.println("Server.static initializer: encountered wrong
status whil constructing internal error "+e);
-
- }
- }
-
- /**
- * the port on which this server should run on
- */
-
- private int httpPort=-1;
-
- /**
- * thread pool for that server
- */
-
- private ThreadPool threadPool;
-
- /**
- * constructor sets the port and the url
- */
-
- public Server(int thePort) throws UnknownHostException, MalformedURLException {
-
- if(Environment.DEBUG_HTTP)
- Environment.out.print("Server()\n");
-
- httpPort=thePort;
-
- threadPool=new
ThreadPool(Environment.serverPoolSize,Environment.serverBlocks,"HTTP",false);
-
- url=new URL("http://"+InetAddress.getLocalHost().getHostName()+"/");
- }
-
- /**
- * the finalize method - destroys the pool with it
- */
-
- public void finalize() {
-
- if(Environment.DEBUG_HTTP)
- Environment.out.println("Server.finalize()");
-
- stop();
-
- }
-
- /**
- * start method
- */
-
- public void start() throws IOException {
-
- if(Environment.DEBUG_HTTP)
- Environment.out.println("Server.start()");
-
- // create a new server socket
- server = new ServerSocket(httpPort);
-
- // set the correct max size in the thread pool
- threadPool.setMaxSize(Environment.serverPoolSize);
-
- // and a thread to listen on it
- listen();
- }
-
- /**
- * local helper to start a new thread around this runnable
- */
-
- protected void listen() {
-
- if(Environment.DEBUG_HTTP)
- Environment.out.println("Server.listen()");
-
- // use the thread pool
- threadPool.run(this);
- }
-
- /**
- * stop method, close the listening socket, hence
- * interrupt the listening thread if started.
- */
-
- public void stop() {
-
- if(Environment.DEBUG_HTTP)
- Environment.out.println("Server.stop()");
-
- // safely take the socket away
- ServerSocket serversocket = server;
- server = null;
- try {
-
- // and close it, afterwards
- serversocket.close();
- } catch(Exception _ex) { }
-
- // and kill the threadpool
- threadPool.finalize();
-
- } // stop()
-
- /**
- * the run method that is called, whenever this runnable interface is
- * put into a new thread. It will first listen to the servers socket to
- * accept incoming connections. Upon connection, it will spawn a new thread
- * that keeps listening and process the incoming http request.
- *
- * The connection is immediately closed afterwards. At least, the
Connection:Closed
- * header is produced in order to ensure compatibility with full-fledged
- * http/1.1 clients.
- */
-
- public void run() {
-
- if(Environment.DEBUG_HTTP)
- Environment.out.println("Server.run()");
-
- // the new socket that is accepted
- Socket socket = null;
-
- try {
-
- // accept incoming connections
- socket = server.accept();
-
- } catch(IOException e) {
-
- if(Environment.DEBUG_HTTP)
- Environment.err.println("Server.run(): encountered IOException "+e);
-
- // interrupted: have we been finished?
- if(server != null) {
-
- // no, then we have to recover !
- if(Environment.DEBUG_HTTP)
- Environment.out.println("Server.run(): Trying to recover.");
-
- try{
- start();
- } catch(IOException _ex) {
-
- if(Environment.DEBUG_HTTP)
- Environment.err.println("Server.run(): recoverage failed"+e);
-
- } // try
- } // if
-
- // in each case, end this thread
- return;
-
- } catch(NullPointerException e) {
-
- if(Environment.DEBUG_HTTP)
- Environment.err.println("Server.run(): encountered Nullpointer Exception
"+e);
-
- // happens if the server socket has already been set to null before
- // listen has been called
- return;
-
- } // try
-
- // when we are here, a new connection has been accepted
- // hence, spawn a new thread that keeps listening on the server socket
- listen();
-
- // process the request(s) by yourself
- try{
-
- // we construct some output stream to give responses back
- PrintWriter dataoutputstream =
- new PrintWriter(socket.getOutputStream());
-
- // construct a reader to read requests in
- BufferedReader bufferedreader =
- new BufferedReader(new InputStreamReader(socket.getInputStream()));
-
- // whether this session should be closed
- boolean hasBeenClosed=false;
-
- try{
- // loop until closed
- while(!hasBeenClosed) {
-
-
- // no, then we have to recover !
- if(Environment.DEBUG_HTTP)
- Environment.out.println("Server.run(): going into reception loop.");
-
-
- // create a new request using an extensible factory method
- // that can be overridden to implement more specialised request structures
- Request request=createRequest();
-
- // let the request fill itself using the input buffer
- request.read(bufferedreader);
-
- // create a response to the given request
- Response response=processRequest(request);
-
- // find out whether an explicit closing is required
- hasBeenClosed=request.isConnectionClose() || response.isConnectionClose();
-
- // mark it in the response
- response.setConnectionClose(hasBeenClosed);
-
- // and write to the outstream
- response.write(dataoutputstream);
-
- // flush the output
- dataoutputstream.flush();
- } // while(!hasBeenClosed)
-
- } catch(HttpException e) {
-
- if(Environment.DEBUG_HTTP)
- Environment.out.println("Server.run(): encountered http exception "+e);
-
- try{
- GENERAL_ERROR.write(dataoutputstream);
- } catch (HttpException e2) {
-
- if(Environment.DEBUG_HTTP)
- Environment.out.println("Server.run(): encountered http exception"+
- " while responding error."+e);
-
- }
-
- } // try
-
- // close the socket to indicate EOF
- socket.shutdownOutput();
-
- } catch(IOException e) {
-
- if(Environment.DEBUG_HTTP)
- Environment.err.println("Server.run(): encountered IOException"+
- " while trying to open and read from socket"+e);
-
- // ignored - we close the socket. our partner was seemingly unable to
- // communicate, so do we
-
- } finally {
-
- if(Environment.DEBUG_HTTP)
- Environment.out.println("Server.run(): closing socket.");
-
- // close the socket created by accept()
- try {
- socket.close();
- // ignore any errors here
- } catch(IOException _ex) { }
-
- } // try
-
- } // run
-
- /**
- * factory method to create new request structures
- * may throw an @throws UnknowRequestException to indicate that
- * the construction of the request did not succeed. It is called by the
- * server, whenever a new request comes in and must be parsed.
- *
- * Please overwrite this method to generate more specialised requests
- */
-
- protected Request createRequest() throws UnknownRequestMethodException {
-
- if(Environment.DEBUG_HTTP)
- Environment.out.println("Server.createRequest()");
-
- return new Request(null,1,1,null,false,getURL(),null,"GET");
- }
-
- /**
- * this method is called by the server, whenever an incoming
- * @arg request has been sucessfully parsed. It returns a corresponding
- * @arg Response that will be delivered to the client in return. It may
- * throw an @throws ProcessException to indicate a failure in processing
- * that message.
- *
- * This default implementation simply returns the general "not implemented"
response.
- * Overwrite to get useful services.
- */
-
- protected Response processRequest(Request request) throws ProcessException {
-
- if(Environment.DEBUG_HTTP)
- Environment.out.println("Server.processRequest("+request+")");
-
- try{
-
- return new Response(null,1,1,null,true,501,"ERROR");
-
- } catch(StatusCodeException e) {
-
- if(Environment.DEBUG_HTTP)
- Environment.err.println("Server.processRequest("+request+"): encountered
status exception "+e);
-
- throw new ProcessException();
-
- }
-
- }
-
- /**
- * returns the URL of this server
- */
-
- public URL getURL() {
- return url;
- }
-
-} // Server
+/*
+ * $Id: Server.java,v 1.2 2000/12/04 12:35:47 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.
+ */
+
+package de.infor.ce.http;
+
+import de.infor.ce.util.ThreadPool;
+
+import java.net.ServerSocket;
+import java.net.Socket;
+import java.net.URL;
+import java.net.MalformedURLException;
+import java.net.UnknownHostException;
+import java.net.InetAddress;
+import java.io.IOException;
+import java.io.Reader;
+import java.io.BufferedReader;
+import java.io.PrintWriter;
+import java.io.InputStreamReader;
+import java.util.Hashtable;
+
+/**
+ * An HTTP/1.1-compliant server with dummy functionality that can be extended
in order
+ * to derive useful web services, such as class-loading, file-serving or
messaging.
+ *
+ * It is implemented after the pattern of com.dreambean.dynaserver.DynaServer
where
+ * we have a single runnable that spawns multiple threads going through it
+ * to handle a bunch of connections.
+ *
+ * It currently lacks support for sophisticated tranfer-encodings and
+ * multiple-commands per connection which should be incorporated in the near
+ * future.
+ *
+ * @see <related>
+ * @author $Author: jung $
+ * @version $Revision: 1.2 $
+ */
+
+public class Server implements Runnable
+{
+
+ /**
+ * the server socket that this Server is listening to
+ */
+
+ private ServerSocket server;
+
+ /**
+ * the url that this server has
+ */
+
+ private URL url;
+
+ /**
+ * the all-embracing error response
+ */
+
+ private static Response GENERAL_ERROR;
+
+ // is statically initialised as follows
+ static {
+
+ if(Environment.DEBUG_HTTP)
+ Environment.out.println("Server.static initializer");
+
+ try{
+ GENERAL_ERROR=new Response(null,1,1,null,true,500,"ERROR");
+ } catch(StatusCodeException e) {
+
+ if(Environment.DEBUG_HTTP)
+ Environment.err.println("Server.static initializer: encountered wrong
status whil constructing internal error "+e);
+
+ }
+ }
+
+ /**
+ * the port on which this server should run on
+ */
+
+ private int httpPort=-1;
+
+ /**
+ * thread pool for that server
+ */
+
+ private ThreadPool threadPool;
+
+ /**
+ * constructor sets the port and the url
+ */
+
+ public Server(int thePort) throws UnknownHostException, MalformedURLException {
+
+ if(Environment.DEBUG_HTTP)
+ Environment.out.print("Server()\n");
+
+ httpPort=thePort;
+
+ threadPool=new
ThreadPool(Environment.serverPoolSize,Environment.serverBlocks,"HTTP",false);
+
+ url=new URL("http",InetAddress.getLocalHost().getHostName(),httpPort,"/");
+
+ }
+
+ /**
+ * the finalize method - destroys the pool with it
+ */
+
+ public void finalize() {
+
+ if(Environment.DEBUG_HTTP)
+ Environment.out.println("Server.finalize()");
+
+ stop();
+
+ }
+
+ /**
+ * start method
+ */
+
+ public void start() throws IOException {
+
+ if(Environment.DEBUG_HTTP)
+ Environment.out.println("Server.start()");
+
+ // create a new server socket
+ server = new ServerSocket(httpPort);
+
+ // set the correct max size in the thread pool
+ threadPool.setMaxSize(Environment.serverPoolSize);
+
+ // and a thread to listen on it
+ listen();
+ }
+
+ /**
+ * local helper to start a new thread around this runnable
+ */
+
+ protected void listen() {
+
+ if(Environment.DEBUG_HTTP)
+ Environment.out.println("Server.listen()");
+
+ // use the thread pool
+ threadPool.run(this);
+ }
+
+ /**
+ * stop method, close the listening socket, hence
+ * interrupt the listening thread if started.
+ */
+
+ public void stop() {
+
+ if(Environment.DEBUG_HTTP)
+ Environment.out.println("Server.stop()");
+
+ // safely take the socket away
+ ServerSocket serversocket = server;
+ server = null;
+ try {
+
+ // and close it, afterwards
+ serversocket.close();
+ } catch(Exception _ex) { }
+
+ // and kill the threadpool
+ threadPool.finalize();
+
+ } // stop()
+
+ /**
+ * the run method that is called, whenever this runnable interface is
+ * put into a new thread. It will first listen to the servers socket to
+ * accept incoming connections. Upon connection, it will spawn a new thread
+ * that keeps listening and process the incoming http request.
+ *
+ * The connection is immediately closed afterwards. At least, the
Connection:Closed
+ * header is produced in order to ensure compatibility with full-fledged
+ * http/1.1 clients.
+ */
+
+ public void run() {
+
+ if(Environment.DEBUG_HTTP)
+ Environment.out.println("Server.run()");
+
+ // the new socket that is accepted
+ Socket socket = null;
+
+ try {
+
+ // accept incoming connections
+ socket = server.accept();
+
+ } catch(IOException e) {
+
+ if(Environment.DEBUG_HTTP)
+ Environment.err.println("Server.run(): encountered IOException "+e);
+
+ // interrupted: have we been finished?
+ if(server != null) {
+
+ // no, then we have to recover !
+ if(Environment.DEBUG_HTTP)
+ Environment.out.println("Server.run(): Trying to recover.");
+
+ try{
+ start();
+ } catch(IOException _ex) {
+
+ if(Environment.DEBUG_HTTP)
+ Environment.err.println("Server.run(): recoverage failed"+e);
+
+ } // try
+ } // if
+
+ // in each case, end this thread
+ return;
+
+ } catch(NullPointerException e) {
+
+ if(Environment.DEBUG_HTTP)
+ Environment.err.println("Server.run(): encountered Nullpointer Exception
"+e);
+
+ // happens if the server socket has already been set to null before
+ // listen has been called
+ return;
+
+ } // try
+
+ // when we are here, a new connection has been accepted
+ // hence, spawn a new thread that keeps listening on the server socket
+ listen();
+
+ // process the request(s) by yourself
+ try{
+
+ // we construct some output stream to give responses back
+ PrintWriter dataoutputstream =
+ new PrintWriter(socket.getOutputStream());
+
+ // construct a reader to read requests in
+ BufferedReader bufferedreader =
+ new BufferedReader(new InputStreamReader(socket.getInputStream()));
+
+ // whether this session should be closed
+ boolean hasBeenClosed=false;
+
+ try{
+ // loop until closed
+ while(!hasBeenClosed) {
+
+
+ // no, then we have to recover !
+ if(Environment.DEBUG_HTTP)
+ Environment.out.println("Server.run(): going into reception loop.");
+
+
+ // create a new request using an extensible factory method
+ // that can be overridden to implement more specialised request structures
+ Request request=createRequest();
+
+ // let the request fill itself using the input buffer
+ request.read(bufferedreader);
+
+ // create a response to the given request
+ Response response=processRequest(request);
+
+ // find out whether an explicit closing is required
+ hasBeenClosed=request.isConnectionClose() || response.isConnectionClose();
+
+ // mark it in the response
+ response.setConnectionClose(hasBeenClosed);
+
+ // and write to the outstream
+ response.write(dataoutputstream);
+
+ // flush the output
+ dataoutputstream.flush();
+ } // while(!hasBeenClosed)
+
+ } catch(HttpException e) {
+
+ if(Environment.DEBUG_HTTP)
+ Environment.out.println("Server.run(): encountered http exception "+e);
+
+ try{
+ GENERAL_ERROR.write(dataoutputstream);
+ } catch (HttpException e2) {
+
+ if(Environment.DEBUG_HTTP)
+ Environment.out.println("Server.run(): encountered http exception"+
+ " while responding error."+e);
+
+ }
+
+ } // try
+
+ // close the socket to indicate EOF
+ socket.shutdownOutput();
+
+ } catch(IOException e) {
+
+ if(Environment.DEBUG_HTTP)
+ Environment.err.println("Server.run(): encountered IOException"+
+ " while trying to open and read from socket"+e);
+
+ // ignored - we close the socket. our partner was seemingly unable to
+ // communicate, so do we
+
+ } finally {
+
+ if(Environment.DEBUG_HTTP)
+ Environment.out.println("Server.run(): closing socket.");
+
+ // close the socket created by accept()
+ try {
+ socket.close();
+ // ignore any errors here
+ } catch(IOException _ex) { }
+
+ } // try
+
+ } // run
+
+ /**
+ * factory method to create new request structures
+ * may throw an @throws UnknowRequestException to indicate that
+ * the construction of the request did not succeed. It is called by the
+ * server, whenever a new request comes in and must be parsed.
+ *
+ * Please overwrite this method to generate more specialised requests
+ */
+
+ protected Request createRequest() throws UnknownRequestMethodException {
+
+ if(Environment.DEBUG_HTTP)
+ Environment.out.println("Server.createRequest()");
+
+ return new Request(null,1,1,null,false,getURL(),null,"GET");
+ }
+
+ /**
+ * this method is called by the server, whenever an incoming
+ * @arg request has been sucessfully parsed. It returns a corresponding
+ * @arg Response that will be delivered to the client in return. It may
+ * throw an @throws ProcessException to indicate a failure in processing
+ * that message.
+ *
+ * This default implementation simply returns the general "not implemented"
response.
+ * Overwrite to get useful services.
+ */
+
+ protected Response processRequest(Request request) throws ProcessException {
+
+ if(Environment.DEBUG_HTTP)
+ Environment.out.println("Server.processRequest("+request+")");
+
+ try{
+
+ return new Response(null,1,1,null,true,501,"ERROR");
+
+ } catch(StatusCodeException e) {
+
+ if(Environment.DEBUG_HTTP)
+ Environment.err.println("Server.processRequest("+request+"): encountered
status exception "+e);
+
+ throw new ProcessException();
+
+ }
+
+ }
+
+ /**
+ * returns the URL of this server
+ */
+
+ public URL getURL() {
+ return url;
+ }
+
+} // Server
1.2 +92 -88 zoap/src/de/infor/ce/http/StartLineException.java
Index: StartLineException.java
===================================================================
RCS file: /products/cvs/ejboss/zoap/src/de/infor/ce/http/StartLineException.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- StartLineException.java 2000/08/10 21:06:44 1.1
+++ StartLineException.java 2000/12/04 12:35:47 1.2
@@ -1,91 +1,101 @@
-/*
- * $Id: StartLineException.java,v 1.1 2000/08/10 21:06:44 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.
- */
-
-package de.infor.ce.http;
-
-/**
- * is thrown when outputting or reading the starting line of a command did not
- * work.
- *
- * @see <related>
- * @author $Author: jung $
- * @version $Revision: 1.1 $
- */
-
-public class StartLineException extends HttpException {
-}
-
-/*
+/*
+ * $Id: StartLineException.java,v 1.2 2000/12/04 12:35:47 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.
+ */
+
+package de.infor.ce.http;
+
+/**
+ * is thrown when outputting or reading the starting line of a command did not
+ * work.
+ *
+ * @see <related>
+ * @author $Author: jung $
+ * @version $Revision: 1.2 $
+ */
+
+public class StartLineException extends HttpException {
+}
+
+/*
* $Log: StartLineException.java,v $
- * Revision 1.1 2000/08/10 21:06:44 jung
- * Initial revision
- *
- * Revision 1.1.1.1.2.1 2000/07/13 12:46:14 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.1.1 2000/07/06 14:11:26 jung
- * Import of a pre beta version of ZOAP source with a new directory structure,
- * ant-based make, apache-kind of license, etc.
- *
- * jars are coming later because of cvs-history reasons.
- *
- * Revision 1.1.2.1 2000/06/13 15:01:42 jung
- * SOAP support begins to run
- *
- * Revision 1.2 2000/06/07 10:18:58 jung
- * added some service functionality to llokup other
- * beans and yourself as a bean. extended the test case
- * for that purpose.
- *
- * added a lookup service.
- *
- * Revision 1.1.1.1 2000/05/15 10:38:34 jung
- * Initial import of the directory structure. Contains templates and a batch file
to
- * create API documentation. Also contains the not yet
- * fully running directory service (AFDS).
- *
- */
+ * Revision 1.2 2000/12/04 12:35:47 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:06:44 jung
+ * Initial import.
+ *
+ *
+ * Revision 1.1.1.1.2.1 2000/07/13 12:46:14 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.1.1 2000/07/06 14:11:26 jung
+ * Import of a pre beta version of ZOAP source with a new directory structure,
+ * ant-based make, apache-kind of license, etc.
+ *
+ * jars are coming later because of cvs-history reasons.
+ *
+ * Revision 1.1.2.1 2000/06/13 15:01:42 jung
+ * SOAP support begins to run
+ *
+ * Revision 1.2 2000/06/07 10:18:58 jung
+ * added some service functionality to llokup other
+ * beans and yourself as a bean. extended the test case
+ * for that purpose.
+ *
+ * added a lookup service.
+ *
+ * Revision 1.1.1.1 2000/05/15 10:38:34 jung
+ * Initial import of the directory structure. Contains templates and a batch file
to
+ * create API documentation. Also contains the not yet
+ * fully running directory service (AFDS).
+ *
+ */
1.2 +91 -87 zoap/src/de/infor/ce/http/StatusCodeException.java
Index: StatusCodeException.java
===================================================================
RCS file: /products/cvs/ejboss/zoap/src/de/infor/ce/http/StatusCodeException.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- StatusCodeException.java 2000/08/10 21:06:45 1.1
+++ StatusCodeException.java 2000/12/04 12:35:48 1.2
@@ -1,90 +1,100 @@
-/*
- * $Id: StatusCodeException.java,v 1.1 2000/08/10 21:06:45 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.
- */
-
-package de.infor.ce.http;
-
-/**
- * indicates a non-valid status code (error-code) in a http-response.
- *
- * @see <related>
- * @author $Author: jung $
- * @version $Revision: 1.1 $
- */
-
-public class StatusCodeException extends StartLineException {
-}
-
-/*
+/*
+ * $Id: StatusCodeException.java,v 1.2 2000/12/04 12:35:48 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.
+ */
+
+package de.infor.ce.http;
+
+/**
+ * indicates a non-valid status code (error-code) in a http-response.
+ *
+ * @see <related>
+ * @author $Author: jung $
+ * @version $Revision: 1.2 $
+ */
+
+public class StatusCodeException extends StartLineException {
+}
+
+/*
* $Log: StatusCodeException.java,v $
- * Revision 1.1 2000/08/10 21:06:45 jung
- * Initial revision
- *
- * Revision 1.1.1.1.2.1 2000/07/13 12:46:14 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.1.1 2000/07/06 14:11:26 jung
- * Import of a pre beta version of ZOAP source with a new directory structure,
- * ant-based make, apache-kind of license, etc.
- *
- * jars are coming later because of cvs-history reasons.
- *
- * Revision 1.1.2.1 2000/06/13 15:01:42 jung
- * SOAP support begins to run
- *
- * Revision 1.2 2000/06/07 10:18:58 jung
- * added some service functionality to llokup other
- * beans and yourself as a bean. extended the test case
- * for that purpose.
- *
- * added a lookup service.
- *
- * Revision 1.1.1.1 2000/05/15 10:38:34 jung
- * Initial import of the directory structure. Contains templates and a batch file
to
- * create API documentation. Also contains the not yet
- * fully running directory service (AFDS).
- *
- */
+ * Revision 1.2 2000/12/04 12:35:48 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:06:45 jung
+ * Initial import.
+ *
+ *
+ * Revision 1.1.1.1.2.1 2000/07/13 12:46:14 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.1.1 2000/07/06 14:11:26 jung
+ * Import of a pre beta version of ZOAP source with a new directory structure,
+ * ant-based make, apache-kind of license, etc.
+ *
+ * jars are coming later because of cvs-history reasons.
+ *
+ * Revision 1.1.2.1 2000/06/13 15:01:42 jung
+ * SOAP support begins to run
+ *
+ * Revision 1.2 2000/06/07 10:18:58 jung
+ * added some service functionality to llokup other
+ * beans and yourself as a bean. extended the test case
+ * for that purpose.
+ *
+ * added a lookup service.
+ *
+ * Revision 1.1.1.1 2000/05/15 10:38:34 jung
+ * Initial import of the directory structure. Contains templates and a batch file
to
+ * create API documentation. Also contains the not yet
+ * fully running directory service (AFDS).
+ *
+ */
1.2 +91 -87 zoap/src/de/infor/ce/http/UnknownHeaderFieldException.java
Index: UnknownHeaderFieldException.java
===================================================================
RCS file:
/products/cvs/ejboss/zoap/src/de/infor/ce/http/UnknownHeaderFieldException.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- UnknownHeaderFieldException.java 2000/08/10 21:06:45 1.1
+++ UnknownHeaderFieldException.java 2000/12/04 12:35:48 1.2
@@ -1,90 +1,100 @@
-/*
- * $Id: UnknownHeaderFieldException.java,v 1.1 2000/08/10 21:06:45 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.
- */
-
-package de.infor.ce.http;
-
-/**
- * indicates a non-supported header field in an http command.
- *
- * @see <related>
- * @author $Author: jung $
- * @version $Revision: 1.1 $
- */
-
-public class UnknownHeaderFieldException extends HeaderException {
-}
-
-/*
+/*
+ * $Id: UnknownHeaderFieldException.java,v 1.2 2000/12/04 12:35:48 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.
+ */
+
+package de.infor.ce.http;
+
+/**
+ * indicates a non-supported header field in an http command.
+ *
+ * @see <related>
+ * @author $Author: jung $
+ * @version $Revision: 1.2 $
+ */
+
+public class UnknownHeaderFieldException extends HeaderException {
+}
+
+/*
* $Log: UnknownHeaderFieldException.java,v $
- * Revision 1.1 2000/08/10 21:06:45 jung
- * Initial revision
- *
- * Revision 1.1.1.1.2.1 2000/07/13 12:46:14 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.1.1 2000/07/06 14:11:26 jung
- * Import of a pre beta version of ZOAP source with a new directory structure,
- * ant-based make, apache-kind of license, etc.
- *
- * jars are coming later because of cvs-history reasons.
- *
- * Revision 1.1.2.1 2000/06/13 15:01:42 jung
- * SOAP support begins to run
- *
- * Revision 1.2 2000/06/07 10:18:58 jung
- * added some service functionality to llokup other
- * beans and yourself as a bean. extended the test case
- * for that purpose.
- *
- * added a lookup service.
- *
- * Revision 1.1.1.1 2000/05/15 10:38:34 jung
- * Initial import of the directory structure. Contains templates and a batch file
to
- * create API documentation. Also contains the not yet
- * fully running directory service (AFDS).
- *
- */
+ * Revision 1.2 2000/12/04 12:35:48 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:06:45 jung
+ * Initial import.
+ *
+ *
+ * Revision 1.1.1.1.2.1 2000/07/13 12:46:14 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.1.1 2000/07/06 14:11:26 jung
+ * Import of a pre beta version of ZOAP source with a new directory structure,
+ * ant-based make, apache-kind of license, etc.
+ *
+ * jars are coming later because of cvs-history reasons.
+ *
+ * Revision 1.1.2.1 2000/06/13 15:01:42 jung
+ * SOAP support begins to run
+ *
+ * Revision 1.2 2000/06/07 10:18:58 jung
+ * added some service functionality to llokup other
+ * beans and yourself as a bean. extended the test case
+ * for that purpose.
+ *
+ * added a lookup service.
+ *
+ * Revision 1.1.1.1 2000/05/15 10:38:34 jung
+ * Initial import of the directory structure. Contains templates and a batch file
to
+ * create API documentation. Also contains the not yet
+ * fully running directory service (AFDS).
+ *
+ */
1.2 +91 -87 zoap/src/de/infor/ce/http/UnknownRequestMethodException.java
Index: UnknownRequestMethodException.java
===================================================================
RCS file:
/products/cvs/ejboss/zoap/src/de/infor/ce/http/UnknownRequestMethodException.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- UnknownRequestMethodException.java 2000/08/10 21:06:45 1.1
+++ UnknownRequestMethodException.java 2000/12/04 12:35:48 1.2
@@ -1,90 +1,100 @@
-/*
- * $Id: UnknownRequestMethodException.java,v 1.1 2000/08/10 21:06:45 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.
- */
-
-package de.infor.ce.http;
-
-/**
- * indicates a non-supported request method.
- *
- * @see <related>
- * @author $Author: jung $
- * @version $Revision: 1.1 $
- */
-
-public class UnknownRequestMethodException extends StartLineException {
-}
-
-/*
+/*
+ * $Id: UnknownRequestMethodException.java,v 1.2 2000/12/04 12:35:48 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.
+ */
+
+package de.infor.ce.http;
+
+/**
+ * indicates a non-supported request method.
+ *
+ * @see <related>
+ * @author $Author: jung $
+ * @version $Revision: 1.2 $
+ */
+
+public class UnknownRequestMethodException extends StartLineException {
+}
+
+/*
* $Log: UnknownRequestMethodException.java,v $
- * Revision 1.1 2000/08/10 21:06:45 jung
- * Initial revision
- *
- * Revision 1.1.1.1.2.1 2000/07/13 12:46:14 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.1.1 2000/07/06 14:11:26 jung
- * Import of a pre beta version of ZOAP source with a new directory structure,
- * ant-based make, apache-kind of license, etc.
- *
- * jars are coming later because of cvs-history reasons.
- *
- * Revision 1.1.2.1 2000/06/13 15:01:42 jung
- * SOAP support begins to run
- *
- * Revision 1.2 2000/06/07 10:18:58 jung
- * added some service functionality to llokup other
- * beans and yourself as a bean. extended the test case
- * for that purpose.
- *
- * added a lookup service.
- *
- * Revision 1.1.1.1 2000/05/15 10:38:34 jung
- * Initial import of the directory structure. Contains templates and a batch file
to
- * create API documentation. Also contains the not yet
- * fully running directory service (AFDS).
- *
- */
+ * Revision 1.2 2000/12/04 12:35:48 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:06:45 jung
+ * Initial import.
+ *
+ *
+ * Revision 1.1.1.1.2.1 2000/07/13 12:46:14 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.1.1 2000/07/06 14:11:26 jung
+ * Import of a pre beta version of ZOAP source with a new directory structure,
+ * ant-based make, apache-kind of license, etc.
+ *
+ * jars are coming later because of cvs-history reasons.
+ *
+ * Revision 1.1.2.1 2000/06/13 15:01:42 jung
+ * SOAP support begins to run
+ *
+ * Revision 1.2 2000/06/07 10:18:58 jung
+ * added some service functionality to llokup other
+ * beans and yourself as a bean. extended the test case
+ * for that purpose.
+ *
+ * added a lookup service.
+ *
+ * Revision 1.1.1.1 2000/05/15 10:38:34 jung
+ * Initial import of the directory structure. Contains templates and a batch file
to
+ * create API documentation. Also contains the not yet
+ * fully running directory service (AFDS).
+ *
+ */
1.2 +111 -110 zoap/src/de/infor/ce/http/http.dfPackage
Index: http.dfPackage
===================================================================
RCS file: /products/cvs/ejboss/zoap/src/de/infor/ce/http/http.dfPackage,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- http.dfPackage 2000/08/10 21:06:41 1.1
+++ http.dfPackage 2000/12/04 12:35:48 1.2
@@ -1,110 +1,111 @@
-package id4kjhfca3fgnbmca3tca74;
-
-/**
-@version 2.0
-@physicalPackage
-@__modelType diagram
-*/
-class diagram {
-/**
-@__ref <oiref:java#Class#de.infor.ce.http.Request:oiref><oihard>
-@__modelType reference
-*/
-class reference {
-}/**
-@__ref <oiref:java#Class#de.infor.ce.http.Response:oiref><oihard>
-@__modelType reference
-*/
-class reference10 {
-}/**
-@__ref <oiref:java#Class#de.infor.ce.http.BodyException:oiref><oihard>
-@__modelType reference
-*/
-class reference11 {
-}/**
-@__ref <oiref:java#Class#de.infor.ce.http.UnknownHeaderFieldException:oiref><oihard>
-@__modelType reference
-*/
-class reference12 {
-}/**
-@__ref <oiref:design#Class#id3iqfxca3fgnbmca3tcayx.diagram:oiref><oihard>
-@__modelType reference
-*/
-class reference13 {
-}/**
-@__ref <oiref:java#Class#de.infor.ce.http.StatusCodeException:oiref><oihard>
-@__modelType reference
-*/
-class reference15 {
-}/**
-@__ref <oiref:java#Class#de.infor.ce.http.Environment:oiref><oihard>
-@__modelType reference
-*/
-class reference16 {
-}/**
-@__ref <oiref:java#Class#de.infor.ce.http.Command:oiref><oihard>
-@__modelType reference
-*/
-class reference17 {
-}/**
-@__ref <oiref:java#Class#de.infor.ce.http.HeaderFormatException:oiref><oihard>
-@__modelType reference
-*/
-class reference18 {
-}/**
-@__ref <oiref:java#Class#de.infor.ce.http.Server:oiref><oihard>
-@__modelType reference
-*/
-class reference19 {
-}/**
-@__ref <oiref:java#Class#de.infor.ce.http.ProcessException:oiref><oihard>
-@__modelType reference
-*/
-class reference20 {
-}/**
-@__ref <oiref:java#Class#de.infor.ce.http.StartLineException:oiref><oihard>
-@__modelType reference
-*/
-class reference21 {
-}/**
-@__ref <oiref:java#Class#de.infor.ce.http.HeaderException:oiref><oihard>
-@__modelType reference
-*/
-class reference22 {
-}/**
-@__ref
<oiref:java#Class#de.infor.ce.http.UnknownRequestMethodException:oiref><oihard>
-@__modelType reference
-*/
-class reference23 {
-}/**
-@__ref <oiref:java#Class#de.infor.ce.http.HttpException:oiref><oihard>
-@__modelType reference
-*/
-class reference24 {
-}/**
-@shapeType DependencyLink
-@__modelType link
-@__ref <oiref:design#Class#idqnwuc9pgodo2c9pqkznw.diagram:oiref><oihard>
-@label builds on
-*/
-class link {
-}/**
-@shapeType NoteLink
-@__modelType link
-@__ref <oiref:design#Class#id2e2vrc9pgodo2c9pgqtl6.node29:oiref><oihard>
-*/
-class link31 {
-}}/**
-@__tags
-@shapeType ClassDiagram
-*/
-class __tags {
-}/**
-@__options
-*/
-class __options {
-}/**
-@__positions
-*/
-class __positions {
-}
\ No newline at end of file
+package id4kjhfca3fgnbmca3tca74;
+
+/**
+@version 2.0
+@physicalPackage
+@__modelType diagram
+*/
+class diagram {
+/**
+@__ref <oiref:java#Class#de.infor.ce.http.Request:oiref><oihard>
+@__modelType reference
+*/
+class reference {
+}/**
+@__ref <oiref:java#Class#de.infor.ce.http.Response:oiref><oihard>
+@__modelType reference
+*/
+class reference10 {
+}/**
+@__ref <oiref:java#Class#de.infor.ce.http.BodyException:oiref><oihard>
+@__modelType reference
+*/
+class reference11 {
+}/**
+@__ref <oiref:java#Class#de.infor.ce.http.UnknownHeaderFieldException:oiref><oihard>
+@__modelType reference
+*/
+class reference12 {
+}/**
+@__ref <oiref:design#Class#id3iqfxca3fgnbmca3tcayx.diagram:oiref><oihard>
+@__modelType reference
+*/
+class reference13 {
+}/**
+@__ref <oiref:java#Class#de.infor.ce.http.StatusCodeException:oiref><oihard>
+@__modelType reference
+*/
+class reference15 {
+}/**
+@__ref <oiref:java#Class#de.infor.ce.http.Environment:oiref><oihard>
+@__modelType reference
+*/
+class reference16 {
+}/**
+@__ref <oiref:java#Class#de.infor.ce.http.Command:oiref><oihard>
+@__modelType reference
+*/
+class reference17 {
+}/**
+@__ref <oiref:java#Class#de.infor.ce.http.HeaderFormatException:oiref><oihard>
+@__modelType reference
+*/
+class reference18 {
+}/**
+@__ref <oiref:java#Class#de.infor.ce.http.Server:oiref><oihard>
+@__modelType reference
+*/
+class reference19 {
+}/**
+@__ref <oiref:java#Class#de.infor.ce.http.ProcessException:oiref><oihard>
+@__modelType reference
+*/
+class reference20 {
+}/**
+@__ref <oiref:java#Class#de.infor.ce.http.StartLineException:oiref><oihard>
+@__modelType reference
+*/
+class reference21 {
+}/**
+@__ref <oiref:java#Class#de.infor.ce.http.HeaderException:oiref><oihard>
+@__modelType reference
+*/
+class reference22 {
+}/**
+@__ref
<oiref:java#Class#de.infor.ce.http.UnknownRequestMethodException:oiref><oihard>
+@__modelType reference
+*/
+class reference23 {
+}/**
+@__ref <oiref:java#Class#de.infor.ce.http.HttpException:oiref><oihard>
+@__modelType reference
+*/
+class reference24 {
+}/**
+@shapeType DependencyLink
+@__modelType link
+@__ref <oiref:design#Class#idqnwuc9pgodo2c9pqkznw.diagram:oiref><oihard>
+@label builds on
+*/
+class link {
+}/**
+@shapeType NoteLink
+@__modelType link
+@__ref <oiref:design#Class#id2e2vrc9pgodo2c9pgqtl6.node29:oiref><oihard>
+*/
+class link31 {
+}}/**
+@__tags
+@shapeType ClassDiagram
+@number txmiida
+*/
+class __tags {
+}/**
+@__options
+*/
+class __options {
+}/**
+@__positions
+*/
+class __positions {
+}