• venomousblood
  • NEWBIE
  • 0 Points
  • Member since 2008

  • Chatter
    Feed
  • 0
    Best Answers
  • 1
    Likes Received
  • 0
    Likes Given
  • 4
    Questions
  • 5
    Replies

I am performing real-time integration between SFDC and external application.We have generated a custom webservice and provided the wsdl to the external app.Since I am not implementing any login method in this webservice there is no way to login to SFDC from external app.

I am aware if we use enterprise/partner wsdl we get the login method but using these wsdl would also expose my organizations complete configuration information which I would not like to happen.

In this case how would we allow external app to login to SFDC?

Hi,

 

I have created a custom web service method in salesforce. I have generated the wsdl and provided to the java developer. How can the java developer access my custom web service method ? My web service doesnt have any login method. Any help on this is greatly appreciated.

 

Thanks,

Bala

Hi there,

 

Any help is greatly appreciated. 

 

I have a scheduled .net program which queries SF objects for reporting, eg. getting contacts, opportunties related information from all accounts in the system.  This report (when successful) runs for 2-3 hours.  I have read other discussion board postings on session timeouts so I made sure that I am logging in and out of Salesforce during the reporting process so that no single session exists for more than 2 hours (note: my organization's session timeout is set to 8 hours anyway).

 

The problem here is that I cannot consistently run through the entire report.  Given the *same* .net codebase, sometimes it runs for an hour or so before it throws the INVALID_SESSION_ID error, sometimes it runs for > 2 hours, sometimes < 1 hour, sometimes it runs through completely.

 

My login code is very simple:

 

    class Program
    {
        public static SforceService sfdc = new SforceService();

 

....

....

 

      try
            {

                LoginResult lr = sfdc.login("user@company.com", "Hello123");

                if (!lr.passwordExpired)
                {
                    sfdc.Url = lr.serverUrl;
                    sfdc.SessionHeaderValue = new SessionHeader();
                    sfdc.SessionHeaderValue.sessionId = lr.sessionId;
                    writeDebug("Current Session ID: " + lr.sessionId);

                }
                else
                {
                    writeDebug("Your password has expired.\n");
                }

                writeDebug("[INFO] Logged in to Salesforce at " + DateTime.Now.ToString());


-------------

 

As you can see, I am printing out the session key before I set it to the session header and login.  Here is an example of a failed run.  As you can see, the invalid session key in the exception message matches the session key that is set before the login so I am not sure why it would be invalid unless somehow Salesforce dropped or invalidated the session unexpectedly.

 

 Current Session ID: 433200D00000000hgkJ!ARgAQJ4rsOqnp_kj3BkvtsT_nhJ2y18YD0XOoFe9bLpGhXJXONX_z440EOMdWc03iApAWNi3UfEBVl6CUG61sgOQ7_YyvD1y
[INFO] Logged in to Salesforce at 3/3/2009 1:57:35 AM

 

.... after processing a bunch of queries (any number of them, does not always fail at the same spot)

 

[ERROR] 3/3/2009 2:03:24 AM: Error executing SOQL.
INVALID_SESSION_ID: Invalid Session ID found in SessionHeader: Illegal Session. Session not found, missing session key: 433200D00000000hgkJ!ARgAQJ4rsOqnp_kj3BkvtsT_nhJ2y18YD0XOoFe9bLpGhXJXONX_z440EOMdWc03iApAWNi3UfEBVl6CUG61sgOQ7_YyvD1y
 

Due to the random nature of this error, I cannot tell when the report will or will not run successfully.   How can I tell why a session is invalidated by Salesforce?  And what can I do in this case to obtain a more stable session?  Is this a SF bug?

 

I am using the partner WSDL dated Dec 2008.

 

Thank you in advance for the help,

Pi

Message Edited by Iceman123 on 03-03-2009 04:30 PM

I just ran a query (using sforce Explorer .NET version) for "select Id from AccountShare". This was for a large customer with nearly 2 million AccountShare records.

I did not receive a query timeout. I received a network timeout. I also tried the same thing with the API and confirmed that it is a network timeout by increasing the Timeout in the web service binding.

Is this the expected behavior? Under which circumstances should I expect a query timeout vs. a network timeout?