Package our.apache.commons.httpclient

Examples of our.apache.commons.httpclient.Header


                    throw new MessageException(
                            LOCALIZER.format(messageKey, messageParam));
                }

                // Read the response header
                Header idHeader = method.getResponseHeader(
                        MessageStoreServlet.MESSAGE_RESPONSE_HEADER_NAME);

                // Check for a null value which indicates that the header was
                // not set for some reason
                if (idHeader == null) {
                    final String messageKey =
                            "message-id-missing-url-construction-failed";
                    LOGGER.error(messageKey);
                    throw new MessageException(
                            LOCALIZER.format(messageKey));
                }

                id = idHeader.getValue();

                // And finally construct the URL to return, encoding the ? and
                // = as this is required by the NowSMS gateway BUT the whole
                // URL cannot be encoded as the / should not be encoded!
                // Rest of URL to return was created above
View Full Code Here


        // go through the headers with the right name
        for (Enumeration enumeration = headers.getHeaders(headerName);
             enumeration != null && enumeration.hasMoreElements();) {

            final String headerValue = (String) enumeration.nextElement();
            final Header header = new Header(headerName, headerValue);
            try {
                // check the elements in the value
                final HeaderElement[] elements = header.getValues();
                for (int i = 0; i < elements.length; i++) {
                    final HeaderElement element = elements[i];
                    // no element value expected here
                    if (element.getValue() == null) {
                        final String elementName = element.getName();
View Full Code Here

        // iterate over the Opt headers (if there is any)
        for (Enumeration enumeration = headers.getHeaders("Opt");
             enumeration != null && enumeration.hasMoreElements();) {

            final String optValue = (String) enumeration.nextElement();
            final Header header = new Header("Opt", optValue);
            try {
                // iterate over the values to collect namespace ID's
                final HeaderElement[] values = header.getValues();
                for (int i = 0; i < values.length; i++) {
                    final HeaderElement element = values[i];
                    // remove the optional " characters from the beginning and
                    // the end of the name
                    String elementName = element.getName();
View Full Code Here

TOP

Related Classes of our.apache.commons.httpclient.Header

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.