Please bear with this really long e-mail.  I've been throug many of the
archive postings on related subjects but didn't see where anyone was having
this particular problem relating to inheritance.  I'm very new to XML and
Castor so I'm sure I've done something wrong, but after banging my head
against a wall for 2 days I can't seem to figure out how to fix it.  Any
help you provide will be very much appreciated.

I have two classes: CaseRequest, NMSCaseRequest

NMSCaseRequest extends CaseRequest and adds another attribute.

the xml I am attempting to load into an NMSCaseRequest object looks like
this:

<CaseCreateRequest>
   <Case>
      <ContactRole>TestContactRole</ContactRole>
      <ContactPhone>800-555-1212</ContactPhone>
      <CaseTitle>TestCaseTitle</CaseTitle>
      <CaseType>TestCaseType</CaseType>
      <CaseSubType>TestCaseSubType</CaseSubType>
      <CaseSubTypeDetail>TestCaseSubTypeDetail</CaseSubTypeDetail>
      <CaseOriginator>Joe Schmoe</CaseOriginator>
      <Priority>highest</Priority>
      <Severity>worst</Severity>
      <Escalation>none</Escalation>
      <Status>Working</Status>
      <Notes>This problem won't go away.</Notes>
      <DispatchQueue>TestDispatchQueue</DispatchQueue>
      <TicketNumber>1013</TicketNumber>

      <Site>
         <ReportingSite>Broomfield, CO</ReportingSite>
      </Site>

   </Case>
</CaseCreateRequest>
===============================================================
My mapping file looks like this... some of the details are omitted in the
interest
of a shorter e-mail.

   <class name="level3.clarify.api.ClarifyCaseRequest">
      <map-to xml="Case"/>

      <field name="caseOriginator" 
             type="string"
             required="true"
             get-method="getCaseOriginator"
             set-method="setCaseOriginator">
         <bind-xml name="CaseOriginator" node="attribute"/>
      </field>
      ...
      ... (other fields listed of course)
      ...
   </class>
   <class name="level3.clarify.api.NMSCaseCreateRequest"
          extends="level3.clarify.api.ClarifyCaseRequest">
      <map-to xml="CaseCreateRequest"/> 

      <field name="_reportingSite"
             type="string"
             get-method="getReportingSite"
             set-method="setReportingSite">
         <bind-xml name="ReportingSite" node="attribute"/>
      </field>

    </class>
<mapping>

-===========================================================================
=
When I try to test this I get the error: unable to find FieldDescriptor for
'Case' in ClassDescriptor of CaseCreateRequest

This is true. The NMSCaseCreateRequest extends the ClarifyCaseRequest object
so no reference is held by it.  How do I adjust my map file so this error
will go away?  

Thanks for your time.

Regards,
Liz

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

Reply via email to