首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >从SalesForce企业WSDL构建WSC文件时出现问题

从SalesForce企业WSDL构建WSC文件时出现问题
EN

Stack Overflow用户
提问于 2013-04-18 00:12:07
回答 1查看 3K关注 0票数 0

正如these instructions中所指定的,我下载了组织的enterprise.wsdl文件,从Web Services Connector downloads page下载了wsc-23.jar,并从包含两个下载的文件的目录中运行了以下命令:

代码语言:javascript
复制
java -classpath wsc-23.jar com.sforce.ws.tools.wsdlc enterprise.wsdl enterprise.jar

它生成了以下输出:

代码语言:javascript
复制
[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会导致编译失败?

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2013-04-19 02:24:11

作为我们在上面的注释中讨论的问题的变通方法,尝试手动将RecordType复杂类型添加到WSDL中。下面是它应该是什么样子:

代码语言:javascript
复制
<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支持部门提交一份工单。

票数 2
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/16065077

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档