0

jaxb unmarshals

    <xs:complexType name="Test" mixed="true">
    <xs:sequence>
         <xs:any namespace="http://www.w3.org/1999/xhtml" minOccurs="0"/>
    </xs:sequence>
    <attributes.../>
    </xs:complexType>

as protected List<Object> content;

My jxb bindings file is :

  <jxb:bindings node="//xs:complexType[@name='Test']">

                <jxb:property>
                <jxb:baseType name="java.lang.String"></jxb:baseType>
                </jxb:property>
        </jxb:bindings>

and this makes the java equivalent as

protected List<String> content;

Is there a way I can get it to be protected String content ?


What kind of TransactionOption are you running your Select query under? Also look in to using NO LOCK in your select query if you are okay to read uncommitted data. Look into this thread Effect of NOLOCK hint in SELECT statements

4

1 回答 1

0

You can extend the generated class as described in this stackoverflow question: How can I extend Java code generated by JAXB, CXF or Hibernate tools? That should give you acces to the protected field

于 2013-03-29T22:23:56.640 回答