You need to sign in to do that
Don't have an account?
webservice login issues
I created an apex class and I downloaded the wsdl for that class. I also have downloaded the wsdl for the sandbox. I try to access this class in c# and I am getting an invalid login session error. I am guessing this is beause I am loging into the sandbox instead of the webservice class, but I dont see that I can login using the webservice class?? Is there a way to add loggin ability to the webservice class? Does this make sense?
So basically I dont really need to login into the sandbox, I just need to login into this webservice class I created in the sandbox but there doesnt seem to be a way?
Thanks
Apex class
global class CorePatternerror
{
WebService static string GetPattern(string penSerNbr, string shelfSize)
{
return '';
}
System.Web.Services.Protocols.SoapException: System.Web.Services.Protocols.SoapHeaderException: INVALID_SESSION_ID: Invalid Session ID found in SessionHeader: Illegal Session
at System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessage message, WebResponse response, Stream responseStream, Boolean asyncCall)
at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters)
We developed a webservice call that has been working without issue for months. Yesterday, we refreshed our sandbox and the server changed from cs3 to cs12. Now we are getting an invalid session ID error between the user logon and the webservice call.
It appears that the Guest User is maintaining a relationship to the old sandbox server.
SalesforceProxy.ServiceApi.Url: https://cs12-api.salesforce.com/services/Soap/c/25.0/00DV00000051oGh/0DFQ00000004DxE
SalesforceProxy.AuthenticateCscUser.Url: https://cs3-api.salesforce.com/services/Soap/class/LoginHandler
Any suggestions?
The custom apex web service has a hard coded reference to the instance when the WSDL was generated. you'll need to either get a new WSDL, or update your code to dynamically set the host name from the loginResult details.