Package org.apache.axis2.om

Examples of org.apache.axis2.om.OMElement


        this.read = read;
        this.result = result;
    }

    public void run() {
        OMElement readQueueElement = OMElementCreator.read(
                this.createQueue.getText(), getKey());
        this.axis2EngineRuns("Read",
                readQueueElement,
                new SimpleQueueReadCallbackHandler(this.queueCode,
                        this.result));
View Full Code Here


        this.result = result;
    }

    public void run() {
        if (this.createQueue.isEditable()) {
            OMElement createQueueElement = OMElementCreator.creatQueueElement(
                    this.createQueue.getText(), getKey());
            this.axis2EngineRuns("CreateQueue",
                    createQueueElement,
                    new SimpleQueueCreateQueueCallbackHandler(this.createQueue,
                            this.queueCode,
                            this.enqueue, this.result));
        }
        if (this.enqueue.isEditable()) {
            OMElement enqueueElement = OMElementCreator.enqueueElement(
                    this.enqueue.getText(),
                    this.queueCode.getText(), getKey());
            this.axis2EngineRuns("Enqueue",
                    enqueueElement,
                    new SimpleQueueEnqueueCallbackHandler(this.createQueue,
View Full Code Here

    private void getQueueDeleteStatus(OMElement element) {
        Iterator iterator = element.getChildren();
        while (iterator.hasNext()) {
            OMNode omNode = (OMNode) iterator.next();
            if (omNode.getType() == OMNode.ELEMENT_NODE) {
                OMElement omElement = (OMElement) omNode;
                if (omElement.getLocalName().equals("Status")) {
                    this.readTheQueue(omElement);
                } else {
                    getQueueDeleteStatus(omElement);
                }
            }
View Full Code Here

    private boolean getResults(OMElement element) {
        Iterator iterator = element.getChildren();
        while (iterator.hasNext()) {
            OMNode omNode = (OMNode) iterator.next();
            if (omNode.getType() == OMNode.ELEMENT_NODE) {
                OMElement omElement = (OMElement) omNode;
                if ((omElement.getLocalName().equals("Status"))
                        || (omElement.getLocalName().equals("QueueId"))) {
                    this.getText(omElement);
                } else {
                    getResults(omElement);
                }
            }
View Full Code Here

    private boolean getResults(OMElement element) {
        Iterator iterator = element.getChildren();
        while (iterator.hasNext()) {
            OMNode omNode = (OMNode) iterator.next();
            if (omNode.getType() == OMNode.ELEMENT_NODE) {
                OMElement omElement = (OMElement) omNode;
                if ((omElement.getLocalName().equals("QueueId"))
                        || (omElement.getLocalName().equals("QueueName"))) {

                    if (omElement.getLocalName().equals("QueueId")) {
                        this.getText(omElement);
                    }
                    if (omElement.getLocalName().equals("QueueName")) {
                        this.getText(omElement);
                    }

                } else {
                    getResults(omElement);
View Full Code Here

        this.result = result;
        this.button = button;
    }

    public void run() {
        OMElement deleteQueueElement = OMElementCreator.deleteQueueElement(
                this.createQueue.getText(), getKey());
        this.axis2EngineRuns("DeleteQueue",
                deleteQueueElement,
                new SimpleQueueDeleteQueueCallbackHandler(this.result,
                        this.button));
View Full Code Here

        DataHandler expectedDH;
        OMFactory fac = OMAbstractFactory.getOMFactory();
        OMNamespace omNs = fac.createOMNamespace("http://localhost/my", "my");

        OMElement data = fac.createOMElement("mtomSample", omNs);
        OMElement image = fac.createOMElement("image", omNs);
        Image expectedImage;
        expectedImage = new ImageIO()
                .loadImage(new FileInputStream(inputFile));

        ImageDataSource dataSource = new ImageDataSource("test.jpg",
                expectedImage);
        expectedDH = new DataHandler(dataSource);
        OMText textData = fac.createText(expectedDH, true);
        image.addChild(textData);

        OMElement imageName = fac.createOMElement("fileName", omNs);
        if (fileName != null) {
            imageName.setText(fileName);
        }
        //OMElement wrap = fac.createOMElement("wrap",omNs);
        data.addChild(image);
        data.addChild(imageName);
        //data.addChild(wrap);
View Full Code Here

    }

    public OMElement sendFile(String fileName) throws Exception {

        OMElement payload = createEnvelope(fileName);
        Options options = new Options();
        options.setSoapVersionURI(SOAP11Constants.SOAP_ENVELOPE_NAMESPACE_URI);
        options.setTo(targetEPR);
        // enabling MTOM in the client side
        options.setProperty(Constants.Configuration.ENABLE_MTOM, Constants.VALUE_TRUE);
View Full Code Here

        this.result = result;
        this.button = button;
    }

    public void run() {
        OMElement listMyQueuesElement = OMElementCreator.queueListElement(
                getKey());
        this.axis2EngineRuns("ListMyQueues",
                listMyQueuesElement,
                new SimpleQueueListMyQueuesCallbackHandler(this.createQueue, this.queueCode,
                        this.read, this.result, this.button));
View Full Code Here

    private boolean getResults(OMElement element) {
        Iterator iterator = element.getChildren();
        while (iterator.hasNext()) {
            OMNode omNode = (OMNode) iterator.next();
            if (omNode.getType() == OMNode.ELEMENT_NODE) {
                OMElement omElement = (OMElement) omNode;
                if (omElement.getLocalName().equals("Status")) {
                    this.getText(omElement);
                } else {
                    getResults(omElement);
                }
            }
View Full Code Here

TOP

Related Classes of org.apache.axis2.om.OMElement

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.