2017-01-23 82 views
0

我正嘗試使用Web服務使用者將MuleSfot連接到基於Salesforce SOAP的Web服務。首先在SOAPUI中嘗試,但獲取INVALID_SESSION_ID,我需要在Salesforce中登錄以獲取ID但不清楚。 請幫助!將Mule連接到Salesforce的基於SOAP的Web服務

編輯1

請求我送

<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,我不能讓

原始請求

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) 

原始響應

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

請發佈更多的細節,你已經嘗試和問題。還添加原始請求和響應。 – Rao

回答

1

我知道了。需要首先登錄到Salesforce,使用login()調用並獲取會話ID。 謝謝