You need to sign in to do that
Don't have an account?
saritha78
SForceService serialization problem
Hi,
I am new to Salesforce; I am trying to bind ObjectDatasource to a method in our custom namespace and I get the serialization error.
Here are the details:
In the APIHelper class (which is defined in a custom namespace which references the SalesForceWebservice), I have a method as
public static List<NewObj__c> GetNewObjects(SforceService binding, string opId)
I am binding this method to selectMethod of an object datasource and it gives me the following error:
Type 'a.b.SforceService' in Assembly 'a,
Version=1.0.2460.27497, Culture=neutral, PublicKeyToken=null' is not marked as serializable.
I believe this error occurs if a class does not have the attribute Serializable, in this case I think the class SforceService is Serializable and yet I get this message. Do I have to open a case with support to get a solution to this problem?
Thanks,
Saritha
But the WSDL is generated for me by salesforce, I just download it and update my web reference. Is there a way in salesforce to specify that the custom object that I am creating is Serializable?
Thx,
Have a look at this
http://www.microsoft.com/belux/msdn/nl/community/columns/jdruyts/wsproxy.mspx
Cheers
G.
I don't know if this will solve you're problem but wsdl.exe /enableDataBinding enterprise.wsdl will turn on databinding support in the generated code.
Message Edited by saritha78 on 09-27-2006 02:30 PM
Also, I changed the method signature to
public static List<NewObj__c> GetNewObjects(string api, string sessionid, string opId)
and got the SForceService object inside this method using the sessionid and api and this method binds to the objectdatasource fine! So, I am assuming the problem is with sforceservice object and not my custom object.