2013-04-17 25 views
0

these instructions規定,我下載我的組織enterprise.wsdl文件,從Web Services Connector downloads page下載wsc-23.jar,跑從包含該目錄下面的命令兩個下載的文件:問題從Salesforce企業WSDL建設WSC jar文件

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

其產生這樣的輸出:

[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 

爲什麼類RecordType造成編譯失敗?

+0

你能確認你有'<複雜類型名稱= 「記錄類型」> ...在WSDL'?我認爲這可能是一個可見性問題,其他對象正在查找RecordType,但是您的WSDL中沒有RecordType本身。 – ryanbrainard

+0

@ryanbrainard不,複合型不會在WSDL存​​在。 SalesForce爲我的組織生成了一個糟糕的WSDL嗎? –

+0

這是可能的。我試圖從我的WSDL元素中刪除'> ...並重現相同的問題。您是否正在使用專業版?可能有一個錯誤,那就是沒有特殊的套管PE缺乏記錄類型?我建議向SFDC支持部門提交一個問題。 – ryanbrainard

回答

2

的解決方法是我們的​​意見上文所討論的問題,請嘗試手動添加RecordType複雜類型的WSDL。下面是它應該是什麼樣子:

<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> 

正如我上面提到的,這聽起來像WSDL生成一個錯誤,所以我建議提交與SFDC支持票爲好。

+0

我與SFDC努力讓這個解決,你的解決方法的工作暫時。謝謝! –