Actually, the case typo was just in my email (I typed
it by hand as the code was on a different machine) not
in my code. It turns out that a class doesn't reflect
directly those methods it INHERITS. I"m new to
reflection, so I don't know for sure, but I'm guessing
that this is the normal behavior. Ended up coding:
Class.forName("Org.apache.xerces.framework.XMLParser").getDeclaredMethod("parse",
paramType);
You learn something new every day! Thanks for you
help.
-Jason
--- Jeffrey Rodriguez <[EMAIL PROTECTED]> wrote:
> Hi Jason,
>
>
Class.forName("Org.apache.xerces.parsers.DOMParser").getDeclaredMethod"parse",paramType);
>
> In this call your are trying to call a class that
> does not exist
> since:
>
> "Org.apache.xerces.parsers.DOMParser"
>
> should be:
> ("org.apache.xerces.parsers.DOMParser"
>
> Case matters.
>
> Thanks,
>
> Jeffrey Rodriguez
>
>
>
>
> >From: Jason Rizer <[EMAIL PROTECTED]>
> >Reply-To: [EMAIL PROTECTED]
> >To: [EMAIL PROTECTED]
> >Subject: Having trouble using reflection to call
> parse( );
> >Date: Wed, 11 Apr 2001 20:24:16 -0700 (PDT)
> >
> >Hello. I'm trying to use reflection to call parse(
> )
> >on my DOMParser, but I get an
> NoSuchMethodException.
> >Anyone see anything wrong with the following code?
> >org.xml.sax.InputSource inputSource = new
> >org.xml.sax.InputSource(aByteStream);
> >
> >paramTypes[0] =
> >Class.forName("org.xml.sax.InputSource");
> >
> >objArgs[0] = inputSource;
> >
> >method =
>
>Class.forName("Org.apache.xerces.parsers.DOMParser").getDeclaredMethod("parse",
> >paramType);
> >
> >method.invoke(domParser, objArgs);
> >
> >I'm able to reflect setIncludeIgnorableWhitespace(
> ),
> >but for some reason this one fails.
> >
> >-Jason
> >
> >__________________________________________________
> >Do You Yahoo!?
> >Get email at your own domain with Yahoo! Mail.
> >http://personal.mail.yahoo.com/
> >
>
>---------------------------------------------------------------------
> >To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> >For additional commands, e-mail:
> [EMAIL PROTECTED]
> >
>
>
_________________________________________________________________
> Get your FREE download of MSN Explorer at
> http://explorer.msn.com
>
>
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
>
__________________________________________________
Do You Yahoo!?
Get email at your own domain with Yahoo! Mail.
http://personal.mail.yahoo.com/
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]