Pregunta

Estoy tratando de generar la clase APEX en el archivo WSDL, pero estoy obteniendo por debajo de error:

Falló la generación del ápice Incapaz de encontrar esquema para el elemento;{ http://www.w3.org/2001/xmlschema } Cadena

Cualquier ayuda en esto es muy apreciada. Gracias de antemano

ver por debajo del archivo wsdl:

<?xml version="1.0" encoding="UTF-8"?>
<!--Created by TIBCO WSDL-->
<wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"    xmlns:tns="http://xmlns.example.com/1393912810519" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:ns0="http://www.tibco.com/schemas/vendorInterface/SharedResource/Schema/Schema.xsd2" xmlns:ns1="http://www.tibco.com/schemas/vendorInterface/SharedResource/Schema/Schema.xsd" xmlns:xs="http://www.w3.org/2001/XMLSchema" name="Untitled" targetNamespace="http://xmlns.example.com/1393912810519">
    <wsdl:types>
        <xs:schema xmlns="http://www.tibco.com/schemas/vendorInterface/SharedResource/Schema/Schema.xsd" targetNamespace="http://www.tibco.com/schemas/vendorInterface/SharedResource/Schema/Schema.xsd" elementFormDefault="qualified" attributeFormDefault="unqualified">
            <xs:element name="VendorInterface">
                <xs:complexType>
                    <xs:sequence>
                        <xs:element name="Vendor_main">
                            <xs:complexType>
                                <xs:sequence>
                                    <xs:element name="LIFNR" type="xs:string"/>
                                    <xs:element name="NAME1" type="xs:string"/>
                                    <xs:element name="SORTL" type="xs:string"/>
                                    <xs:element name="BUS_TYPE" type="xs:string"/>
                                    <xs:element name="ROUTE_CODE" type="xs:string"/>
                                    <xs:element name="VESTYR" type="xs:string" minOccurs="0"/>
                                    <xs:element name="VESTYB" type="xs:string"/>
                                    <xs:element name="ZTERM" type="xs:string"/>
                                    <xs:element name="ZWELS" type="xs:string"/>
                                    <xs:element name="SPERM" type="xs:string"/>
                                    <xs:element name="REPRF" type="xs:string"/>
                                    <xs:element name="WAERS" type="xs:string"/>
                                    <xs:element name="ZAHLS" type="xs:string"/>
                                    <xs:element name="SPRAS" type="xs:string"/>
                                    <xs:element name="ZZ_ACTION" type="xs:string"/>
                                    <xs:element name="STATUS" type="xs:string"/>
                                  </xs:sequence>
                             </xs:complexType>
                        </xs:element>
                        <xs:element name="Vendor_User">
                            <xs:complexType>
                                <xs:sequence>
                                    <xs:element name="LIFNR" type="xs:string"/>
                                    <xs:element name="NAME1" type="xs:string"/>
                                    <xs:element name="NAME2" type="xs:string" minOccurs="0"/>
                                   <xs:element name="ZZ_ACTION" type="xs:string"/>
                                    <xs:element name="STATUS" type="xs:string" minOccurs="0"/>
                                </xs:sequence>
                            </xs:complexType>
                        </xs:element>
                        <xs:element name="Vendor_Tax">
                            <xs:complexType>
                                <xs:sequence>
                                    <xs:element name="LIFNR" type="xs:string"/>
                                    <xs:element name="LAND1" type="xs:string"/>
                                    <xs:element name="STCEG" type="xs:string" minOccurs="0"/>
                                    <xs:element name="ITTXAC" type="xs:string"/>
                                    <xs:element name="STENR" type="xs:string"/>
                                    <xs:element name="ITRCVR" type="xs:string"/>
                                    <xs:element name="ZZ_ACTION" type="xs:string"/>
                                    <xs:element name="STATUS" type="xs:string"/>
                                </xs:sequence>
                            </xs:complexType>
                        </xs:element>
                        <xs:element name="Vendor_Address">
                            <xs:complexType>
                                <xs:sequence>
                                    <xs:element name="LIFNR" type="xs:string"/>
                                    <xs:element name="VASTYP" type="xs:string"/>
                                    <xs:element name="VABFRT" type="xs:string"/>
                                    <xs:element name="STREET1" type="xs:string"/>
                                    <xs:element name="STREET2" type="xs:string"/>
                                    <xs:element name="STREET3" type="xs:string"/>
                                    <xs:element name="STREET4" type="xs:string"/>
                                    <xs:element name="ORT01" type="xs:string"/>
                                    <xs:element name="LAND1" type="xs:string"/>
                                    <xs:element name="WAERS" type="xs:string"/>
                                    <xs:element name="SPRAS" type="xs:string"/>
                                    <xs:element name="PSTLZ" type="xs:string"/>
                                    <xs:element name="SMTP_ADDR" type="xs:string"/>
                                    <xs:element name="KOINH" type="xs:string"/>
                                    <xs:element name="INTAD" type="xs:string"/>
                                    <xs:element name="ZZ_ACTION" type="xs:string"/>
                                    <xs:element name="STATUS" type="xs:string"/>
                                </xs:sequence>
                            </xs:complexType>
                        </xs:element>
                        <xs:element name="Vendor_Paymen_Methods">
                            <xs:complexType>
                                <xs:sequence>
                                    <xs:element name="LIFNR" type="xs:string"/>
                                    <xs:element name="ZWELS" type="xs:string"/>
                                    <xs:element name="KOINH" type="xs:string"/>
                                    <xs:element name="REMARK" type="xs:string"/>
                                    <xs:element name="BANKA" type="xs:string"/>
                                    <xs:element name="ZZ_ACTION" type="xs:string"/>
                                    <xs:element name="STATUS" type="xs:string" minOccurs="0"/>
                                </xs:sequence>
                            </xs:complexType>
                        </xs:element>
                        <xs:element name="Vendor_ContactPerson">
                            <xs:complexType>
                                <xs:sequence>
                                    <xs:element name="LIFNR" type="xs:string"/>
                                    <xs:element name="CNTTYP" type="xs:string"/>
                                    <xs:element name="NAMEV" type="xs:string"/>
                                    <xs:element name="NAME1" type="xs:string"/>
                                    <xs:element name="CNSTYP" type="xs:string"/>
                                    <xs:element name="TEL_NUMBER" type="xs:string"/>
                                    <xs:element name="TEL_EXTENS" type="xs:string"/>
                                    <xs:element name="FAX_NUMBER" type="xs:string"/>
                                    <xs:element name="TEL_NUMBER2" type="xs:string"/>
                                    <xs:element name="TEL_EXTENS2" type="xs:string"/>
                                    <xs:element name="FAX_NUMBER2" type="xs:string"/>
                                    <xs:element name="ZZ_ACTION" type="xs:string"/>
                                    <xs:element name="STATUS" type="xs:string" minOccurs="0"/>
                                </xs:sequence>
                            </xs:complexType>
                        </xs:element>
                    </xs:sequence>
                </xs:complexType>
            </xs:element>
        </xs:schema>
        <xs:schema xmlns="http://www.tibco.com/schemas/vendorInterface/SharedResource/Schema/Schema.xsd2" targetNamespace="http://www.tibco.com/schemas/vendorInterface/SharedResource/Schema/Schema.xsd2" elementFormDefault="qualified" attributeFormDefault="unqualified">
            <xs:element name="VendorDetails" type="xs:string"/>
        </xs:schema>
    </wsdl:types>
    <wsdl:service name="VendorInterface">
        <wsdl:port name="VendorInfoEndpoint" binding="tns:VendorInfoEndpointBinding">
            <soap:address location="http://localhost:8050/BusinessProcess/InterfaceImplementation/VendorInterface.serviceagent/VendorInfoEndpoint"/>
        </wsdl:port>
    </wsdl:service>
    <wsdl:portType name="PortType">
        <wsdl:operation name="GetVendorInfo">
            <wsdl:input message="tns:GetVendorInfo_Request"/>
            <wsdl:output message="tns:GetVendorInfo_Respone"/>
            <wsdl:fault name="fault1" message="tns:GetVendorInfo_Fault"/>
        </wsdl:operation>
    </wsdl:portType>
    <wsdl:binding name="VendorInfoEndpointBinding" type="tns:PortType">
        <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
        <wsdl:operation name="GetVendorInfo">
            <soap:operation style="document" soapAction="/BusinessProcess/InterfaceImplementation/VendorInterface.serviceagent/VendorInfoEndpoint/GetVendorInfo"/>
            <wsdl:input>
                <soap:body use="literal" parts="Request"/>
            </wsdl:input>
            <wsdl:output>
                <soap:body use="literal" parts="Response"/>
            </wsdl:output>
            <wsdl:fault name="fault1">
                <soap:fault use="literal" name="fault1"/>
            </wsdl:fault>
        </wsdl:operation>
    </wsdl:binding>
    <wsdl:message name="GetVendorInfo_Request">
       <wsdl:part name="Request" element="ns0:VendorDetails"/>
    </wsdl:message>
   <wsdl:message name="GetVendorInfo_Respone">
        <wsdl:part name="Response" element="ns1:VendorInterface"/>
    </wsdl:message>
    <wsdl:message name="GetVendorInfo_Fault">
        <wsdl:part name="fault" type="xs:string"/>
    </wsdl:message>
</wsdl:definitions>

¿Fue útil?

Solución

El tipo para getvendorinfo_request . Esto tiene:

<xs:element name="VendorDetails" type="xs:string"/>

WSDL2APEX no admite solicitudes o respuestas directas de tipo estándar único. En su lugar, tendría que ser anidado en un tipo complejo dentro de una secuencia. E.g.

<xs:schema xmlns="http://www.tibco.com/schemas/vendorInterface/SharedResource/Schema/Schema.xsd2" targetNamespace="http://www.tibco.com/schemas/vendorInterface/SharedResource/Schema/Schema.xsd2" elementFormDefault="qualified" attributeFormDefault="unqualified">
    <!--
        This isn't supported by wsdl2Apex
        <xs:element name="VendorDetails" type="xs:string"/>
    -->

    <xs:element name="VendorDetails">
        <xs:complexType>
            <xs:sequence>
                <xs:element name="inputParam" type="xs:string"/>
            </xs:sequence>
        </xs:complexType>
    </xs:element>

</xs:schema>

Si no puede modificar el WSDL, puede hacer que la solicitud sea directamente utilizando un HTTPRequest construyendo la carga útil de JAPL requerida. He estado trabajando con un pasante en una herramienta para automatizar esto. Lamentablemente, tampoco admite directamente las solicitudes de tipo estándar / respuestas. Si está interesado, consulte analizador de WSDL y el generador APEX (Descargo de responsabilidad: trabajo para la compañía que crea esta herramienta. Es gratis).

Consulte también: Error de análisis de WSDL2APEX: no se puede encontrar esquema para el elemento; {http://www.w3.org/2001/xmlschema-string

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top