Package com.betfair.cougar.marshalling.api.databinding

Examples of com.betfair.cougar.marshalling.api.databinding.FaultMarshaller


                    } catch (CougarValidationException e) {
                        responseMediaType = MediaType.APPLICATION_XML_TYPE;
                    }
                    response.setContentType(responseMediaType.toString());
                    DataBindingFactory dataBindingFactory = DataBindingManager.getInstance().getFactory(responseMediaType);
                    FaultMarshaller marshaller = dataBindingFactory.getFaultMarshaller();
                    ByteCountingOutputStream out = null;
                    try {
                        out = new ByteCountingOutputStream(response.getOutputStream());
                        marshaller.marshallFault(out, error.getFault(), getContentTypeNormaliser().getNormalisedEncoding(request));
                        bytesWritten = out.getCount();
                    } catch (IOException e) {
                        handleResponseWritingIOException(e, error.getClass());
                    } finally {
                        closeStream(out);
View Full Code Here


                    } catch (CougarValidationException e) {
                        responseMediaType = MediaType.APPLICATION_XML_TYPE;
                    }
                    response.setContentType(responseMediaType.toString());
                    DataBindingFactory dataBindingFactory = DataBindingManager.getInstance().getFactory(responseMediaType);
                    FaultMarshaller marshaller = dataBindingFactory.getFaultMarshaller();
                    ByteCountingOutputStream out = null;
                    try {
                        out = new ByteCountingOutputStream(response.getOutputStream());
                        marshaller.marshallFault(out, error.getFault(), getContentTypeNormaliser().getNormalisedEncoding(request));
                        bytesWritten = out.getCount();
                    } catch (IOException e) {
                        handleResponseWritingIOException(e, error.getClass());
                    } finally {
                        closeStream(out);
View Full Code Here

TOP

Related Classes of com.betfair.cougar.marshalling.api.databinding.FaultMarshaller

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.