1
내가 생성 한 Java 클래스를 정렬 화 실종 네임 스페이스와 내가 접두사 네임 스페이스 여기JAXB의 XSD에서
와 JAXB 클래스에서 마샬링 할 내가
<?xml version="1.0" encoding="UTF-8"?>
<schema xmlns="http://www.w3.org/2001/XMLSchema"
targetNamespace="http://www.example.org/event"
xmlns:tns="http://www.example.org/event"
elementFormDefault="qualified">
<element name="Events" type="tns:EventsType"></element>
<complexType name="EventsType">
<sequence>
<element name="Event" type="tns:inputFlowEventType" maxOccurs="unbounded" minOccurs="1"></element>
</sequence></complexType>
<complexType name="inputFlowEventType">
<sequence>
<element name="DISTRIBUTOR_ID" minOccurs="1" maxOccurs="1">
<simpleType><restriction base="string"><maxLength value="17"></maxLength></restriction></simpleType>
</element>
</sequence>
</complexType>
</schema>
을 가지고있는 내가이
이 대신<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <tns:Events xmlns="http://www.example.org/event"> <tns:Event><tns:DISTRIBUTOR_ID>6</tns:DISTRIBUTOR_ID></tns:Event></tns:Events>
의
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <Events xmlns="http://www.example.org/event"><Event><DISTRIBUTOR_ID>6</DISTRIBUTOR_ID></Event></Events>
누군가가 무엇이 잘못되었는지 알 수 있습니까?
감사합니다.
먼저, 당신은 당신이 오히려 기대한다 마지막 부분에 오타가합니다 (XMLNS주의 : TNS = ''섹션) : xml version = "1.0"encoding = "UTF-8"standalone = "yes"?> 6 tns : DISTRIBUTOR_ID> –