• Dan Cahill
  • NEWBIE
  • 0 Points
  • Member since 2015

  • Chatter
    Feed
  • 0
    Best Answers
  • 1
    Likes Received
  • 1
    Likes Given
  • 2
    Questions
  • 4
    Replies
Hello,

I am preparing to move a webservice call that has been in testing in my sandbox environment and works as expected there.  When I run the same call against my production environment I receive the following error:

Fatal error: Uncaught SoapFault exception: [sf:INVALID_SESSION_ID] INVALID_SESSION_ID: Invalid Session ID found in SessionHeader: Illegal Session. Session not found, missing session hash: <**HASH REMOVED**> This is expected, it can happen if the session has expired and swept away, or if the user logs out, or if its just someone trying to hack in.

The code is fairly simple - I am creating a connection with the PHP toolkit using the appropriately generated partner wsdl.jsp and logging in.  I am able to log in  but when I make the call to the webservice I am given the error above.  Could this be an issue in the way the production org is set up or do I need to look elsewhere?

Code used to call the service is below.  The error is thrown on $client->IsThisLiveProduct($valuearray);
$USERNAME = "USERNAME";
$PASSWORD = "PASSWORD";
$TOKEN = "TOKEN";

require_once ('/soapclient/SforcePartnerClient.php');
require_once ('/soapclient/SforceHeaderOptions.php');

$mySforceConnection = new SforcePartnerClient();
$mySoapClient = $mySforceConnection->createConnection("../forcecom2/soapclient/wsdl.jsp.xml");
$mylogin = $mySforceConnection->login($USERNAME, $PASSWORD . $TOKEN);

$parsedURL = parse_url($mySforceConnection->getLocation());
define ("_WS_NAME_", 'WSNAME');
define ("_WS_WSDL_", _WS_NAME_ . '.xml');
define ("_WS_NAMESPACE_", 'http://soap.sforce.com/schemas/class/' . _WS_NAME_);

// SOAP Client for Web Service
$client = new SoapClient(_WS_WSDL_);
$sforce_header = new SoapHeader(_WS_NAMESPACE_, "SessionHeader", array("sessionId" => $mySforceConnection->getSessionId()));
$client->__setSoapHeaders(array($sforce_header));

// Call the web service
$valuearray = array('SerialNumber'=>'SERIALNO');
$response = $client->IsThisLiveProduct($valuearray);

Thanks!
I've seen other posts regarding this issue and have tried them to the best of my ability, but no luck.

PHP code:
$USERNAME="XXX";
$PASSWORD="XXX";
$TOKEN="XXX";

require_once ('../forcecom/soapclient/SforcePartnerClient.php');
require_once ('../forcecom/soapclient/SforceHeaderOptions.php');

$mySforceConnection = new SforcePartnerClient();
$mySoapClient = $mySforceConnection->createConnection("../forcecom/soapclient/partner.wsdl.xml");
$mylogin = $mySforceConnection->login($USERNAME, $PASSWORD . $TOKEN);

Every attempt always shows:

Fatal error: Uncaught SoapFault exception: [sf:INVALID_LOGIN] INVALID_LOGIN: Invalid username, password, security token; or user locked out.

So far I have tried the following:
  • Recreating the sandbox.
  • Resetting the password and the security token for two seperate accounts.  Both of these account can log into the sandbox using the browser successfully.
  • Changing the endpoint to <soap:address location="https://login.salesforce.com/services/Soap/u/32.0"/> 
Is there anything else that I should try?  Please help!
Hello,

I am preparing to move a webservice call that has been in testing in my sandbox environment and works as expected there.  When I run the same call against my production environment I receive the following error:

Fatal error: Uncaught SoapFault exception: [sf:INVALID_SESSION_ID] INVALID_SESSION_ID: Invalid Session ID found in SessionHeader: Illegal Session. Session not found, missing session hash: <**HASH REMOVED**> This is expected, it can happen if the session has expired and swept away, or if the user logs out, or if its just someone trying to hack in.

The code is fairly simple - I am creating a connection with the PHP toolkit using the appropriately generated partner wsdl.jsp and logging in.  I am able to log in  but when I make the call to the webservice I am given the error above.  Could this be an issue in the way the production org is set up or do I need to look elsewhere?

Code used to call the service is below.  The error is thrown on $client->IsThisLiveProduct($valuearray);
$USERNAME = "USERNAME";
$PASSWORD = "PASSWORD";
$TOKEN = "TOKEN";

require_once ('/soapclient/SforcePartnerClient.php');
require_once ('/soapclient/SforceHeaderOptions.php');

$mySforceConnection = new SforcePartnerClient();
$mySoapClient = $mySforceConnection->createConnection("../forcecom2/soapclient/wsdl.jsp.xml");
$mylogin = $mySforceConnection->login($USERNAME, $PASSWORD . $TOKEN);

$parsedURL = parse_url($mySforceConnection->getLocation());
define ("_WS_NAME_", 'WSNAME');
define ("_WS_WSDL_", _WS_NAME_ . '.xml');
define ("_WS_NAMESPACE_", 'http://soap.sforce.com/schemas/class/' . _WS_NAME_);

// SOAP Client for Web Service
$client = new SoapClient(_WS_WSDL_);
$sforce_header = new SoapHeader(_WS_NAMESPACE_, "SessionHeader", array("sessionId" => $mySforceConnection->getSessionId()));
$client->__setSoapHeaders(array($sforce_header));

// Call the web service
$valuearray = array('SerialNumber'=>'SERIALNO');
$response = $client->IsThisLiveProduct($valuearray);

Thanks!
Hello,I am looking for some guidance on a Fault Viewer error message received by one of our developers doing integration with Salesforce and another tool. Salesforce said that this is a Visualforce error and to post in this community.

Last week one of our users ran about 80-90 messages that were queued up to SalesForce and that he received the following error.

"Exception in ProcessServiceOrdersOrchestration: InvalidFieldFault thrown by SalesforceQuery. Code: INVALID_SESSIONID Message: Invalid Session ID found in SessionHeader: Illegal Session. Session not found, missing session hash: ..."

I am wondering who can look at the SalesForce side to determine the real cause? Is it admins?

Additional info from our developer sent "If SalesForce saw a load from a particular IP and thought perhaps it was someone hacking then we need to understand whether that can be configured or if I need to throttle messages being sent."

Please let me know what this error means and what steps we can take in the future to investigate.

Thank you!
I've seen other posts regarding this issue and have tried them to the best of my ability, but no luck.

PHP code:
$USERNAME="XXX";
$PASSWORD="XXX";
$TOKEN="XXX";

require_once ('../forcecom/soapclient/SforcePartnerClient.php');
require_once ('../forcecom/soapclient/SforceHeaderOptions.php');

$mySforceConnection = new SforcePartnerClient();
$mySoapClient = $mySforceConnection->createConnection("../forcecom/soapclient/partner.wsdl.xml");
$mylogin = $mySforceConnection->login($USERNAME, $PASSWORD . $TOKEN);

Every attempt always shows:

Fatal error: Uncaught SoapFault exception: [sf:INVALID_LOGIN] INVALID_LOGIN: Invalid username, password, security token; or user locked out.

So far I have tried the following:
  • Recreating the sandbox.
  • Resetting the password and the security token for two seperate accounts.  Both of these account can log into the sandbox using the browser successfully.
  • Changing the endpoint to <soap:address location="https://login.salesforce.com/services/Soap/u/32.0"/> 
Is there anything else that I should try?  Please help!
Hello,I am looking for some guidance on a Fault Viewer error message received by one of our developers doing integration with Salesforce and another tool. Salesforce said that this is a Visualforce error and to post in this community.

Last week one of our users ran about 80-90 messages that were queued up to SalesForce and that he received the following error.

"Exception in ProcessServiceOrdersOrchestration: InvalidFieldFault thrown by SalesforceQuery. Code: INVALID_SESSIONID Message: Invalid Session ID found in SessionHeader: Illegal Session. Session not found, missing session hash: ..."

I am wondering who can look at the SalesForce side to determine the real cause? Is it admins?

Additional info from our developer sent "If SalesForce saw a load from a particular IP and thought perhaps it was someone hacking then we need to understand whether that can be configured or if I need to throttle messages being sent."

Please let me know what this error means and what steps we can take in the future to investigate.

Thank you!