Ah !

Of course, stupid of me ! J 

Thanks a lot !

 

BR

Niklas

 


From: Wing Yew Poon
Sent: Tuesday, August 02, 2005 17:04
To: user@xmlbeans.apache.org
Subject: RE: Generated code question

 

Niklas,

I think that, when using the xmlbean ant task, you set the binary output path by setting the classgendir attribute.

See http://xmlbeans.apache.org/docs/2.0.0/guide/antXmlbean.html for details.

- Wing Yew

 


From: Niklas Modin
Sent: Tuesday, August 02, 2005 1:49 PM
To: user@xmlbeans.apache.org
Subject: RE: Generated code question

Hi

I am using the <xmlbean> ant task for compiling my xsd. I’m not sure that
I can specify the binary output path for that task. Instead is seems that there
is a TEMP path used for this as I get this output from the task :

 

[xmlbean] Compiling 122 source files to D:\TEMP\xbean15776.d\classes

 

Can I set the binary output in the ant task?

 

Could go for option b, but would rather get a working binary instead of

having to get SVN and compile it all locally….. J

 

Niklas

 

 


From: Lawrence Jones
Sent: Tuesday, August 02, 2005 11:23
To: user@xmlbeans.apache.org
Subject: RE: Generated code question

 

Hi Niklas

 

The TypeSystemHolder class is a generated class which is the “link” between the Java (.class) world and the compiled schema (.xsb) world. It is output in the binary output directory (whatever you specify with the –d flag to scomp) and is not output if you specify -srconly.

 

With SVN checkin #220181 XmlBeans was updated so that the generated source no longer looks like the below but instead uses an XmlBeans method to look up the TypeSystemHolder using the name of the package, in your case “schemaorg_apache_xmlbeans.system.s356E206406D0E1BFD7A82E7E8EAC7C8F”, as a String.

 

So you have a couple of choices:

 

a)       you can include the binary output directory in your classpath when you compile – then the compilation will find the TypeSystemHolder class and your compilation should proceed.

b)       you can update to a version of XmlBeans after #220181 – in which case you should be able to compile just the generated source without the binary dir – though you will of course need the binary output dir on the classpath at runtime – otherwise the lookup by name will fail.

 

Cheers,

 

Lawrence

 

 


From: Niklas Modin
Sent: Tuesday, August 02, 2005 10:52 AM
To: user@xmlbeans.apache.org
Subject: Generated code question

 

Hi !

 

When using the xmlbean ant task, the generated source refers to some strange

package names, e.g :

 

schemaorg_apache_xmlbeans.system.s356E206406D0E1BFD7A82E7E8EAC7C8F.TypeSystemHolder.typeSystem.resolveHandle("alerttype5256type");

 

When trying to compile the generated code this fails with package do not exists error as expected.

 

Am I missing something here ? It generates the .jar files ok so should I just make sure the generated code
is put somewhere out of the way for my project source code ?

 

BR

Niklas

Reply via email to