• dilip Jain
  • NEWBIE
  • 0 Points
  • Member since 2019

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
    Questions
  • 1
    Replies
Hi Everyone , I am stuck
I am currently testing out some functionality where I have to pass 1 record value from one instance to other instance of salesforce using SOAP webservice and WSDL , steps being followed by me :
step1 :  wrote a webservice class in SFDC instance1
step2 : after successfull creation , clicked on GENERATE WSDL on the same page and saved it.
step 3 : opened my SFDC instance2 and in Apex class -- clicked on Generate from  WSDL , here i refered to the wsdl class which I had obtained from SFDC instance 1.
step 4 :  now I am working in my another controller class in sfdc Instance2 and trying to fetch the data retured from WSDL class (by intiating it and calling my method in it ) but it is saying
"System.CalloutException: Web service callout failed: WebService returned a SOAP Fault: INVALID_SESSION_ID: Invalid Session ID found in SessionHeader: Illegal Session faultcode=sf:INVALID_SESSION_ID faultactor="

I know I am missing many things :
- call login() with username and password
- I have to fetch the session ID and use it

even I want to set them up , but I am unable to find out them in my "APEX generated from wsdl class" . There is only 1 method with the name LoginINFO (no username or password in the method) in my apex generated frm WSDL
please advise and assist me.
Thanks