• ManishDhupar
  • NEWBIE
  • 0 Points
  • Member since 2007

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 4
    Questions
  • 5
    Replies
Hi
 
I Create an account with Fax Field value i.e. (account.Fax ="123456";)
 
Then I upadate the same Account using the below with account.Fax ="" or null

QSFTest.Sforce.SaveResult[] saveResults = binding.update(records);

This empty string does not update the Fax field and previous value for Fax which is 123456 is reflected.

While updating if I want to replace the previous value of fax with null.

How do I achieve the same?

Do we have any such preferences?

Thanks,

Manish

 

 

 

 

 

 

We are getting a "INVALID_SESSION_ID: Invalid Session ID found in SessionHeader: Illegal Session" while making a call using .NET.
 
The same request was working fine until yesterday.
 
After we try to create an Account using the below
 

QSFTest.Sforce.sObject[] records = new QSFTest.Sforce.sObject[] {account};
QSFTest.Sforce.SaveResult[] saveResults = binding.create(records);

we encounter this issue.

Regards,
Manish

 

 

 

We are trying to integrate one of our Commerce Application with our Salesforce Instance and during the login call we receive the following error using C#/.NET.  However the login works through  console application however but throws the error through the .dll (compiled with the same code) which is called by our Commerce Application.

 

A few days back we recieved the below error

 

Exception : System.Web.Services.Protocols.SoapHeaderException: Required field/property SforceService.LoginScopeHeaderValue of SOAP header LoginScopeHeader was not set by the client prior to making the call.
at System.Web.Services.Protocols.SoapHeaderHandling.GetHeaderMembers(SoapHeaderCollection headers, Object target, SoapHeaderMapping[] mappings, SoapHeaderDirection direction, Boolean client)
at System.Web.Services.Protocols.SoapHttpClientProtocol.BeforeSerialize(WebRequest request, String methodName, Object[] parameters)
at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters)
at Mercury_SFAdapter.Sforce.SforceService.login(String username, String password)
at Mercury_SFAdapter.Mercury_SFAdapterSvc.login()

 

which got resolved by declaring the LoginScopeHeader as below.

 

binding.LoginScopeHeaderValue = new Mercury_SFAdapter.Sforce.LoginScopeHeader();

 

Thanks to some quick help from SimonF

 

http://community.salesforce.com/sforce/board/message?board.id=NET_development&message.id=5675&jump=true#M5675

 

Yesterday  we created a new field in ourSandbox Instance and downloaded and updated the new .wsdl file.

(Sandbox now showing Spring 08)

 

We started recieving the below exception message for AssignmentRuleHeader

 

ERROR: System.Web.Services.Protocols.SoapHeaderException: Required field/property SforceService.AssignmentRuleHeaderValue of SOAP header AssignmentRuleHeader was not set by the client prior to making the call.

   at System.Web.Services.Protocols.SoapHeaderHandling.GetHeaderMembers(SoapHeaderCollection headers, Object target, SoapHeaderMapping[] mappings, SoapHeaderDirection direction, Boolean client)

   at System.Web.Services.Protocols.SoapHttpClientProtocol.BeforeSerialize(WebRequest request, String methodName, Object[] parameters)

   at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters)

 

On creating a AssignmentRuleHeaderValue insatance as done above for LoginScopeHeaderValue

 

leads to message for DebuggingHeaderValue , EmailHeaderValue ,MruHeaderValue and so on.

 

private bool login()

{

binding = new Mercury_SFAdapter.Sforce.SforceService();

try

{

//execute the login placing the results

//in a LoginResult object

binding.LoginScopeHeaderValue = new Mercury_SFAdapter.Sforce.LoginScopeHeader();

Mercury_SFAdapter.Sforce.LoginResult loginResult = binding.login("username", "password");

if (!loginResult.passwordExpired)

{

binding.Url = loginResult.serverUrl;

//set the session id header for subsequent calls

binding.SessionHeaderValue = new Mercury_SFAdapter.Sforce.SessionHeader();

binding.SessionHeaderValue.sessionId = loginResult.sessionId;

return true;

}

else

{

QLogWrapper.m_staticLogger.logComment("Password is Expired");

}

}

catch (Exception ex)

{

QLogWrapper.m_staticLogger.logComment("Exception : " + ex);

}

//Login failed, report message then return false

//--------Console.WriteLine("Login failed with message: " + ex.Message);

return false;

}


 


 

Request some immediate assistance on this.

 

Thank you,

Manish K Dhupar


 

We are trying to integrate one of our Commerce Application with our Salesforce Instance and during the login call we receive the following error using C#/.NET.  However the login works through  console application however throws the above error through the .dll (compiled with the same code) which is called by our Commerce Application.

 

Exception : System.Web.Services.Protocols.SoapHeaderException: Required field/property SforceService.LoginScopeHeaderValue of SOAP header LoginScopeHeader was not set by the client prior to making the call.
at System.Web.Services.Protocols.SoapHeaderHandling.GetHeaderMembers(SoapHeaderCollection headers, Object target, SoapHeaderMapping[] mappings, SoapHeaderDirection direction, Boolean client)
at System.Web.Services.Protocols.SoapHttpClientProtocol.BeforeSerialize(WebRequest request, String methodName, Object[] parameters)
at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters)
at Mercury_SFAdapter.Sforce.SforceService.login(String username, String password)
at Mercury_SFAdapter.Mercury_SFAdapterSvc.login()

 

Further,  when we provide the organisationId, (as below) – (Commented in The Source Code Shared Below)

binding.LoginScopeHeaderValue = new Mercury_SFAdapter.Sforce.LoginScopeHeader();
binding.LoginScopeHeaderValue.organizationId = "Our Org ID";

the Exception changes to the one below:

 

Exception : System.Web.Services.Protocols.SoapException: INVALID_LOGIN: Invalid username or password, locked out or Self-Service portal is not enabled
at System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessage message, WebResponse response, Stream responseStream)
at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters)
at Mercury_SFAdapter.Sforce.SforceService.login(String username, String password)
at Mercury_SFAdapter.Mercury_SFAdapterSvc.login()

 

The same username/Password works absolutely fine through the Web Interface and Console Application. We also tried to use the Security Token along with the Password but with no Luck.

 

The Source Code used is as Below:

 

 

private bool login()

{

binding = new Mercury_SFAdapter.Sforce.SforceService();

try

{

//execute the login placing the results

//in a LoginResult object

//binding.LoginScopeHeaderValue = new Mercury_SFAdapter.Sforce.LoginScopeHeader();

//binding.LoginScopeHeaderValue.organizationId = "00D500000007nEo";

Mercury_SFAdapter.Sforce.LoginResult loginResult = binding.login("username", "password");

if (!loginResult.passwordExpired)

{

binding.Url = loginResult.serverUrl;

//set the session id header for subsequent calls

binding.SessionHeaderValue = new Mercury_SFAdapter.Sforce.SessionHeader();

binding.SessionHeaderValue.sessionId = loginResult.sessionId;

return true;

}

else

{

QLogWrapper.m_staticLogger.logComment("Password is Expired");

}

}

catch (Exception ex)

{

QLogWrapper.m_staticLogger.logComment("Exception : " + ex);

}

//Login failed, report message then return false

//--------Console.WriteLine("Login failed with message: " + ex.Message);

return false;

}


 

 

Request some immediate assistance on this.

 

Thank you,

Manish K Dhupar

We are trying to integrate one of our Commerce Application with our Salesforce Instance and during the login call we receive the following error using C#/.NET.  However the login works through  console application however but throws the error through the .dll (compiled with the same code) which is called by our Commerce Application.

 

A few days back we recieved the below error

 

Exception : System.Web.Services.Protocols.SoapHeaderException: Required field/property SforceService.LoginScopeHeaderValue of SOAP header LoginScopeHeader was not set by the client prior to making the call.
at System.Web.Services.Protocols.SoapHeaderHandling.GetHeaderMembers(SoapHeaderCollection headers, Object target, SoapHeaderMapping[] mappings, SoapHeaderDirection direction, Boolean client)
at System.Web.Services.Protocols.SoapHttpClientProtocol.BeforeSerialize(WebRequest request, String methodName, Object[] parameters)
at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters)
at Mercury_SFAdapter.Sforce.SforceService.login(String username, String password)
at Mercury_SFAdapter.Mercury_SFAdapterSvc.login()

 

which got resolved by declaring the LoginScopeHeader as below.

 

binding.LoginScopeHeaderValue = new Mercury_SFAdapter.Sforce.LoginScopeHeader();

 

Thanks to some quick help from SimonF

 

http://community.salesforce.com/sforce/board/message?board.id=NET_development&message.id=5675&jump=true#M5675

 

Yesterday  we created a new field in ourSandbox Instance and downloaded and updated the new .wsdl file.

(Sandbox now showing Spring 08)

 

We started recieving the below exception message for AssignmentRuleHeader

 

ERROR: System.Web.Services.Protocols.SoapHeaderException: Required field/property SforceService.AssignmentRuleHeaderValue of SOAP header AssignmentRuleHeader was not set by the client prior to making the call.

   at System.Web.Services.Protocols.SoapHeaderHandling.GetHeaderMembers(SoapHeaderCollection headers, Object target, SoapHeaderMapping[] mappings, SoapHeaderDirection direction, Boolean client)

   at System.Web.Services.Protocols.SoapHttpClientProtocol.BeforeSerialize(WebRequest request, String methodName, Object[] parameters)

   at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters)

 

On creating a AssignmentRuleHeaderValue insatance as done above for LoginScopeHeaderValue

 

leads to message for DebuggingHeaderValue , EmailHeaderValue ,MruHeaderValue and so on.

 

private bool login()

{

binding = new Mercury_SFAdapter.Sforce.SforceService();

try

{

//execute the login placing the results

//in a LoginResult object

binding.LoginScopeHeaderValue = new Mercury_SFAdapter.Sforce.LoginScopeHeader();

Mercury_SFAdapter.Sforce.LoginResult loginResult = binding.login("username", "password");

if (!loginResult.passwordExpired)

{

binding.Url = loginResult.serverUrl;

//set the session id header for subsequent calls

binding.SessionHeaderValue = new Mercury_SFAdapter.Sforce.SessionHeader();

binding.SessionHeaderValue.sessionId = loginResult.sessionId;

return true;

}

else

{

QLogWrapper.m_staticLogger.logComment("Password is Expired");

}

}

catch (Exception ex)

{

QLogWrapper.m_staticLogger.logComment("Exception : " + ex);

}

//Login failed, report message then return false

//--------Console.WriteLine("Login failed with message: " + ex.Message);

return false;

}


 


 

Request some immediate assistance on this.

 

Thank you,

Manish K Dhupar


 

We are trying to integrate one of our Commerce Application with our Salesforce Instance and during the login call we receive the following error using C#/.NET.  However the login works through  console application however throws the above error through the .dll (compiled with the same code) which is called by our Commerce Application.

 

Exception : System.Web.Services.Protocols.SoapHeaderException: Required field/property SforceService.LoginScopeHeaderValue of SOAP header LoginScopeHeader was not set by the client prior to making the call.
at System.Web.Services.Protocols.SoapHeaderHandling.GetHeaderMembers(SoapHeaderCollection headers, Object target, SoapHeaderMapping[] mappings, SoapHeaderDirection direction, Boolean client)
at System.Web.Services.Protocols.SoapHttpClientProtocol.BeforeSerialize(WebRequest request, String methodName, Object[] parameters)
at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters)
at Mercury_SFAdapter.Sforce.SforceService.login(String username, String password)
at Mercury_SFAdapter.Mercury_SFAdapterSvc.login()

 

Further,  when we provide the organisationId, (as below) – (Commented in The Source Code Shared Below)

binding.LoginScopeHeaderValue = new Mercury_SFAdapter.Sforce.LoginScopeHeader();
binding.LoginScopeHeaderValue.organizationId = "Our Org ID";

the Exception changes to the one below:

 

Exception : System.Web.Services.Protocols.SoapException: INVALID_LOGIN: Invalid username or password, locked out or Self-Service portal is not enabled
at System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessage message, WebResponse response, Stream responseStream)
at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters)
at Mercury_SFAdapter.Sforce.SforceService.login(String username, String password)
at Mercury_SFAdapter.Mercury_SFAdapterSvc.login()

 

The same username/Password works absolutely fine through the Web Interface and Console Application. We also tried to use the Security Token along with the Password but with no Luck.

 

The Source Code used is as Below:

 

 

private bool login()

{

binding = new Mercury_SFAdapter.Sforce.SforceService();

try

{

//execute the login placing the results

//in a LoginResult object

//binding.LoginScopeHeaderValue = new Mercury_SFAdapter.Sforce.LoginScopeHeader();

//binding.LoginScopeHeaderValue.organizationId = "00D500000007nEo";

Mercury_SFAdapter.Sforce.LoginResult loginResult = binding.login("username", "password");

if (!loginResult.passwordExpired)

{

binding.Url = loginResult.serverUrl;

//set the session id header for subsequent calls

binding.SessionHeaderValue = new Mercury_SFAdapter.Sforce.SessionHeader();

binding.SessionHeaderValue.sessionId = loginResult.sessionId;

return true;

}

else

{

QLogWrapper.m_staticLogger.logComment("Password is Expired");

}

}

catch (Exception ex)

{

QLogWrapper.m_staticLogger.logComment("Exception : " + ex);

}

//Login failed, report message then return false

//--------Console.WriteLine("Login failed with message: " + ex.Message);

return false;

}


 

 

Request some immediate assistance on this.

 

Thank you,

Manish K Dhupar