commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Susan Liu <xia...@auto-trol.com>
Subject [betwixt] Write XML Schema of a Cyclic Bean
Date Mon, 17 Jan 2005 16:02:26 GMT
I am trying to write xml schema for a cyclic Bean(A include B, B include A).

The Bean definition used LoopBean.java in the example:

public class LoopBean
{
   private static int count = 0;   
   private static final int max_count = 100;

   private LoopBean friend;
 
   private String name;
  .........................

}


The code to generate the XML Schema for this Bean: (from the example)

     SchemaTranscriber transcriber = new SchemaTranscriber();
 
transcriber.getXMLIntrospector().getConfiguration().setElementNameMapper(new
HyphenatedNameMapper());
 
transcriber.getXMLIntrospector().getConfiguration().setAttributeNameMapper(n
ew HyphenatedNameMapper());
 
transcriber.getXMLIntrospector().getConfiguration().setAttributesForPrimitiv
es(false);
 
transcriber.getXMLIntrospector().getConfiguration().setWrapCollectionsInElem
ent(false);
      //transcriber.getXMLIntrospector().setMapIDs(true);
      
      System.out.println("before generate schema:");
      Schema schema = transcriber.generate(LoopBean.class);

   .........................


A StackOverflowException was caught when executing the:
transcriber.generate(LoopBean.class).

Please help.

Susan 


---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org


Mime
View raw message