Package com.sun.xml.ws.api.message

Examples of com.sun.xml.ws.api.message.MessageHeaders


        if ( envelopeReader != null ) readEnvelope(this);
        writer.writeStartDocument();
        envelopeTag.writeStart(writer);

        //write headers
        MessageHeaders hl = getHeaders();
        if (hl.hasHeaders() && headerTag == null) headerTag = new TagInfoset(envelopeTag.nsUri,"Header",envelopeTag.prefix,EMPTY_ATTS);
        if (headerTag != null) {
            headerTag.writeStart(writer);
            if (hl.hasHeaders()){
                for(Header h : hl.asList()){
                    h.writeTo(writer);
                }
            }
            writer.writeEndElement();
        }
View Full Code Here


        envelopeTag.writeStart(contentHandler);
        if (hasHeaders() && headerTag == null) headerTag = new TagInfoset(envelopeTag.nsUri,"Header",envelopeTag.prefix,EMPTY_ATTS);
        if (headerTag != null) {
            headerTag.writeStart(contentHandler);
            if (hasHeaders()) {
                MessageHeaders headers = getHeaders();
                for (Header h : headers.asList()) {
                    // shouldn't JDK be smart enough to use array-style indexing for this foreach!?
                    h.writeTo(contentHandler,errorHandler);
                }
            }
            headerTag.writeEnd(contentHandler);
View Full Code Here

        w.writeStartDocument();
        w.writeStartElement("S","Envelope",soapNsUri);
        w.writeNamespace("S",soapNsUri);
        if(hasHeaders()) {
            w.writeStartElement("S","Header",soapNsUri);
            MessageHeaders headers = getHeaders();
            for (Header h : headers.asList()) {
                h.writeTo(w);
            }
            w.writeEndElement();
        }
        // write the body
View Full Code Here

        contentHandler.startDocument();
        contentHandler.startPrefixMapping("S",soapNsUri);
        contentHandler.startElement(soapNsUri,"Envelope","S:Envelope",EMPTY_ATTS);
        if(hasHeaders()) {
            contentHandler.startElement(soapNsUri,"Header","S:Header",EMPTY_ATTS);
            MessageHeaders headers = getHeaders();
            for (Header h : headers.asList()) {
                h.writeTo(contentHandler,errorHandler);
            }
            contentHandler.endElement(soapNsUri,"Header","S:Header");
        }
        // write the body
View Full Code Here

        if ( envelopeReader != null ) readEnvelope(this);
        writer.writeStartDocument();
        envelopeTag.writeStart(writer);

        //write headers
        MessageHeaders hl = getHeaders();
        if (hl.hasHeaders() && headerTag == null) headerTag = new TagInfoset(envelopeTag.nsUri,"Header",envelopeTag.prefix,EMPTY_ATTS);
        if (headerTag != null) {
            headerTag.writeStart(writer);
            if (hl.hasHeaders()){
                for(Header h : hl.asList()){
                    h.writeTo(writer);
                }
            }
            writer.writeEndElement();
        }
View Full Code Here

        envelopeTag.writeStart(contentHandler);
        if (hasHeaders() && headerTag == null) headerTag = new TagInfoset(envelopeTag.nsUri,"Header",envelopeTag.prefix,EMPTY_ATTS);
        if (headerTag != null) {
            headerTag.writeStart(contentHandler);
            if (hasHeaders()) {
                MessageHeaders headers = getHeaders();
                for (Header h : headers.asList()) {
                    // shouldn't JDK be smart enough to use array-style indexing for this foreach!?
                    h.writeTo(contentHandler,errorHandler);
                }
            }
            headerTag.writeEnd(contentHandler);
View Full Code Here

        w.writeStartDocument();
        w.writeStartElement("S","Envelope",soapNsUri);
        w.writeNamespace("S",soapNsUri);
        if(hasHeaders()) {
            w.writeStartElement("S","Header",soapNsUri);
            MessageHeaders headers = getHeaders();
            for (Header h : headers.asList()) {
                h.writeTo(w);
            }
            w.writeEndElement();
        }
        // write the body
View Full Code Here

        contentHandler.startDocument();
        contentHandler.startPrefixMapping("S",soapNsUri);
        contentHandler.startElement(soapNsUri,"Envelope","S:Envelope",EMPTY_ATTS);
        if(hasHeaders()) {
            contentHandler.startElement(soapNsUri,"Header","S:Header",EMPTY_ATTS);
            MessageHeaders headers = getHeaders();
            for (Header h : headers.asList()) {
                h.writeTo(contentHandler,errorHandler);
            }
            contentHandler.endElement(soapNsUri,"Header","S:Header");
        }
        // write the body
View Full Code Here

            }
        }
    }

    void setNonAnnonymousReplyTo(Message m, AddressingVersion av, Header nonAnonymousHeader) {
        MessageHeaders headers = m.getHeaders();
        headers.remove(av.replyToTag);
        headers.add(nonAnonymousHeader);

        if (headers.remove(av.faultToTag) != null) {
            headers.add(nonAnonymousHeader);
        }

    }
View Full Code Here

//    public QName getWSDLOperationQName(Packet request) throws DispatchException {
//        return getWSDLOperationMapping(request).getWSDLBoundOperation().getName();
//    }

    public WSDLOperationMapping getWSDLOperationMapping(Packet request) throws DispatchException {
        MessageHeaders hl = request.getMessage().getHeaders();
        String action = AddressingUtils.getAction(hl, av, binding.getSOAPVersion());

        if (action == null)
            // Addressing is not enagaged, return null to use other ways to dispatch.
            return null;
View Full Code Here

TOP

Related Classes of com.sun.xml.ws.api.message.MessageHeaders

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.