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
Mary CusackMary Cusack 

trailhead exercise soap with soapui invalid session id but I am logged in

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:urn="urn:enterprise.soap.sforce.com" xmlns:urn1="urn:sobject.enterprise.soap.sforce.com">
   <soapenv:Header>
     
    
      <urn:SessionHeader>
         <urn:sessionId>00Df20000011Hrb!AR4AQNPWrjRsJ7IDCZ9fPi_Odn.kNQ.ujQ6oVAKO0hoMwGAb0ULFhlcG4P6YnohndiIecZ5PI5oj6TmJ.1pBnPJ_xlWBuauP</urn:sessionId>
      </urn:SessionHeader>
   </soapenv:Header>
   <soapenv:Body>
      <urn:create>
         <!--Zero or more repetitions:-->
         <urn:sObjects>
           <Name>Sample Soap Account</Name>
          <AccountNumber>SampleSo</AccountNumber>
            <!--Zero or more repetitions:-->
      
         </urn:sObjects>
      </urn:create>
   </soapenv:Body>
</soapenv:Envelope>


what am I doing wrong???????  I keep getting invalid session id. 
Best Answer chosen by Mary Cusack
Mary CusackMary Cusack
figured it out myself .  When you loging the response gives you the url you have to use. you copy it and paste it in the box above the xml
url to use for soap after initial loginUser-added image

All Answers

Mary CusackMary Cusack
I am using enterprse wsdl they told me to create.   Every time I log in I get the same session key.  Please help!!!!
 
Abdul KhatriAbdul Khatri
I do not see any issues if you follow step by step instructions.

Have you done the following excercise
1. Successful Login Request and Copy the SessionID and the ServerUrl

2.
I don't see you have change this 
<urn:sObjects>
to this
<urn:sObjects xsi:type="urn1:Account" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" >

You also need to change the instance url (Server Url) , you copied in the point 1. Then entire url must look like this
https://na30.salesforce.com/services/Soap/c/36.0
I hope this helped.
Mary CusackMary Cusack
figured it out myself .  When you loging the response gives you the url you have to use. you copy it and paste it in the box above the xml
url to use for soap after initial loginUser-added image
This was selected as the best answer
Abdul KhatriAbdul Khatri
Anyways that was one of my suggestions in my response.

Kindly help making either your response the best or whatever you like. so that it shows up Resolved.

Thanks.
Lakshmi Rajyam TalasilaLakshmi Rajyam Talasila
Hello,

Can any one help me regarding this invalid session Id error. How to resolve that?

User-added image


Thanks,
Lakshmi