Hi,

I'm trying to set an element value that is a complex type, but I had to add an attribute to the element so I can no longer call it like this:

book.setTitle(rs.getString("title"));

I now get this message:

The method setTitle(TitleType) in the type Book is
 not applicable for the arguments (String)

So, how do I convert the String to the TitleType object?

My XSD looks something like this:

        <xs:element type="tns:titleType" name="title"/>


        <xs:complexType name="titleType">
        <xs:simpleContent>
                <xs:extension base="xs:string">
                        <xs:attribute type="xs:boolean" name="lost"/>
                </xs:extension>
        </xs:simpleContent>
        </xs:complexType>


Thanks,
Steven

Reply via email to