title: getting error "Apex type not found for element Name" in partner wsdl
body: <p>I am new in SOAP Web service. I want to synch two Salesforce instance. For this I am using Partner WSDL. I have installed this WSDL into my instance and I have created one custom class:</p>
  
  <pre><code>public with sharing class ConnectionManager {
  private String uName = 'xxx';
  private String Password = 'xxx';
  private partnerSoapSforceCom.Soap connection{get;set;}
  public ConnectionManager() {
      connection = new partnerSoapSforceCom.Soap();
      partnerSoapSforceCom.LoginResult status = connection.login(uName, Password);
      system.debug('status: '+status);
  
      connection.endpoint_x = status.serverUrl;
      connection.SessionHeader = new partnerSoapSforceCom.SessionHeader_element();
      connection.SessionHeader.sessionId = status.sessionId;
      system.debug('connection.outputHttpHeaders_x: '+connection.outputHttpHeaders_x);
  
      //connection.inputHttpHeaders_x.put('Cookie',connection.outputHttpHeaders_x.get('Set-Cookie'));
      system.debug('qr: '+connection.query('SELECT Id, Name FROM Account where Name=\'test\''));
  }}
  </code></pre>
  
  <p>But It is giving me one exception:</p>
  
  <blockquote>
    <p>System.CalloutException: Web service callout failed: Unable to parse
    callout response. Apex type not found for element Name</p>
    
    <p>Class.partnerSoapSforceCom.Soap.query: line 2048, column 1
    Class.ConnectionManager.: line 16, column 1</p>
  </blockquote>
  
  <p>it is logging into salesforce but giving me error in "connection.query()" method.</p>
  
  <p>I checked in debug log and got this response xml:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns="urn:partner.soap.sforce.com" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:sf="urn:sobject.partner.soap.sforce.com"&gt;
      &lt;soapenv:Header&gt;
          &lt;LimitInfoHeader&gt;
              &lt;limitInfo&gt;
                  &lt;current&gt;1&lt;/current&gt;
                  &lt;limit&gt;5000&lt;/limit&gt;
                  &lt;type&gt;API REQUESTS&lt;/type&gt;
              &lt;/limitInfo&gt;
          &lt;/LimitInfoHeader&gt;
      &lt;/soapenv:Header&gt;
      &lt;soapenv:Body&gt;
          &lt;queryResponse&gt;
              &lt;result xsi:type="QueryResult"&gt;
                  &lt;done&gt;true&lt;/done&gt;
                  &lt;queryLocator xsi:nil="true"/&gt;
                  &lt;records xsi:type="sf:sObject"&gt;
                      &lt;sf:type&gt;Account&lt;/sf:type&gt;
                      &lt;sf:Id&gt;0019000000lhRWKAA2&lt;/sf:Id&gt;
                      &lt;sf:Id&gt;0019000000lhRWKAA2&lt;/sf:Id&gt;
                      &lt;sf:Name&gt;test&lt;/sf:Name&gt;
                  &lt;/records&gt;
                  &lt;size&gt;1&lt;/size&gt;
              &lt;/result&gt;
          &lt;/queryResponse&gt;
      &lt;/soapenv:Body&gt;
  &lt;/soapenv:Envelope&gt;
  </code></pre>
  
  <p>Please help me. Thanks in advance.</p>