我正在将我的项目从IBM WebSphere迁移到Tomcat 8.0,我遇到了从WSDL生成客户端的问题。我尝试过使用 WSDL2Java,但这个 WSDL 文件有多个 xsd 文件作为导入。我无法从这个 WSDL 生成所有 java 文件。任何帮助将不胜感激
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<!-- Generated by JAX-WS RI at http://jax-ws.dev.java.net. RI's version is JAX-WS RI 2.1.4-b01-. -->
<definitions targetNamespace="http://example.com/" name="WS_50" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:tns="http://example.com/" xmlns="http://schemas.xmlsoap.org/wsdl/">
<types>
<xsd:schema>
<xsd:import namespace="http://example.com" schemaLocation="WS50_schema1.xsd"/>
</xsd:schema>
<xsd:schema>
<xsd:import namespace="http://dummy.com" schemaLocation="WS50_schema2.xsd"/>
</xsd:schema>
<xsd:schema>
<xsd:import namespace="http://dummy123.com" schemaLocation="WS50_schema3.xsd"/>
</xsd:schema>
</types>
<message name="createPart">
<part name="parameters" element="ns1:createPart" xmlns:ns1="http://example.com"/>
</message>
<message name="createPartResponse">
<part name="parameters" element="ns2:createPartResponse" xmlns:ns2="http://example.com"/>
</message>
<message name="getFileList">
<part name="parameters" element="ns3:getFileList" xmlns:ns3="http://example.com"/>
</message>
<message name="getFileListResponse">
<part name="parameters" element="ns4:getFileListResponse" xmlns:ns4="http://example.com"/>
</message>
<message name="getListBasicPart">
<part name="parameters" element="ns5:getListBasicPart" xmlns:ns5="http://example.com"/>
</message>
<message name="getListBasicPartResponse">
<part name="parameters" element="ns6:getListBasicPartResponse" xmlns:ns6="http://example.com"/>
</message>
<message name="getListBasicUser">
<part name="parameters" element="ns7:getListBasicUser" xmlns:ns7="http://example.com"/>
</message>
<message name="getListBasicUserResponse">
<part name="parameters" element="ns8:getListBasicUserResponse" xmlns:ns8="http://example.com"/>
</message>
<message name="getListBasicUserList">
<part name="parameters" element="ns9:getListBasicUserList" xmlns:ns9="http://example.com"/>
</message>
<message name="getListBasicUserListResponse">
<part name="parameters" element="ns10:getListBasicUserListResponse" xmlns:ns10="http://example.com"/>
</message>
<message name="getListDesignControl">
<part name="parameters" element="ns11:getListDesignControl" xmlns:ns11="http://example.com"/>
</message>
<message name="getListDesignControlResponse">
<part name="parameters" element="ns12:getListDesignControlResponse" xmlns:ns12="http://example.com"/>
</message>
<message name="getListGeographicalRestriction">
<part name="parameters" element="ns13:getListGeographicalRestriction" xmlns:ns13="http://example.com"/>
</message>
<message name="getListGeographicalRestrictionResponse">
<part name="parameters" element="ns14:getListGeographicalRestrictionResponse" xmlns:ns14="http://example.com"/>
</message>
<message name="getListLanguageCode">
<part name="parameters" element="ns15:getListLanguageCode" xmlns:ns15="http://example.com"/>
</message>
<message name="getListLanguageCodeResponse">
<part name="parameters" element="ns16:getListLanguageCodeResponse" xmlns:ns16="http://example.com"/>
</message>
<message name="getListMachineCriticalCode">
<part name="parameters" element="ns17:getListMachineCriticalCode" xmlns:ns17="http://example.com"/>
</message>
<message name="getListMachineCriticalCodeResponse">
<part name="parameters" element="ns18:getListMachineCriticalCodeResponse" xmlns:ns18="http://example.com"/>
</message>
<message name="getListManufacturer">
<part name="parameters" element="ns19:getListManufacturer" xmlns:ns19="http://example.com"/>
</message>
<message name="getListManufacturerResponse">
<part name="parameters" element="ns20:getListManufacturerResponse" xmlns:ns20="http://example.com"/>
</message>
<message name="getListMaterialCode">
<part name="parameters" element="ns21:getListMaterialCode" xmlns:ns21="http://example.com"/>
</message>
<message name="getListMaterialCodeResponse">
<part name="parameters" element="ns22:getListMaterialCodeResponse" xmlns:ns22="http://example.com"/>
</message>
<message name="getListPartClassification">
<part name="parameters" element="ns23:getListPartClassification" xmlns:ns23="http://example.com"/>
</message>
<message name="getListPartClassificationResponse">
<part name="parameters" element="ns24:getListPartClassificationResponse" xmlns:ns24="http://example.com"/>
</message>
<message name="getListPrimaryUse">
<part name="parameters" element="ns25:getListPrimaryUse" xmlns:ns25="http://example.com"/>
</message>
<message name="getListPrimaryUseResponse">
<part name="parameters" element="ns26:getListPrimaryUseResponse" xmlns:ns26="http://example.com"/>
</message>
<message name="getListReplenishmentSource">
<part name="parameters" element="ns27:getListReplenishmentSource" xmlns:ns27="http://example.com"/>
</message>
<message name="getListReplenishmentSourceResponse">
<part name="parameters" element="ns28:getListReplenishmentSourceResponse" xmlns:ns28="http://example.com"/>
</message>
<message name="getListTermCode">
<part name="parameters" element="ns29:getListTermCode" xmlns:ns29="http://example.com"/>
</message>
<message name="getListTermCodeResponse">
<part name="parameters" element="ns30:getListTermCodeResponse" xmlns:ns30="http://example.com"/>
</message>
<message name="getListTermCodeDetails">
<part name="parameters" element="ns31:getListTermCodeDetails" xmlns:ns31="http://example.com"/>
</message>
<message name="getListTermCodeDetailsResponse">
<part name="parameters" element="ns32:getListTermCodeDetailsResponse" xmlns:ns32="http://example.com"/>
</message>
<message name="getListUniCodeTermCode">
<part name="parameters" element="ns33:getListUniCodeTermCode" xmlns:ns33="http://example.com"/>
</message>
<message name="getListUniCodeTermCodeResponse">
<part name="parameters" element="ns34:getListUniCodeTermCodeResponse" xmlns:ns34="http://example.com"/>
</message>
<message name="getListUniCodeTermCodeDetails">
<part name="parameters" element="ns35:getListUniCodeTermCodeDetails" xmlns:ns35="http://example.com"/>
</message>
<message name="getListUniCodeTermCodeDetailsResponse">
<part name="parameters" element="ns36:getListUniCodeTermCodeDetailsResponse" xmlns:ns36="http://example.com"/>
</message>
<message name="getListUnitCode">
<part name="parameters" element="ns37:getListUnitCode" xmlns:ns37="http://example.com"/>
</message>
<message name="getListUnitCodeResponse">
<part name="parameters" element="ns38:getListUnitCodeResponse" xmlns:ns38="http://example.com"/>
</message>
<message name="getPartClassification">
<part name="parameters" element="ns39:getPartClassification" xmlns:ns39="http://example.com"/>
</message>
<message name="getPartClassificationResponse">
<part name="parameters" element="ns40:getPartClassificationResponse" xmlns:ns40="http://example.com"/>
</message>
<message name="getPingMessage">
<part name="parameters" element="ns41:getPingMessage" xmlns:ns41="http://example.com"/>
</message>
<message name="getPingMessageResponse">
<part name="parameters" element="ns42:getPingMessageResponse" xmlns:ns42="http://example.com"/>
</message>
<message name="processDesignControlTransfer">
<part name="parameters" element="ns43:processDesignControlTransfer" xmlns:ns43="http://example.com"/>
</message>
<message name="processDesignControlTransferResponse">
<part name="parameters" element="ns44:processDesignControlTransferResponse" xmlns:ns44="http://example.com"/>
</message>
<message name="updateListPart">
<part name="parameters" element="ns45:updateListPart" xmlns:ns45="http://example.com"/>
</message>
<message name="updateListPartResponse">
<part name="parameters" element="ns46:updateListPartResponse" xmlns:ns46="http://example.com"/>
</message>
<message name="updateListPartUser">
<part name="parameters" element="ns47:updateListPartUser" xmlns:ns47="http://example.com"/>
</message>
<message name="updateListPartUserResponse">
<part name="parameters" element="ns48:updateListPartUserResponse" xmlns:ns48="http://example.com"/>
</message>
<message name="updatePartList">
<part name="parameters" element="ns49:updatePartList" xmlns:ns49="http://example.com"/>
</message>
<message name="updatePartListResponse">
<part name="parameters" element="ns50:updatePartListResponse" xmlns:ns50="http://example.com"/>
</message>
<message name="getListPartPrefix">
<part name="parameters" element="ns51:getListPartPrefix" xmlns:ns51="http://example.com"/>
</message>
<message name="getListPartPrefixResponse">
<part name="parameters" element="ns52:getListPartPrefixResponse" xmlns:ns52="http://example.com"/>
</message>
<message name="createDRPPart">
<part name="parameters" element="ns53:createDRPPart" xmlns:ns53="http://example.com"/>
</message>
<message name="createDRPPartResponse">
<part name="parameters" element="ns54:createDRPPartResponse" xmlns:ns54="http://example.com"/>
</message>
<message name="createManufacturerPart">
<part name="parameters" element="ns55:createManufacturerPart" xmlns:ns55="http://example.com"/>
</message>
<message name="createManufacturerPartResponse">
<part name="parameters" element="ns56:createManufacturerPartResponse" xmlns:ns56="http://example.com"/>
</message>
<!-- added for updateSupplierPart message requirement -->
<message name="updateSupplierPart">
<part name="parameters" element="ns57:updateSupplierPart" xmlns:ns57="http://example.com"/>
</message>
<message name="updateSupplierPartResponse">
<part name="parameters" element="ns58:updateSupplierPartResponse" xmlns:ns58="http://example.com"/>
</message>
<portType name="WS_50">
<operation name="createPart">
<input message="tns:createPart"/>
<output message="tns:createPartResponse"/>
</operation>
<operation name="getFileList">
<input message="tns:getFileList"/>
<output message="tns:getFileListResponse"/>
</operation>
<operation name="getListBasicPart">
<input message="tns:getListBasicPart"/>
<output message="tns:getListBasicPartResponse"/>
</operation>
<operation name="getListBasicUser">
<input message="tns:getListBasicUser"/>
<output message="tns:getListBasicUserResponse"/>
</operation>
<operation name="getListBasicUserList">
<input message="tns:getListBasicUserList"/>
<output message="tns:getListBasicUserListResponse"/>
</operation>
<operation name="getListDesignControl">
<input message="tns:getListDesignControl"/>
<output message="tns:getListDesignControlResponse"/>
</operation>
<operation name="getListGeographicalRestriction">
<input message="tns:getListGeographicalRestriction"/>
<output message="tns:getListGeographicalRestrictionResponse"/>
</operation>
<operation name="getListLanguageCode">
<input message="tns:getListLanguageCode"/>
<output message="tns:getListLanguageCodeResponse"/>
</operation>
<operation name="getListMachineCriticalCode">
<input message="tns:getListMachineCriticalCode"/>
<output message="tns:getListMachineCriticalCodeResponse"/>
</operation>
<operation name="getListManufacturer">
<input message="tns:getListManufacturer"/>
<output message="tns:getListManufacturerResponse"/>
</operation>
<operation name="getListMaterialCode">
<input message="tns:getListMaterialCode"/>
<output message="tns:getListMaterialCodeResponse"/>
</operation>
<operation name="getListPartClassification">
<input message="tns:getListPartClassification"/>
<output message="tns:getListPartClassificationResponse"/>
</operation>
<operation name="getListPrimaryUse">
<input message="tns:getListPrimaryUse"/>
<output message="tns:getListPrimaryUseResponse"/>
</operation>
<operation name="getListReplenishmentSource">
<input message="tns:getListReplenishmentSource"/>
<output message="tns:getListReplenishmentSourceResponse"/>
</operation>
<operation name="getListTermCode">
<input message="tns:getListTermCode"/>
<output message="tns:getListTermCodeResponse"/>
</operation>
<operation name="getListTermCodeDetails">
<input message="tns:getListTermCodeDetails"/>
<output message="tns:getListTermCodeDetailsResponse"/>
</operation>
<operation name="getListUniCodeTermCode">
<input message="tns:getListUniCodeTermCode"/>
<output message="tns:getListUniCodeTermCodeResponse"/>
</operation>
<operation name="getListUniCodeTermCodeDetails">
<input message="tns:getListUniCodeTermCodeDetails"/>
<output message="tns:getListUniCodeTermCodeDetailsResponse"/>
</operation>
<operation name="getListUnitCode">
<input message="tns:getListUnitCode"/>
<output message="tns:getListUnitCodeResponse"/>
</operation>
<operation name="getPartClassification">
<input message="tns:getPartClassification"/>
<output message="tns:getPartClassificationResponse"/>
</operation>
<operation name="getPingMessage">
<input message="tns:getPingMessage"/>
<output message="tns:getPingMessageResponse"/>
</operation>
<operation name="processDesignControlTransfer">
<input message="tns:processDesignControlTransfer"/>
<output message="tns:processDesignControlTransferResponse"/>
</operation>
<operation name="updateListPart">
<input message="tns:updateListPart"/>
<output message="tns:updateListPartResponse"/>
</operation>
<operation name="updateListPartUser">
<input message="tns:updateListPartUser"/>
<output message="tns:updateListPartUserResponse"/>
</operation>
<operation name="updatePartList">
<input message="tns:updatePartList"/>
<output message="tns:updatePartListResponse"/>
</operation>
<operation name="getListPartPrefix">
<input message="tns:getListPartPrefix"/>
<output message="tns:getListPartPrefixResponse"/>
</operation>
<operation name="createDRPPart">
<input message="tns:createDRPPart"/>
<output message="tns:createDRPPartResponse"/>
</operation>
<operation name="createManufacturerPart">
<input message="tns:createManufacturerPart"/>
<output message="tns:createManufacturerPartResponse"/>
</operation>
<!-- added for updateSupplierPart message requirement -->
<operation name="updateSupplierPart">
<input message="tns:updateSupplierPart"/>
<output message="tns:updateSupplierPartResponse"/>
</operation>
</portType>
<binding name="WS_50PortBinding" type="tns:WS_50">
<soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document"/>
<operation name="createPart">
<soap:operation soapAction="createPart"/>
<input>
<soap:body use="literal"/>
</input>
<output>
<soap:body use="literal"/>
</output>
</operation>
<operation name="getFileList">
<soap:operation soapAction="getFileList"/>
<input>
<soap:body use="literal"/>
</input>
<output>
<soap:body use="literal"/>
</output>
</operation>
<operation name="getListBasicPart">
<soap:operation soapAction="getListBasicPart"/>
<input>
<soap:body use="literal"/>
</input>
<output>
<soap:body use="literal"/>
</output>
</operation>
<operation name="getListBasicUser">
<soap:operation soapAction="getListBasicUser"/>
<input>
<soap:body use="literal"/>
</input>
<output>
<soap:body use="literal"/>
</output>
</operation>
<operation name="getListBasicUserList">
<soap:operation soapAction="getListBasicUserList"/>
<input>
<soap:body use="literal"/>
</input>
<output>
<soap:body use="literal"/>
</output>
</operation>
<operation name="getListDesignControl">
<soap:operation soapAction="getListDesignControl"/>
<input>
<soap:body use="literal"/>
</input>
<output>
<soap:body use="literal"/>
</output>
</operation>
<operation name="getListGeographicalRestriction">
<soap:operation soapAction="getListGeographicalRestriction"/>
<input>
<soap:body use="literal"/>
</input>
<output>
<soap:body use="literal"/>
</output>
</operation>
<operation name="getListLanguageCode">
<soap:operation soapAction="getListLanguageCode"/>
<input>
<soap:body use="literal"/>
</input>
<output>
<soap:body use="literal"/>
</output>
</operation>
<operation name="getListMachineCriticalCode">
<soap:operation soapAction="getListMachineCriticalCode"/>
<input>
<soap:body use="literal"/>
</input>
<output>
<soap:body use="literal"/>
</output>
</operation>
<operation name="getListManufacturer">
<soap:operation soapAction="getListManufacturer"/>
<input>
<soap:body use="literal"/>
</input>
<output>
<soap:body use="literal"/>
</output>
</operation>
<operation name="getListMaterialCode">
<soap:operation soapAction="getListMaterialCode"/>
<input>
<soap:body use="literal"/>
</input>
<output>
<soap:body use="literal"/>
</output>
</operation>
<operation name="getListPartClassification">
<soap:operation soapAction="getListPartClassification"/>
<input>
<soap:body use="literal"/>
</input>
<output>
<soap:body use="literal"/>
</output>
</operation>
<operation name="getListPrimaryUse">
<soap:operation soapAction="getListPrimaryUse"/>
<input>
<soap:body use="literal"/>
</input>
<output>
<soap:body use="literal"/>
</output>
</operation>
<operation name="getListReplenishmentSource">
<soap:operation soapAction="getListReplenishmentSource"/>
<input>
<soap:body use="literal"/>
</input>
<output>
<soap:body use="literal"/>
</output>
</operation>
<operation name="getListTermCode">
<soap:operation soapAction="getListTermCode"/>
<input>
<soap:body use="literal"/>
</input>
<output>
<soap:body use="literal"/>
</output>
</operation>
<operation name="getListTermCodeDetails">
<soap:operation soapAction="getListTermCodeDetails"/>
<input>
<soap:body use="literal"/>
</input>
<output>
<soap:body use="literal"/>
</output>
</operation>
<operation name="getListUniCodeTermCode">
<soap:operation soapAction="getListUniCodeTermCode"/>
<input>
<soap:body use="literal"/>
</input>
<output>
<soap:body use="literal"/>
</output>
</operation>
<operation name="getListUniCodeTermCodeDetails">
<soap:operation soapAction="getListUniCodeTermCodeDetails"/>
<input>
<soap:body use="literal"/>
</input>
<output>
<soap:body use="literal"/>
</output>
</operation>
<operation name="getListUnitCode">
<soap:operation soapAction="getListUnitCode"/>
<input>
<soap:body use="literal"/>
</input>
<output>
<soap:body use="literal"/>
</output>
</operation>
<operation name="getPartClassification">
<soap:operation soapAction="getPartClassification"/>
<input>
<soap:body use="literal"/>
</input>
<output>
<soap:body use="literal"/>
</output>
</operation>
<operation name="getPingMessage">
<soap:operation soapAction="getPingMessage"/>
<input>
<soap:body use="literal"/>
</input>
<output>
<soap:body use="literal"/>
</output>
</operation>
<operation name="processDesignControlTransfer">
<soap:operation soapAction="processDesignControlTransfer"/>
<input>
<soap:body use="literal"/>
</input>
<output>
<soap:body use="literal"/>
</output>
</operation>
<operation name="updateListPart">
<soap:operation soapAction="updateListPart"/>
<input>
<soap:body use="literal"/>
</input>
<output>
<soap:body use="literal"/>
</output>
</operation>
<operation name="updateListPartUser">
<soap:operation soapAction="updateListPartUser"/>
<input>
<soap:body use="literal"/>
</input>
<output>
<soap:body use="literal"/>
</output>
</operation>
<operation name="updatePartList">
<soap:operation soapAction="updatePartList"/>
<input>
<soap:body use="literal"/>
</input>
<output>
<soap:body use="literal"/>
</output>
</operation>
<operation name="getListPartPrefix">
<soap:operation soapAction="getListPartPrefix"/>
<input>
<soap:body use="literal"/>
</input>
<output>
<soap:body use="literal"/>
</output>
</operation>
<operation name="createDRPPart">
<soap:operation soapAction="createDRPPart"/>
<input>
<soap:body use="literal"/>
</input>
<output>
<soap:body use="literal"/>
</output>
</operation>
<operation name="createManufacturerPart">
<soap:operation soapAction="createManufacturerPart"/>
<input>
<soap:body use="literal"/>
</input>
<output>
<soap:body use="literal"/>
</output>
</operation>
<!-- added for updateSupplierPart message requirement -->
<operation name="updateSupplierPart">
<soap:operation soapAction="updateSupplierPart"/>
<input>
<soap:body use="literal"/>
</input>
<output>
<soap:body use="literal"/>
</output>
</operation>
</binding>
<service name="WS_50">
<port name="WS_50Port" binding="tns:WS_50PortBinding">
<soap:address location="REPLACE_WITH_ACTUAL_URL"/>
</port>
</service>
</definitions>
请尝试在命令提示符上使用"wsimport",如下所示:
wsimport -s F:temp -p cn.ljl.sand.jws.chapter3.client.wsimport http://localhost:6666/service/interpret?wsdl
详细的 wsimport 选项,请参考以下 URL:世界导入
注意:请确保已将 wsimport 文件夹添加到路径中。
希望对您有所帮助。