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

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


        // Move to next element
        XMLStreamReaderUtil.nextElementContent(reader);
        XMLStreamReaderUtil.verifyReaderState(reader,
                javax.xml.stream.XMLStreamConstants.START_ELEMENT);

        HeaderList headers = null;
        TagInfoset headerTag = null;

        if (reader.getLocalName().equals(SOAP_HEADER)
                && reader.getNamespaceURI().equals(soapVersion.nsUri)) {
            headerTag = new TagInfoset(reader);

            // Collect namespaces on soap:Header
            for(int i=0; i< reader.getNamespaceCount();i++){
                namespaces.put(reader.getNamespacePrefix(i), reader.getNamespaceURI(i));
            }
            // skip <soap:Header>
            XMLStreamReaderUtil.nextElementContent(reader);

            // If SOAP header blocks are present (i.e. not <soap:Header/>)
            if (reader.getEventType() == XMLStreamConstants.START_ELEMENT) {
                headers = new HeaderList(soapVersion);

                try {
                    // Cache SOAP header blocks
                    StreamHeaderDecoder headerDecoder = SOAPVersion.SOAP_11.equals(soapVersion) ? SOAP11StreamHeaderDecoder : SOAP12StreamHeaderDecoder;
                    cacheHeaders(reader, namespaces, headers, headerDecoder);
View Full Code Here


     */
    public JAXBMessage(JAXBMessage that) {
        super(that);
        this.headers = that.headers;
        if(this.headers!=null)
            this.headers = new HeaderList(this.headers);
        this.attachmentSet = that.attachmentSet;

        this.jaxbObject = that.jaxbObject;
        this.bridge = that.bridge;
        this.rawContext = that.rawContext;
View Full Code Here

    }

    @Override
    public MessageHeaders getHeaders() {
        if(headers==null)
            headers = new HeaderList(getSOAPVersion());
        return headers;
    }
View Full Code Here

    private final MessageHeaders headers;
    private final AttachmentSet attachmentSet;

    public EmptyMessageImpl(SOAPVersion version) {
        super(version);
        this.headers = new HeaderList(version);
        this.attachmentSet = new AttachmentSetImpl();
    }
View Full Code Here

    }

    public EmptyMessageImpl(MessageHeaders headers, @NotNull AttachmentSet attachmentSet, SOAPVersion version){
        super(version);
        if(headers==null)
            headers = new HeaderList(version);
        this.attachmentSet = attachmentSet;
        this.headers = headers;
    }
View Full Code Here

    /**
     * Copy constructor.
     */
    private EmptyMessageImpl(EmptyMessageImpl that) {
        super(that);
        this.headers = new HeaderList(that.headers);
        this.attachmentSet = that.attachmentSet;
    }
View Full Code Here

        return getHeaders().hasHeaders();
    }

    public MessageHeaders getHeaders() {
        if (headers == null)
            headers = new HeaderList(getSOAPVersion());

        return headers;
    }
View Full Code Here

        if (wsdlProperties != null) {
            packet.addSatellite(wsdlProperties);
        }
        if (addrVersion != null) {
            // populate request WS-Addressing headers
            HeaderList headerList = packet.getMessage().getHeaders();
            headerList.fillRequestAddressingHeaders(wsdlPort, binding, packet);


            // Spec is not clear on if ReferenceParameters are to be added when addressing is not enabled,
            // but the EPR has ReferenceParameters.
            // Current approach: Add ReferenceParameters only if addressing enabled.
View Full Code Here

    }

    public static WSCBuilderFactory fromHeaders(MessageHeaders h) {
        WSCBuilderFactory builder = null;
        // FIXME: RJE -- remove cast
        HeaderList headers = (HeaderList) h;
        for (int i = 0; i < headers.size(); i++) {
            Header header =  headers.get(i);
            if(header.getLocalPart().equals(WSATConstants.COORDINATION_CONTEXT)){
                if(WSATConstants.WSAT10_NS_URI.equals(header.getNamespaceURI())){
                   builder = new com.sun.xml.ws.tx.coord.v10.WSCBuilderFactoryImpl();
                }else if(WSATConstants.WSAT11_NS_URI.equals(header.getNamespaceURI())){
                    builder = new com.sun.xml.ws.tx.coord.v11.WSCBuilderFactoryImpl();
                }
                if(builder!=null) {
                  headers.understood(i);
                  //builder.getWSATCoordinationContextBuilder().
                  return builder;
                }
            }
        }
View Full Code Here


    public static CoordinationContextBuilder headers(MessageHeaders h, Transactional.Version version) {
        CoordinationContextBuilder builder = null;
        // FIXME: RJE -- remove cast once MessageHeaders supports asList()
        HeaderList headers = (HeaderList) h;
        for (int i = 0; i < headers.size(); i++) {
            Header header =  headers.get(i);
            if(header.getLocalPart().equals(WSATConstants.COORDINATION_CONTEXT)){
                if(WSATConstants.WSCOOR10_NS_URI.equals(header.getNamespaceURI())){
                    if (version == Transactional.Version.WSAT10 || version == Transactional.Version.DEFAULT) {
                        builder = new com.sun.xml.ws.tx.coord.v10.CoordinationContextBuilderImpl();
                        builder.version = Transactional.Version.WSAT10;
                    }
                }else if(WSATConstants.WSCOOR11_NS_URI.equals(header.getNamespaceURI())){
                    if (version != Transactional.Version.WSAT10) {
                        builder = new com.sun.xml.ws.tx.coord.v11.CoordinationContextBuilderImpl();
                        builder.version = Transactional.Version.WSAT11;
                    }
                }
                if(builder!=null) {
                  headers.understood(i);
                  return builder.header(header);
                }
            }
        }
        return null;
View Full Code Here

TOP

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

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.