Package com.sun.xml.ws.wsdl.writer

Examples of com.sun.xml.ws.wsdl.writer.DocumentLocationResolver


        return WSDL_PATH +"/" + rootWsdlName;
    }

    private String fetchFile(final String doc, DOMForest forest, final Map<String, String> documentMap, File destDir) throws IOException, XMLStreamException {

        DocumentLocationResolver docLocator = createDocResolver(doc, forest, documentMap);
        WSDLPatcher wsdlPatcher = new WSDLPatcher(new PortAddressResolver() {
            @Override
            public String getAddressFor(@NotNull QName serviceName, @NotNull String portName) {
                return null;
            }
        }, docLocator);

        XMLStreamReader xsr = null;
        XMLStreamWriter xsw = null;
        OutputStream os = null;
        String resolvedRootWsdl = null;
        try {
            XMLOutputFactory writerfactory;
            xsr = SourceReaderFactory.createSourceReader(new DOMSource(forest.get(doc)), false);
            writerfactory = XMLOutputFactory.newInstance();
            resolvedRootWsdl = docLocator.getLocationFor(null, doc);
            File outFile = new File(destDir, resolvedRootWsdl);
            os = new FileOutputStream(outFile);
            if(options.verbose) {
                listener.message(WscompileMessages.WSIMPORT_DOCUMENT_DOWNLOAD(doc,outFile));
            }
View Full Code Here


        }
        return map;
    }

    private DocumentLocationResolver createDocResolver(final String baseWsdl, final DOMForest forest, final Map<String,String> documentMap) {
        return new DocumentLocationResolver() {
            @Override
            public String getLocationFor(String namespaceURI, String systemId) {
                try {
                    URL reference = new URL(new URL(baseWsdl),systemId);
                    systemId = reference.toExternalForm();
View Full Code Here

TOP

Related Classes of com.sun.xml.ws.wsdl.writer.DocumentLocationResolver

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.