Package org.xmlsoap.schemas.soap.envelope

Examples of org.xmlsoap.schemas.soap.envelope.Header


                soapAction = webMethod.action();
            }
        }
               
        Body body = new Body();
        Header header = new Header();

        Throwable exception = exchange.getProperty(Exchange.EXCEPTION_CAUGHT, Throwable.class);
        if (exception == null) {
            exception = exchange.getIn().getHeader(Exchange.EXCEPTION_CAUGHT, Throwable.class);
        }
       
        final List<JAXBElement<?>> bodyContent;
        List<JAXBElement<?>> headerContent = new ArrayList<JAXBElement<?>>();
        if (exception != null) {
            bodyContent = new ArrayList<JAXBElement<?>>();
            bodyContent.add(createFaultFromException(exception));
        } else {
            bodyContent = createContentFromObject(inputObject, soapAction, headerContent);
        }
      
        for (JAXBElement<?> elem : bodyContent) {
            body.getAny().add(elem);
        }
        for (JAXBElement<?> elem : headerContent) {
            header.getAny().add(elem);
        }
        Envelope envelope = new Envelope();
        if (headerContent.size() > 0) {
            envelope.setHeader(header);
        }
View Full Code Here


        if (rootObject.getClass() != Envelope.class) {
            throw new RuntimeCamelException("Expected Soap Envelope but got " + rootObject.getClass());
        }
        Envelope envelope = (Envelope) rootObject;
       
        Header header = envelope.getHeader();
        if (header != null) {
            List<Object> returnHeaders;
            List<Object> anyHeaderElements = envelope.getHeader().getAny();
            if (null != anyHeaderElements && !(isIgnoreUnmarshalledHeaders())) {
                if (isIgnoreJAXBElement()) {
View Full Code Here

    private EnvelopeDocument buildSoapEnvelopeForGet(String address, EndpointReferenceType endpointReferenceType)
    {
        EnvelopeDocument envelopeDocument = EnvelopeDocument.Factory.newInstance();
        Envelope envelope = envelopeDocument.addNewEnvelope();
        envelope.addNewBody();
        Header header = envelope.addNewHeader();
        XmlObject toElem;
        XmlObject actionElem;
        org.xmlsoap.schemas.ws.x2004.x08.addressing.ToDocument toDoc = org.xmlsoap.schemas.ws.x2004.x08.addressing.ToDocument.Factory.newInstance();
        AttributedURI attributedURI = toDoc.addNewTo();
        attributedURI.setStringValue(address);
View Full Code Here

        assertTrue(response.indexOf("fault") > -1);
    }

    private String sendJobRequest(EnvelopeDocument request) throws IOException
    {
        Header header = request.getEnvelope().getHeader();
        setAddressingHeaders(header, m_jobURL);
        return sendRequest(m_jobURL, request.newInputStream());
    }
View Full Code Here

        return jobRef;
    }

    private void addReferencePropsToEnvelope(EnvelopeDocument envelopeDocument, ReferencePropertiesType referenceProperties)
    {
        Header header = envelopeDocument.getEnvelope().getHeader();
        if (referenceProperties != null)
        {
            XmlObject[] childElements = XmlBeanUtils.getChildElements(referenceProperties);
            for (int i = 0; i < childElements.length; i++)
            {
View Full Code Here

    }

    @Override
    public Object doMarshal(Exchange exchange, Object inputObject, OutputStream stream, String soapAction) throws IOException {
        Body body = new Body();
        Header header = new Header();

        Throwable exception = exchange.getProperty(Exchange.EXCEPTION_CAUGHT, Throwable.class);
        if (exception == null) {
            exception = exchange.getIn().getHeader(Exchange.EXCEPTION_CAUGHT, Throwable.class);
        }

        final List<JAXBElement<?>> bodyContent;
        List<JAXBElement<?>> headerContent = new ArrayList<JAXBElement<?>>();
        if (exception != null) {
            bodyContent = new ArrayList<JAXBElement<?>>();
            bodyContent.add(createFaultFromException(exception));
        } else {
            bodyContent = getDataFormat().createContentFromObject(inputObject, soapAction, headerContent);
        }

        for (JAXBElement<?> elem : bodyContent) {
            body.getAny().add(elem);
        }
        for (JAXBElement<?> elem : headerContent) {
            header.getAny().add(elem);
        }
        Envelope envelope = new Envelope();
        if (headerContent.size() > 0) {
            envelope.setHeader(header);
        }
View Full Code Here

        if (rootObject.getClass() != Envelope.class) {
            throw new RuntimeCamelException("Expected Soap Envelope but got " + rootObject.getClass());
        }
        Envelope envelope = (Envelope) rootObject;

        Header header = envelope.getHeader();
        if (header != null) {
            List<Object> returnHeaders;
            List<Object> anyHeaderElements = envelope.getHeader().getAny();
            if (null != anyHeaderElements && !(getDataFormat().isIgnoreUnmarshalledHeaders())) {
                if (getDataFormat().isIgnoreJAXBElement()) {
View Full Code Here

        return jobRef;
    }

    private void addReferencePropsToEnvelope(EnvelopeDocument envelopeDocument, ReferencePropertiesType referenceProperties)
    {
        Header header = envelopeDocument.getEnvelope().getHeader();
        if (referenceProperties != null)
        {
            XmlObject[] childElements = XmlBeanUtils.getChildElements(referenceProperties);
            for (int i = 0; i < childElements.length; i++)
            {
View Full Code Here

                soapAction = webMethod.action();
            }
        }
               
        Body body = new Body();
        Header header = new Header();

        Throwable exception = exchange.getProperty(Exchange.EXCEPTION_CAUGHT, Throwable.class);
        if (exception == null) {
            exception = exchange.getIn().getHeader(Exchange.EXCEPTION_CAUGHT, Throwable.class);
        }
       
        final List<JAXBElement<?>> bodyContent;
        List<JAXBElement<?>> headerContent = new ArrayList<JAXBElement<?>>();
        if (exception != null) {
            bodyContent = new ArrayList<JAXBElement<?>>();
            bodyContent.add(createFaultFromException(exception));
        } else {
            bodyContent = createContentFromObject(inputObject, soapAction, headerContent);
        }
      
        for (JAXBElement<?> elem : bodyContent) {
            body.getAny().add(elem);
        }
        for (JAXBElement<?> elem : headerContent) {
            header.getAny().add(elem);
        }
        Envelope envelope = new Envelope();
        if (headerContent.size() > 0) {
            envelope.setHeader(header);
        }
View Full Code Here

        if (rootObject.getClass() != Envelope.class) {
            throw new RuntimeCamelException("Expected Soap Envelope but got " + rootObject.getClass());
        }
        Envelope envelope = (Envelope) rootObject;
       
        Header header = envelope.getHeader();
        if (header != null) {
            List<Object> returnHeaders;
            List<Object> anyHeaderElements = envelope.getHeader().getAny();
            if (null != anyHeaderElements && !(isIgnoreUnmarshalledHeaders())) {
                if (isIgnoreJAXBElement()) {
View Full Code Here

TOP

Related Classes of org.xmlsoap.schemas.soap.envelope.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.