首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >将Mule连接到Salesforce的基于SOAP的Web服务

将Mule连接到Salesforce的基于SOAP的Web服务
EN

Stack Overflow用户
提问于 2017-01-23 18:44:13
回答 1查看 256关注 0票数 0

我正在尝试使用将MuleSfot连接到基于Salesforce SOAP的web服务。首先尝试在SOAPUI中尝试,但获得INVALID_SESSION_ID,我需要登录Salesforce来获取ID,但不清楚。救命啊!!

编辑1

我要发出的请求

代码语言:javascript
复制
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:="http://soap.sforce.com/schemas/class/WebService">
   <soapenv:Header>
      <AllowFieldTruncationHeader>
         <allowFieldTruncation>false</allowFieldTruncation>
      </AllowFieldTruncationHeader>
      <DebuggingHeader>
         <!--Zero or more repetitions:-->
         <categories>
            <category>All</category>
            <level>None</level>
         </categories>
         <debugLevel>None</debugLevel>
      </DebuggingHeader>
      <CallOptions>
         <client>?</client>
      </CallOptions>
      <SessionHeader>
         <sessionId>?</sessionId>
      </SessionHeader>
   </soapenv:Header>
   <soapenv:Body>
   </soapenv:Body>
</soapenv:Envelope>

?对客户来说很好。这是我无法得到的会话ID

原始请求

代码语言:javascript
复制
POST https://cs61.salesforce.com/services/Soap/class/WebService HTTP/1.1
Accept-Encoding: gzip,deflate
Content-Type: text/xml;charset=UTF-8
SOAPAction: ""
Content-Length: 972
Host: cs61.salesforce.com
Connection: Keep-Alive
User-Agent: Apache-HttpClient/4.1.1 (java 1.5)

原始响应

代码语言:javascript
复制
HTTP/1.1 500 Server Error
Date: Tue, 24 Jan 2017 04:18:15 GMT
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Content-Security-Policy: reflected-xss block;report-uri /_/ContentDomainCSPNoAuth?type=xss
Content-Security-Policy: referrer origin-when-cross-origin
Set-Cookie: BrowserId=CdHsqmLzR3OFRklUfp1p3g;Path=/;Domain=.salesforce.com;Expires=Sat, 25-Mar-2017 04:18:15 GMT
Expires: Thu, 01 Jan 1970 00:00:00 GMT
Content-Type: text/xml; charset=utf-8
Transfer-Encoding: chunked


    <?xml version="1.0" encoding="UTF-8"?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:sf="http://soap.sforce.com/schemas/class/WebService">
<soapenv:Body>
<soapenv:Fault>
<faultcode>sf:INVALID_SESSION_ID</faultcode>
<faultstring>INVALID_SESSION_ID: Invalid Session ID found in SessionHeader: Illegal Session</faultstring>
</soapenv:Fault>
</soapenv:Body>
</soapenv:Envelope>
EN

回答 1

Stack Overflow用户

发布于 2017-01-25 05:05:49

这样啊,原来是这么回事。首先需要登录到Salesforce,使用登录()调用并获取会话ID。

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

https://stackoverflow.com/questions/41813426

复制
相关文章

相似问题

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