Examples of ResponseWrapper


Examples of javax.xml.ws.ResponseWrapper

            return cachedClass;
        }

        Method m = getDeclaredMethod(selected);

        ResponseWrapper rw = m.getAnnotation(ResponseWrapper.class);
        String clsName = "";
        if (rw == null) {
            clsName = getPackageName(selected) + ".jaxws." + StringUtils.capitalize(selected.getName())
                      + "Response";
        } else {
            clsName = rw.className();
        }
       
        if (clsName.length() > 0) {
            cachedClass = responseMethodClassCache.get(clsName);
            if (cachedClass != null) {
View Full Code Here

Examples of javax.xml.ws.ResponseWrapper

    @Override
    public String getResponseWrapperClassName(Method selected) {
        Method m = getDeclaredMethod(selected);

        ResponseWrapper rw = m.getAnnotation(ResponseWrapper.class);
        String clsName = "";
        if (rw != null) {
            clsName = rw.className();
        }
        if (clsName.length() > 0) {
            return clsName;
        }
        return null;
View Full Code Here

Examples of org.apache.cxf.tools.java2wsdl.processor.internal.jaxws.ResponseWrapper

                    if (requestWrapper.isWrapperBeanClassNotExist()) {
                        wrapperClasses.add(jClass);
                    }
                }
                if (op.hasOutput()) {
                    ResponseWrapper responseWrapper = new ResponseWrapper();
                    responseWrapper.setOperationInfo(op);
                    JavaClass jClass = responseWrapper.buildWrapperBeanClass();

                    if (responseWrapper.isWrapperBeanClassNotExist()) {
                        wrapperClasses.add(jClass);
                    }
                }
            }
        }
View Full Code Here

Examples of org.exist.http.servlets.ResponseWrapper

        final JavaObjectValue respValue = (JavaObjectValue)respVar.getValue().itemAt( 0 );

        if( !"org.exist.http.servlets.HttpResponseWrapper".equals( respValue.getObject().getClass().getName() ) ) {
            throw( new XPathException( this, signature.toString() + " can only be used within the EXistServlet or XQueryServlet" ) );
        }
        final ResponseWrapper response = (ResponseWrapper)respValue.getObject();

        response.setContentType( "application/zip" );
        response.setHeader("Content-Length", String.valueOf(backupFile.length()));
        try {
            final InputStream  is  = new FileInputStream( backupFile );
            final OutputStream os  = response.getOutputStream();
            final byte[]       buf = new byte[4096];
            int          c;

            while( ( c = is.read( buf ) ) > -1 ) {
                os.write( buf, 0, c );
            }
            is.close();
            os.close();
            response.flushBuffer();
        }
        catch( final IOException e ) {
            throw( new XPathException( this, "An IO error occurred while reading the backup archive" ) );
        }
        return( Sequence.EMPTY_SEQUENCE );
View Full Code Here

Examples of pt.ist.fenixWebFramework.servlets.filters.contentRewrite.ResponseWrapper

        if ("doOperation".equals(request.getParameter("method"))
                && "PRINT_ALL_DOCUMENTS".equals(request.getParameter("operationType"))) {

            try {
                ResponseWrapper response = (ResponseWrapper) arg1;
                // clean the response html and make a DOM document out of it
                String responseHtml = clean(response.getContent());
                DocumentBuilder builder = DocumentBuilderFactory.newInstance().newDocumentBuilder();
                Document doc = builder.parse(new ByteArrayInputStream(responseHtml.getBytes()));

                // alter paths of link/img tags so itext can use them properly
                patchLinks(doc, request);

                // structure pdf document
                ITextRenderer renderer = new ITextRenderer();
                renderer.setDocument(doc, "");
                renderer.layout();

                // create the pdf
                ByteArrayOutputStream pdfStream = new ByteArrayOutputStream();
                renderer.createPDF(pdfStream);

                // concatenate with other docs
                final Person person = (Person) request.getAttribute("person");
                final StudentCandidacy candidacy = getCandidacy(request);
                ByteArrayOutputStream finalPdfStream = concatenateDocs(pdfStream.toByteArray(), person);
                byte[] pdfByteArray = finalPdfStream.toByteArray();

                // associate the summary file to the candidacy
                associateSummaryFile(pdfByteArray, person.getStudent().getNumber().toString(), candidacy);

                // redirect user to the candidacy summary page
                response.reset();
                response.sendRedirect(buildRedirectURL(request, candidacy));

                response.flushBuffer();
            } catch (ParserConfigurationException e) {
                logger.error(e.getMessage(), e);
            } catch (SAXException e) {
                logger.error(e.getMessage(), e);
            } catch (DocumentException e) {
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.