1

(I assume anyone out there using SalesForce web services from c# has also seen this. If there's a way around this - obviously I'd rather know that.)

Whenever I set, say, the value of a field on a wsdl.exe generated web service like this:

campaignStat.Clicks__c = ToDouble(Stat.clicks);
campaignStat.Clicks__cSpecified = true;

Can anyone think of a way to not have to worry about forgetting to set that boolean? I don't care if it's a hack.

Aaron Anodide
  • 16,906
  • 15
  • 62
  • 121
  • Wow, that's... sad. Do you have an option to generate classes some other way? I mean that when I worked with Java & Salesforce, "Apache Axis" let me use "adb", "xmlbeans" or "jibx" libraries. Each of them created a bit different code from same WSDL and had different view on SOAP communication. As stupid as it sounds: can you have a look how much effort would it cost you to serialize your objects to XML yourself and handcraft the messages? Examples can be found on http://wiki.developerforce.com/index.php/Sample_SOAP_Messages_%2810.0_API%29 – eyescream Aug 26 '10 at 19:08

1 Answers1

1

According to WCF service proxy not setting "FieldSpecified" property the answer is "So basically - that's the way it is, get used to it :-)"

As long as the web service that You are calling have optional parameters, this is how it is. You can hack around by altering the proxy code that VS generated, but Your changes will be lost next time You regenerate the proxy.

Community
  • 1
  • 1
Andreas Paulsson
  • 7,745
  • 3
  • 25
  • 31