Package org.apache.axis.soap

Examples of org.apache.axis.soap.SOAPConstants


            } else if (responseMessage == null) {
                res.setStatusCode(202);
                return;
            }
            try {
                SOAPConstants soapConstants = messageContext.getSOAPConstants();
                String contentType1 = responseMessage.getContentType(soapConstants);
                res.setContentType(contentType1);
                // Transfer MIME headers to HTTP headers for response message.
                MimeHeaders responseMimeHeaders = responseMessage.getMimeHeaders();
                for (Iterator i = responseMimeHeaders.getAllHeaders(); i.hasNext();) {
View Full Code Here


            } else if (responseMessage == null) {
                res.setStatusCode(202);
                return;
            }
            try {
                SOAPConstants soapConstants = messageContext.getSOAPConstants();
                String contentType1 = responseMessage.getContentType(soapConstants);
                res.setContentType(contentType1);
                // Transfer MIME headers to HTTP headers for response message.
                MimeHeaders responseMimeHeaders = responseMessage.getMimeHeaders();
                for (Iterator i = responseMimeHeaders.getAllHeaders(); i.hasNext();) {
View Full Code Here

         * Write the encoding style attribute IF it's different from
         * whatever encoding style is in scope....
         */
        if (encodingStyle != null) {
            MessageContext mc = context.getMessageContext();
            SOAPConstants soapConstants = (mc != null) ?
                                            mc.getSOAPConstants() :
                                            SOAPConstants.SOAP11_CONSTANTS;
            if (parent == null) {
                // don't emit an encoding style if its "" (literal)
                if (!encodingStyle.equals("")) {
                    setAttribute(soapConstants.getEnvelopeURI(),
                                 Constants.ATTR_ENCODING_STYLE,
                                 encodingStyle);
                }
            } else if (!encodingStyle.equals(parent.getEncodingStyle())) {
                setAttribute(soapConstants.getEnvelopeURI(),
                             Constants.ATTR_ENCODING_STYLE,
                             encodingStyle);
            }
        }

View Full Code Here

    public SOAPHeaderElement(String namespace, String localPart, String prefix,
                      Attributes attributes, DeserializationContext context) {
        super(namespace, localPart, prefix, attributes, context);

        SOAPConstants soapConstants = context.getMessageContext().
                                                          getSOAPConstants();

        // Check for mustUnderstand
        String val = attributes.getValue(soapConstants.getEnvelopeURI(),
                                         Constants.ATTR_MUST_UNDERSTAND);
        mustUnderstand = ((val != null) && val.equals("1")) ? true : false;

        actor = attributes.getValue(soapConstants.getEnvelopeURI(),
                                    Constants.ATTR_ACTOR);

        processed = false;
    }
View Full Code Here

        child.setParentElement(parent);
        assertEquals("Parent is not as set", parent, child.getParentElement());
    }

    public void testAddChild() throws Exception {
        SOAPConstants sc = SOAPConstants.SOAP11_CONSTANTS;
        EnvelopeBuilder eb = new EnvelopeBuilder(Message.REQUEST, sc);
        DeserializationContext dc = new DeserializationContextImpl(null,
                                                                   eb);
        SOAPElement parent = new MessageElement("parent.names",
                                                "parent",
View Full Code Here

        Iterator c1only = parent.getChildElements(c1);
        assertEquals("Child 1 not found", child1, c1only.next());
        assertTrue("Unexpected child", !c1only.hasNext());
    }
    public void testDetachNode() throws Exception {
        SOAPConstants sc = SOAPConstants.SOAP11_CONSTANTS;
        EnvelopeBuilder eb = new EnvelopeBuilder(Message.REQUEST, sc);
        DeserializationContext dc = new DeserializationContextImpl(null,
                                                                   eb);
        SOAPElement parent = new MessageElement("parent.names",
                                                "parent",
View Full Code Here

            } else if (responseMessage == null) {
                res.setStatus(HttpServletResponse.SC_ACCEPTED);
                return;
            }
            try {
                final SOAPConstants soapConstants = messageContext.getSOAPConstants();
                final String contentType1 = responseMessage.getContentType(soapConstants);
                res.setContentType(contentType1);
                // Transfer MIME headers to HTTP headers for response message.
                final MimeHeaders responseMimeHeaders = responseMessage.getMimeHeaders();
                for (final Iterator i = responseMimeHeaders.getAllHeaders(); i.hasNext(); ) {
View Full Code Here

    public SOAPHeaderElement(String namespace, String localPart, String prefix,
                      Attributes attributes, DeserializationContext context) {
        super(namespace, localPart, prefix, attributes, context);

        SOAPConstants soapConstants = context.getMessageContext().
                                                          getSOAPConstants();

        // Check for mustUnderstand
        String val = attributes.getValue(soapConstants.getEnvelopeURI(),
                                         Constants.ATTR_MUST_UNDERSTAND);
        mustUnderstand = ((val != null) && val.equals("1")) ? true : false;

        actor = attributes.getValue(soapConstants.getEnvelopeURI(),
                                    Constants.ATTR_ACTOR);

        processed = false;
    }
View Full Code Here

    public void startElement(String namespace, String localName,
                             String prefix, Attributes attributes,
                             DeserializationContext context)
        throws SAXException
    {
        SOAPConstants soapConstants = Constants.DEFAULT_SOAP_VERSION;
        if (context.getMessageContext() != null)
            soapConstants = context.getMessageContext().getSOAPConstants();

        if (soapConstants == SOAPConstants.SOAP12_CONSTANTS &&
            attributes.getValue(Constants.URI_SOAP12_ENV, Constants.ATTR_ENCODING_STYLE) != null) {
View Full Code Here

     * When we're sure we have everything, this gets called.
     */
    private void createFault() {
        AxisFault f = null;
       
        SOAPConstants soapConstants = context.getMessageContext() == null ?
                                        SOAPConstants.SOAP11_CONSTANTS :
                                        context.getMessageContext().getSOAPConstants();

        if (faultClass != null) {
            // Custom fault handling
View Full Code Here

TOP

Related Classes of org.apache.axis.soap.SOAPConstants

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.