Web Service没有以自上而下的方式获取xsd文件

时间:2013-03-14 09:57:21

标签: web-services java-ee xsd wsdl

我正在尝试从wsdl文件(自上而下的方法)生成一个需要xsd文件的Web服务。我已成功创建了Web服务。当我从eclipse的浏览器测试web服务时,它工作正常但是当我从其他应用程序测试它时(在我的情况下,我在WSO2 ESB中测试生成的服务 - 试试它部分),它没有给我任何输出。问题是当从eclipse外部调用时,服务没有获取xsd文件。那我怎么能解决这个xsd相关的问题呢 我的wsdl:

<wsdl:definitions targetNamespace="http://www.openoandm.org/xml/CIR/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:tns="http://www.openoandm.org/xml/CIR/" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/">
  <wsdl:types>
    <xs:schema elementFormDefault="qualified" targetNamespace="http://www.openoandm.org/xml/CIR/" xmlns:cct="urn:un:unece:uncefact:documentation:standard:CoreComponentType:2">
            <xs:import namespace="urn:un:unece:uncefact:documentation:standard:CoreComponentType:2" schemaLocation="CIRService?xsd=CoreComponentType_2p0.xsd"/>
            <xs:include schemaLocation="CIRService?xsd=CommonInteroperabilityRegistry.xsd"/>


                            <xs:element name="GetEquivalentEntriesByCIRID">
                <xs:complexType>
                    <xs:sequence>
                        <xs:element maxOccurs="1" minOccurs="1" name="ExistingCIRID" type="cct:IDType"/>
                        <xs:element maxOccurs="unbounded" minOccurs="0" name="TargetSourceID" type="cct:IDType"/>
                    </xs:sequence>
                </xs:complexType>
            </xs:element>
            <xs:element name="GetEquivalentEntriesByCIRIDResponse">
                <xs:complexType>
                    <xs:sequence>
                        <xs:element maxOccurs="1" minOccurs="0" name="Registry" type="tns:Registry"/>
                    </xs:sequence>
                </xs:complexType>
            </xs:element>
        </xs:schema>
  </wsdl:types>
  <wsdl:message name="DeletePropertiesIn">
    <wsdl:part name="parameters" element="tns:DeleteProperties">
    </wsdl:part>
  </wsdl:message>
  <wsdl:message name="CreateRegistryOut">
    <wsdl:part name="parameters" element="tns:CreateRegistryResponse">
    </wsdl:part>
  </wsdl:message>
  <wsdl:message name="DeleteEntriesIn">
    <wsdl:part name="parameters" element="tns:DeleteEntries">
    </wsdl:part>
  </wsdl:message>
  <wsdl:message name="GetRegistryOut">
    <wsdl:part name="parameters" element="tns:GetRegistryResponse">
    </wsdl:part>
  </wsdl:message>
  <wsdl:message name="DeleteCategoryOut">
    <wsdl:part name="parameters" element="tns:DeleteCategoryResponse">
    </wsdl:part>
  </wsdl:message>
  <wsdl:message name="UpdateRegistryIn">
    <wsdl:part name="parameters" element="tns:UpdateRegistry">
    </wsdl:part>
  </wsdl:message>
  <wsdl:message name="DeleteRegistryIn">
    <wsdl:part name="parameters" element="tns:DeleteRegistry">
    </wsdl:part>
  </wsdl:message>
  <wsdl:message name="DuplicateEntryFault">
    <wsdl:part name="parameters" element="tns:DuplicateEntryFault">
    </wsdl:part>
  </wsdl:message>
  <wsdl:message name="DeletePropertiesOut">
    <wsdl:part name="parameters" element="tns:DeletePropertiesResponse">
    </wsdl:part>
  </wsdl:message>
  <wsdl:message name="DeleteRegistryOut">
    <wsdl:part name="parameters" element="tns:DeleteRegistryResponse">
    </wsdl:part>
  </wsdl:message>
  <wsdl:message name="RegistryNotFoundFault">
    <wsdl:part name="parameters" element="tns:RegistryNotFoundFault">
    </wsdl:part>
  </wsdl:message>
  <wsdl:message name="PropertyNotFoundFault">
    <wsdl:part name="parameters" element="tns:PropertyNotFoundFault">
    </wsdl:part>
  </wsdl:message>
  <wsdl:message name="EntryNotFoundFault">
    <wsdl:part name="parameters" element="tns:EntryNotFoundFault">
    </wsdl:part>
  </wsdl:message>
  <wsdl:message name="UpdateEntryCIRIDOut">
    <wsdl:part name="parameters" element="tns:UpdateEntryCIRIDResponse">
    </wsdl:part>
  </wsdl:message>
  <wsdl:message name="GetRegistryIn">
    <wsdl:part name="parameters" element="tns:GetRegistry">
    </wsdl:part>
  </wsdl:message>
  <wsdl:message name="GetEquivalentEntriesByCIRIDOut">
    <wsdl:part name="parameters" element="tns:GetEquivalentEntriesByCIRIDResponse">
    </wsdl:part>
  </wsdl:message>
  <wsdl:message name="GetEquivalentEntriesByCIRIDIn">
    <wsdl:part name="parameters" element="tns:GetEquivalentEntriesByCIRID">
    </wsdl:part>
  </wsdl:message>
  <wsdl:message name="CreateRegistryFault">
    <wsdl:part name="parameters" element="tns:CreateRegistryFault">
    </wsdl:part>
  </wsdl:message>
  <wsdl:message name="CreateRegistryIn">
    <wsdl:part name="parameters" element="tns:CreateRegistry">
    </wsdl:part>
  </wsdl:message>
  <wsdl:message name="GetEquivalentEntriesIn">
    <wsdl:part name="parameters" element="tns:GetEquivalentEntries">
    </wsdl:part>
  </wsdl:message>
  <wsdl:message name="UpdateEntryCIRIDIn">
    <wsdl:part name="parameters" element="tns:UpdateEntryCIRID">
    </wsdl:part>
  </wsdl:message>
  <wsdl:message name="CreateEquivalentEntryIn">
    <wsdl:part name="parameters" element="tns:CreateEquivalentEntry">
    </wsdl:part>
  </wsdl:message>
  <wsdl:message name="GetEquivalentEntriesOut">
    <wsdl:part name="parameters" element="tns:GetEquivalentEntriesResponse">
    </wsdl:part>
  </wsdl:message>
  <wsdl:message name="DeleteCategoryIn">
    <wsdl:part name="parameters" element="tns:DeleteCategory">
    </wsdl:part>
  </wsdl:message>
  <wsdl:message name="DuplicatePropertyFault">
    <wsdl:part name="parameters" element="tns:DuplicatePropertyFault">
    </wsdl:part>
  </wsdl:message>
  <wsdl:message name="CategoryNotFoundFault">
    <wsdl:part name="parameters" element="tns:CategoryNotFoundFault">
    </wsdl:part>
  </wsdl:message>
  <wsdl:message name="CreateCategoryFault">
    <wsdl:part name="parameters" element="tns:CreateCategoryFault">
    </wsdl:part>
  </wsdl:message>
  <wsdl:message name="DeleteEntriesOut">
    <wsdl:part name="parameters" element="tns:DeleteEntriesResponse">
    </wsdl:part>
  </wsdl:message>
  <wsdl:message name="CreateEquivalentEntryOut">
    <wsdl:part name="parameters" element="tns:CreateEquivalentEntryResponse">
    </wsdl:part>
  </wsdl:message>
  <wsdl:message name="UpdateRegistryOut">
    <wsdl:part name="parameters" element="tns:UpdateRegistryResponse">
    </wsdl:part>
  </wsdl:message>
  <wsdl:portType name="CIRService">
    <wsdl:operation name="CreateRegistry">
<wsdl:documentation>Creates a new Registry, new Category in a
                Registry, new Entries in a Category, and Properties with Values in
                an Entry.</wsdl:documentation>
      <wsdl:input message="tns:CreateRegistryIn">
    </wsdl:input>
      <wsdl:output message="tns:CreateRegistryOut">
    </wsdl:output>
      <wsdl:fault name="DuplicatePropertyFault" message="tns:DuplicatePropertyFault">
    </wsdl:fault>
      <wsdl:fault name="CreateRegistryFault" message="tns:CreateRegistryFault">
    </wsdl:fault>
      <wsdl:fault name="DuplicateEntryFault" message="tns:DuplicateEntryFault">
    </wsdl:fault>
      <wsdl:fault name="CreateCategoryFault" message="tns:CreateCategoryFault">
    </wsdl:fault>
    </wsdl:operation>
    <wsdl:operation name="CreateEquivalentEntry">
<wsdl:documentation>Creates a single Entry and associated Properties,
                and links the new Entry to an existing equivalent Entry. Returns the
                CIRID of the newly created Entry.</wsdl:documentation>
      <wsdl:input message="tns:CreateEquivalentEntryIn">
    </wsdl:input>
      <wsdl:output message="tns:CreateEquivalentEntryOut">
    </wsdl:output>
      <wsdl:fault name="CategoryNotFoundFault" message="tns:CategoryNotFoundFault">
    </wsdl:fault>
      <wsdl:fault name="DuplicateEntryFault" message="tns:DuplicateEntryFault">
    </wsdl:fault>
      <wsdl:fault name="EntryNotFoundFault" message="tns:EntryNotFoundFault">
    </wsdl:fault>
      <wsdl:fault name="RegistryNotFoundFault" message="tns:RegistryNotFoundFault">
    </wsdl:fault>
    </wsdl:operation>
    <wsdl:operation name="UpdateRegistry">
<wsdl:documentation>Updates the attributes of existing Registries,
                Categories, Entries or Properties.</wsdl:documentation>
      <wsdl:input message="tns:UpdateRegistryIn">
    </wsdl:input>
      <wsdl:output message="tns:UpdateRegistryOut">
    </wsdl:output>
      <wsdl:fault name="CategoryNotFoundFault" message="tns:CategoryNotFoundFault">
    </wsdl:fault>
      <wsdl:fault name="EntryNotFoundFault" message="tns:EntryNotFoundFault">
    </wsdl:fault>
      <wsdl:fault name="RegistryNotFoundFault" message="tns:RegistryNotFoundFault">
    </wsdl:fault>
      <wsdl:fault name="PropertyNotFoundFault" message="tns:PropertyNotFoundFault">
    </wsdl:fault>
    </wsdl:operation>
    <wsdl:operation name="UpdateEntryCIRID">
<wsdl:documentation>Replaces the CIRID field on matching Entries with
                a new CIRID value.</wsdl:documentation>
      <wsdl:input message="tns:UpdateEntryCIRIDIn">
    </wsdl:input>
      <wsdl:output message="tns:UpdateEntryCIRIDOut">
    </wsdl:output>
    </wsdl:operation>
    <wsdl:operation name="DeleteRegistry">
<wsdl:documentation>Deletes the specified Registry along with its
                Categories, Entries and Properties.</wsdl:documentation>
      <wsdl:input message="tns:DeleteRegistryIn">
    </wsdl:input>
      <wsdl:output message="tns:DeleteRegistryOut">
    </wsdl:output>
      <wsdl:fault name="RegistryNotFoundFault" message="tns:RegistryNotFoundFault">
    </wsdl:fault>
    </wsdl:operation>
    <wsdl:operation name="DeleteCategory">
<wsdl:documentation>Deletes the specified Category along with its
                Entries and Properties.</wsdl:documentation>
      <wsdl:input message="tns:DeleteCategoryIn">
    </wsdl:input>
      <wsdl:output message="tns:DeleteCategoryOut">
    </wsdl:output>
      <wsdl:fault name="CategoryNotFoundFault" message="tns:CategoryNotFoundFault">
    </wsdl:fault>
      <wsdl:fault name="RegistryNotFoundFault" message="tns:RegistryNotFoundFault">
    </wsdl:fault>
    </wsdl:operation>
    <wsdl:operation name="DeleteEntries">
<wsdl:documentation>Deletes the specified Entries along with its
                Properties.</wsdl:documentation>
      <wsdl:input message="tns:DeleteEntriesIn">
    </wsdl:input>
      <wsdl:output message="tns:DeleteEntriesOut">
    </wsdl:output>
      <wsdl:fault name="CategoryNotFoundFault" message="tns:CategoryNotFoundFault">
    </wsdl:fault>
      <wsdl:fault name="EntryNotFoundFault" message="tns:EntryNotFoundFault">
    </wsdl:fault>
      <wsdl:fault name="RegistryNotFoundFault" message="tns:RegistryNotFoundFault">
    </wsdl:fault>
    </wsdl:operation>
    <wsdl:operation name="DeleteProperties">
<wsdl:documentation>Deletes the specified Properties.
            </wsdl:documentation>
      <wsdl:input message="tns:DeletePropertiesIn">
    </wsdl:input>
      <wsdl:output message="tns:DeletePropertiesOut">
    </wsdl:output>
      <wsdl:fault name="CategoryNotFoundFault" message="tns:CategoryNotFoundFault">
    </wsdl:fault>
      <wsdl:fault name="EntryNotFoundFault" message="tns:EntryNotFoundFault">
    </wsdl:fault>
      <wsdl:fault name="RegistryNotFoundFault" message="tns:RegistryNotFoundFault">
    </wsdl:fault>
      <wsdl:fault name="PropertyNotFoundFault" message="tns:PropertyNotFoundFault">
    </wsdl:fault>
    </wsdl:operation>
    <wsdl:operation name="GetRegistry">
<wsdl:documentation>Returns all Registries, Categories, Entries and
                Properties filtered by the specified conditions.
            </wsdl:documentation>
      <wsdl:input message="tns:GetRegistryIn">
    </wsdl:input>
      <wsdl:output message="tns:GetRegistryOut">
    </wsdl:output>
    </wsdl:operation>
    <wsdl:operation name="GetEquivalentEntries">
<wsdl:documentation>Returns any equivalent Entries to the specified
                existing Entries (i.e. by identifying all Entries with the same
                CIRID to the existing Entries). Multiple entries are specified by
                IDInSource and SourceID pairs. A TargetSourceID or list of
                TargetSourceIDs can be specified to filter returned Entries.
            </wsdl:documentation>
      <wsdl:input message="tns:GetEquivalentEntriesIn">
    </wsdl:input>
      <wsdl:output message="tns:GetEquivalentEntriesOut">
    </wsdl:output>
    </wsdl:operation>
    <wsdl:operation name="GetEquivalentEntriesByCIRID">
<wsdl:documentation>Returns any equivalent Entries to the specified
                existing Entry (i.e. by identifying all other Entries with the same
                CIRID to the existing Entry). An Entry is specified by CIRID. A
                Target SourceID or list of SourceIDs can be specified to filter
                returned Entries.</wsdl:documentation>
      <wsdl:input message="tns:GetEquivalentEntriesByCIRIDIn">
    </wsdl:input>
      <wsdl:output message="tns:GetEquivalentEntriesByCIRIDOut">
    </wsdl:output>
    </wsdl:operation>
  </wsdl:portType>
  <wsdl:binding name="CIRServiceSoap12" type="tns:CIRService">
    <soap12:binding transport="http://schemas.xmlsoap.org/soap/http"/>
    <wsdl:operation name="CreateRegistry">
      <soap12:operation soapAction="http://www.openoandm.org/xml/CIR/CreateRegistry" style="document"/>
      <wsdl:input>
        <soap12:body use="literal"/>
      </wsdl:input>
      <wsdl:output>
        <soap12:body use="literal"/>
      </wsdl:output>
      <wsdl:fault name="DuplicatePropertyFault">
        <soap12:fault name="DuplicatePropertyFault" use="literal"/>
      </wsdl:fault>
      <wsdl:fault name="CreateRegistryFault">
        <soap12:fault name="CreateRegistryFault" use="literal"/>
      </wsdl:fault>
      <wsdl:fault name="DuplicateEntryFault">
        <soap12:fault name="DuplicateEntryFault" use="literal"/>
      </wsdl:fault>
      <wsdl:fault name="CreateCategoryFault">
        <soap12:fault name="CreateCategoryFault" use="literal"/>
      </wsdl:fault>
    </wsdl:operation>
    <wsdl:operation name="CreateEquivalentEntry">
      <soap12:operation soapAction="http://www.openoandm.org/xml/CIR/CreateEquivalentEntry" style="document"/>
      <wsdl:input>
        <soap12:body use="literal"/>
      </wsdl:input>
      <wsdl:output>
        <soap12:body use="literal"/>
      </wsdl:output>
      <wsdl:fault name="CategoryNotFoundFault">
        <soap12:fault name="CategoryNotFoundFault" use="literal"/>
      </wsdl:fault>
      <wsdl:fault name="DuplicateEntryFault">
        <soap12:fault name="DuplicateEntryFault" use="literal"/>
      </wsdl:fault>
      <wsdl:fault name="EntryNotFoundFault">
        <soap12:fault name="EntryNotFoundFault" use="literal"/>
      </wsdl:fault>
      <wsdl:fault name="RegistryNotFoundFault">
        <soap12:fault name="RegistryNotFoundFault" use="literal"/>
      </wsdl:fault>
    </wsdl:operation>
    <wsdl:operation name="UpdateRegistry">
      <soap12:operation soapAction="http://www.openoandm.org/xml/CIR/UpdateRegistry" style="document"/>
      <wsdl:input>
        <soap12:body use="literal"/>
      </wsdl:input>
      <wsdl:output>
        <soap12:body use="literal"/>
      </wsdl:output>
      <wsdl:fault name="CategoryNotFoundFault">
        <soap12:fault name="CategoryNotFoundFault" use="literal"/>
      </wsdl:fault>
      <wsdl:fault name="EntryNotFoundFault">
        <soap12:fault name="EntryNotFoundFault" use="literal"/>
      </wsdl:fault>
      <wsdl:fault name="RegistryNotFoundFault">
        <soap12:fault name="RegistryNotFoundFault" use="literal"/>
      </wsdl:fault>
      <wsdl:fault name="PropertyNotFoundFault">
        <soap12:fault name="PropertyNotFoundFault" use="literal"/>
      </wsdl:fault>
    </wsdl:operation>
    <wsdl:operation name="UpdateEntryCIRID">
      <soap12:operation soapAction="http://www.openoandm.org/xml/CIR/UpdateEntryCIRID" style="document"/>
      <wsdl:input>
        <soap12:body use="literal"/>
      </wsdl:input>
      <wsdl:output>
        <soap12:body use="literal"/>
      </wsdl:output>
    </wsdl:operation>
    <wsdl:operation name="DeleteRegistry">
      <soap12:operation soapAction="http://www.openoandm.org/xml/CIR/DeleteRegistry" style="document"/>
      <wsdl:input>
        <soap12:body use="literal"/>
      </wsdl:input>
      <wsdl:output>
        <soap12:body use="literal"/>
      </wsdl:output>
      <wsdl:fault name="RegistryNotFoundFault">
        <soap12:fault name="RegistryNotFoundFault" use="literal"/>
      </wsdl:fault>
    </wsdl:operation>
    <wsdl:operation name="DeleteCategory">
      <soap12:operation soapAction="http://www.openoandm.org/xml/CIR/DeleteCategory" style="document"/>
      <wsdl:input>
        <soap12:body use="literal"/>
      </wsdl:input>
      <wsdl:output>
        <soap12:body use="literal"/>
      </wsdl:output>
      <wsdl:fault name="CategoryNotFoundFault">
        <soap12:fault name="CategoryNotFoundFault" use="literal"/>
      </wsdl:fault>
      <wsdl:fault name="RegistryNotFoundFault">
        <soap12:fault name="RegistryNotFoundFault" use="literal"/>
      </wsdl:fault>
    </wsdl:operation>
    <wsdl:operation name="DeleteEntries">
      <soap12:operation soapAction="http://www.openoandm.org/xml/CIR/DeleteEntries" style="document"/>
      <wsdl:input>
        <soap12:body use="literal"/>
      </wsdl:input>
      <wsdl:output>
        <soap12:body use="literal"/>
      </wsdl:output>
      <wsdl:fault name="CategoryNotFoundFault">
        <soap12:fault name="CategoryNotFoundFault" use="literal"/>
      </wsdl:fault>
      <wsdl:fault name="EntryNotFoundFault">
        <soap12:fault name="EntryNotFoundFault" use="literal"/>
      </wsdl:fault>
      <wsdl:fault name="RegistryNotFoundFault">
        <soap12:fault name="RegistryNotFoundFault" use="literal"/>
      </wsdl:fault>
    </wsdl:operation>
    <wsdl:operation name="DeleteProperties">
      <soap12:operation soapAction="http://www.openoandm.org/xml/CIR/DeleteProperties" style="document"/>
      <wsdl:input>
        <soap12:body use="literal"/>
      </wsdl:input>
      <wsdl:output>
        <soap12:body use="literal"/>
      </wsdl:output>
      <wsdl:fault name="CategoryNotFoundFault">
        <soap12:fault name="CategoryNotFoundFault" use="literal"/>
      </wsdl:fault>
      <wsdl:fault name="EntryNotFoundFault">
        <soap12:fault name="EntryNotFoundFault" use="literal"/>
      </wsdl:fault>
      <wsdl:fault name="RegistryNotFoundFault">
        <soap12:fault name="RegistryNotFoundFault" use="literal"/>
      </wsdl:fault>
      <wsdl:fault name="PropertyNotFoundFault">
        <soap12:fault name="PropertyNotFoundFault" use="literal"/>
      </wsdl:fault>
    </wsdl:operation>
    <wsdl:operation name="GetRegistry">
      <soap12:operation soapAction="http://www.openoandm.org/xml/CIR/GetRegistry" style="document"/>
      <wsdl:input>
        <soap12:body use="literal"/>
      </wsdl:input>
      <wsdl:output>
        <soap12:body use="literal"/>
      </wsdl:output>
    </wsdl:operation>
    <wsdl:operation name="GetEquivalentEntries">
      <soap12:operation soapAction="http://www.openoandm.org/xml/CIR/GetEquivalentEntries" style="document"/>
      <wsdl:input>
        <soap12:body use="literal"/>
      </wsdl:input>
      <wsdl:output>
        <soap12:body use="literal"/>
      </wsdl:output>
    </wsdl:operation>
    <wsdl:operation name="GetEquivalentEntriesByCIRID">
      <soap12:operation soapAction="http://www.openoandm.org/xml/CIR/GetEquivalentEntriesByCIRID" style="document"/>
      <wsdl:input>
        <soap12:body use="literal"/>
      </wsdl:input>
      <wsdl:output>
        <soap12:body use="literal"/>
      </wsdl:output>
    </wsdl:operation>
  </wsdl:binding>
  <wsdl:binding name="CIRServiceSoap" type="tns:CIRService">
    <soap:binding transport="http://schemas.xmlsoap.org/soap/http"/>
    <wsdl:operation name="CreateRegistry">
      <soap:operation soapAction="http://www.openoandm.org/xml/CIR/CreateRegistry" style="document"/>
      <wsdl:input>
        <soap:body use="literal"/>
      </wsdl:input>
      <wsdl:output>
        <soap:body use="literal"/>
      </wsdl:output>
      <wsdl:fault name="DuplicatePropertyFault">
        <soap:fault name="DuplicatePropertyFault" use="literal"/>
      </wsdl:fault>
      <wsdl:fault name="CreateRegistryFault">
        <soap:fault name="CreateRegistryFault" use="literal"/>
      </wsdl:fault>
      <wsdl:fault name="DuplicateEntryFault">
        <soap:fault name="DuplicateEntryFault" use="literal"/>
      </wsdl:fault>
      <wsdl:fault name="CreateCategoryFault">
        <soap:fault name="CreateCategoryFault" use="literal"/>
      </wsdl:fault>
    </wsdl:operation>
    <wsdl:operation name="CreateEquivalentEntry">
      <soap:operation soapAction="http://www.openoandm.org/xml/CIR/CreateEquivalentEntry" style="document"/>
      <wsdl:input>
        <soap:body use="literal"/>
      </wsdl:input>
      <wsdl:output>
        <soap:body use="literal"/>
      </wsdl:output>
      <wsdl:fault name="CategoryNotFoundFault">
        <soap:fault name="CategoryNotFoundFault" use="literal"/>
      </wsdl:fault>
      <wsdl:fault name="DuplicateEntryFault">
        <soap:fault name="DuplicateEntryFault" use="literal"/>
      </wsdl:fault>
      <wsdl:fault name="EntryNotFoundFault">
        <soap:fault name="EntryNotFoundFault" use="literal"/>
      </wsdl:fault>
      <wsdl:fault name="RegistryNotFoundFault">
        <soap:fault name="RegistryNotFoundFault" use="literal"/>
      </wsdl:fault>
    </wsdl:operation>
    <wsdl:operation name="UpdateRegistry">
      <soap:operation soapAction="http://www.openoandm.org/xml/CIR/UpdateRegistry" style="document"/>
      <wsdl:input>
        <soap:body use="literal"/>
      </wsdl:input>
      <wsdl:output>
        <soap:body use="literal"/>
      </wsdl:output>
      <wsdl:fault name="CategoryNotFoundFault">
        <soap:fault name="CategoryNotFoundFault" use="literal"/>
      </wsdl:fault>
      <wsdl:fault name="EntryNotFoundFault">
        <soap:fault name="EntryNotFoundFault" use="literal"/>
      </wsdl:fault>
      <wsdl:fault name="RegistryNotFoundFault">
        <soap:fault name="RegistryNotFoundFault" use="literal"/>
      </wsdl:fault>
      <wsdl:fault name="PropertyNotFoundFault">
        <soap:fault name="PropertyNotFoundFault" use="literal"/>
      </wsdl:fault>
    </wsdl:operation>
    <wsdl:operation name="UpdateEntryCIRID">
      <soap:operation soapAction="http://www.openoandm.org/xml/CIR/UpdateEntryCIRID" style="document"/>
      <wsdl:input>
        <soap:body use="literal"/>
      </wsdl:input>
      <wsdl:output>
        <soap:body use="literal"/>
      </wsdl:output>
    </wsdl:operation>
    <wsdl:operation name="DeleteRegistry">
      <soap:operation soapAction="http://www.openoandm.org/xml/CIR/DeleteRegistry" style="document"/>
      <wsdl:input>
        <soap:body use="literal"/>
      </wsdl:input>
      <wsdl:output>
        <soap:body use="literal"/>
      </wsdl:output>
      <wsdl:fault name="RegistryNotFoundFault">
        <soap:fault name="RegistryNotFoundFault" use="literal"/>
      </wsdl:fault>
    </wsdl:operation>
    <wsdl:operation name="DeleteCategory">
      <soap:operation soapAction="http://www.openoandm.org/xml/CIR/DeleteCategory" style="document"/>
      <wsdl:input>
        <soap:body use="literal"/>
      </wsdl:input>
      <wsdl:output>
        <soap:body use="literal"/>
      </wsdl:output>
      <wsdl:fault name="CategoryNotFoundFault">
        <soap:fault name="CategoryNotFoundFault" use="literal"/>
      </wsdl:fault>
      <wsdl:fault name="RegistryNotFoundFault">
        <soap:fault name="RegistryNotFoundFault" use="literal"/>
      </wsdl:fault>
    </wsdl:operation>
    <wsdl:operation name="DeleteEntries">
      <soap:operation soapAction="http://www.openoandm.org/xml/CIR/DeleteEntries" style="document"/>
      <wsdl:input>
        <soap:body use="literal"/>
      </wsdl:input>
      <wsdl:output>
        <soap:body use="literal"/>
      </wsdl:output>
      <wsdl:fault name="CategoryNotFoundFault">
        <soap:fault name="CategoryNotFoundFault" use="literal"/>
      </wsdl:fault>
      <wsdl:fault name="EntryNotFoundFault">
        <soap:fault name="EntryNotFoundFault" use="literal"/>
      </wsdl:fault>
      <wsdl:fault name="RegistryNotFoundFault">
        <soap:fault name="RegistryNotFoundFault" use="literal"/>
      </wsdl:fault>
    </wsdl:operation>
    <wsdl:operation name="DeleteProperties">
      <soap:operation soapAction="http://www.openoandm.org/xml/CIR/DeleteProperties" style="document"/>
      <wsdl:input>
        <soap:body use="literal"/>
      </wsdl:input>
      <wsdl:output>
        <soap:body use="literal"/>
      </wsdl:output>
      <wsdl:fault name="CategoryNotFoundFault">
        <soap:fault name="CategoryNotFoundFault" use="literal"/>
      </wsdl:fault>
      <wsdl:fault name="EntryNotFoundFault">
        <soap:fault name="EntryNotFoundFault" use="literal"/>
      </wsdl:fault>
      <wsdl:fault name="RegistryNotFoundFault">
        <soap:fault name="RegistryNotFoundFault" use="literal"/>
      </wsdl:fault>
      <wsdl:fault name="PropertyNotFoundFault">
        <soap:fault name="PropertyNotFoundFault" use="literal"/>
      </wsdl:fault>
    </wsdl:operation>
    <wsdl:operation name="GetRegistry">
      <soap:operation soapAction="http://www.openoandm.org/xml/CIR/GetRegistry" style="document"/>
      <wsdl:input>
        <soap:body use="literal"/>
      </wsdl:input>
      <wsdl:output>
        <soap:body use="literal"/>
      </wsdl:output>
    </wsdl:operation>
    <wsdl:operation name="GetEquivalentEntries">
      <soap:operation soapAction="http://www.openoandm.org/xml/CIR/GetEquivalentEntries" style="document"/>
      <wsdl:input>
        <soap:body use="literal"/>
      </wsdl:input>
      <wsdl:output>
        <soap:body use="literal"/>
      </wsdl:output>
    </wsdl:operation>
    <wsdl:operation name="GetEquivalentEntriesByCIRID">
      <soap:operation soapAction="http://www.openoandm.org/xml/CIR/GetEquivalentEntriesByCIRID" style="document"/>
      <wsdl:input>
        <soap:body use="literal"/>
      </wsdl:input>
      <wsdl:output>
        <soap:body use="literal"/>
      </wsdl:output>
    </wsdl:operation>
  </wsdl:binding>
  <wsdl:service name="CIRService">
    <wsdl:port name="CIRServiceSoap" binding="tns:CIRServiceSoap">
      <soap:address location="http://localhost:8080/CIRService/services/CIRService.CIRServiceSoap/"/>
    </wsdl:port>
    <wsdl:port name="CIRServiceSoap12" binding="tns:CIRServiceSoap12">
      <soap12:address location="http://localhost:8080/CIRService/services/CIRService.CIRServiceSoap12/"/>
    </wsdl:port>
  </wsdl:service>
</wsdl:definitions>

Plz帮助

1 个答案:

答案 0 :(得分:0)

您可以在您的客户端JAR中包含原始WSDL。您的客户wsimport应该按照以下行生成客户服务类:

@WebServiceClient(name = "TestClient", targetNamespace = "http://namespace", wsdlLocation = "file:/somewhere")
public class TestClient extends Service
{

    private final static URL TESTSERVICE_WSDL_LOCATION;

    static {
        URL url = null;
        try {
            URL baseUrl;
            baseUrl = test.clientTestClient.class.getResource(".");
            url = new URL(baseUrl, "file:/somewhere");
        } catch (MalformedURLException e) {
            logger.warning("Failed to create URL for the wsdl Location: 'file:/somewhere', retrying as a local file");
            logger.warning(e.getMessage());
        }
        TESTSERVICE_WSDL_LOCATION = url;
    }

    public TestClient(URL wsdlLocation, QName serviceName) {
        super(wsdlLocation, serviceName);
    }

    public TestClient() {
        super(TESTSERVICE_WSDL_LOCATION, new QName("http://namespace", "TestClient"));
    }

    /* ... more stuff ... */

}

您现在可以像这样创建服务实例:

new TestClient(getClass().getResource("/wsdlthatisincludedinclientjar.wsdl"), new QName("http://namespace", "TestClient"));

现在,您只需将(预先存在的)WSDL(以及所有依赖XSD)放在客户端JAR的根目录下。唯一剩下的问题是,所有依赖于XSD的东西都需要由WSDL中的相对URI引用。 但由于这是您预先存在的WSDL,因此您可以随时将其编辑为您的内容。