首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >force.com流接口

force.com流接口
EN

Stack Overflow用户
提问于 2012-09-21 07:45:18
回答 1查看 731关注 0票数 1

我正在尝试Force.com Streaming API demo,但得到以下错误:

代码语言:javascript
复制
<?xml version="1.0" encoding="UTF-8"?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:sf="urn:fault.partner.soap.sforce.com" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <soapenv:Body><soapenv:Fault>
        <faultcode>UNKNOWN_EXCEPTION</faultcode>
        <faultstring>UNKNOWN_EXCEPTION: Element type &quot;soapenv:Envelope&quot; must be followed by either attribute specifications, &quot;&gt;&quot; or &quot;/&gt;&quot;.   </faultstring>
        <detail>
            <sf:UnexpectedErrorFault xsi:type="sf:UnexpectedErrorFault">   
                <sf:exceptionCode>UNKNOWN_EXCEPTION</sf:exceptionCode>
                <sf:exceptionMessage>Element type &quot;soapenv:Envelope&quot; must be followed by either attribute specifications, &quot;&gt;&quot; or &quot;/&gt;&quot;.</sf:exceptionMessage>
            </sf:UnexpectedErrorFault>  
        </detail> 
    </soapenv:Fault></soapenv:Body>
</soapenv:Envelope>
EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2013-08-16 12:48:36

第22行有一个放错位置的double quote,编译器没有捕获它。

替换此代码:

代码语言:javascript
复制
private static final String ENV_START =
"
"<soapenv:Envelope xmlns:soapenv='http://schemas.xmlsoap.org/soap/envelope/'
         + "xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' " +
         "xmlns:urn='urn:partner.soap.sforce.com'><soapenv:Body>";

使用以下代码:

代码语言:javascript
复制
private static final String ENV_START =
    "<soapenv:Envelope xmlns:soapenv='http://schemas.xmlsoap.org/soap/envelope/'"
    + "xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' " +
         "xmlns:urn='urn:partner.soap.sforce.com'><soapenv:Body>";
票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/12522498

复制
相关文章

相似问题

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