Package org.apache.neethi

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


        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_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, policyType);
        String policyResourcePath = servicePath + RegistryResources.POLICIES + policy.getId();
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

                            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

                            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

                            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

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.