I am trying to
unmarshall an XML file by using a mapping file. I don't use any castor generated
class descriptors.
In fact the input
XML is the XML generated by the marshaller using the same mapping
file!!
Please
help.
-Bhaskar
Getting
this error:
org.xml.sax.SAXException: unable to find FieldDescriptor for
'business-relationship' in ClassDescriptor of organization
at org.exolab.castor.xml.UnmarshalHandler.startElement(UnmarshalHandler.java:1224)
at org.apache.xerces.parsers.SAXParser.startElement(SAXParser.java:1340)
at org.exolab.castor.xml.UnmarshalHandler.startElement(UnmarshalHandler.java:1224)
at org.apache.xerces.parsers.SAXParser.startElement(SAXParser.java:1340)
Mapping
file extract:
<class name="com.mhub.core.busobj.Organization"
auto-complete="false">
<description>Default mapping for class com.mhub.core.busobj.Organization</description>
<map-to xml="organization" ns-uri="http://www.mortgagehub.com/schemas/core" ns-prefix="core"/>
<field name="businessRelationship" type="com.mhub.core.busobj.BusinessRelationship" required="false" direct="false" transient="false">
<bind-xml name="business-relationship" node="element"/>
</field>
</class>
<description>Default mapping for class com.mhub.core.busobj.Organization</description>
<map-to xml="organization" ns-uri="http://www.mortgagehub.com/schemas/core" ns-prefix="core"/>
<field name="businessRelationship" type="com.mhub.core.busobj.BusinessRelationship" required="false" direct="false" transient="false">
<bind-xml name="business-relationship" node="element"/>
</field>
</class>
<class
name="com.mhub.core.busobj.BusinessRelationship"
auto-complete="false">
<description>Default mapping for class com.mhub.core.busobj.BusinessRelationship</description>
<map-to xml="business-relationship" ns-uri="http://www.mortgagehub.com/schemas/core" ns-prefix="core"/>
<field name="id" type="long" required="false" direct="false" transient="false">
<bind-xml name="id" node="attribute"/>
</field>
</class>
<description>Default mapping for class com.mhub.core.busobj.BusinessRelationship</description>
<map-to xml="business-relationship" ns-uri="http://www.mortgagehub.com/schemas/core" ns-prefix="core"/>
<field name="id" type="long" required="false" direct="false" transient="false">
<bind-xml name="id" node="attribute"/>
</field>
</class>
Input
XML:
<trans:mhub-response-transaction xmlns:trans="http://www.mortgagehub.com/schemas/trans"><trans:loan-transaction
transaction-type-code="0"><trans:loan id="-1" loan-amount="0.00"
cltv="0.0" lien-position="0" other-liens="0.0" ltv="0.0" requested-rate="0.0"
term="0" amort-term="0" indicator-fico="0" frontend-ratio="0.0"
backend-ratio="0.0" draw-amount="0.0" requested-margin="0.0" due-months="0"
max-qualifying-rate="0.0"
max-cash-out="0.0"><min></min><loan-number></loan-number><seller-loan-number></seller-loan-number><trans:property
year-acquired="0" market-value="0.0" appraised-value="0.0" num-of-stories="0"
num-of-units="0" sales-price="0.0"><core:address id="-1"
communication-id="0" xmlns:core="http://www.mortgagehub.com/schemas/core"><zip-code></zip-code><state></state><zip-ext></zip-ext><street2></street2><street1></street1><unit-number></unit-number><county></county><city></city></core:address><trans:property-type
id="-1"/></trans:property><core:organization id="-1"
owner-org-id="-1" xmlns:core="http://www.mortgagehub.com/schemas/core"><core:person
id="-1" org-id="-1" age="-1"><ssn></ssn><core:communication
id="-1"><core:address id="-1"
communication-id="0"><zip-code></zip-code><state></state><zip-ext></zip-ext><street2></street2><street1></street1><unit-number></unit-number><county></county><city></city></core:address><core:telephone
id="-1" communication-id="-1"/><core:telephone id="-1"
communication-id="-1"/></core:communication><middle-name></middle-name><salutation></salutation><sex></sex><first-name></first-name><suffix></suffix><last-name></last-name></core:person><core:communication
id="-1"><core:address id="-1"
communication-id="0"><zip-code></zip-code><state></state><zip-ext></zip-ext><street2></street2><street1></street1><unit-number></unit-number><county></county><city></city></core:address><core:telephone
id="-1" communication-id="-1"/><core:telephone id="-1"
communication-id="-1"/></core:communication><core:business-relationship
id="-1" child-id="-1" parent-id="-1"
no-cascade-flag="0"><core:organization-roles id="-1" org-id="-1"
br-id="-1" role-id="-1"/></core:business-relationship><core:region
id="-1"/></core:organization><username></username><cross-ref-loan-number></cross-ref-loan-number><amort-type></amort-type><loan-purpose></loan-purpose><manual-review-indicator></manual-review-indicator><master-commitment-number></master-commitment-number><commitment-number></commitment-number><doc-type></doc-type><AUDecision></AUDecision><piggyback-indicator></piggyback-indicator><investor-code></investor-code><special-program></special-program><trans:price
id="-1" base-rate="0.0" final-rate="0.0" base-price="0.0" final-price="0.0"
base-margin="0.0" final-margin="0.0" srp="0.0" lock-period="0"
lock-extend-days="0"/><inv-code-man-review-ind></inv-code-man-review-ind><trans:product
id="-1" min-term="-1" max-term="-1" lien-position="-1"
lender-id="-1"/><teaser-code></teaser-code><eligibility-decision></eligibility-decision><trans:borrowers
primary-borrower="true" id="-1" us-citizen="false" self-employed="false"
primary-earner="false" first-time-homeowner="false" loan-id="0"
monthly-income="0.0"><core:person id="-1" org-id="-1" age="-1"
xmlns:core="http://www.mortgagehub.com/schemas/core"><ssn></ssn><core:communication
id="-1"><core:address id="-1"
communication-id="0"><zip-code></zip-code><state></state><zip-ext></zip-ext><street2></street2><street1></street1><unit-number></unit-number><county></county><city></city></core:address><core:telephone
id="-1" communication-id="-1"/><core:telephone id="-1"
communication-id="-1"/></core:communication><middle-name></middle-name><salutation></salutation><sex></sex><first-name></first-name><suffix></suffix><last-name></last-name></core:person><marital-status></marital-status><race></race></trans:borrowers><trans:borrowers
primary-borrower="false" id="-1" us-citizen="false" self-employed="false"
primary-earner="false" first-time-homeowner="false" loan-id="0"
monthly-income="0.0"><core:person id="-1" org-id="-1" age="-1"
xmlns:core="http://www.mortgagehub.com/schemas/core"><ssn></ssn><core:communication
id="-1"><core:address id="-1"
communication-id="0"><zip-code></zip-code><state></state><zip-ext></zip-ext><street2></street2><street1></street1><unit-number></unit-number><county></county><city></city></core:address><core:telephone
id="-1" communication-id="-1"/><core:telephone id="-1"
communication-id="-1"/></core:communication><middle-name></middle-name><salutation></salutation><sex></sex><first-name></first-name><suffix></suffix><last-name></last-name></core:person><marital-status></marital-status><race></race></trans:borrowers><loan-file></loan-file><bank-eligibility></bank-eligibility><trans:loan-status
id="-1"
loan-id="0"/><escrows></escrows><loan-type></loan-type><prepayment-penalty></prepayment-penalty><mortgage-history></mortgage-history><buydown-option></buydown-option><lender-underwriter-name></lender-underwriter-name><lender-underwriter-phone></lender-underwriter-phone><lender-underwriter-email></lender-underwriter-email><casefile-number></casefile-number></trans:loan></trans:loan-transaction><trans:response-header><trans:response-status/><response-type>abc</response-type></trans:response-header></trans:mhub-response-transaction>
-----------------------------------------------------------
If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
unsubscribe castor-user
