2012-02-24 24 views
-1

我試圖生成從WSDL file.but我面臨的一個問題的Apex類...失敗頂點生成,同時導入WSDL

頂點生成失敗01​​無法找到架構元素; {http://www.w3.org/2001/XMLSchema}字符串

您可以請幫忙。

<?xml version="1.0" encoding="UTF-8"?> 
<wsdl:definitions targetNamespace="http://eapisws.cbp.dhs.gov/ws/manifest1_0/" xmlns:mns="http://eapisws.cbp.dhs.gov/ws/manifest1_0/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"> 
    <wsdl:types> 
     <xs:schema targetNamespace="http://eapisws.cbp.dhs.gov/ws/manifest1_0/" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:mns="http://eapisws.cbp.dhs.gov/ws/manifest1_0/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" elementFormDefault="qualified" attributeFormDefault="unqualified" version="1_0"> 
      <xs:annotation> 
       <xs:documentation xml:lang="en"> 
       This is the first release of WSDL file for the APIS FlightManifest Batch Web Service and it is subject to change. 
       </xs:documentation> 
      </xs:annotation> 
      <xs:element name="flightManifest" nillable="false"> 
       <xs:annotation> 
        <xs:documentation xml:lang="en">Valid UN-EDIFACT document</xs:documentation> 
       </xs:annotation> 
       <xs:simpleType> 
        <xs:restriction base="xs:string"> 
         <xs:maxLength value="2097152"/> 
        </xs:restriction> 
       </xs:simpleType> 
      </xs:element> 
      <xs:element name="certificationFlightManifest" nillable="false"> 
       <xs:annotation> 
        <xs:documentation xml:lang="en">Valid UN-EDIFACT document to be certified/validated</xs:documentation> 
       </xs:annotation> 
       <xs:simpleType> 
        <xs:restriction base="xs:string"> 
         <xs:maxLength value="2097152"/> 
        </xs:restriction> 
       </xs:simpleType> 
      </xs:element> 
      <xs:element name="submissionResponse" nillable="true" type="xs:string"/> 
     </xs:schema> 
    </wsdl:types> 
    <wsdl:message name="flightManifestRequest"> 
     <wsdl:part element="mns:flightManifest" name="flightManifest"/> 
    </wsdl:message> 
    <wsdl:message name="certificationFlightManifestRequest"> 
     <wsdl:part element="mns:certificationFlightManifest" name="certificationFlightManifest"/> 
    </wsdl:message> 
    <wsdl:message name="flightManifestResponse"> 
     <wsdl:part element="mns:submissionResponse" name="submissionResponse"/> 
    </wsdl:message> 
    <wsdl:portType name="EapisManifest"> 
     <wsdl:operation name="submitFlightManifest"> 
      <wsdl:input message="mns:flightManifestRequest" name="flightManifestRequest"/> 
      <wsdl:output message="mns:flightManifestResponse" name="flightManifestResponse"/> 
     </wsdl:operation> 
     <wsdl:operation name="submitCarrierCertificationRequest"> 
      <wsdl:input message="mns:certificationFlightManifestRequest" name="certificationFlightManifestRequest"/> 
      <wsdl:output message="mns:flightManifestResponse" name="flightManifestResponse"/> 
     </wsdl:operation> 
    </wsdl:portType> 
    <wsdl:binding name="EapisManifestSoapBinding" type="mns:EapisManifest"> 
     <wsdlsoap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/> 
     <wsdl:operation name="submitFlightManifest"> 
      <wsdlsoap:operation soapAction=""/> 
      <wsdl:input name="flightManifestRequest"> 
       <wsdlsoap:body use="literal"/> 
      </wsdl:input> 
      <wsdl:output name="flightManifestResponse"> 
       <wsdlsoap:body use="literal"/> 
      </wsdl:output> 
     </wsdl:operation> 
     <wsdl:operation name="submitCarrierCertificationRequest"> 
      <wsdlsoap:operation soapAction=""/> 
      <wsdl:input name="certificationFlightManifestRequest"> 
       <wsdlsoap:body use="literal"/> 
      </wsdl:input> 
      <wsdl:output name="flightManifestResponse"> 
       <wsdlsoap:body use="literal"/> 
      </wsdl:output> 
     </wsdl:operation> 
    </wsdl:binding> 
    <wsdl:service name="EapisManifestService"> 
     <wsdl:port binding="mns:EapisManifestSoapBinding" name="EapisManifest"> 
      <wsdlsoap:address location="https://eapisws.cbp.dhs.gov/apis/eapisws1_0/services/EapisManifest"/> 
     </wsdl:port> 
    </wsdl:service> 
</wsdl:definitions> 
+0

你能否提供一些關於wsdl文件的信息?它是公開的還是可以發佈的? – pbattisson 2012-02-24 09:53:49

+0

請參閱編輯.... – Vivek 2012-02-24 10:24:34

+2

我認爲解決方案在http://boards.developerforce.com/t5/General-Development/Please-help-me-wsdl2apex-Unable-to-find-schema-for-element/td-p/124631會給出一些見解。我認爲您需要將元素更改爲複雜類型。 – pbattisson 2012-02-24 11:16:59

回答

0

答案的問題就從一個簡單的類型提交響應元素改變爲在link提到的複雜類型提出的意見被提及。

+0

嗨pbattisson,上次我能夠導入web服務。現在我試圖通過傳遞XML請求來調用服務。但我收到錯誤的響應XML。你能幫助解決這個問題嗎?我正在使用soapUI,並且已經在請求頭中設置了證書。 響應: soapenv:Server.userException org.xml.sax.SAXException:SimpleDeserializer在嘗試反序列化的某個對象中遇到了不期望的子元素。 Vivek 2012-03-07 06:43:43