org.apache.axis.Constants Maven / Gradle / Ivy
/* * Copyright 2001-2004 The Apache Software Foundation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.axis; import org.apache.axis.schema.SchemaVersion1999; import org.apache.axis.schema.SchemaVersion2000; import org.apache.axis.schema.SchemaVersion2001; import org.apache.axis.soap.SOAPConstants; import org.xml.sax.Attributes; import javax.xml.namespace.QName; public class Constants { // Some common Constants that should be used in local handler options // (Not all implementations will have these concepts - for example // not all Engines will have notion of registries but defining these // here should allow people to ask if they exist) ////////////////////////////////////////////////////////////////////////// // Namespace Prefix Constants ////////////////////////////////////////////////////////////////////////// public static final String NS_PREFIX_SOAP_ENV = "soapenv"; public static final String NS_PREFIX_SOAP_ENC = "soapenc"; public static final String NS_PREFIX_SCHEMA_XSI = "xsi" ; public static final String NS_PREFIX_SCHEMA_XSD = "xsd" ; public static final String NS_PREFIX_WSDL = "wsdl" ; public static final String NS_PREFIX_WSDL_SOAP = "wsdlsoap"; public static final String NS_PREFIX_XMLSOAP = "apachesoap"; public static final String NS_PREFIX_XML = "xml"; public static final String NS_PREFIX_XOP = "xop"; // Axis Namespaces public static final String NS_URI_AXIS = "http://xml.apache.org/axis/"; public static final String NS_URI_XMLSOAP = "http://xml.apache.org/xml-soap"; // Special namespace URI to indicate an "automatically" serialized Java // type. This allows us to use types without needing explicit mappings, // such that Java classes like "org.foo.Bar" map to QNames like // {http://xml.apache.org/axis/java}org.foo.Bar public static final String NS_URI_JAVA = "http://xml.apache.org/axis/java"; // // Default SOAP version // public static final SOAPConstants DEFAULT_SOAP_VERSION = SOAPConstants.SOAP11_CONSTANTS; // // SOAP-ENV Namespaces // public static final String URI_SOAP11_ENV = "http://schemas.xmlsoap.org/soap/envelope/" ; public static final String URI_SOAP12_ENV = "http://www.w3.org/2003/05/soap-envelope"; public static final String URI_DEFAULT_SOAP_ENV = DEFAULT_SOAP_VERSION.getEnvelopeURI(); // fixme: this is unsafe - a client can (accidentaly or on purpose) // over-write the elemnts of this array. This pattern is used throughout // this file. public static final String[] URIS_SOAP_ENV = { URI_SOAP11_ENV, URI_SOAP12_ENV, }; // Constant name of the enterprise-style logging category. // The enterprise category is for stuff that an enterprise product might // want to track, but in a simple environment (like the AXIS build) would // be nothing more than a nuisance. public static final String ENTERPRISE_LOG_CATEGORY = "org.apache.axis.enterprise"; /** * time logged stuff. */ public static final String TIME_LOG_CATEGORY = "org.apache.axis.TIME"; /** * Servlet exceptions. Axis faults are logged at debug level here. */ public static final String EXCEPTION_LOG_CATEGORY = "org.apache.axis.EXCEPTIONS"; /** The name of the field which accepts xsd:any content in Beans. */ public static final String ANYCONTENT = "_any"; /** * The size of the buffer size for. */ public static final int HTTP_TXR_BUFFER_SIZE = 8 * 1024; /** Basic Profile 1.1 compatibility flag */ public static final String WSIBP11_COMPAT_PROPERTY = "axis.ws-i.bp11.compatibility"; /** * Returns true if the string is the SOAP_ENV Namespace. * * @param s the string representation of a URI * @return
matches a SOAP ENCODING namespace URI, * false otherwise */ public static boolean isSOAP_ENC(String s) { for (int i=0; itrue
if s represents any of the supported soap * envelope URI strings */ public static boolean isSOAP_ENV(String s) { for (int i=0; is s is a Schema XSI URI, false otherwise */ public static boolean isSchemaXSI(String s) { for (int i=0; i s is a WSDL namespace URI, false otherwise */ public static boolean isWSDL(String s) { for (int i=0; i s matches any of the WSDL SOAP namepace * URIs, false otherwise */ public static boolean isWSDLSOAP(String s) { for (int i=0; i client exceptions. */ public static final QName QNAME_FAULTDETAIL_EXCEPTIONNAME = new QName(NS_URI_AXIS, "exceptionName"); /** * Flag set if this was a runtime exception, rather than something thrown by the class at the end of the * chain. Axis' logging treats runtime exceptions more seriously. */ public static final QName QNAME_FAULTDETAIL_RUNTIMEEXCEPTION = new QName(NS_URI_AXIS, "isRuntimeException"); /** * QName of stack trace element in an axis fault detail. */ public static final QName QNAME_FAULTDETAIL_HTTPERRORCODE = new QName(NS_URI_AXIS, "HttpErrorCode"); /** * QName of a nested fault in an axis fault detail. */ public static final QName QNAME_FAULTDETAIL_NESTEDFAULT = new QName(NS_URI_AXIS, "nestedFault"); /** * QName of a hostname in an axis fault detail. */ public static final QName QNAME_FAULTDETAIL_HOSTNAME = new QName(NS_URI_AXIS, "hostname"); //QNames of well known faults /** * The no-service fault value. */ public static final QName QNAME_NO_SERVICE_FAULT_CODE = new QName(NS_URI_AXIS, "Server.NoService"); // Misc Strings ////////////////////////////////////////////////////////////////////////// // Where to put those pesky JWS classes public static final String MC_JWS_CLASSDIR = "jws.classDir" ; // Where we're rooted public static final String MC_HOME_DIR = "home.dir"; // Relative path of the request URL (ie. http://.../axis/a.jws = /a.jws public static final String MC_RELATIVE_PATH = "path"; // MessageContext param for the engine's path public static final String MC_REALPATH = "realpath"; // MessageContext param for the location of config files public static final String MC_CONFIGPATH = "configPath"; // MessageContext param for the IP of the calling client public static final String MC_REMOTE_ADDR = "remoteaddr"; // When invoked from a servlet, per JAX-RPC, we need a // ServletEndpointContext object. This is where it lives. public static final String MC_SERVLET_ENDPOINT_CONTEXT = "servletEndpointContext"; // If we're SOAP 1.2, the default behavior in org.apache.axis.message.BodyBuilder // is to throw a ProcedureNotPresent fault if we can't dispatch to an // OperationDesc during deserialization. Set this property to any non-null // value to prevent this behavior (only used by test.soap12. public static final String MC_NO_OPERATION_OK = "NoOperationOK"; // This property indicates we're supporting only a single SOAP version. // If set (by the service or engine), we'll only accept envelopes of the // specified version. Value should be an org.apache.axis.soap.SOAPConstants public static final String MC_SINGLE_SOAP_VERSION = "SingleSOAPVersion"; /** * What the extension of JWS files is. If changing this, note that * AxisServlet has an xdoclet declaration in the class javadocs that * also needs updating. */ public static final String JWS_DEFAULT_FILE_EXTENSION = ".jws"; /** * The default timeout for messages. * * @since Axis1.2 */ public static final int DEFAULT_MESSAGE_TIMEOUT=60*1000*10; /** * MIME Content Types * * @since Axis1.2 */ public static final String MIME_CT_APPLICATION_OCTETSTREAM = "application/octet-stream"; public static final String MIME_CT_TEXT_PLAIN = "text/plain"; public static final String MIME_CT_IMAGE_JPEG = "image/jpeg"; public static final String MIME_CT_IMAGE_GIF = "image/gif"; public static final String MIME_CT_TEXT_XML = "text/xml"; public static final String MIME_CT_APPLICATION_XML = "application/xml"; public static final String MIME_CT_MULTIPART_PREFIX = "multipart/"; }
© 2015 - 2025 Weber Informatics LLC | Privacy Policy