com.sun.xml.internal.ws.streaming.TidyXMLStreamReader Java Examples

The following examples show how to use com.sun.xml.internal.ws.streaming.TidyXMLStreamReader. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: EntityResolverWrapper.java    From TencentKona-8 with GNU General Public License v2.0 6 votes vote down vote up
public Parser resolveEntity(String publicId, String systemId) throws SAXException, IOException {
    InputSource source = core.resolveEntity(publicId,systemId);
    if(source==null)
        return null;    // default

    // ideally entity resolvers should be giving us the system ID for the resource
    // (or otherwise we won't be able to resolve references within this imported WSDL correctly),
    // but if none is given, the system ID before the entity resolution is better than nothing.
    if(source.getSystemId()!=null)
        systemId = source.getSystemId();

    URL url = new URL(systemId);
    InputStream stream;
    if (useStreamFromEntityResolver) {
            stream = source.getByteStream();
    } else {
            stream = url.openStream();
    }
    return new Parser(url,
            new TidyXMLStreamReader(XMLStreamReaderFactory.create(url.toExternalForm(), stream, true), stream));
}
 
Example #2
Source File: EntityResolverWrapper.java    From jdk8u60 with GNU General Public License v2.0 6 votes vote down vote up
public Parser resolveEntity(String publicId, String systemId) throws SAXException, IOException {
    InputSource source = core.resolveEntity(publicId,systemId);
    if(source==null)
        return null;    // default

    // ideally entity resolvers should be giving us the system ID for the resource
    // (or otherwise we won't be able to resolve references within this imported WSDL correctly),
    // but if none is given, the system ID before the entity resolution is better than nothing.
    if(source.getSystemId()!=null)
        systemId = source.getSystemId();

    URL url = new URL(systemId);
    InputStream stream;
    if (useStreamFromEntityResolver) {
            stream = source.getByteStream();
    } else {
            stream = url.openStream();
    }
    return new Parser(url,
            new TidyXMLStreamReader(XMLStreamReaderFactory.create(url.toExternalForm(), stream, true), stream));
}
 
Example #3
Source File: EntityResolverWrapper.java    From openjdk-jdk8u with GNU General Public License v2.0 6 votes vote down vote up
public Parser resolveEntity(String publicId, String systemId) throws SAXException, IOException {
    InputSource source = core.resolveEntity(publicId,systemId);
    if(source==null)
        return null;    // default

    // ideally entity resolvers should be giving us the system ID for the resource
    // (or otherwise we won't be able to resolve references within this imported WSDL correctly),
    // but if none is given, the system ID before the entity resolution is better than nothing.
    if(source.getSystemId()!=null)
        systemId = source.getSystemId();

    URL url = new URL(systemId);
    InputStream stream;
    if (useStreamFromEntityResolver) {
            stream = source.getByteStream();
    } else {
            stream = url.openStream();
    }
    return new Parser(url,
            new TidyXMLStreamReader(XMLStreamReaderFactory.create(url.toExternalForm(), stream, true), stream));
}
 
Example #4
Source File: EntityResolverWrapper.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 6 votes vote down vote up
public Parser resolveEntity(String publicId, String systemId) throws SAXException, IOException {
    InputSource source = core.resolveEntity(publicId,systemId);
    if(source==null)
        return null;    // default

    // ideally entity resolvers should be giving us the system ID for the resource
    // (or otherwise we won't be able to resolve references within this imported WSDL correctly),
    // but if none is given, the system ID before the entity resolution is better than nothing.
    if(source.getSystemId()!=null)
        systemId = source.getSystemId();

    URL url = new URL(systemId);
    InputStream stream;
    if (useStreamFromEntityResolver) {
            stream = source.getByteStream();
    } else {
            stream = url.openStream();
    }
    return new Parser(url,
            new TidyXMLStreamReader(XMLStreamReaderFactory.create(url.toExternalForm(), stream, true), stream));
}
 
Example #5
Source File: EntityResolverWrapper.java    From openjdk-jdk9 with GNU General Public License v2.0 6 votes vote down vote up
public Parser resolveEntity(String publicId, String systemId) throws SAXException, IOException {
    InputSource source = core.resolveEntity(publicId,systemId);
    if(source==null)
        return null;    // default

    // ideally entity resolvers should be giving us the system ID for the resource
    // (or otherwise we won't be able to resolve references within this imported WSDL correctly),
    // but if none is given, the system ID before the entity resolution is better than nothing.
    if(source.getSystemId()!=null)
        systemId = source.getSystemId();

    URL url = new URL(systemId);
    InputStream stream;
    if (useStreamFromEntityResolver) {
            stream = source.getByteStream();
    } else {
            stream = url.openStream();
    }
    return new Parser(url,
            new TidyXMLStreamReader(XMLStreamReaderFactory.create(url.toExternalForm(), stream, true), stream));
}
 
Example #6
Source File: EntityResolverWrapper.java    From hottub with GNU General Public License v2.0 6 votes vote down vote up
public Parser resolveEntity(String publicId, String systemId) throws SAXException, IOException {
    InputSource source = core.resolveEntity(publicId,systemId);
    if(source==null)
        return null;    // default

    // ideally entity resolvers should be giving us the system ID for the resource
    // (or otherwise we won't be able to resolve references within this imported WSDL correctly),
    // but if none is given, the system ID before the entity resolution is better than nothing.
    if(source.getSystemId()!=null)
        systemId = source.getSystemId();

    URL url = new URL(systemId);
    InputStream stream;
    if (useStreamFromEntityResolver) {
            stream = source.getByteStream();
    } else {
            stream = url.openStream();
    }
    return new Parser(url,
            new TidyXMLStreamReader(XMLStreamReaderFactory.create(url.toExternalForm(), stream, true), stream));
}
 
Example #7
Source File: EntityResolverWrapper.java    From openjdk-8-source with GNU General Public License v2.0 6 votes vote down vote up
public Parser resolveEntity(String publicId, String systemId) throws SAXException, IOException {
    InputSource source = core.resolveEntity(publicId,systemId);
    if(source==null)
        return null;    // default

    // ideally entity resolvers should be giving us the system ID for the resource
    // (or otherwise we won't be able to resolve references within this imported WSDL correctly),
    // but if none is given, the system ID before the entity resolution is better than nothing.
    if(source.getSystemId()!=null)
        systemId = source.getSystemId();

    URL url = new URL(systemId);
    InputStream stream;
    if (useStreamFromEntityResolver) {
            stream = source.getByteStream();
    } else {
            stream = url.openStream();
    }
    return new Parser(url,
            new TidyXMLStreamReader(XMLStreamReaderFactory.create(url.toExternalForm(), stream, true), stream));
}
 
Example #8
Source File: EntityResolverWrapper.java    From openjdk-8 with GNU General Public License v2.0 6 votes vote down vote up
public Parser resolveEntity(String publicId, String systemId) throws SAXException, IOException {
    InputSource source = core.resolveEntity(publicId,systemId);
    if(source==null)
        return null;    // default

    // ideally entity resolvers should be giving us the system ID for the resource
    // (or otherwise we won't be able to resolve references within this imported WSDL correctly),
    // but if none is given, the system ID before the entity resolution is better than nothing.
    if(source.getSystemId()!=null)
        systemId = source.getSystemId();

    URL url = new URL(systemId);
    InputStream stream;
    if (useStreamFromEntityResolver) {
            stream = source.getByteStream();
    } else {
            stream = url.openStream();
    }
    return new Parser(url,
            new TidyXMLStreamReader(XMLStreamReaderFactory.create(url.toExternalForm(), stream, true), stream));
}
 
Example #9
Source File: RuntimeWSDLParser.java    From TencentKona-8 with GNU General Public License v2.0 4 votes vote down vote up
private XMLStreamReader createReader(@NotNull Source src) throws XMLStreamException {
    return new TidyXMLStreamReader(SourceReaderFactory.createSourceReader(src, true), null);
}
 
Example #10
Source File: RuntimeWSDLParser.java    From jdk8u60 with GNU General Public License v2.0 4 votes vote down vote up
private XMLStreamReader createReader(@NotNull Source src) throws XMLStreamException {
    return new TidyXMLStreamReader(SourceReaderFactory.createSourceReader(src, true), null);
}
 
Example #11
Source File: RuntimeWSDLParser.java    From openjdk-jdk8u with GNU General Public License v2.0 4 votes vote down vote up
private XMLStreamReader createReader(@NotNull Source src) throws XMLStreamException {
    return new TidyXMLStreamReader(SourceReaderFactory.createSourceReader(src, true), null);
}
 
Example #12
Source File: RuntimeWSDLParser.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 4 votes vote down vote up
private XMLStreamReader createReader(@NotNull Source src) throws XMLStreamException {
    return new TidyXMLStreamReader(SourceReaderFactory.createSourceReader(src, true), null);
}
 
Example #13
Source File: RuntimeWSDLParser.java    From openjdk-jdk9 with GNU General Public License v2.0 4 votes vote down vote up
private XMLStreamReader createReader(@NotNull Source src) throws XMLStreamException {
    return new TidyXMLStreamReader(SourceReaderFactory.createSourceReader(src, true), null);
}
 
Example #14
Source File: RuntimeWSDLParser.java    From hottub with GNU General Public License v2.0 4 votes vote down vote up
private XMLStreamReader createReader(@NotNull Source src) throws XMLStreamException {
    return new TidyXMLStreamReader(SourceReaderFactory.createSourceReader(src, true), null);
}
 
Example #15
Source File: RuntimeWSDLParser.java    From openjdk-8-source with GNU General Public License v2.0 4 votes vote down vote up
private XMLStreamReader createReader(@NotNull Source src) throws XMLStreamException {
    return new TidyXMLStreamReader(SourceReaderFactory.createSourceReader(src, true), null);
}
 
Example #16
Source File: RuntimeWSDLParser.java    From openjdk-8 with GNU General Public License v2.0 4 votes vote down vote up
private XMLStreamReader createReader(@NotNull Source src) throws XMLStreamException {
    return new TidyXMLStreamReader(SourceReaderFactory.createSourceReader(src, true), null);
}