Package org.apache.cxf.helpers

Examples of org.apache.cxf.helpers.LoadingByteArrayOutputStream.createInputStream()


                        }

                        schemaSourcesMap.put(sch.getSourceURI() + ":"
                                             + sch.getTargetNamespace(), out.toByteArray());
                       
                        Source source = new StreamSource(out.createInputStream(), sch.getSourceURI());
                        schemaSourcesMap2.put(sch.getSourceURI() + ":"
                                              + sch.getTargetNamespace(), source);
                    }
                }
View Full Code Here


            //change the import location in wsdl file
            OutputStream wsdloutput = new BufferedOutputStream(new FileOutputStream(wsdlFile));
            WSDLWriter wsdlWriter = WSDLFactory.newInstance().newWSDLWriter();
            LoadingByteArrayOutputStream bout = new LoadingByteArrayOutputStream();
            wsdlWriter.writeWSDL(def, bout);
            Element defEle = StaxUtils.read(bout.createInputStream()).getDocumentElement();
            List<Element> xsdElements = DOMUtils.findAllElementsByTagNameNS(defEle,
                                                                            WSDLConstants.NS_SCHEMA_XSD,
                                                                            "schema");
            for (Element xsdEle : xsdElements) {
                updateImports(xsdEle, sourceMap);
View Full Code Here

            for (Definition importDef : defs) {
                File importWsdlFile = new File(outputdir, importWSDLMap.get(importDef.getTargetNamespace()));
                OutputStream wsdlOs = new BufferedOutputStream(new FileOutputStream(importWsdlFile));
                bout = new LoadingByteArrayOutputStream();
                wsdlWriter.writeWSDL(importDef, bout);
                Element importEle = StaxUtils.read(bout.createInputStream()).getDocumentElement();

                xsdElements = DOMUtils.findAllElementsByTagNameNS(importEle, WSDLConstants.NS_SCHEMA_XSD,
                                                                  "schema");
                for (Element xsdEle : xsdElements) {
                    updateImports(xsdEle, sourceMap);
View Full Code Here

                        }

                        schemaSourcesMap.put(sch.getSourceURI() + ":"
                                             + sch.getTargetNamespace(), out.toByteArray());
                       
                        Source source = new StreamSource(out.createInputStream(), sch.getSourceURI());
                        schemaSourcesMap2.put(sch.getSourceURI() + ":"
                                              + sch.getTargetNamespace(), source);
                    }
                }
View Full Code Here

                        }

                        schemaSourcesMap.put(sch.getSourceURI() + ":"
                                             + sch.getTargetNamespace(), out.toByteArray());
                       
                        Source source = new StreamSource(out.createInputStream(), sch.getSourceURI());
                        schemaSourcesMap2.put(sch.getSourceURI() + ":"
                                              + sch.getTargetNamespace(), source);
                    }
                }
View Full Code Here

                bout = new LoadingByteArrayOutputStream(1024);
                IOUtils.copy(is, bout);
                is.close();
                cache.put(uriStr, bout);
            }
            is = bout.createInputStream();
        } catch (MalformedURLException e) {
            // do nothing
        } catch (URISyntaxException e) {
            // do nothing
        }
View Full Code Here

                        }
                       
                        if (ins == null) {
                            LoadingByteArrayOutputStream out = new LoadingByteArrayOutputStream();
                            sch.write(out);
                            ins = out.createInputStream();
                        }
                        Document doc = XMLUtils.parse(ins);
                        try {
                            ins.close();
                        } catch (IOException ex) {
View Full Code Here

                bout = new LoadingByteArrayOutputStream(1024);
                IOUtils.copy(is, bout);
                is.close();
                cache.put(uriStr, bout);
            }
            is = bout.createInputStream();
        } catch (MalformedURLException e) {
            // do nothing
        } catch (URISyntaxException e) {
            // do nothing
        }
View Full Code Here

        try {
            getMarshaller().marshal(ack, bos);
        } catch (JAXBException ex) {
            throw new RMStoreException(ex);
        }
        return bos.createInputStream();
    }
   
    private JAXBContext getContext() throws JAXBException {
        if (null == context) {
            context = JAXBContext.newInstance(PackageUtils
View Full Code Here

            bos.close();
            inbound.add(bos.toByteArray());
            if (LOG.isLoggable(Level.FINE)) {
                LOG.fine("inbound: " + bos.toString());
            }
            ByteArrayInputStream bis = bos.createInputStream();
            message.setContent(InputStream.class, bis);
        } catch (Exception ex) {
            ex.printStackTrace();
        }
    }
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.