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
Rahul BorgaonkarRahul Borgaonkar 

Error - Apex type not found for element http://www.w3.org/2001/XMLSchema=schema

Hi All,

I have converted external system WSDL to a class on our SF sandbox. The part of class is as below
public class PorticoCallOuts {

    public class QUBA_SF_SearchAccountResponse_element {
        public PorticoCallOuts.QUBA_SF_SearchAccountResult_element QUBA_SF_SearchAccountResult;
        private String[] QUBA_SF_SearchAccountResult_type_info = new String[]{'QUBA_SF_SearchAccountResult','http://tempuri.org/',null,'0','1','false'};
        private String[] apex_schema_type_info = new String[]{'http://tempuri.org/','true','true'};
        private String[] field_order_type_info = new String[]{'QUBA_SF_SearchAccountResult'};
    }
    public class QUBA_SF_SearchAccount_element {
        public String accountID;
        public String accountName;
        public String PostCode;
        private String[] accountID_type_info = new String[]{'accountID','http://tempuri.org/',null,'0','1','false'};
        private String[] accountName_type_info = new String[]{'accountName','http://tempuri.org/',null,'0','1','false'};
        private String[] PostCode_type_info = new String[]{'PostCode','http://tempuri.org/',null,'0','1','false'};
        private String[] apex_schema_type_info = new String[]{'http://tempuri.org/','true','true'};
        private String[] field_order_type_info = new String[]{'accountID','accountName','PostCode'};
    }
    public class QUBA_SF_SearchAccountResult_element {
        public String namespace;
        public String tableTypeName;
        private String[] namespace_att_info = new String[]{'namespace'};
        private String[] tableTypeName_att_info = new String[]{'tableTypeName'};
        private String[] apex_schema_type_info = new String[]{'http://tempuri.org/','false','false'};
        private String[] field_order_type_info = new String[]{};
    }

    public class QubaCentre_element {
        public String CentreID;
        public String Name;
        public String Address_1;
        public String Address_2;
        public String Address_3;
        public String Address_4;
        public String Address_5;
        public String Postcode;
        private String[] CentreID_type_info = new String[]{'CentreID','http://tempuri.org/',null,'0','1','false'};
        private String[] Name_type_info = new String[]{'Name','http://tempuri.org/',null,'0','1','false'};
        private String[] Address_1_type_info = new String[]{'Address_1','http://tempuri.org/',null,'0','1','false'};
        private String[] Address_2_type_info = new String[]{'Address_2','http://tempuri.org/',null,'0','1','false'};
        private String[] Address_3_type_info = new String[]{'Address_3','http://tempuri.org/',null,'0','1','false'};
        private String[] Address_4_type_info = new String[]{'Address_4','http://tempuri.org/',null,'0','1','false'};
        private String[] Address_5_type_info = new String[]{'Address_5','http://tempuri.org/',null,'0','1','false'};
        private String[] Postcode_type_info = new String[]{'Postcode','http://tempuri.org/',null,'0','1','false'};
        private String[] apex_schema_type_info = new String[]{'http://tempuri.org/','true','true'};
        private String[] field_order_type_info = new String[]{'CentreID','Name','Address_1','Address_2','Address_3','Address_4','Address_5','Postcode'};
    }
    public class QubaSfV1_element {
        public PorticoCallOuts.QubaCentre_element QubaCentre;
        public PorticoCallOuts.QubaAccountCreateOrUpdateResult_element QubaAccountCreateOrUpdateResult;
        public PorticoCallOuts.QubaContactCreateOrUpdateResult_element QubaContactCreateOrUpdateResult;
        public PorticoCallOuts.QubaContact_element QubaContact;
        public PorticoCallOuts.QubaApprovalCreateOrUpdateResult_element QubaApprovalCreateOrUpdateResult;
        public PorticoCallOuts.QubaUpdateCreditBalanceResult_element QubaUpdateCreditBalanceResult;
        private String[] QubaCentre_type_info = new String[]{'QubaCentre','http://tempuri.org/',null,'1','1','false'};
        private String[] QubaAccountCreateOrUpdateResult_type_info = new String[]{'QubaAccountCreateOrUpdateResult','http://tempuri.org/',null,'1','1','false'};
        private String[] QubaContactCreateOrUpdateResult_type_info = new String[]{'QubaContactCreateOrUpdateResult','http://tempuri.org/',null,'1','1','false'};
        private String[] QubaContact_type_info = new String[]{'QubaContact','http://tempuri.org/',null,'1','1','false'};
        private String[] QubaApprovalCreateOrUpdateResult_type_info = new String[]{'QubaApprovalCreateOrUpdateResult','http://tempuri.org/',null,'1','1','false'};
        private String[] QubaUpdateCreditBalanceResult_type_info = new String[]{'QubaUpdateCreditBalanceResult','http://tempuri.org/',null,'1','1','false'};
        private String[] apex_schema_type_info = new String[]{'http://tempuri.org/','true','true'};
        private String[] field_order_type_info = new String[]{'QubaCentre','QubaAccountCreateOrUpdateResult','QubaContactCreateOrUpdateResult','QubaContact','QubaApprovalCreateOrUpdateResult','QubaUpdateCreditBalanceResult'};
    }
    public class QubaAccountCreateOrUpdateResult_element {
        public String Success;
        public String Quartz_AccountID;
        public String AccountID;
        public String ErrorMessage;
        private String[] Success_type_info = new String[]{'Success','http://tempuri.org/',null,'0','1','false'};
        private String[] Quartz_AccountID_type_info = new String[]{'Quartz_AccountID','http://tempuri.org/',null,'0','1','false'};
        private String[] AccountID_type_info = new String[]{'AccountID','http://tempuri.org/',null,'0','1','false'};
        private String[] ErrorMessage_type_info = new String[]{'ErrorMessage','http://tempuri.org/',null,'0','1','false'};
        private String[] apex_schema_type_info = new String[]{'http://tempuri.org/','true','true'};
        private String[] field_order_type_info = new String[]{'Success','Quartz_AccountID','AccountID','ErrorMessage'};
    }
    public class WSQUBA_SF_V1Soap {
        public String endpoint_x = 'http://qh02ws.quartz-system.com/QuartzWSExtra/BritSafe_ST/WSQUBA_SF_V1.asmx';
        public Map<String,String> inputHttpHeaders_x;
        public Map<String,String> outputHttpHeaders_x;
        public String clientCertName_x;
        public String clientCert_x;
        public String clientCertPasswd_x;
        public Integer timeout_x;
        private String[] ns_map_type_info = new String[]{'http://tempuri.org/', 'PorticoCallOuts'};

        public PorticoCallOuts.QUBA_SF_SearchAccountResult_element QUBA_SF_SearchAccount(String accountID,String accountName,String PostCode) {
            PorticoCallOuts.QUBA_SF_SearchAccount_element request_x = new PorticoCallOuts.QUBA_SF_SearchAccount_element();
            request_x.accountID = accountID;
            request_x.accountName = accountName;
            request_x.PostCode = PostCode;
            PorticoCallOuts.QUBA_SF_SearchAccountResponse_element response_x;
            Map<String, PorticoCallOuts.QUBA_SF_SearchAccountResponse_element> response_map_x = new Map<String, PorticoCallOuts.QUBA_SF_SearchAccountResponse_element>();
            response_map_x.put('response_x', response_x);
            WebServiceCallout.invoke(
              this,
              request_x,
              response_map_x,
              new String[]{endpoint_x,
              'http://tempuri.org/QUBA_SF_SearchAccount',
              'http://tempuri.org/',
              'QUBA_SF_SearchAccount',
              'http://tempuri.org/',
              'QUBA_SF_SearchAccountResponse',
              'PorticoCallOuts.QUBA_SF_SearchAccountResponse_element'}
            );
            response_x = response_map_x.get('response_x');
            return response_x.QUBA_SF_SearchAccountResult;
        }
    }
}

While executing QUBA_SF_SearchAccount(String accountID,String accountName,String PostCode) function I am getting error below
Web service callout failed: Unable to parse callout response. Apex type not found for element http://www.w3.org/2001/XMLSchema=schema

The return xml generated from SoapUI is
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
   <soap:Body>
      <QUBA_SF_SearchAccountResponse xmlns="http://tempuri.org/">
         <QUBA_SF_SearchAccountResult>
            <xs:schema id="NewDataSet" xmlns="" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
               <xs:element name="NewDataSet" msdata:IsDataSet="true" msdata:MainDataTable="QubaCentre" msdata:UseCurrentLocale="true">
                  <xs:complexType>
                     <xs:choice minOccurs="0" maxOccurs="unbounded">
                        <xs:element name="QubaCentre">
                           <xs:complexType>
                              <xs:sequence>
                                 <xs:element name="CentreID" msdata:Caption="ID" type="xs:string" minOccurs="0"/>
                                 <xs:element name="Name" type="xs:string" minOccurs="0"/>
                                 <xs:element name="Address_1" type="xs:string" minOccurs="0"/>
                                 <xs:element name="Address_2" type="xs:string" minOccurs="0"/>
                                 <xs:element name="Address_3" type="xs:string" minOccurs="0"/>
                                 <xs:element name="Address_4" type="xs:string" minOccurs="0"/>
                                 <xs:element name="Address_5" type="xs:string" minOccurs="0"/>
                                 <xs:element name="Postcode" type="xs:string" minOccurs="0"/>
                              </xs:sequence>
                           </xs:complexType>
                        </xs:element>
                     </xs:choice>
                  </xs:complexType>
               </xs:element>
            </xs:schema>
            <diffgr:diffgram xmlns:msdata="urn:schemas-microsoft-com:xml-msdata" xmlns:diffgr="urn:schemas-microsoft-com:xml-diffgram-v1">
               <DocumentElement xmlns="">
                  <QubaCentre diffgr:id="QubaCentre1" msdata:rowOrder="0" diffgr:hasChanges="inserted">
                     <CentreID>1</CentreID>
                     <Name>Test Centre</Name>
                     <Address_1>123 Street Name</Address_1>
                     <Address_2>City name</Address_2>
                     <Address_3/>
                     <Address_4/>
                     <Address_5/>
                     <Postcode>GU23 6AE</Postcode>
                  </QubaCentre>
               </DocumentElement>
            </diffgr:diffgram>
         </QUBA_SF_SearchAccountResult>
      </QUBA_SF_SearchAccountResponse>
   </soap:Body>
</soap:Envelope>
Could I kindly request you to find exact issue with this? I guess it is something with schema element from return xml but not able to find exact problem.

Please help.

Best Regards,

Rahul
 
Lokesh KumarLokesh Kumar
Please go through the below article for the same issue.

http://salesforce.stackexchange.com/questions/93891/unsupported-schema-element-found-http-www-w3-org-2001-xmlschemaattribute
http://salesforce.stackexchange.com/questions/151635/unsupported-schema-element-found-http-www-w3-org-2001-xmlschemaattributegroup/151701

Use FuseIT to parse your WSDL.
http://www.fuseit.com/explorer

Thanks
Lokesh