You need to call the register() method on your generated Factory class. 
For example:

MyFactory.INSTANCE.register(myHelperContext);

Frank.

Stanislaw Findeisen <[EMAIL PROTECTED]> wrote on 03/31/2008 
10:03:23 AM:

> Hello
> 
> Could anyone give me an example of how to generate Java classes from XSD 

> files and how to use them later for reading XML files?
> 
> In our project we are using XSD2JavaGenerator, and later this to read 
the 
> data:
> 
>      XMLDocument xmlDoc = XMLHelper.INSTANCE.load(inputStream, "
> http://www.pl.ibm.com/esb/config";, null);
>      ConnectionsList sdoConnectionsList = (ConnectionsList) xmlDoc.
> getRootObject();
> 
> where ConnectionsList is a generated Java interface.
> 
> This used to work with Tuscany SDO M2 release, but now we get this 
error:
> 
>      Exception in thread "main" java.lang.ClassCastException:
>      org.apache.tuscany.sdo.impl.AnyTypeDataObjectImpl cannot be cast to
>      com.ibm.pl.esb.config.ConnectionsList
> 
> Is there any "init" call we should make prior to this, or maybe we 
should 
> take some totally different approach?
> 
> I couldn't find any working example of this in your samples (only 
dynamic 
> API is used there, that is, DataObject obj = xmlDoc.getRootObject()).
> 
> Thanks!
> STF
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to