You are viewing a plain text version of this content. The canonical link for it is here.
Posted to soap-dev@xml.apache.org by wc...@locus.apache.org on 2000/11/28 23:25:26 UTC

cvs commit: xml-soap/java/src/org/apache/soap Constants.java

wcloeten    00/11/28 14:25:23

  Modified:    java/src/org/apache/soap Constants.java
  Log:
  made constants final for performance, multipart MIME support
  
  Revision  Changes    Path
  1.10      +60 -43    xml-soap/java/src/org/apache/soap/Constants.java
  
  Index: Constants.java
  ===================================================================
  RCS file: /home/cvs/xml-soap/java/src/org/apache/soap/Constants.java,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- Constants.java	2000/10/17 12:03:40	1.9
  +++ Constants.java	2000/11/28 22:25:19	1.10
  @@ -68,54 +68,64 @@
   public class Constants
   {
     // Namespace prefixes.
  -  public static String NS_PRE_XMLNS = "xmlns";
  -  public static String NS_PRE_SOAP = "SOAP";
  -  public static String NS_PRE_SOAP_ENV = NS_PRE_SOAP + "-ENV";
  -  public static String NS_PRE_SOAP_ENC = NS_PRE_SOAP + "-ENC";
  -  public static String NS_PRE_SCHEMA_XSI = "xsi";
  -  public static String NS_PRE_SCHEMA_XSD = "xsd";
  +  public static final String NS_PRE_XMLNS = "xmlns";
  +  public static final String NS_PRE_SOAP = "SOAP";
  +  public static final String NS_PRE_SOAP_ENV = NS_PRE_SOAP + "-ENV";
  +  public static final String NS_PRE_SOAP_ENC = NS_PRE_SOAP + "-ENC";
  +  public static final String NS_PRE_SCHEMA_XSI = "xsi";
  +  public static final String NS_PRE_SCHEMA_XSD = "xsd";
   
     // Namespace URIs.
  -  public static String NS_URI_XMLNS =
  +  public static final String NS_URI_XMLNS =
       "http://www.w3.org/2000/xmlns/";
  -  public static String NS_URI_SOAP_ENV =
  +  public static final String NS_URI_SOAP_ENV =
       "http://schemas.xmlsoap.org/soap/envelope/";
  -  public static String NS_URI_SOAP_ENC =
  +  public static final String NS_URI_SOAP_ENC =
       "http://schemas.xmlsoap.org/soap/encoding/";
  -  public static String NS_URI_SCHEMA_XSI =
  +  public static final String NS_URI_SCHEMA_XSI =
       "http://www.w3.org/1999/XMLSchema-instance";
  -  public static String NS_URI_SCHEMA_XSD =
  +  public static final String NS_URI_SCHEMA_XSD =
       "http://www.w3.org/1999/XMLSchema";
  -  public static String NS_URI_XML_SOAP = 
  +  public static final String NS_URI_XML_SOAP = 
       "http://xml.apache.org/xml-soap";
  -  public static String NS_URI_XML_SOAP_DEPLOYMENT = 
  +  public static final String NS_URI_XML_SOAP_DEPLOYMENT = 
       "http://xml.apache.org/xml-soap/deployment";
  -  public static String NS_URI_LITERAL_XML = 
  +  public static final String NS_URI_LITERAL_XML = 
       "http://xml.apache.org/xml-soap/literalxml";
  -  public static String NS_URI_XMI_ENC = 
  +  public static final String NS_URI_XMI_ENC = 
       "http://www.ibm.com/namespaces/xmi";
   
     // HTTP header field names.
  -  public static String HEADER_POST = "POST";
  -  public static String HEADER_HOST = "Host";
  -  public static String HEADER_CONTENT_TYPE = "Content-Type";
  -  public static String HEADER_CONTENT_LENGTH = "Content-Length";
  -  public static String HEADER_SOAP_ACTION = "SOAPAction";
  +  public static final String HEADER_POST = "POST";
  +  public static final String HEADER_HOST = "Host";
  +  public static final String HEADER_CONTENT_TYPE = "Content-Type";
  +  public static final String HEADER_CONTENT_TYPE_JMS = "ContentType";
  +  public static final String HEADER_CONTENT_LENGTH = "Content-Length";
  +  public static final String HEADER_CONTENT_LOCATION = "Content-Location";
  +  public static final String HEADER_CONTENT_ID = "Content-ID";
  +  public static final String HEADER_SOAP_ACTION = "SOAPAction";
   
  +
     // HTTP header field values.
  -  public static String HEADERVAL_CONTENT_TYPE = "text/xml";
  -  public static String HEADERVAL_CONTENT_TYPE_UTF8 = "text/xml; charset=UTF-8";
  +  public static final String HEADERVAL_DEFAULT_CHARSET = "iso-8859-1";
  +  public static final String HEADERVAL_CHARSET_UTF8 = "utf-8";
  +  public static final String HEADERVAL_CONTENT_TYPE = "text/xml";
  +  public static final String HEADERVAL_CONTENT_TYPE_UTF8 =
  +    HEADERVAL_CONTENT_TYPE + ";charset=" + HEADERVAL_CHARSET_UTF8;
  +  public static final String HEADERVAL_MULTIPART_CONTENT_SUBTYPE = "related";
  +  public static final String HEADERVAL_CONTENT_TYPE_MULTIPART =
  +    "multipart/" + HEADERVAL_MULTIPART_CONTENT_SUBTYPE;
   
     // Element names.
  -  public static String ELEM_ENVELOPE = "Envelope";
  -  public static String ELEM_BODY = "Body";
  -  public static String ELEM_HEADER = "Header";
  -  public static String ELEM_FAULT = "Fault";
  -  public static String ELEM_FAULT_CODE = "faultcode";
  -  public static String ELEM_FAULT_STRING = "faultstring";
  -  public static String ELEM_FAULT_ACTOR = "faultactor";
  -  public static String ELEM_DETAIL = "detail";
  -  public static String ELEM_FAULT_DETAIL_ENTRY = "detailEntry";
  +  public static final String ELEM_ENVELOPE = "Envelope";
  +  public static final String ELEM_BODY = "Body";
  +  public static final String ELEM_HEADER = "Header";
  +  public static final String ELEM_FAULT = "Fault";
  +  public static final String ELEM_FAULT_CODE = "faultcode";
  +  public static final String ELEM_FAULT_STRING = "faultstring";
  +  public static final String ELEM_FAULT_ACTOR = "faultactor";
  +  public static final String ELEM_DETAIL = "detail";
  +  public static final String ELEM_FAULT_DETAIL_ENTRY = "detailEntry";
   
     // Qualified element names.
     public static QName  Q_ELEM_ENVELOPE =
  @@ -128,11 +138,13 @@
       new QName(NS_URI_SOAP_ENV, ELEM_FAULT);
   
     // Attribute names.
  -  public static String ATTR_ENCODING_STYLE = "encodingStyle";
  -  public static String ATTR_MUST_UNDERSTAND = "mustUnderstand";
  -  public static String ATTR_TYPE = "type";
  -  public static String ATTR_NULL = "null";
  -  public static String ATTR_ARRAY_TYPE = "arrayType";
  +  public static final String ATTR_ENCODING_STYLE = "encodingStyle";
  +  public static final String ATTR_MUST_UNDERSTAND = "mustUnderstand";
  +  public static final String ATTR_TYPE = "type";
  +  public static final String ATTR_NULL = "null";
  +  public static final String ATTR_ARRAY_TYPE = "arrayType";
  +  public static final String ATTR_REFERENCE = "href";
  +  public static final String ATTR_ID = "id";
   
     // Qualified attribute names.
     public static QName  Q_ATTR_MUST_UNDERSTAND =
  @@ -152,13 +164,18 @@
   
     // XML-SOAP implementation defined fault codes.
     public static String FAULT_CODE_SERVER_BAD_TARGET_OBJECT_URI =
  -    Constants.FAULT_CODE_SERVER + ".BadTargetObjectURI";
  +      Constants.FAULT_CODE_SERVER + ".BadTargetObjectURI";
   
     // Error messages.
  -  public static String ERR_MSG_VERSION_MISMATCH = FAULT_CODE_VERSION_MISMATCH +
  -                                                  ": Envelope element must " +
  -                                                  "be associated with " +
  -                                                  "the '" +
  -                                                  Constants.NS_URI_SOAP_ENV +
  -                                                  "' namespace.";
  +  public static String ERR_MSG_VERSION_MISMATCH =
  +      FAULT_CODE_VERSION_MISMATCH +
  +      ": Envelope element must " +
  +      "be associated with " +
  +      "the '" +
  +      Constants.NS_URI_SOAP_ENV +
  +      "' namespace.";
  +
  +  // Transport hook extension
  +  public static final String TRANSPORT_HOOK_EXTENSION =
  +      "org.apache.soap.TransportHookExtension";
   }