function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
SathikSathik 

Error while Generating APEX from WSDL :Unable to find complexType for {http://tempuri.org/}

Hi all,
I am getting below error while wsdl2apex conversion
Error:
Failed to Unable to find complexType for {http://tempuri.org/}

I have attached my code below:

<?xml version="1.0" encoding="utf-8"?>
<wsdl:definitions name="RTrakWebService" targetNamespace="http://tempuri.org/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:wsx="http://schemas.xmlsoap.org/ws/2004/09/mex" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" xmlns:wsa10="http://www.w3.org/2005/08/addressing" xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy" xmlns:wsap="http://schemas.xmlsoap.org/ws/2004/08/addressing/policy" xmlns:msc="http://schemas.microsoft.com/ws/2005/12/wsdl/contract" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:wsam="http://www.w3.org/2007/05/addressing/metadata" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:tns="http://tempuri.org/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">
    <wsdl:types>
            <xs:schema elementFormDefault="qualified" targetNamespace="http://tempuri.org/">
                <xs:schema elementFormDefault="qualified" targetNamespace="http://schemas.datacontract.org/2004/07/RTrakWebService">
                    <xs:complexType name="CompositeType">
                        <xs:sequence>
                            <xs:element minOccurs="0" name="BoolValue" type="xs:boolean"/>
                            <xs:element minOccurs="0" name="StringValue" nillable="true" type="xs:string"/>
                        </xs:sequence>
                    </xs:complexType>
                    <xs:element name="CompositeType" nillable="true" type="tns:CompositeType"/>
                </xs:schema>
                <xs:schema elementFormDefault="qualified" targetNamespace="http://schemas.datacontract.org/2004/07/RTrakWebService.Models">
                    <xs:complexType name="ArrayOfOpportunityModel">
                        <xs:sequence>
                            <xs:element minOccurs="0" maxOccurs="unbounded" name="OpportunityModel" nillable="true" type="tns:OpportunityModel"/>
                                </xs:sequence>
                    </xs:complexType>
                    <xs:element name="ArrayOfOpportunityModel" nillable="true" type="tns:ArrayOfOpportunityModel"/>
                    <xs:complexType name="OpportunityModel">
                        <xs:sequence>
                            <xs:element minOccurs="0" name="AccountName" nillable="true" type="xs:string"/>
                            <xs:element minOccurs="0" name="CloseDate" type="xs:dateTime"/>
                            <xs:element minOccurs="0" name="OpportunityName" nillable="true" type="xs:string"/>
                        </xs:sequence>
                    </xs:complexType>
                    <xs:element name="OpportunityModel" nillable="true" type="tns:OpportunityModel"/>
                </xs:schema> 
                <xs:element name="GetData">
                    <xs:complexType>
                        <xs:sequence>
                            <xs:element minOccurs="0" name="value" type="xs:int"/>
                        </xs:sequence>
                    </xs:complexType>
                </xs:element>
                <xs:element name="GetDataResponse">
                    <xs:complexType>
                        <xs:sequence>
                            <xs:element minOccurs="0" name="GetDataResult" nillable="true" type="xs:string"/>
                        </xs:sequence>
                    </xs:complexType>
                </xs:element>
                <xs:element name="GetDataUsingDataContract">
                    <xs:complexType>
                        <xs:sequence>
                            <xs:element minOccurs="0" name="composite" nillable="true" type="q1:CompositeType"/>
                        </xs:sequence>
                    </xs:complexType>
                </xs:element>
                <xs:element name="GetDataUsingDataContractResponse">
                    <xs:complexType>
                        <xs:sequence>
                            <xs:element minOccurs="0" name="GetDataUsingDataContractResult" nillable="true" type="q2:CompositeType"/>
                        </xs:sequence>
                    </xs:complexType>
                </xs:element>
                <xs:element name="GetAllOpportunities">
                    <xs:complexType>
                        <xs:sequence/>
                    </xs:complexType>
                </xs:element>
                <xs:element name="GetAllOpportunitiesResponse">
                    <xs:complexType>
                        <xs:sequence>
                            <xs:element minOccurs="0" name="GetAllOpportunitiesResult" nillable="true" type="q3:ArrayOfOpportunityModel"/>
                        </xs:sequence>
                    </xs:complexType>
                </xs:element>



Pls Help me ! 
if any one have solutions,pls let me know
SathikSathik
<xs:element name="CreateOpportunity">
                    <xs:complexType>
                        <xs:sequence>
                            <xs:element minOccurs="0" name="opportunityModel" nillable="true" type="q4:OpportunityModel"/>
                        </xs:sequence>
                    </xs:complexType>
                </xs:element>
                <xs:element name="CreateOpportunityResponse">
                    <xs:complexType>
                        <xs:sequence>
                            <xs:element minOccurs="0" name="CreateOpportunityResult" type="xs:int"/>
                        </xs:sequence>
                    </xs:complexType>
                </xs:element>
                <xs:element name="UpdateOpportunity">
                    <xs:complexType>
                        <xs:sequence>
                            <xs:element minOccurs="0" name="opportunityModel" nillable="true" type="q5:OpportunityModel"/>
                        </xs:sequence>
                    </xs:complexType>
                </xs:element>
                <xs:element name="UpdateOpportunityResponse">
                    <xs:complexType>
                        <xs:sequence>
                            <xs:element minOccurs="0" name="UpdateOpportunityResult" type="xs:int"/>
                        </xs:sequence>
                    </xs:complexType>
                </xs:element>
            </xs:schema>
            <xs:schema attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://schemas.microsoft.com/2003/10/Serialization/"><xs:element name="anyType" nillable="true" type="xs:anyType"/><xs:element name="anyURI" nillable="true" type="xs:anyURI"/><xs:element name="base64Binary" nillable="true" type="xs:base64Binary"/><xs:element name="boolean" nillable="true" type="xs:boolean"/><xs:element name="byte" nillable="true" type="xs:byte"/><xs:element name="dateTime" nillable="true" type="xs:dateTime"/><xs:element name="decimal" nillable="true" type="xs:decimal"/><xs:element name="double" nillable="true" type="xs:double"/><xs:element name="float" nillable="true" type="xs:float"/><xs:element name="int" nillable="true" type="xs:int"/><xs:element name="long" nillable="true" type="xs:long"/><xs:element name="QName" nillable="true" type="xs:QName"/><xs:element name="short" nillable="true" type="xs:short"/><xs:element name="string" nillable="true" type="xs:string"/><xs:element name="unsignedByte" nillable="true" type="xs:unsignedByte"/><xs:element name="unsignedInt" nillable="true" type="xs:unsignedInt"/><xs:element name="unsignedLong" nillable="true" type="xs:unsignedLong"/><xs:element name="unsignedShort" nillable="true" type="xs:unsignedShort"/><xs:element name="char" nillable="true" type="tns:char"/><xs:simpleType name="char"><xs:restriction base="xs:int"/></xs:simpleType><xs:element name="duration" nillable="true" type="tns:duration"/><xs:simpleType name="duration"><xs:restriction base="xs:duration"><xs:pattern value="\-?P(\d*D)?(T(\d*H)?(\d*M)?(\d*(\.\d*)?S)?)?"/><xs:minInclusive value="-P10675199DT2H48M5.4775808S"/><xs:maxInclusive value="P10675199DT2H48M5.4775807S"/></xs:restriction></xs:simpleType><xs:element name="guid" nillable="true" type="tns:guid"/><xs:simpleType name="guid"><xs:restriction base="xs:string"><xs:pattern value="[\da-fA-F]{8}-[\da-fA-F]{4}-[\da-fA-F]{4}-[\da-fA-F]{4}-[\da-fA-F]{12}"/></xs:restriction></xs:simpleType></xs:schema>
            <xs:schema elementFormDefault="qualified" targetNamespace="http://schemas.datacontract.org/2004/07/RTrakWebService"><xs:complexType name="CompositeType"><xs:sequence><xs:element minOccurs="0" name="BoolValue" type="xs:boolean"/><xs:element minOccurs="0" name="StringValue" nillable="true" type="xs:string"/></xs:sequence></xs:complexType><xs:element name="CompositeType" nillable="true" type="tns:CompositeType"/></xs:schema>
            <xs:schema elementFormDefault="qualified" targetNamespace="http://schemas.datacontract.org/2004/07/RTrakWebService.Models"><xs:complexType name="ArrayOfOpportunityModel"><xs:sequence><xs:element minOccurs="0" maxOccurs="unbounded" name="OpportunityModel" nillable="true" type="tns:OpportunityModel"/></xs:sequence></xs:complexType><xs:element name="ArrayOfOpportunityModel" nillable="true" type="tns:ArrayOfOpportunityModel"/><xs:complexType name="OpportunityModel"><xs:sequence><xs:element minOccurs="0" name="AccountName" nillable="true" type="xs:string"/><xs:element minOccurs="0" name="CloseDate" type="xs:dateTime"/><xs:element minOccurs="0" name="OpportunityName" nillable="true" type="xs:string"/></xs:sequence></xs:complexType><xs:element name="OpportunityModel" nillable="true" type="tns:OpportunityModel"/></xs:schema>
    </wsdl:types>
    <wsdl:message name="IRTrakWebSerivce_GetData_InputMessage">
        <wsdl:part name="parameters" element="tns:GetData"/>
    </wsdl:message>
    <wsdl:message name="IRTrakWebSerivce_GetData_OutputMessage">
        <wsdl:part name="parameters" element="tns:GetDataResponse"/>
    </wsdl:message>
    <wsdl:message name="IRTrakWebSerivce_GetDataUsingDataContract_InputMessage">
        <wsdl:part name="parameters" element="tns:GetDataUsingDataContract"/>
    </wsdl:message>
    <wsdl:message name="IRTrakWebSerivce_GetDataUsingDataContract_OutputMessage">
        <wsdl:part name="parameters" element="tns:GetDataUsingDataContractResponse"/>
    </wsdl:message>
    <wsdl:message name="IRTrakWebSerivce_GetAllOpportunities_InputMessage">
        <wsdl:part name="parameters" element="tns:GetAllOpportunities"/>
    </wsdl:message>
    <wsdl:message name="IRTrakWebSerivce_GetAllOpportunities_OutputMessage">
        <wsdl:part name="parameters" element="tns:GetAllOpportunitiesResponse"/>
    </wsdl:message>
    <wsdl:message name="IRTrakWebSerivce_CreateOpportunity_InputMessage">
        <wsdl:part name="parameters" element="tns:CreateOpportunity"/>
    </wsdl:message>
    <wsdl:message name="IRTrakWebSerivce_CreateOpportunity_OutputMessage">
        <wsdl:part name="parameters" element="tns:CreateOpportunityResponse"/>
    </wsdl:message>
    <wsdl:message name="IRTrakWebSerivce_UpdateOpportunity_InputMessage">
        <wsdl:part name="parameters" element="tns:UpdateOpportunity"/>
    </wsdl:message>
    <wsdl:message name="IRTrakWebSerivce_UpdateOpportunity_OutputMessage">
        <wsdl:part name="parameters" element="tns:UpdateOpportunityResponse"/>
    </wsdl:message>
    
    <wsdl:portType name="IRTrakWebSerivce">
        <wsdl:operation name="GetData">
            <wsdl:input wsaw:Action="http://tempuri.org/IRTrakWebSerivce/GetData" message="tns:IRTrakWebSerivce_GetData_InputMessage"/>
            <wsdl:output wsaw:Action="http://tempuri.org/IRTrakWebSerivce/GetDataResponse" message="tns:IRTrakWebSerivce_GetData_OutputMessage"/>
        </wsdl:operation>
        <wsdl:operation name="GetDataUsingDataContract">
            <wsdl:input wsaw:Action="http://tempuri.org/IRTrakWebSerivce/GetDataUsingDataContract" message="tns:IRTrakWebSerivce_GetDataUsingDataContract_InputMessage"/>
            <wsdl:output wsaw:Action="http://tempuri.org/IRTrakWebSerivce/GetDataUsingDataContractResponse" message="tns:IRTrakWebSerivce_GetDataUsingDataContract_OutputMessage"/>
        </wsdl:operation>
        <wsdl:operation name="GetAllOpportunities">
            <wsdl:input wsaw:Action="http://tempuri.org/IRTrakWebSerivce/GetAllOpportunities" message="tns:IRTrakWebSerivce_GetAllOpportunities_InputMessage"/>
            <wsdl:output wsaw:Action="http://tempuri.org/IRTrakWebSerivce/GetAllOpportunitiesResponse" message="tns:IRTrakWebSerivce_GetAllOpportunities_OutputMessage"/>
        </wsdl:operation>
        <wsdl:operation name="CreateOpportunity">
            <wsdl:input wsaw:Action="http://tempuri.org/IRTrakWebSerivce/CreateOpportunity" message="tns:IRTrakWebSerivce_CreateOpportunity_InputMessage"/>
            <wsdl:output wsaw:Action="http://tempuri.org/IRTrakWebSerivce/CreateOpportunityResponse" message="tns:IRTrakWebSerivce_CreateOpportunity_OutputMessage"/>
        </wsdl:operation>
        <wsdl:operation name="UpdateOpportunity">
            <wsdl:input wsaw:Action="http://tempuri.org/IRTrakWebSerivce/UpdateOpportunity" message="tns:IRTrakWebSerivce_UpdateOpportunity_InputMessage"/>
            <wsdl:output wsaw:Action="http://tempuri.org/IRTrakWebSerivce/UpdateOpportunityResponse" message="tns:IRTrakWebSerivce_UpdateOpportunity_OutputMessage"/>
        </wsdl:operation>
    </wsdl:portType>
    
    <wsdl:binding name="basicEndpoint" type="tns:IRTrakWebSerivce">
        <soap:binding transport="http://schemas.xmlsoap.org/soap/http"/>
            <wsdl:operation name="GetData">
                <soap:operation soapAction="http://tempuri.org/IRTrakWebSerivce/GetData" style="document"/>
                <wsdl:input>
                    <soap:body use="literal"/>
                </wsdl:input>
                <wsdl:output>
                    <soap:body use="literal"/>
                </wsdl:output>
            </wsdl:operation>
            <wsdl:operation name="GetDataUsingDataContract">
                <soap:operation soapAction="http://tempuri.org/IRTrakWebSerivce/GetDataUsingDataContract" style="document"/>
                <wsdl:input>
                    <soap:body use="literal"/>
                </wsdl:input>
                <wsdl:output>
                    <soap:body use="literal"/>
                </wsdl:output>
            </wsdl:operation>
            <wsdl:operation name="GetAllOpportunities">
                <soap:operation soapAction="http://tempuri.org/IRTrakWebSerivce/GetAllOpportunities" style="document"/>
                <wsdl:input>
                    <soap:body use="literal"/>
                </wsdl:input>
                <wsdl:output>
                    <soap:body use="literal"/>
                </wsdl:output>
            </wsdl:operation>
            <wsdl:operation name="CreateOpportunity">
                <soap:operation soapAction="http://tempuri.org/IRTrakWebSerivce/CreateOpportunity" style="document"/>
                <wsdl:input>
                    <soap:body use="literal"/>
                </wsdl:input>
                <wsdl:output>
                    <soap:body use="literal"/>
                </wsdl:output>
            </wsdl:operation>
            <wsdl:operation name="UpdateOpportunity">
                <soap:operation soapAction="http://tempuri.org/IRTrakWebSerivce/UpdateOpportunity" style="document"/>
                <wsdl:input>
                    <soap:body use="literal"/>
                </wsdl:input>
                <wsdl:output>
                    <soap:body use="literal"/>
                </wsdl:output>
            </wsdl:operation>
    </wsdl:binding>
    
    <wsdl:service name="RTrakWebService">
        <wsdl:port name="basicEndpoint" binding="tns:basicEndpoint">
            <soap:address location="http://192.168.1.81/RTrackService/RTrakWebService.svc/basicHttp"/>
        </wsdl:port>
    </wsdl:service>
</wsdl:definitions>

Remaining code i attahed above.

 Pls Help me ! 
if any one have solutions,pls let me know