导入 wsdl 时 Apex 生成失败
我正在尝试从 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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
问题的答案在有关将提交响应元素从简单类型更改为复杂类型的评论中提到,如 链接。
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.