Hi all

I am trying to unmarhall this xml to the following class. It does not
work because it is not implementing Serializable and I am also getting
an exception. Client is an existing class and I can change it what's the
best to work around this.

Thanks in advance for any help

mike 

code: 
Client c = (Client)Unmarshaller.unmarshal(Client.class, sr);

xml:
<?xml version="1.0"?>
<client><name>Michael</name><gender>F</gender></client>

class:
public final class Client {

    public static final String _id_ = "IDL:client/Client:1.0";

    public Client() { }

    public String name;
    public String gender;

    public Client(String _name, String _gender) {
        name = _name;
        gender = _gender;
    }
};

exception:
org.xml.sax.SAXException: unable to create XMLClassDescriptor for class:
client.Client
 
org.exolab.castor.xml.UnmarshalHandler.startElement(UnmarshalHandler.java,
Compiled Code)
  org.apache.xerces.parsers.SAXParser.startElement(SAXParser.java,
Compiled Code)
 
org.apache.xerces.validators.common.XMLValidator.callStartElement(XMLValidator.java,
Compiled Code)
 
org.apache.xerces.framework.XMLDocumentScanner$ContentDispatcher.dispatch(XMLDocumentScanner.java,
Compiled Code)
 
org.apache.xerces.framework.XMLDocumentScanner.parseSome(XMLDocumentScanner.java,
Compiled Code)
  org.apache.xerces.framework.XMLParser.parse(XMLParser.java:1081)
  org.exolab.castor.xml.Unmarshaller.unmarshal(Unmarshaller.java:338)
  org.exolab.castor.xml.Unmarshaller.unmarshal(Unmarshaller.java:270)
  org.exolab.castor.xml.Unmarshaller.unmarshal(Unmarshaller.java:391)

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

Reply via email to