导入wsdl时Apex生成失败

时间:2012-02-24 08:24:25

标签: salesforce apex-code

我正在尝试从wsdl文件生成Apex类。但是我遇到了问题......

Apex生成失败 无法找到元素的模式; {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>

1 个答案:

答案 0 :(得分:0)

link中提到的关于将提交响应元素从简单类型更改为复杂类型的注释中提到了问题的答案。