Examples of RMProperties


Examples of org.apache.cxf.ws.rm.RMProperties

            public SequenceIdInterceptor() {
                super(Phase.USER_LOGICAL);
            }
           
            public void handleMessage(Message m) {
                RMProperties rmps = RMContextUtils.retrieveRMProperties(m, true);
                if (null != rmps && null != rmps.getSequence()) {
                    rmps.getSequence().getIdentifier().setValue("UNKNOWN");
                }
            }
View Full Code Here

Examples of org.apache.cxf.ws.rm.RMProperties

     *
     * @param ctx the message context.
     * @return ResendCandidate
     */   
    protected ResendCandidate cacheUnacknowledged(Message message) {
        RMProperties rmps = RMContextUtils.retrieveRMProperties(message, true);
        SequenceType st = rmps.getSequence();
        Identifier sid = st.getIdentifier();
        String key = sid.getValue();
       
        ResendCandidate candidate = null;
       
View Full Code Here

Examples of org.apache.cxf.ws.rm.RMProperties

     * @return default Resender
     */
    protected final Resender getDefaultResender() {
        return new Resender() {
            public void resend(Message message, boolean requestAcknowledge) {
                RMProperties properties = RMContextUtils.retrieveRMProperties(message, true);
                SequenceType st = properties.getSequence();
                if (st != null) {
                    LOG.log(Level.INFO, "RESEND_MSG", st.getMessageNumber());
                }
                try {
                    // TODO: remove previously added acknowledgments and update
View Full Code Here

Examples of org.apache.cxf.ws.rm.RMProperties

            if (to != null
                && RMUtils.getAddressingConstants().getAnonymousURI().equals(to.getValue())) {
                LOG.log(Level.INFO, "Cannot resend to anonymous target.  Not scheduling a resend.");
                return;
            }
            RMProperties rmprops = RMContextUtils.retrieveRMProperties(message, true);
            if (null != rmprops) {
                number = rmprops.getSequence().getMessageNumber();
            }
            if (null != manager.getTimer() && maxRetries != 0) {
                schedule();
            }
        }
View Full Code Here

Examples of org.apache.cxf.ws.rm.RMProperties

     * and store them in the message.
     * 
     * @param message the SOAP mesage
     */
    void decode(SoapMessage message) {
        RMProperties rmps = unmarshalRMProperties(message);
        RMContextUtils.storeRMProperties(message, rmps, false);
        // TODO: decode SequenceFault ?
    }
View Full Code Here

Examples of org.apache.cxf.ws.rm.RMProperties

     *
     * @param message the SOAP message
     * @return the RM properties
     */
    public RMProperties unmarshalRMProperties(SoapMessage message) {
        RMProperties rmps = new RMProperties();
       
        try {
            Collection<SequenceAcknowledgement> acks = new ArrayList<SequenceAcknowledgement>();
            Collection<AckRequestedType> requested = new ArrayList<AckRequestedType>();          
           
            List<Header> header = message.getHeaders();
            if (header != null) {
                Unmarshaller unmarshaller =
                    getJAXBContext().createUnmarshaller();
                Iterator<Header> iter = header.iterator();
                while (iter.hasNext()) {
                    Object node = iter.next().getObject();
                    if (node instanceof Element) {
                        Element elem = (Element) node;
                        if (Node.ELEMENT_NODE != elem.getNodeType()) {
                            continue;
                        }
                        String headerURI = elem.getNamespaceURI();
                        String localName = elem.getLocalName();
                        if (RMConstants.getNamespace().equals(headerURI)) {
                            LOG.log(Level.FINE, "decoding RM header {0}", localName);
                            if (RMConstants.getSequenceName().equals(localName)) {
                                SequenceType s = decodeProperty(SequenceType.class,
                                        elem,
                                                                unmarshaller);
                               
                                rmps.setSequence(s);
                            } else if (RMConstants.getSequenceAckName().equals(localName)) {
                                SequenceAcknowledgement ack = decodeProperty(SequenceAcknowledgement.class,
                                        elem,
                                                                unmarshaller);
                                acks.add(ack);                           
                            } else if (RMConstants.getAckRequestedName().equals(localName)) {
                                AckRequestedType ar = decodeProperty(AckRequestedType.class,
                                        elem,
                                                                unmarshaller);
                                requested.add(ar);
                            }
                        }
                    }
                }
                if (acks.size() > 0) {
                    rmps.setAcks(acks);
                }
                if (requested.size() > 0) {
                    rmps.setAcksRequested(requested);
                }
            }
        } catch (JAXBException ex) {
            LOG.log(Level.WARNING, "SOAP_HEADER_DECODE_FAILURE_MSG", ex);
        }
View Full Code Here

Examples of org.apache.cxf.ws.rm.RMProperties

     *
     * @param message the SOAP message
     */
   
    void encode(SoapMessage message) {
        RMProperties rmps = RMContextUtils.retrieveRMProperties(message, true);
        if (null != rmps) {
            encode(message, rmps);
        } else if (MessageUtils.isFault(message)) {
            Exception ex = message.getContent(Exception.class);
            if (ex instanceof SoapFault && ex.getCause() instanceof SequenceFault) {
View Full Code Here

Examples of org.apache.cxf.ws.rm.RMProperties

     * and store them in the message.
     * 
     * @param message the SOAP mesage
     */
    void decode(SoapMessage message) {
        RMProperties rmps = unmarshalRMProperties(message);
        RMContextUtils.storeRMProperties(message, rmps, false);
        // TODO: decode SequenceFault ?
    }
View Full Code Here

Examples of org.apache.cxf.ws.rm.RMProperties

     *
     * @param message the SOAP message
     * @return the RM properties
     */
    public RMProperties unmarshalRMProperties(SoapMessage message) {
        RMProperties rmps = new RMProperties();
        List<Header> headers = message.getHeaders();
        if (headers != null) {
            decodeHeaders(message, headers, rmps);
        }
        return rmps;
View Full Code Here

Examples of org.apache.cxf.ws.rm.RMProperties

        } else if (RM11Constants.ACTIONS.contains(action)) {
            consts = RM11Constants.INSTANCE;
        } else {
            return;
        }
        RMProperties rmps = RMContextUtils.retrieveRMProperties(message, false);
        rmps.exposeAs(consts.getWSRMNamespace());
        ProtocolVariation protocol =
            ProtocolVariation.findVariant(consts.getWSRMNamespace(), maps.getNamespaceURI());
       
        LOG.info("Updating service model info in exchange");
       
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.