|
Generated .jar files cause conflict: msg#00026text.xml.xmlbeans.user
XmlBeans - We are implementing different versions of a specification which are based on very similar schemas. Many of the tags in these schemas have the same names. The specification authors have not used any namespaces. We would like to use one servlet to evaluate the request then pass it to the API that handles that version. We have compiled the XmlBeans classes into different packages using a xsdconfig file and deploy the classes in separate jars. gdas090.jar and gdas091.jar are both in the class path. Unfortunately when marshalling the main XML document we don't always get the correct version returned from the Factory class. Example: Org.nfis.gdas.v091.GdasCapabilitiesDocument doc = GDASCapabilitiesDocument.Factory.parse(in); The above line can throw a ClassCastException from the generated code from at this line: public static org.nfis.gdas.v091.GDASCapabilitiesDocument parse(java.io.InputStream is) throws org.apache.xmlbeans.XmlException, java.io.IOException { return (org.nfis.gdas.v091.GDASCapabilitiesDocument) org.apache.xmlbeans.XmlBeans.getContextTypeLoader().parse( is, type, null ); } Debugging I discovered the returned class was actually org.nfis.gdas.v090.GDASCapabilitiesDocument (the incorrect version) which resulted in the ClassCastException. While we can put these versions in separate web containers to resolve this problem we would rather not do this. Any thoughts about why this is occurring? Eric Murphy Software Developer (NFIS) erimurph@xxxxxxxxxxxxxxx tel/tél: 250-363-6038 fax / télécopieur 250-363-6004 Natural Resources Canada Pacific Forestry Centre 506 West Burnside Road Victoria BC V8Z 1M5 Ressources naturelles Canada Centre de foresterie du Pacifique 506 rue Burnside ouest Victoria, Colombie-Britanique V8Z 1M5 |
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | RE: Memory Leak Problems in v1.0.1 w/selectPath(): 00026, Jamie Zyskowski |
|---|---|
| Next by Date: | Re: WSDL+Array compilation: 00026, Dan Diephouse |
| Previous by Thread: | WSDL+Array compilationi: 00026, Jacques-Olivier Goussard |
| Next by Thread: | RE: Generated .jar files cause conflict: 00026, Kevin Krouse |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |