Package org.apache.axis.message

Examples of org.apache.axis.message.PrefixedQName


        MessageElement parent = new MessageElement("parent.names",
                                                "parent",
                                                "parns",
                                                null,
                                                dc);
        Name c1 = new PrefixedQName("child1.names", "child1" ,"c1ns");
        SOAPElement child1 = parent.addChildElement(c1);
        SOAPElement child2 = parent.addChildElement("child2");
        SOAPElement child3 = parent.addChildElement("child3.names", "parns");
        SOAPElement child4 = parent.addChildElement("child4",
                                                    "c4ns",
View Full Code Here


        SOAPElement parent = new MessageElement("parent.names",
                                                "parent",
                                                "parns",
                                                null,
                                                dc);
        Name c1 = new PrefixedQName("child1.names", "child1" ,"c1ns");
        SOAPElement child1 = parent.addChildElement(c1);
        SOAPElement child2 = parent.addChildElement("child2");
        SOAPElement child3 = parent.addChildElement("child3.names", "parns");
        SOAPElement child4 = parent.addChildElement("child4",
                                                    "c4ns",
View Full Code Here

        SOAPElement parent = new MessageElement("parent.names",
                                                "parent",
                                                "parns:parent",
                                                null,
                                                dc);
        Name c1 = new PrefixedQName("child1.names", "child1" ,"c1ns");
        SOAPElement child1 = parent.addChildElement(c1);
        SOAPElement child2 = parent.addChildElement("child2");
        SOAPElement child3 = parent.addChildElement("child3.names", "parns");
        SOAPElement child4 = parent.addChildElement("child4",
                                                    "c4ns",
View Full Code Here

        MessageElement parent = new MessageElement("parent.names",
                                                "parent",
                                                "parns",
                                                null,
                                                dc);
        Name c1 = new PrefixedQName("child1.names", "child1" ,"c1ns");
        SOAPElement child1 = parent.addChildElement(c1);
        SOAPElement child2 = parent.addChildElement("child2");
        SOAPElement child3 = parent.addChildElement("child3.names", "parns");
        SOAPElement child4 = parent.addChildElement("child4",
                                                    "c4ns",
View Full Code Here

        assertNotNull(body);
        MessageElement child = (MessageElement)body.getChildElements().next();
        assertNotNull(child);
        Iterator i = child.getAllAttributes();
        assertNotNull(i);
        PrefixedQName attr = (PrefixedQName)i.next();
        assertNotNull(attr);
        assertEquals("Prefix for attribute was not 'xml'", attr.getPrefix(), "xml");
        assertEquals("Namespace for attribute was not correct", attr.getURI(),
                     Constants.NS_URI_XML);
    }
View Full Code Here

        MessageElement parent = new MessageElement("parent.names",
                                                "parent",
                                                "parns",
                                                null,
                                                dc);
        Name c1 = new PrefixedQName("child1.names", "child1" ,"c1ns");
        SOAPElement child1 = parent.addChildElement(c1);
        SOAPElement child2 = parent.addChildElement("child2");
        SOAPElement child3 = parent.addChildElement("child3.names", "parns");
        SOAPElement child4 = parent.addChildElement("child4",
                                                    "c4ns",
View Full Code Here

        MessageElement parent = new MessageElement("parent.names",
                                                "parent",
                                                "parns",
                                                null,
                                                dc);
        Name c1 = new PrefixedQName("child1.names", "child1" ,"c1ns");
        SOAPElement child1 = parent.addChildElement(c1);
        SOAPElement child2 = parent.addChildElement("child2");
        SOAPElement child3 = parent.addChildElement("child3.names", "parns");
        SOAPElement child4 = parent.addChildElement("child4",
                                                    "c4ns",
View Full Code Here

    {
        SOAPHeaderElement header = req.getHeaderByName(NS_URI_WSRM, "SequenceAcknowledgement");
        if (header == null)
            return// Fault?

        Iterator i = header.getChildElements(new PrefixedQName(NS_URI_WSU, "Identifier", null));
        if (!i.hasNext()) {
            // return fault
            throw new AxisFault("WSRM.Fault", "Missing identifier in Sequence", null, null);
        }

        MessageElement el = (MessageElement)i.next();
        String id = el.getValue();
        MySequence seq = (MySequence)sequences.get(id);
        if (seq == null) {
            // Acknowledging a sequence I don't know about...
            throw new AxisFault("WSRM.UnknownSequence", "Don't recognize ack of sequence '" + id + "'", null, null);
        }

        i = header.getChildElements(new PrefixedQName(NS_URI_WSRM, "AcknowledgementRange", null));
        while (i.hasNext()) {
            el = (MessageElement)i.next();
            String val = el.getAttributeValue("Upper");
            int upper = Integer.parseInt(val);
            val = el.getAttributeValue("Lower");
View Full Code Here

        SOAPEnvelope req = msgContext.getRequestMessage().getSOAPEnvelope();
        SOAPHeaderElement header = req.getHeaderByName(NS_URI_WSRM, "Sequence");
        if (header == null)
            return;

        Iterator i = header.getChildElements(new PrefixedQName(NS_URI_WSU, "Identifier", null));
        if (!i.hasNext()) {
            // return fault
            throw new AxisFault("WSRM.Fault", "Missing identifier in Sequence", null, null);
        }

        MessageElement el = (MessageElement)i.next();
        String id = el.getValue();
        Sequence seq = (Sequence)sequences.get(id);
        if (seq == null) {
            seq = new Sequence(id);
            sequences.put(id, seq);
        }

        i = header.getChildElements(new PrefixedQName(NS_URI_WSRM, "MessageNumber", null));
        el = (MessageElement)i.next();

        // We've received a message with a given ID.
        int seqNum = Integer.parseInt(el.getValue());
        int nextSeq = seq.maxReceived + 1;
        if (seqNum < nextSeq) {
            Integer s = new Integer(seqNum);
            if (seq.missing.contains(s)) {
                seq.missing.remove(s);
            }
        } else {
            if (seqNum > nextSeq) {
                // Missing everything between maxReceived and this
                for (int n = nextSeq; n < seqNum; n++) {
                    seq.missing.add(new Integer(n));
                }
            }
            seq.maxReceived = seqNum;
        }

        header.setProcessed(true);

        String from = null;
        header = req.getHeaderByName(NS_URI_WSA, "From");
        if (header != null) {
            i = header.getChildElements(new PrefixedQName(NS_URI_WSA, "Address", null));
            if (!i.hasNext()) {
                throw new AxisFault("WSRM.NoAddress", "No <Address> element in <From> header", null, null);
            }
            el = (MessageElement)i.next();
            from = el.getValue();
View Full Code Here

        MessageElement parent = new MessageElement("parent.names",
                                                "parent",
                                                "parns",
                                                null,
                                                dc);
        Name c1 = new PrefixedQName("child1.names", "child1" ,"c1ns");
        SOAPElement child1 = parent.addChildElement(c1);
        SOAPElement child2 = parent.addChildElement("child2");
        SOAPElement child3 = parent.addChildElement("child3.names", "parns");
        SOAPElement child4 = parent.addChildElement("child4",
                                                    "c4ns",
View Full Code Here

TOP

Related Classes of org.apache.axis.message.PrefixedQName

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.