导入 wsdl 时 Apex 生成失败

发布于 2025-01-08 07:44:13 字数 5135 浏览 1 评论 0原文

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

Apex 生成失败 无法找到元素的架构; {http://www.w3.org/2001/XMLSchema}string

您可以帮忙吗那。

<?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>

I am trying to generate Apex classes from a wsdl file.but i am facing a problem...

Apex Generation Failed
Unable to find schema for element; {http://www.w3.org/2001/XMLSchema}string

Can you please help on that.

<?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>

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

我喜欢麦丽素 2025-01-15 07:44:13

问题的答案在有关将提交响应元素从简单类型更改为复杂类型的评论中提到,如 链接

The answer to the problem is mentioned in the comment made regarding changing the submission response element from a simple type to a complex type as mentioned in the link.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文