Java 无法解析符号 xsd 文件
Java cannot resolve symbol xsd file
我有以下 .xsd 文件:
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:tns="http://soapexercise.plonca.sri.pja.edu/employees"
targetNameSpace="http://soapexercise.plonca.sri.pja.edu/employees"
elementFormDefault="qualified">
<xs:complexType name="employeeDto">
<xs:sequence>
<xs:element name="id" type="xs:decimal" minOccurs="0"/>
<xs:element name="firstName" type="xs:string"/>
<xs:element name="lastName" type="xs:string"/>
<xs:element name="birthDate" type="xs:date"/>
<xs:element name="job" type="xs:string"/>
</xs:sequence>
</xs:complexType>
<xs:element name="getEmployeesResponse">
<xs:complexType>
<xs:sequence>
<xs:element name="employees" type="tns:employeeDto" maxOccurs="unbounded"/>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>
IntelliJ 说 tns:employeeDto
无法解析。如果我在文件上尝试 运行 jaxb2:xjc
插件,我会得到以下堆栈跟踪:https://pastebin.com/CfseWE23。我应该怎么做才能使 tns:employeeDto
得到解决?
targetNameSpace
应该是 targetNamespace
。属性大小写错误,无效。
我有以下 .xsd 文件:
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:tns="http://soapexercise.plonca.sri.pja.edu/employees"
targetNameSpace="http://soapexercise.plonca.sri.pja.edu/employees"
elementFormDefault="qualified">
<xs:complexType name="employeeDto">
<xs:sequence>
<xs:element name="id" type="xs:decimal" minOccurs="0"/>
<xs:element name="firstName" type="xs:string"/>
<xs:element name="lastName" type="xs:string"/>
<xs:element name="birthDate" type="xs:date"/>
<xs:element name="job" type="xs:string"/>
</xs:sequence>
</xs:complexType>
<xs:element name="getEmployeesResponse">
<xs:complexType>
<xs:sequence>
<xs:element name="employees" type="tns:employeeDto" maxOccurs="unbounded"/>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>
IntelliJ 说 tns:employeeDto
无法解析。如果我在文件上尝试 运行 jaxb2:xjc
插件,我会得到以下堆栈跟踪:https://pastebin.com/CfseWE23。我应该怎么做才能使 tns:employeeDto
得到解决?
targetNameSpace
应该是 targetNamespace
。属性大小写错误,无效。