I have a very large and complex XSD for a SOAP service which I do not control. There are several elements which always contain string data which are not typed. Typically these are very deeply-nested elements.
For example
...
<xs:complexType>
<xs:sequence>
<xs:element name="foo"/>
<xs:element name="bar"/>
</xs:sequence>
</xs:complexType>
...
Is there a way to tell JAXB to always bind untyped elements (such as foo and bar above) to java.lang.String?
I understand that I can call out these exceptions individually using an XPath query string, but is there a one liner for this?
In an external binding file an XPath expression like
would match any such element (assuming XJC has full XPath support rather than just a subset of the language).