function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
sfdc18sfdc18 

INVALID_SESSION_ID: Invalid Session ID found in SessionHeader: Illegal Session

Hi,

I am calling Salesforce Webservice from Soap UI.
I am getting below error in request.

INVALID_SESSION_ID: Invalid Session ID found in SessionHeader: Illegal Session

Soap Request :


<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:cas="http://soap.sforce.com/schemas/class/CaseWebService">
   <soapenv:Header>
      <cas:AllowFieldTruncationHeader>
         <cas:allowFieldTruncation>0</cas:allowFieldTruncation>
      </cas:AllowFieldTruncationHeader>
      <cas:DebuggingHeader>
         <!--Zero or more repetitions:-->
         <cas:categories>
            <cas:category>All</cas:category>
            <cas:level>INFO</cas:level>
         </cas:categories>
         <cas:debugLevel>NONE</cas:debugLevel>
      </cas:DebuggingHeader>
      <cas:CallOptions>
         <cas:client>0</cas:client>
      </cas:CallOptions>
      <cas:SessionHeader>
         <cas:sessionId>1XjSeaHT9b85DPaCSHzp4RjZ</cas:sessionId>
      </cas:SessionHeader>
   </soapenv:Header>
   <soapenv:Body>
      <cas:CaseParam>
         <cas:cNo>00001024</cas:cNo>
         <cas:cOrigin>Phone</cas:cOrigin>
         <cas:cDescription>Test</cas:cDescription>
         <cas:cSubject>Design issue with mechanical rotor Test</cas:cSubject>
         <cas:cPriority>High</cas:cPriority>
         <cas:cStatus>Working</cas:cStatus>
      </cas:CaseParam>
   </soapenv:Body>
</soapenv:Envelope>
Error :

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:sf="http://soap.sforce.com/schemas/class/CaseWebService">
   <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>



Apex - LearnerApex - Learner
Please generate a new session Id using Login service. As shown in screenshot below, provide your username and password in the request which will retrun a new session Id and server url. Use this new endpoint (ServrerURL) and session Id to do further calls (update, create, upsert etc.)

 SOAP UI Login Method

Please do let me know if you still face any issues.