I have the following two schemas and I want the generated classes to live in
the same package.

schema 1:

<?xml version="1.0" encoding="utf-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema";>

  <xs:element name="Response1">
    <xs:complexType>
      <xs:sequence>
        <xs:element name="statusHeader">
          <xs:complexType>
            <xs:sequence>
              <xs:element name="statusCode" type="xs:string"/>
              <xs:element name="errorMessage" type="xs:string"/>
            </xs:sequence>
          </xs:complexType>  
        </xs:element>
        <xs:element name="messageBody">
          <xs:complexType>
            <xs:sequence>
              <xs:element name="fasFlag" type="xs:string"/>
              <xs:element name="fasJobCode" type="xs:string"/>
              <xs:element name="fasArea" type="xs:string"/>
            </xs:sequence>
          </xs:complexType>  
        </xs:element>
      </xs:sequence>
    </xs:complexType>  
  </xs:element>
</xs:schema>

schema 2:

<?xml version="1.0" encoding="utf-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema";>

  <xs:element name="Response2">
    <xs:complexType>
      <xs:sequence>
        <xs:element name="statusHeader">
          <xs:complexType>
            <xs:sequence>
              <xs:element name="statusCode" type="xs:string"/>
              <xs:element name="errorMessage" type="xs:string"/>
            </xs:sequence>
          </xs:complexType>  
        </xs:element>
        <xs:element name="messageBody">
          <xs:complexType>
            <xs:sequence>
              <xs:element name="cisNumber" type="xs:string"/>
              <xs:element name="cisData" type="xs:string"/>
            </xs:sequence>
          </xs:complexType>  
        </xs:element>
      </xs:sequence>
    </xs:complexType>  
  </xs:element>
</xs:schema>

In the case of StatusHeader class, both responses share the same data, but
the MessageBody class data in both responses is totally unrelated.  I could
merge MessageBody into one big class, but I really don't want to do that.  I
tried changing the names of the classes manually after generating the code,
and that seems to work fine.  So I can have MessageBodyFAS and
MessageBodyCIS classes that generates and XML with messageBody element.  Is
there an easy way to specify the name of the class and the name of the
element (complex type) so I don't have to change the name of the classes
manually?

Thanks in advance,
Monika Koerdt

----------------------------------------------------------- 
If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
        unsubscribe castor-dev

Reply via email to