Package org.apache.neethi

Examples of org.apache.neethi.Policy.serialize()


                            try {
                                writer = XMLOutputFactory.newInstance()
                                        .createXMLStreamWriter(out);

                                res.setContentType("text/xml");
                                targetPolicy.serialize(writer);
                                writer.flush();

                            } catch (XMLStreamException e) {
                                throw new ServletException(
                                        "Error occured when serializing the Policy",
View Full Code Here


                            try {
                                writer = XMLOutputFactory.newInstance()
                                        .createXMLStreamWriter(out);

                                res.setContentType("text/xml");
                                effecPolicy.serialize(writer);
                                writer.flush();

                            } catch (XMLStreamException e) {
                                throw new ServletException(
                                        "Error occured when serializing the Policy",
View Full Code Here

                                OutputStream out = res.getOutputStream();
                                writer = XMLOutputFactory.newInstance()
                                        .createXMLStreamWriter(out);

                                res.setContentType("application/wspolicy+xml");
                                targetPolicy.serialize(writer);
                                writer.flush();

                            } catch (XMLStreamException e) {
                                throw new ServletException(
                                        "Error occured when serializing the Policy",
View Full Code Here

                                OutputStream out = res.getOutputStream();
                                writer = XMLOutputFactory.newInstance()
                                        .createXMLStreamWriter(out);

                                res.setContentType("application/wspolicy+xml");
                                effecPolicy.serialize(writer);
                                writer.flush();

                            } catch (XMLStreamException e) {
                                throw new ServletException(
                                        "Error occured when serializing the Policy",
View Full Code Here

                policyResource.setProperty(RegistryResources.ServiceProperties.POLICY_UUID, "RMPolicy");
            }

            ByteArrayOutputStream baos = new ByteArrayOutputStream();
            XMLStreamWriter writer = XMLOutputFactory.newInstance().createXMLStreamWriter(baos);
            sandeshaPolicy.serialize(writer);
            writer.flush();
            policyResource.setContent(baos.toString());
            registry.put(resourcePath, policyResource);

        } catch (RegistryException e) {
View Full Code Here

        policyResource.setProperty(RegistryResources.ModuleProperties.POLICY_UUID, policy.getId());
        policyResource.setProperty(RegistryResources.ModuleProperties.VERSION, moduleVersion);
        // do a performance improvement
        ByteArrayOutputStream baos = new ByteArrayOutputStream();
        XMLStreamWriter writer = XMLOutputFactory.newInstance().createXMLStreamWriter(baos);
        policy.serialize(writer);
        writer.flush();
        policyResource.setContent(baos.toString());
        policyResource.setProperty(RegistryResources.ModuleProperties.POLICY_TYPE,
                                   "" + PolicyInclude.AXIS_MODULE_POLICY);
View Full Code Here

        Resource policyResource = registry.newResource();
        policyResource.setProperty(RegistryResources.ServiceProperties.POLICY_UUID, policy.getId());
        // do a performance improvement
        ByteArrayOutputStream baos = new ByteArrayOutputStream();
        XMLStreamWriter writer = XMLOutputFactory.newInstance().createXMLStreamWriter(baos);
        policy.serialize(writer);
        writer.flush();
        policyResource.setContent(baos.toString());
        policyResource.setProperty(RegistryResources.ServiceProperties.POLICY_TYPE,
                                   "" + PolicyInclude.AXIS_SERVICE_POLICY);
        String policyResourcePath = servicePath + RegistryResources.POLICIES + policy.getId();
View Full Code Here

        Resource policyResource = registry.newResource();
        policyResource.setProperty(RegistryResources.ServiceProperties.POLICY_UUID, policy.getId());
        // do a performance improvement
        ByteArrayOutputStream baos = new ByteArrayOutputStream();
        XMLStreamWriter writer = XMLOutputFactory.newInstance().createXMLStreamWriter(baos);
        policy.serialize(writer);
        writer.flush();
        policyResource.setContent(baos.toString());
        policyResource.setProperty(RegistryResources.ServiceProperties.POLICY_TYPE,
                                   "" + PolicyInclude.AXIS_OPERATION_POLICY);
        String policyResourcePath = servicePath + RegistryResources.POLICIES + policy.getId();
View Full Code Here

        Resource policyResource = registry.newResource();
        policyResource.setProperty(RegistryResources.ServiceProperties.POLICY_UUID, policy.getId());
        // do a performance improvement
        ByteArrayOutputStream baos = new ByteArrayOutputStream();
        XMLStreamWriter writer = XMLOutputFactory.newInstance().createXMLStreamWriter(baos);
        policy.serialize(writer);
        writer.flush();
        policyResource.setContent(baos.toString());
        policyResource.setProperty(RegistryResources.ServiceProperties.POLICY_TYPE,
                                   "" + PolicyInclude.AXIS_MESSAGE_POLICY);
View Full Code Here

        Resource policyResource = registry.newResource();
        policyResource.setProperty(RegistryResources.ServiceProperties.POLICY_UUID, policy.getId());
        // do a performance improvement
        ByteArrayOutputStream baos = new ByteArrayOutputStream();
        XMLStreamWriter writer = XMLOutputFactory.newInstance().createXMLStreamWriter(baos);
        policy.serialize(writer);
        writer.flush();
        policyResource.setContent(baos.toString());
        policyResource.setProperty(RegistryResources.ServiceProperties.POLICY_TYPE,
                                   "" + PolicyInclude.BINDING_POLICY);
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.