Examples of SequenceFaultType


Examples of org.apache.cxf.ws.rm.v200702.SequenceFaultType

        header.setAttributeNodeNS(attr);

        Marshaller marshaller = getContext().createMarshaller();
        marshaller.setProperty(Marshaller.JAXB_FRAGMENT, Boolean.TRUE);
        QName fqname = RM11Constants.SEQUENCE_FAULT_QNAME;
        SequenceFaultType flt = new SequenceFaultType();
        flt.setFaultCode(sf.getFaultCode());
        Object detail = sf.getDetail();
        if (detail instanceof Element) {
            flt.getAny().add(detail);
        } else if (detail instanceof Identifier) {
            marshaller.marshal(detail, doc);
        } else if (detail instanceof SequenceAcknowledgement) {
            marshaller.marshal(detail, doc);
        }
        Element data = doc.getDocumentElement();
        if (data != null) {
            flt.getDetail().getAny().add(data);
        }
        data = sf.getExtraDetail();
        if (data != null) {
            flt.getDetail().getAny().add(data);
        }
        marshaller.marshal(new JAXBElement<SequenceFaultType>(fqname, SequenceFaultType.class, flt), header);
        return header;
    }
View Full Code Here

Examples of org.apache.cxf.ws.rm.v200702.SequenceFaultType

        EasyMock.expect(sf.getReason()).andReturn("reason");
        EasyMock.expect(sf.isSender()).andReturn(isSender);
        EasyMock.expect(sf.getFaultCode()).andReturn(code);
        if (null != detail) {
            EasyMock.expect(sf.getDetail()).andReturn(detail);
            SequenceFaultType sft = new SequenceFaultType();
            sft.setFaultCode(RM10Constants.UNKNOWN_SEQUENCE_FAULT_QNAME);
        }
        return sf;
    }
View Full Code Here

Examples of org.objectweb.celtix.ws.rm.SequenceFaultType

     * @param lastMessage true if this is to be the last message in the sequence
     */
    void acknowledge(BigInteger messageNumber) throws SequenceFault {
       
        if (null != lastMessageNumber && messageNumber.compareTo(lastMessageNumber) > 0) {
            SequenceFaultType sf = RMUtils.getWSRMFactory().createSequenceFaultType();
            sf.setFaultCode(RMUtils.getRMConstants().getLastMessageNumberExceededFaultCode());
            Message msg = new Message("LAST_MESSAGE_NUMBER_EXCEEDED_EXC", LOG, this);
            throw new SequenceFault(msg.toString(), sf);
        }
       
        monitor.acknowledgeMessage();
View Full Code Here

Examples of org.objectweb.celtix.ws.rm.SequenceFaultType

        // can be included in a HTTP response
        return getAcksTo().getAddress().getValue().equals(Names.WSA_ANONYMOUS_ADDRESS);
    }
   
    static SequenceFault createUnknownSequenceFault(Identifier sid) {
        SequenceFaultType sf = RMUtils.getWSRMFactory().createSequenceFaultType();
        sf.setFaultCode(RMUtils.getRMConstants().getUnknownSequenceFaultCode());
        Message msg = new Message("UNKNOWN_SEQUENCE_EXC", LOG, sid.getValue());
        return new SequenceFault(msg.toString(), sf);
    }
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.