axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael Schuerig <mich...@schuerig.de>
Subject Re: Accessing a file from a Serializer?
Date Mon, 22 Nov 2004 02:04:53 GMT
On Sunday 21 November 2004 20:05, Michael Schuerig wrote:
> If only I could obtain a URL pointing to my file.

    public Element writeSchema( Class javaType, Types types )
        throws Exception {
        if (StringUtils.isNotBlank(_schemaName)) {
            URL schemaURL = getClass().getResource(_schemaName);
            if (schemaURL != null) {
                types.loadInputSchema(schemaURL.toString());
            } else {
                logger.error("No XML schema file found for name: " +
                         _schemaName);
            }
        }
        return null;
    }

M.

-- 
Michael Schuerig                       Face reality and stare it down
mailto:michael@schuerig.de        --Jethro Tull, Silver River Turning
http://www.schuerig.de/michael/

Mime
View raw message