0

As specified in these instructions, I downloaded my organization's enterprise.wsdl file, downloaded wsc-23.jar from the Web Services Connector downloads page, and ran the following command from the directory containing the two downloaded files:

java -classpath wsc-23.jar com.sforce.ws.tools.wsdlc enterprise.wsdl enterprise.jar

which generated this output:

[WSC23][wsdlc.run:348]Created temp dir: C:\Users\myName\AppData\Local\Temp\wsd
lc-temp-215798849-dir
[WSC23][wsdlc.<init>:110]Generating Java files from schema ...
[WSC23][wsdlc.<init>:110]Generated 290 java files.
[WSC23][wsdlc.compileTypes:298]Compiling to target default...
cannot find symbol
  symbol:   class RecordType
  location: package com.sforce.soap.enterprise.sobject
cannot find symbol
  symbol:   class RecordType
  location: package com.sforce.soap.enterprise.sobject
cannot find symbol
  symbol:   class RecordType
  location: package com.sforce.soap.enterprise.sobject
cannot find symbol
  symbol:   class RecordType
  location: package com.sforce.soap.enterprise.sobject
cannot find symbol
  symbol:   class RecordType
  location: package com.sforce.soap.enterprise.sobject
Error: Compilation failed

Why is class RecordType causing compilation to fail?

CFL_Jeff
  • 2,589
  • 3
  • 31
  • 49
  • Can you confirm you have `...` in your WSDL? I'm thinking it might be a visibility issue where the other objects are looking up to RecordType, but you don't have RecordType itself in your WSDL. – ryanbrainard Apr 18 '13 at 05:52
  • @ryanbrainard No, that complex type does not exist in the WSDL. So did SalesForce generate a bad WSDL for my organization? – CFL_Jeff Apr 18 '13 at 16:18
  • It's possible. I just tried removing the `...` from element from my WSDL and reproduced the same issue. Are you using Professional Edition, perhaps? There might be a bug that isn't special casing PE's lack of record types?? I'd recommend filing an issue with SFDC Support. – ryanbrainard Apr 18 '13 at 18:17

1 Answers1

2

As a workaround to the issue we discussed in comments above, try manually adding the RecordType complex type to your WSDL. Here is what it should look like:

<complexType name="RecordType">
    <complexContent>
        <extension base="ens:sObject">
            <sequence>
            <element name="BusinessProcessId" nillable="true" minOccurs="0" type="tns:ID"/>
            <element name="CreatedBy" nillable="true" minOccurs="0" type="ens:User"/>
            <element name="CreatedById" nillable="true" minOccurs="0" type="tns:ID"/>
            <element name="CreatedDate" nillable="true" minOccurs="0" type="xsd:dateTime"/>
            <element name="Description" nillable="true" minOccurs="0" type="xsd:string"/>
            <element name="DeveloperName" nillable="true" minOccurs="0" type="xsd:string"/>
            <element name="IsActive" nillable="true" minOccurs="0" type="xsd:boolean"/>
            <element name="IsPersonType" nillable="true" minOccurs="0" type="xsd:boolean"/>
            <element name="LastModifiedBy" nillable="true" minOccurs="0" type="ens:User"/>
            <element name="LastModifiedById" nillable="true" minOccurs="0" type="tns:ID"/>
            <element name="LastModifiedDate" nillable="true" minOccurs="0" type="xsd:dateTime"/>
            <element name="Localization" nillable="true" minOccurs="0" type="tns:QueryResult"/>
            <element name="Name" nillable="true" minOccurs="0" type="xsd:string"/>
            <element name="NamespacePrefix" nillable="true" minOccurs="0" type="xsd:string"/>
            <element name="SobjectType" nillable="true" minOccurs="0" type="xsd:string"/>
            <element name="SystemModstamp" nillable="true" minOccurs="0" type="xsd:dateTime"/>
            </sequence>
        </extension>
    </complexContent>
</complexType>

As I mentioned above, this sounds like a bug in the WSDL generation, so I'd recommend filing a ticket with SFDC Support as well.

ryanbrainard
  • 5,918
  • 35
  • 41
  • I am working with SFDC to get this resolved, and your workaround worked for the time being. Thanks! – CFL_Jeff Apr 19 '13 at 19:29