가장 많이 묻는 면접 질문과 답변 & 온라인 테스트
면접 준비, 온라인 테스트, 튜토리얼, 라이브 연습을 위한 학습 플랫폼

집중 학습 경로, 모의고사, 면접 준비 콘텐츠로 실력을 키우세요.

WithoutBook은 주제별 면접 질문, 온라인 연습 테스트, 튜토리얼, 비교 가이드를 하나의 반응형 학습 공간으로 제공합니다.

Prepare Interview

JAXB 면접 질문과 답변

Question: How to generate Java from XML Schema. Please show the example.
Answer: • From command-line
– Windows: %JAXB_HOME%binxjc cars.xsd
– UNIX: %JAXB_HOME%/bin/xjc.sh cars.xsd
– these write generated files to current directory
• From Ant
<java jar="${env.JAXB_HOME}/lib/jaxb-xjc.jar" fork="yes">
<arg line="-d ${gen.src.dir} cars.xsd"/>
</java>

Generated Files:

• com/withoutbook/cars directory
– Car.java
• interface representing the “car” complex type
• only describes get and set methods for car properties
– Cars.java
• interface representing “cars” global element
• extends CarsType and javax.xml.bind.Element (just a marker interface)
• describes no additional methods
– CarsType.java
• interface representing anonymous complex type
defined inside the “cars” global element
• provides method to get collection of Car objects (as a java.util.List)
– ObjectFactory.java
• class used to create objects of the above interface types
• extends DefaultJAXBContextImpl which extends JAXBContext
– bgm.ser
• a serialized object of type com.sun.msv.grammar.trex.TREXGrammar
• can’t find any documentation on this - don’t know its purpose
– jaxb.properties
• sets a property that defines the class used to create JAXBContext objects

• com/withoutbook/cars/impl directory
– CarImpl.java
• class that implements Car
• corresponds to the “car” XML Schema complexType
– CarsTypeImpl.java
• class that implements CarType
• corresponds to the XML Schema anonymous type inside the “cars” element
– CarsImpl.java
• class that extends CarsTypeImpl and implements Cars
• corresponds to the “cars” XML Schema element

복습용 저장

이 항목을 북마크하거나, 어렵게 표시하거나, 복습 세트에 넣을 수 있습니다.

내 학습 라이브러리 열기
도움이 되었나요? 아니요

Most helpful rated by users:

Copyright © 2026, WithoutBook.