从 wsdl 生成 java 和 xsd 错误
Generating java from wsdl and xsd error
我是 wsdl/xsd 的初学者,尝试用以下两个生成 Java 类
文件
我从 wsdl2java 收到一些错误,包括 wsdl 文件未定义任何服务,并且无法找到 xsd 文件中的元素。
有人知道问题出在哪里吗?
ChipDataJob.xsd
<?xml version="1.0" encoding="ISO-8859-1" ?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:tns="http://contmgmt.ecm.omega/WorkspaceManager/ChipDataJob"
targetNamespace="http://contmgmt.ecm.omega/WorkspaceManager/ChipDataJob"
elementFormDefault="qualified" attributeFormDefault="qualified">
<xs:element name="dataChipperJob" type="tns:ChipJob"></xs:element>
<xs:element name="dataChipperResponse" type="xs:long"></xs:element>
<xs:element name="cancelResponse" type="xs:boolean"></xs:element>
<xs:complexType name="ChipJob">
<xs:sequence>
<xs:element name="outputFilename" type="xs:string">
</xs:element>
<xs:element name="uuidDataObjects">
<xs:simpleType>
<xs:list itemType="xs:string" />
</xs:simpleType>
</xs:element>
<xs:element name="parameters" type="tns:ChipParameters"></xs:element>
</xs:sequence>
</xs:complexType>
<xs:complexType name="ChipParameters">
<xs:all>
<xs:element name="chipStartTime" type="xs:double">
</xs:element>
<xs:element name="chipEndTime" type="xs:double">
</xs:element>
<xs:element name="fillDuration" type="xs:float">
</xs:element>
<xs:element name="GapFillMethod">
<xs:simpleType final="restriction">
<xs:restriction base="xs:string">
<xs:enumeration value="NONE" />
<xs:enumeration value="ZERO_FILL" />
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="StitchMarkerFormat">
<xs:simpleType final="restriction">
<xs:restriction base="xs:string">
<xs:enumeration value="NONE" />
<xs:enumeration value="FILL" />
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="SequenceMethod">
<xs:simpleType final="restriction">
<xs:restriction base="xs:string">
<xs:enumeration value="TIMECODE" />
<xs:enumeration value="MANUAL" />
</xs:restriction>
</xs:simpleType>
</xs:element>
</xs:all>
</xs:complexType>
</xs:schema>
DataChipper.wsdl
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<wsdl:definitions xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:tns="http://contmgmt.ecm.omega/WorkspaceManager/ChipDataJob"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
targetNamespace="http://contmgmt.ecm.omega/WorkspaceManager/ChipDataJob">
<wsdl:types>
<xsd:schema
targetNamespace="http://contmgmt.ecm.omega/WorkspaceManager/ChipDataJob"
xmlns:tns="http://contmgmt.ecm.omega/WorkspaceManager/ChipDataJob"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
elementFormDefault="qualified"
attributeFormDefault="qualified">
<xsd:include schemaLocation="ChipDataJob.xsd" />
</xsd:schema>
</wsdl:types>
<!-- Chip Message -->
<wsdl:message name="dataChipperJob">
<wsdl:part name="job" element="tns:ChipJob" />
</wsdl:message>
<wsdl:message name="dataChipperResponse">
<wsdl:part name="taskId" element="xs:long" />
</wsdl:message>
<wsdl:message name="cancelResponse">
<wsdl:part name="cancelSuccess" element="xs:boolean" />
</wsdl:message>
<wsdl:portType name="DataChipperServicePort">
<wsdl:operation name="submitRequest">
<wsdl:input message="tns:dataChipperJob"/>
<wsdl:output message="tns:dataChipperResponse"/>
</wsdl:operation>
<wsdl:operation name="cancelRequest">
<wsdl:input message="tns:dataChipperResponse"/>
<wsdl:output message="tns:cancelResponse"/>
</wsdl:operation>
</wsdl:portType>
</wsdl:definitions>
这是我发现的 wsdl 错误。
<wsdl:message name="dataChipperJob">
<wsdl:part name="job" element="tns:ChipJob" />
</wsdl:message>
<wsdl:message name="dataChipperResponse">
<wsdl:part name="taskId" element="xs:long" />
</wsdl:message>
<wsdl:message name="cancelResponse">
<wsdl:part name="cancelSuccess" element="xs:boolean" />
</wsdl:message>
元素标签指的是元素类型而不是元素本身
这些应该改为
<wsdl:message name="dataChipperJob">
<wsdl:part name="job" element="tns:dataChipperJob" />
</wsdl:message>
<wsdl:message name="dataChipperResponse">
<wsdl:part name="taskId" element="tns:dataChipperResponse" />
</wsdl:message>
<wsdl:message name="cancelResponse">
<wsdl:part name="cancelSuccess" element="tns:cancelResponse" />
</wsdl:message>
wsdl 还应该定义绑定和服务。
我是 wsdl/xsd 的初学者,尝试用以下两个生成 Java 类 文件
我从 wsdl2java 收到一些错误,包括 wsdl 文件未定义任何服务,并且无法找到 xsd 文件中的元素。
有人知道问题出在哪里吗?
ChipDataJob.xsd
<?xml version="1.0" encoding="ISO-8859-1" ?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:tns="http://contmgmt.ecm.omega/WorkspaceManager/ChipDataJob"
targetNamespace="http://contmgmt.ecm.omega/WorkspaceManager/ChipDataJob"
elementFormDefault="qualified" attributeFormDefault="qualified">
<xs:element name="dataChipperJob" type="tns:ChipJob"></xs:element>
<xs:element name="dataChipperResponse" type="xs:long"></xs:element>
<xs:element name="cancelResponse" type="xs:boolean"></xs:element>
<xs:complexType name="ChipJob">
<xs:sequence>
<xs:element name="outputFilename" type="xs:string">
</xs:element>
<xs:element name="uuidDataObjects">
<xs:simpleType>
<xs:list itemType="xs:string" />
</xs:simpleType>
</xs:element>
<xs:element name="parameters" type="tns:ChipParameters"></xs:element>
</xs:sequence>
</xs:complexType>
<xs:complexType name="ChipParameters">
<xs:all>
<xs:element name="chipStartTime" type="xs:double">
</xs:element>
<xs:element name="chipEndTime" type="xs:double">
</xs:element>
<xs:element name="fillDuration" type="xs:float">
</xs:element>
<xs:element name="GapFillMethod">
<xs:simpleType final="restriction">
<xs:restriction base="xs:string">
<xs:enumeration value="NONE" />
<xs:enumeration value="ZERO_FILL" />
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="StitchMarkerFormat">
<xs:simpleType final="restriction">
<xs:restriction base="xs:string">
<xs:enumeration value="NONE" />
<xs:enumeration value="FILL" />
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="SequenceMethod">
<xs:simpleType final="restriction">
<xs:restriction base="xs:string">
<xs:enumeration value="TIMECODE" />
<xs:enumeration value="MANUAL" />
</xs:restriction>
</xs:simpleType>
</xs:element>
</xs:all>
</xs:complexType>
</xs:schema>
DataChipper.wsdl
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<wsdl:definitions xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:tns="http://contmgmt.ecm.omega/WorkspaceManager/ChipDataJob"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
targetNamespace="http://contmgmt.ecm.omega/WorkspaceManager/ChipDataJob">
<wsdl:types>
<xsd:schema
targetNamespace="http://contmgmt.ecm.omega/WorkspaceManager/ChipDataJob"
xmlns:tns="http://contmgmt.ecm.omega/WorkspaceManager/ChipDataJob"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
elementFormDefault="qualified"
attributeFormDefault="qualified">
<xsd:include schemaLocation="ChipDataJob.xsd" />
</xsd:schema>
</wsdl:types>
<!-- Chip Message -->
<wsdl:message name="dataChipperJob">
<wsdl:part name="job" element="tns:ChipJob" />
</wsdl:message>
<wsdl:message name="dataChipperResponse">
<wsdl:part name="taskId" element="xs:long" />
</wsdl:message>
<wsdl:message name="cancelResponse">
<wsdl:part name="cancelSuccess" element="xs:boolean" />
</wsdl:message>
<wsdl:portType name="DataChipperServicePort">
<wsdl:operation name="submitRequest">
<wsdl:input message="tns:dataChipperJob"/>
<wsdl:output message="tns:dataChipperResponse"/>
</wsdl:operation>
<wsdl:operation name="cancelRequest">
<wsdl:input message="tns:dataChipperResponse"/>
<wsdl:output message="tns:cancelResponse"/>
</wsdl:operation>
</wsdl:portType>
</wsdl:definitions>
这是我发现的 wsdl 错误。
<wsdl:message name="dataChipperJob">
<wsdl:part name="job" element="tns:ChipJob" />
</wsdl:message>
<wsdl:message name="dataChipperResponse">
<wsdl:part name="taskId" element="xs:long" />
</wsdl:message>
<wsdl:message name="cancelResponse">
<wsdl:part name="cancelSuccess" element="xs:boolean" />
</wsdl:message>
元素标签指的是元素类型而不是元素本身 这些应该改为
<wsdl:message name="dataChipperJob">
<wsdl:part name="job" element="tns:dataChipperJob" />
</wsdl:message>
<wsdl:message name="dataChipperResponse">
<wsdl:part name="taskId" element="tns:dataChipperResponse" />
</wsdl:message>
<wsdl:message name="cancelResponse">
<wsdl:part name="cancelSuccess" element="tns:cancelResponse" />
</wsdl:message>
wsdl 还应该定义绑定和服务。