Today I send someone a xsd file to generate java classes for me.
He said to me that nothing is downloaded from the internet during the XML binding process.
I still can’t believe that, because if I’m opening the .xsd file, there is not much in it.
For example:
<xs:element name="Country">
<xs:complexType>
<xs:sequence>
<xs:element name="Code" type="xs:string" minOccurs="1" maxOccurs="1"/>
<xs:element name="Name" type="xs:string" minOccurs="1" maxOccurs="1"/>
</xs:sequence>
</xs:complexType>
</xs:element>
Is generating a java class named CountryDocument.java and is 179 lines of code long.
How is this process working?
I still believe that internet is used during the process, because there are openAPI urls in the xsd file.
Someone is likely using JAXB or a similar framework:
Source: https://en.wikipedia.org/wiki/Java_Architecture_for_XML_Binding