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

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


     * @param id String
     * @return Object
     */
    private Object getMessagePart(String id){
        // FIXME : RJE - Remove cast once MessageHeaders supports asList(), hasHeaders()
        HeaderList headers = (HeaderList) securityContext.getNonSecurityHeaders();
        if(headers != null && headers.size() >0){
            Iterator<Header> listItr = headers.listIterator();
            boolean found = false;
            while(listItr.hasNext()){
                GenericSecuredHeader header = (GenericSecuredHeader)listItr.next();
                if(header.hasID(id)){
                    return header;
View Full Code Here


    }
   
    public Data dereference(URIReference uRIReference, XMLCryptoContext xMLCryptoContext) throws URIReferenceException {
       
        // FIXME: RJE -- remove cast once MessageContext supports asList(), hasHeaders()
        HeaderList headers = (HeaderList) securityContext.getNonSecurityHeaders();
        String tmpId = uRIReference.getURI();
       
        if(tmpId.startsWith("cid:")){
            return dereferenceAttachments(tmpId.substring(4));
        }
       
        String id = "";
        int index = tmpId.indexOf("#");
        if( index >=0){
            id = tmpId.substring(index+1);
        }else{
            id = tmpId;
        }
        if(headers != null && headers.size() >0){
            Iterator<Header> listItr = headers.listIterator();
            boolean found = false;
            while(listItr.hasNext()){
                GenericSecuredHeader header = (GenericSecuredHeader)listItr.next();
                if(header.hasID(id) && !header.hasEncData()){
                    return new StreamWriterData(header,((NamespaceContextInfo)header).getInscopeNSContext());
View Full Code Here

        }

        SecurityContext sc = ((JAXBFilterProcessingContext) ctx).getSecurityContext();

        // FIXME: RJE - Remove cast once MessageContext supports asList(), hasHeaders()
        HeaderList headers = (HeaderList) sc.getNonSecurityHeaders();
        // look in non-security headers
        if (headers != null && headers.size() > 0) {
            Iterator<Header> listItr = headers.listIterator();
            while (listItr.hasNext()) {
                GenericSecuredHeader header = (GenericSecuredHeader) listItr.next();
                if (header != null && header.getLocalPart().equals(targetInPolicy)) {
                    return true;
                }
View Full Code Here

        return headers != null && !((HeaderList)headers).isEmpty();
    }

    public HeaderList getHeaders() {
        if (headers == null) {
            headers = new HeaderList();
        }
        // FIXME: RJE -- remove cast once getHeaders returns MessageContext
        return (HeaderList) headers;
    }
View Full Code Here

        writer.writeStartDocument();
        envelopeTag.writeStart(writer);

        //write headers
        // FIXME: RJE -- remove cast
        HeaderList hl = (HeaderList) getHeaders();
        if (hl.size() > 0) {
            headerTag.writeStart(writer);
            for (Header h : hl) {
                h.writeTo(writer);
            }
            writer.writeEndElement();
View Full Code Here

        contentHandler.startDocument();
        envelopeTag.writeStart(contentHandler);
        headerTag.writeStart(contentHandler);
        if (hasHeaders()) {
            // FIXME: remove cast
            HeaderList headerList = (HeaderList) getHeaders();
            int len = headerList.size();
            for (int i = 0; i < len; i++) {
                // shouldn't JDK be smart enough to use array-style indexing for this foreach!?
                headerList.get(i).writeTo(contentHandler, errorHandler);
            }
        }
        headerTag.writeEnd(contentHandler);
        bodyTag.writeStart(contentHandler);
        writePayloadTo(contentHandler, errorHandler, true);
View Full Code Here

                // skip <soap:Header>
                XMLStreamReaderUtil.nextElementContent(message);

                // If SOAP header blocks are present (i.e. not <soap:Header/>)
                if (message.getEventType() == XMLStreamConstants.START_ELEMENT) {
                    this.headers = new HeaderList();
                    // Cache SOAP header blocks
                    //cacheHeaders(message, parentNS);
                    cacheHeaders(message, parentNS, ctx);

                }
View Full Code Here

                        processedHeader = processEncryptedSOAPHeader(header, ekOrRlh);
                    }
                    edList.remove(id);
                    context.setEdIdforEh(null);
                    // FIXME: RJE -- remove cast when MessageContext supports replace()
                    HeaderList h = (HeaderList) headers;
                    int index = h.indexOf(header);
                    h.set(index, processedHeader);
                    found = true;
                    break;
                }
            }
            if (found) {
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

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.