• Rolf Herbert
  • NEWBIE
  • 0 Points
  • Member since 2016

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 1
    Replies
Hi all,

I am using a WSDL that was provided to me by the original developer of a Salesforce app that I am required to write into.

I have attached the WSDL as a reference to the c# project and all seems well. I can connect and perform update/create/search functions with no bother.

The trouble comes when certain XSD data types are specified by the WSDL.

If XSD:DATE is specified the compiler will only allow a c# datetime object to be used but Salesforce ignores it (I presumme because it has a time portion). No error, no reported problems it just nulls that column.

If XSD:BOOLEAN is specified the same thing happens, I can only specifiy true/false for the project to compile but Salesforce ignores it and enters null for the column.

If I manually change the field stypes to XSD:STRING and use appropriate strings (1/0, yyyy-mm-dd) all is fine, but that surely is not the right answer!

Anyone have any ideas..?

Thanks
Greetings...

I have had great success in using .net and the associated API Enterprise generated WSDL and Web Reference for about a year.  I've also used the API in the Sandbox.  I hadn't made a change to the Sandbox or the Production for a couple of months.  Today I did the following in Firefox (I have had more success generating and downloading the WSDL in Firefox)

- Went to Settings/Develop/API/Generate Enterprise WSDL and clicked the GENERATE button to the right of "Generate Enterprise WSDL"
- The result in Firefox was not the normal formatted XML that I had seen in the past (perhaps the update to Firefox did this) What appeared was what looked like one big paragraph of sentences (no xml tags)
-  I right clicked in the white area of the page and "saved as"  test.wsdl
- When I opened test.wsdl, it looked like it alwas does...properly formed XML

Next in VS, I changed the Web Reference property to the Test.wsdl file name and Updated my Web Reference

======================================
Now the issue (finaly)
======================================

When I try to create an instance of SforceService like the code below:

                    SforceService sfService = new SforceService();

I get the following exception:

2014-09-11 16:35:30.000  Warning SalesforceClient.Connect Exception.Exception.Name InvalidOperationException
2014-09-11 16:35:30.000  Warning SalesforceClient.Connect Exception.Exception.Message Unable to generate a temporary class (result=1).
2014-09-11 16:35:30.000  Warning SalesforceClient.Connect Exception.Exception.Message error CS0030: Cannot convert type 'Mozenda.Business.Salesforce.ListViewRecordColumn[]' to 'Mozenda.Business.Salesforce.ListViewRecordColumn'
2014-09-11 16:35:30.000  Warning SalesforceClient.Connect Exception.Exception.Message error CS0030: Cannot convert type 'Mozenda.Business.Salesforce.ListViewRecordColumn[]' to 'Mozenda.Business.Salesforce.ListViewRecordColumn'
2014-09-11 16:35:30.000  Warning SalesforceClient.Connect Exception.Exception.Message error CS0029: Cannot implicitly convert type 'Mozenda.Business.Salesforce.ListViewRecordColumn' to 'Mozenda.Business.Salesforce.ListViewRecordColumn[]'
2014-09-11 16:35:30.000  Warning SalesforceClient.Connect Exception.Exception.Message error CS0029: Cannot implicitly convert type 'Mozenda.Business.Salesforce.ListViewRecordColumn' to 'Mozenda.Business.Salesforce.ListViewRecordColumn[]'
2014-09-11 16:35:30.000  Warning SalesforceClient.Connect Exception.Exception.Source System.Xml
2014-09-11 16:35:30.000  Warning SalesforceClient.Connect Exception.Exception.StackTrace at System.Xml.Serialization.Compiler.Compile(Assembly parent, String ns, XmlSerializerCompilerParameters xmlParameters, Evidence evidence)
2014-09-11 16:35:30.000  Warning SalesforceClient.Connect Exception.Exception.StackTrace    at System.Xml.Serialization.TempAssembly.GenerateAssembly(XmlMapping[] xmlMappings, Type[] types, String defaultNamespace, Evidence evidence, XmlSerializerCompilerParameters parameters, Assembly assembly, Hashtable assemblies)
2014-09-11 16:35:30.000  Warning SalesforceClient.Connect Exception.Exception.StackTrace    at System.Xml.Serialization.TempAssembly..ctor(XmlMapping[] xmlMappings, Type[] types, String defaultNamespace, String location, Evidence evidence)
2014-09-11 16:35:30.000  Warning SalesforceClient.Connect Exception.Exception.StackTrace    at System.Xml.Serialization.XmlSerializer.GetSerializersFromCache(XmlMapping[] mappings, Type type)
2014-09-11 16:35:30.000  Warning SalesforceClient.Connect Exception.Exception.StackTrace    at System.Xml.Serialization.XmlSerializer.FromMappings(XmlMapping[] mappings, Type type)
2014-09-11 16:35:30.000  Warning SalesforceClient.Connect Exception.Exception.StackTrace    at System.Web.Services.Protocols.SoapClientType..ctor(Type type)
2014-09-11 16:35:30.000  Warning SalesforceClient.Connect Exception.Exception.StackTrace    at System.Web.Services.Protocols.SoapHttpClientProtocol..ctor()
2014-09-11 16:35:30.000  Warning SalesforceClient.Connect Exception.Exception.StackTrace    at Mozenda.Business.Salesforce.SforceService..ctor()
2014-09-11 16:35:30.000  Warning SalesforceClient.Connect Exception.Exception.StackTrace    at Mozenda.Business.SalesforceClient.SalesForceClient.Connect()


There is alot if information about "Unable to generate a temporary class (result=1)" doing a Google search, but nothing seems to apply.

- Has Salesforce changed how the Enterprise WSDL is created?

Thanks in advance!!

Russ