Hi,
I want to customize the wsdl generated with aegis binding with annotations.
I have a customType to map a custom Date classe to an xsd:date element.
With my code, I do not generate complexe types for my custom date type but
in my main object, the type of the element is not "xsd:date" but
"ns2:MyDate".
My POJO is something like :
@XmlType(name = "Foo")
public class Foo
{
@XmlElement(type = MyDateType.class)
public MyDate getDate()
{
return myDate;
}
}
and my custom type is :
public class MyDateType extends Type
{
public MyDateType()
{
setTypeClass(MyDate.class);
setSchemaType(new QName("xsd:date"));
}
@Override
public Object readObject(MessageReader aReader, MessageContext aContext)
throws XFireFault
{
...
}
@Override
public void writeObject(Object aObject, MessageWriter aWriter,
MessageContext aContext) throws XFireFault
{
...
}
}
and the generated wsdl :
<xsd:complexType name="Foo">
<xsd:sequence>
<xsd:element minOccurs="0" name="date" nillable="true" type="ns2:MyDate"/>
</xsd:sequence>
<xsd:anyAttribute/>
</xsd:complexType>
I have tried to add a TypeRegistrar like in the doc : is it necessary
with annotations ? But also with this registrar the generated wsdl is
not
correct : is there something more I have to do to generate the right
type for my date in my wsdl file ?
Thanx
Seb