Hi all,
I want to marshall an interface into DOM document. I've created a mapping file and want to use it in marshalling. While marshalling this interface my maping isn't used.
After some debugging I found that (probably) mapping is known to marshaller but marshaller don't use it because it bases on classes not on interfaces and it can't find proper class descriptor.
Sample:
// Interface
public interface IMapped
{
String getName();
}


//Class
public class Mapped implements IMapped
{
  public String getName()
  {
    return "testMapped";
  }
}

//Mapping
<mapping>
  <class name="IMapped" verify-constructable="false">
   <map-to xml="object"/>
    <field name="name" type="string">
      <bind-xml name="description"/>
    </field>
  </class>
</mapping>

After marshalling I get

<mapped><name>testMapped</name></mapped>

which is default mapping.

Is it possible to force Castor to use interface names? Or maybe my investigation failed and I'm doing something wrong...

Help needed,
  Pawel

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




Reply via email to