You need to sign in to do that
Don't have an account?

_CallOptions Object
Hi
I am trying to add a token t(hat we need to add to our integration config )that will allow Professional and Enterprise customers to use our integration. I am trying to use a java sample code
Here is a code
Here is a snippet of sample Java code to aid you in the understanding and use of your client id:
// The following snippet assumes use of the partner WSDL
// For use with sforce 3.0, 4.0, 5.0
// Use the following in your login method, before you call
// the login method. Be sure to set the header value
// with your clientid.
// There exists a header object "_CallOptions" and setter method
// to insert the value. See the WSDL definition for details.
// To insert the header value, set the call option for client id
// as follows:
_CallOptions co = new _CallOptions();
co.setClient("your_clientid_value");
// bind it to the current soap session
binding.SetHeader("SforceService", "CallOptions", co);
I have 2 questions:
1>Where exactly I need to use to set token? will it be in my webservice where I am calling login function.
2>How can I use _CallOptions object? If I try to use it gives me an error type or namespace is not found.
Please Advice!!!!
Thanks,
Nupur
svc.CallOptionsValue = new sforce.CallOptions();
svc.CallOptionsValue.client = "foo";
Once set, .NET will send it up on every request made by that instance of the proxy. All requests from your integration should send this header.
thanks Dave, can you explain this stuff more.... Right now my company is in process of becoming partner with SalesForce.com. so i need to add the token.
Where exactly I need to call this function for adding clientid(token)
Thanks!!!
This is interesting. I've been programming the Partner API for 4 months now, and have never used the CallOptions header. Am I supposed to?