daan wrote:
> 
> I checked in bugzilla. The only related issue is supposed to be fixed
> in 0.9.3.19. So I guess I'll be isolating the problem and adding an
> entry. Or two:
> 
> 1. the marshal does not add the correct xsi:type value
>        is xml-name without namespace at all
>        should be java:package.to.javaClassName

It only uses the "java:" hack if it has to, otherwise it uses the XML
Schema type name. Keep in mind that "java:" is a castor specific hack.

--K

> 
> 2. When I fix the contents of xml, the unmarshaller doesn't find the
> class that the marshaller just used.
> 
> Maybe I am mistaking on what should be in the xsi:type attribute at
> all.
> 
> >>>>> "I" ==   <[EMAIL PROTECTED]> writes:
> 
>     > Date: Wed, 9 Oct 2002 17:14:35 +0200
>     > From: <[EMAIL PROTECTED]>
>     > To: [EMAIL PROTECTED]
>     > Subject: Re: [castor-dev] xsi:type not unmarshaled proper
> 
>     > I have a +- 4 weeks old cvs version in here.
>     > This helps. now i am getting a class not found exception. Both with the way 
>you describe and with the full path name. And the other side of it is that it does 
>not marshal it in that way.
> 
>     >> -----Original Message-----
>     >> From: Arnaud Blandin [mailto:[EMAIL PROTECTED]]
>     >> Sent: Wednesday, October 09, 2002 4:58 PM
>     >> To: [EMAIL PROTECTED]
>     >> Subject: Re: [castor-dev] xsi:type not unmarshaled proper
>     >>
>     >>
>     >> Hi Daan,
>     >>
>     >> Which version are you using? Have you tried to put a java
>     >> prefix to your
>     >> class name in the xsi:type information?
>     >> (xsi:type="java:genericOperation")
>     >>
>     >> Arnaud
>     >>
>     >> > -----Original Message-----
>     >> > From: [EMAIL PROTECTED]
>     >> > [mailto:[EMAIL PROTECTED]]
>     >> > Sent: Wednesday, October 09, 2002 3:06 PM
>     >> > To: [EMAIL PROTECTED]
>     >> > Subject: [castor-dev] xsi:type not unmarshaled proper
>     >> >
>     >> > this is an old issue I think.
>     >> > Please bear my handicap with me; I have only email at my workstation
>     >> > and no http connection to the outside world
>     >> >
>     >> > I have a class Operation which is generated from a complexType
>     >> > operation. It is marshaled as GenericOperation, which is an
>     >> > extension of operation. see schema fragments below.
>     >> >
>     >> > this is the marshaled fragment:
>     >> >         <operation name="LOS" xsi:type="genericOperation"
>     >> > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";>
>     >> >             <site minScale="1.0E-10" maxScale="1.0">
>     >> >                 <ns7:position lon="-26.68666666666667"
>     >> >                     lat="58.76666666666667"
>     >> > xmlns:ns7="itemlib.xsd"/>
>     >> >             </site>
>     >> >         </operation>
>     >> >
>     >> > and this is what happens if I unmarshal it:
>     >> > org.xml.sax.SAXException: unable to find FieldDescriptor for 'site'
>     >> > in ClassDescriptor of Operation
>     >> >         at
>     >> > org.exolab.castor.xml.UnmarshalHandler.startElement(UnmarshalHandler
>     >> > .java:1021)
>     >> >         at
>     >> > org.apache.xerces.parsers.SAXParser.startElement(SAXParser.java:1340
>     >> > )
>     >> >         at
>     >> > org.apache.xerces.validators.common.XMLValidator.callStartElement(XM
>     >> > LValidator.java:1197)
>     >> >         at
>     >> > org.apache.xerces.framework.XMLDocumentScanner.scanElement(XMLDocume
>     >> > ntScanner.java:1862)
>     >> >         at
>     >> > org.apache.xerces.framework.XMLDocumentScanner$ContentDispatcher.dis
>     >> > patch(XMLDocumentScanner.java:1238)
>     >> >         at
>     >> > org.apache.xerces.framework.XMLDocumentScanner.parseSome(XMLDocument
>     >> > Scanner.java:381)
>     >> >         at
>     >> > org.apache.xerces.framework.XMLParser.parse(XMLParser.java:1035)
>     >> >         at
>     >> > org.exolab.castor.xml.Unmarshaller.unmarshal(Unmarshaller.java:485)
>     >> >         at
>     >> > org.exolab.castor.xml.Unmarshaller.unmarshal(Unmarshaller.java:417)
>     >> >         at
>     >> > org.exolab.castor.xml.Unmarshaller.unmarshal(Unmarshaller.java:557)
>     >> >
>     >> > more followed
>     >> > I tried to replace "genericOperation" with
>     >> > "my.package.for.GenericOperation" in the generated document
>     >> > instance. no show.
>     >> > Is this issue resolved? Is it new/newly noticed? Is there a rogue
>     >> > fix? Is it resolved in cvs?
>     >> >
>     >> > here are the schema fragments:
>     >> >
>     >> >   <xsd:complexType name="operation">
>     >> >     <xsd:attribute name="name" type="xsd:string"><!--
>     >> > default="operation"-->
>     >> >   </xsd:complexType>
>     >> >
>     >> >   <xsd:complexType name="genericOperation">
>     >> >     <xsd:complexContent>
>     >> >       <xsd:extension base="sc:operation">
>     >> >         <xsd:sequence>
>     >> >           <xsd:element name="site" type="lib:radar" minOccurs="1"
>     >> > maxOccurs="1" >
>     >> >           </xsd:element>
>     >> >         </xsd:sequence>
>     >> >       </xsd:extension>
>     >> >     </xsd:complexContent>
>     >> >   </xsd:complexType>
>     >> >
>     >> > my gratitude will be,
>     >> >
>     >> > -----------------------------------------------------------
>     >> > If you wish to unsubscribe from this mailing, send mail to
>     >> > [EMAIL PROTECTED] with a subject of:
>     >> >        unsubscribe castor-dev
>     >>
>     >> -----------------------------------------------------------
>     >> If you wish to unsubscribe from this mailing, send mail to
>     >> [EMAIL PROTECTED] with a subject of:
>     >> unsubscribe castor-dev
>     >>
>     >>
> 
>     > -----------------------------------------------------------
>     > If you wish to unsubscribe from this mailing, send mail to
>     > [EMAIL PROTECTED] with a subject of:
>     >   unsubscribe castor-dev
> :wq!
> 
> Daan Hoogland                      Unix consultants      v   v
> [EMAIL PROTECTED]                     OO developers       \ /
>                                  ###   ##    ##  #     >---X---<
> http://snow.nl                  #     #  #  #  # #  #  #  / \
> Snow B.V.                        ##   #  #  #  # #  #  # ^   ^
> Tel. (+31)30-6051501               #  #  #  #  # #  #  #
> Fax. (+31)30-6037445            ###   #  #   ##   ## ##
> 
> -----------------------------------------------------------
> If you wish to unsubscribe from this mailing, send mail to
> [EMAIL PROTECTED] with a subject of:
>         unsubscribe castor-dev

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

Reply via email to