Package org.apache.axis2.jaxws.message

Examples of org.apache.axis2.jaxws.message.Message


        Set<String> keys = this.keySet();
        return keys.contains(key);
    }
   
    public boolean containsValue(Object value) {
        Message m = mc.getMessage();
       
        Set<String> keys = this.keySet();
        for(String key: keys) {
            DataHandler dh = m.getDataHandler(key);
            if (dh.equals(value)) {
                return true;
            }
        }
        return false;
View Full Code Here


        tempMap.putAll(this);
        return tempMap.entrySet();
    }
   
    public DataHandler get(Object key) {
        Message m = mc.getMessage();
        DataHandler dh =  m.getDataHandler((String) key);
        if (log.isDebugEnabled()) {
            log.debug("get(" + key + ") returns dh=" + dh);
        }
        return dh;
    }
View Full Code Here

        return this.keySet().isEmpty();
    }
   
    public Set<String> keySet() {
        Set<String> keys = new HashSet<String>();
        Message m = mc.getMessage();
        // Note that the SOAPPart is ignored
        int i = 0;
        String key = m.getAttachmentID(i);
        while (key != null) {
            keys.add(key);
            i++;
            key = m.getAttachmentID(i);
        }
        return keys;
    }
View Full Code Here

        }
        return keys;
    }
   
    public DataHandler put(String key, DataHandler dh) {
        Message m = mc.getMessage();
        if (log.isDebugEnabled()) {
            log.debug("put(" + key + " , " + dh + ")");
        }
        DataHandler old = get(key);
        m.addDataHandler(dh, key);
        m.setDoingSWA(true)// Can't really tell if the attachment is MTOM or SWA, etc.  Mark as SWA to make sure it is written out
        return old;
       
    }
View Full Code Here

        return old;
       
    }
   
    public void putAll(Map<? extends String, ? extends DataHandler> t) {
        Message m = mc.getMessage();
        for(String key: t.keySet()) {
            DataHandler dh = t.get(key);
            if (log.isDebugEnabled()) {
                log.debug("addDataHandler via putAll (" + key + " , " + dh + ")");
            }
            m.addDataHandler(dh, key);
            m.setDoingSWA(true)// Can't really tell if the attachment is MTOM or SWA, etc.  Mark as SWA to make sure it is written out
        }
    }
View Full Code Here

            m.setDoingSWA(true)// Can't really tell if the attachment is MTOM or SWA, etc.  Mark as SWA to make sure it is written out
        }
    }
   
    public DataHandler remove(Object key) {
        Message m = mc.getMessage();
        // Note that the SOAPPart is ignored
        return m.removeDataHandler((String) key);
    }
View Full Code Here

        // Note that the SOAPPart is ignored
        return m.removeDataHandler((String) key);
    }
   
    public int size() {
        Message m = mc.getMessage();
        Set<String> keys = this.keySet();
        return keys.size();
    }
View Full Code Here

        List<Object> list = new ArrayList<Object>();
        String namespace = qname.getNamespaceURI();
        String localPart = qname.getLocalPart();
        BlockFactory blockFactory = (JAXBBlockFactory)
            FactoryRegistry.getFactory(JAXBBlockFactory.class);
        Message m = messageCtx.getMessage();
        JAXBBlockContext jbc = new JAXBBlockContext(jaxbcontext);
       
        // If allRoles is not specified, pass in a set of roles.
        // The headers must support that role.
        RolePlayer rolePlayer = null;
        if (allRoles == false) {
            rolePlayer = getRolePlayer();
        }
       
        if(m.getNumHeaderBlocks()>0){
            // Get the list of JAXB Blocks
            List<Block> blockList = m.getHeaderBlocks(namespace,
                                               localPart,
                                               jbc,
                                               blockFactory,
                                               rolePlayer);
           
View Full Code Here

        // set a property to indicate that we are accessing the message
        if(log.isDebugEnabled()){
            log.debug("getMessage - accessing message.");
        }
        this.put("jaxws.isMessageAccessed", true);
        Message msg = messageCtx.getMEPContext().getMessageObject();
        if (msg != cachedMessage) {
            cachedMessage = msg;
            cachedSoapMessage = msg.getAsSOAPMessage();
            cacheSOAPMessageInfo(cachedSoapMessage);
        }
        return cachedSoapMessage;
    }
View Full Code Here

        if(log.isDebugEnabled()){
            log.debug("setMessage new=" + JavaUtils.getObjectIdentity(soapMessage) +
                    " existing=" + JavaUtils.getObjectIdentity(cachedSoapMessage));
        }
        try {
            Message msg =
                    ((MessageFactory) FactoryRegistry.getFactory(MessageFactory.class)).createFrom(soapMessage);
            messageCtx.getMEPContext().setMessage(msg);
            cachedMessage = msg;
            cachedSoapMessage = soapMessage;
            cacheSOAPMessageInfo(cachedSoapMessage);
View Full Code Here

TOP

Related Classes of org.apache.axis2.jaxws.message.Message

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.