Package org.apache.servicemix.soap.api

Examples of org.apache.servicemix.soap.api.Fault


   
    public static Document createDocument() {
        try {
            return getDocumentBuilderFactory().newDocumentBuilder().newDocument();
        } catch (ParserConfigurationException e) {
            throw new Fault(e);
        }
    }
View Full Code Here


   
    public static Document parse(InputStream is) {
        try {
            return getDocumentBuilderFactory().newDocumentBuilder().parse(is);
        } catch (SAXException e) {
            throw new Fault(e);
        } catch (IOException e) {
            throw new Fault(e);
        } catch (ParserConfigurationException e) {
            throw new Fault(e);
        }
    }
View Full Code Here

            DOMResult result = new DOMResult(doc);
            Transformer transformer = getTransformerFactory().newTransformer();
            transformer.transform(source, result);
            return doc;
        } catch (TransformerConfigurationException e) {
            throw new Fault(e);
        } catch (TransformerException e) {
            throw new Fault(e);
        }
    }
View Full Code Here

            } else {
                normalizeXml(message);
            }
        } else if (httpMessage.getContentModel() == ContentModel.NONE) {
            if (message.getContent(Source.class) != null) {
                throw new Fault("No content allowed");
            }
        } else {
            throw new Fault("Unsupported content model: " + httpMessage.getContentModel());
        }
    }
View Full Code Here

        XMLStreamWriter writer = message.getContent(XMLStreamWriter.class);
        XMLStreamReader reader = StaxUtil.createReader(source);
        try {
            StaxUtil.copy(reader, writer);
        } catch (XMLStreamException e) {
            throw new Fault(e);
        }
    }
View Full Code Here

            message.put(Message.CONTENT_TYPE, "multipart/related; type=\"text/xml\"; start=\"<" + SOAP_PART_ID + ">\"");
            InterceptorChain chain = message.get(InterceptorChain.class);
            chain.doIntercept(message);
            writeMultipartMessage(message, os, baos.toByteArray());
        } catch (MessagingException e) {
            throw new Fault(e);
        } catch (IOException e) {
            throw new Fault(e);
        }
    }
View Full Code Here

                }
            }
            reader.nextTag();
            message.setContent(XMLStreamReader.class, reader);
        } catch (XMLStreamException e) {
            throw new Fault(e);
        }
    }
View Full Code Here

                is = new SequenceInputStream(new ByteArrayInputStream(new byte[] { 13, 10 }), is);
                MimeMessage mime = new MimeMessage(session, is);
                mime.setHeader(Message.CONTENT_TYPE, contentType);
                read(message, mime);
            } catch (IOException e) {
                throw new Fault(e);
            } catch (MessagingException e) {
                throw new Fault(e);
            }
        }
    }
View Full Code Here

            message.setContent(XMLStreamWriter.class, writer);
            InterceptorChain chain = message.get(InterceptorChain.class);
            chain.doIntercept(message);
            writer.flush();
        } catch (XMLStreamException e) {
            throw new Fault(e);
        }
    }
View Full Code Here

   
    public static XMLStreamReader createReader(InputStream is, String encoding) {
        try {
            return getXMLInputFactory().createXMLStreamReader(is, encoding);
        } catch (XMLStreamException e) {
            throw new Fault(e);
        }
    }
View Full Code Here

TOP

Related Classes of org.apache.servicemix.soap.api.Fault

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.