Denis,

 

SchemaType.getSourceName() returns a name of a resource that represents
the original xsd file from which the type came from.

You can get to the resource by using a SchemaTypeLoader that has access
to it. See the following example on how to use it:

 

    static void testXbGetSourceName()

        throws IOException

    {

        SchemaType st = SchemaDocument.type; // or any schemaType that
is compiled into a jar using scomp

 

        InputStream is =
st.getTypeSystem().getSourceAsStream(st.getSourceName());

 

        Reader r = new InputStreamReader(is);

        Writer w = new PrintWriter(System.out);

        char[] buf = new char[100];

        int l;

        while((l=r.read(buf))>=0)

        {

            w.write(buf, 0, l);

        }

        w.close();

        r.close();

        is.close();

    }

 

Cezar

 

________________________________

From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
Sent: Thursday, February 14, 2008 2:12 AM
To: [email protected]
Subject: SchemaType.getSourceName()

 

Hi, everybody! 

Doesn anybody know how can I decode the result of
SchemaType.getSourceName() method? 

Regards, 
Denis. 


Notice:  This email message, together with any attachments, may contain 
information  of  BEA Systems,  Inc.,  its subsidiaries  and  affiliated 
entities,  that may be confidential,  proprietary,  copyrighted  and/or legally 
privileged, and is intended solely for the use of the individual or entity 
named in this message. If you are not the intended recipient, and have received 
this message in error, please immediately return this by email and then delete 
it.

Reply via email to