Package org.apache.airavata.wsmg.broker.context

Examples of org.apache.airavata.wsmg.broker.context.ProcessingContextBuilder


        WSEProcessingContextBuilder wseBuilder = new WSEProcessingContextBuilder();

        // Create subscription for these entries from DB
        for (int i = 0; i < subscriptionEntry.size(); i++) {

            ProcessingContextBuilder processingCtxBuilder = null;

            log.info("Subscription No. " + i + " is " + subscriptionEntry.get(i).getSubscriptionId());

            StringReader sr = new StringReader(subscriptionEntry.get(i).getSubscribeXml());
            XMLInputFactory inputFactory = XMLInputFactory.newInstance();
            XMLStreamReader inflow;
            try {
                inflow = inputFactory.createXMLStreamReader(sr);

                StAXOMBuilder builder = new StAXOMBuilder(inflow); // get the
                // root
                // element (in
                // this case the
                // envelope)
                subscribeXmlElement = builder.getDocumentElement();

                if (subscribeXmlElement.getNamespace().getNamespaceURI()
                        .equals(NameSpaceConstants.WSNT_NS.getNamespaceURI())) {
                    processingCtxBuilder = wsntBuilder;

                } else {
                    processingCtxBuilder = wseBuilder;
                }

                subscriptionId = subscriptionEntry.get(i).getSubscriptionId();

                ProcessingContext context = processingCtxBuilder.build(subscribeXmlElement);
                createSubscription(subscriptionId, context);

            } catch (XMLStreamException e) {
                log.error("error occured while checking subscription db", e);
            }
View Full Code Here

TOP

Related Classes of org.apache.airavata.wsmg.broker.context.ProcessingContextBuilder

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.