Hi Keith,

the sources are all compiled, so that might not be the problem, in my opinion it is a 
problem uf the generated classes. I attached the files in this email (Schema, 
Instance, Binding).

Or could it be a problem calling the static unmarshall method?

-->E_TX_E xmlife = (E_TX_E) E_TX_E.unmarshal(reader);

I use Castor in debug mode a it displays the message:
debug: *static* unmarshal method called, this will ignore any mapping files or changes 
made to an Unmarshaller instance.

And here is the full PrintStackTrace:
debug: *static* unmarshal method called, this will ignore any mapping files or changes 
made to an Unmarshaller instance.
#startElement: n:TX
#characters: 
        
#startElement: n:AuthRequest
org.xml.sax.SAXException: unable to find FieldDescriptor for 'AuthRequest' in 
ClassDescriptor of TX
        at 
org.exolab.castor.xml.UnmarshalHandler.startElement(UnmarshalHandler.java:1791)
        at 
org.exolab.castor.xml.UnmarshalHandler.startElement(UnmarshalHandler.java:1292)
        at 
org.apache.xerces.parsers.AbstractSAXParser.startElement(AbstractSAXParser.java:446)
        at 
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanStartElement(XMLDocumentFragmentScannerImpl.java:823)
        at 
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(XMLDocumentFragmentScannerImpl.java:1543)
        at 
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:348)
        at org.apache.xerces.parsers.DTDConfiguration.parse(DTDConfiguration.java:539)
        at org.apache.xerces.parsers.DTDConfiguration.parse(DTDConfiguration.java:595)
        at org.apache.xerces.parsers.XMLParser.parse(XMLParser.java:152)
        at 
org.apache.xerces.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1125)
        at org.exolab.castor.xml.Unmarshaller.unmarshal(Unmarshaller.java:605)
        at org.exolab.castor.xml.Unmarshaller.unmarshal(Unmarshaller.java:513)
        at org.exolab.castor.xml.Unmarshaller.unmarshal(Unmarshaller.java:691)
        at tx.E_TX_E.unmarshal(E_TX_E.java:272)
        at main.<init>(main.java:45)
        at main.main(main.java:16)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:324)
        at com.intellij.rt.execution.application.AppMain.main(Unknown Source)
Process terminated with exit code 0



-----------------------

any ideas?

regards,

Andy

The Problem is that this is a simplified version of a part of the ACORD XMLife 
Specification which I try to use. If I try to use the complete XMLife 2.9.90 Schema 
file I get no errors during code generation or at compiletime, but if I try to 
unmarshall a XML instance I get a StackOverflow at the startElement Method in the 
UnmarshallHandler, there's a recursion and he always calls this method with the same 
parameters, he only comes to the first node under the rootNode. Any idea, or tip were 
I could find problem or a solution/workaround? Because it's very important for me to 
unmarshall these xmlife files? Thanx
__________________________________________________________________________
Die sicherste Form der Kommunikation: E-Mails verschluesseln, Spam-Filter,
Adressverifizierung, digitale Unterschrift: http://freemail.web.de

Attachment: TX.xsd
Description: Binary data

<?xml version="1.0"?>
<!-- Binding information for Schemas -->
<!-- This binding maps the various complexTypes, -->
<!-- elements etc for the java classes.-->
<binding>
    <namingXML>
	   <complexTypeName>
	      <prefix>CT_</prefix>
	      <suffix>_CT</suffix>
	   </complexTypeName>
	   <elementName>
	   	      <prefix>E_</prefix>
	   	      <suffix>_E</suffix>
	   </elementName>
	   <modelGroupName>
	   	   	      <prefix>MG_</prefix>
	   	   	      <suffix>_MG</suffix>
	   </modelGroupName>
	</namingXML>
</binding>
<?xml version="1.0" encoding="UTF-8"?>
<n:TX xmlns:n="http://foo.org/Standards/TX/2"; xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; xsi:schemaLocation="http://foo.org/Standards/TX/2
C:\xsdR\acord_patched\TX.xsd" Version="String">
	<n:AuthRequest>
		<n:LoginName>String</n:LoginName>
		<n:Pwd>
			<n:CType>String</n:CType>
		</n:Pwd>
		<n:Domain>String</n:Domain>
		<n:Date>1967-08-13</n:Date>
		<n:Time>String</n:Time>
	</n:AuthRequest>
	<n:TXRequest id="ID000000" PrimaryObjectID="ID000000">
		<n:Trans>String</n:Trans>
	</n:TXRequest>
</n:TX>

Reply via email to