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

API version 32 - Creating new SforceService gives error
I just generated a new enterprise wsdl from the Sandbox which has the new api version 32.
On the login call:
SforceService sforceSession = new SforceService();
it is generating the following error:
System.InvalidOperationException: Unable to generate a temporary class (result=1).
error CS0030: Cannot convert type 'xxx.ListViewRecordColumn[]' to 'xxx.ListViewRecordColumn'
error CS0030: Cannot convert type 'xxx.ListViewRecordColumn[]' to 'xxx.ListViewRecordColumn'
error CS0029: Cannot implicitly convert type 'xxx.ListViewRecordColumn' to 'xxx.ListViewRecordColumn[]'
error CS0029: Cannot implicitly convert type 'xxx.ListViewRecordColumn' to 'xxx.ListViewRecordColumn[]'
It works fine is I use the previous wsdl. Did the object change?
Thanks
On the login call:
SforceService sforceSession = new SforceService();
it is generating the following error:
System.InvalidOperationException: Unable to generate a temporary class (result=1).
error CS0030: Cannot convert type 'xxx.ListViewRecordColumn[]' to 'xxx.ListViewRecordColumn'
error CS0030: Cannot convert type 'xxx.ListViewRecordColumn[]' to 'xxx.ListViewRecordColumn'
error CS0029: Cannot implicitly convert type 'xxx.ListViewRecordColumn' to 'xxx.ListViewRecordColumn[]'
error CS0029: Cannot implicitly convert type 'xxx.ListViewRecordColumn' to 'xxx.ListViewRecordColumn[]'
It works fine is I use the previous wsdl. Did the object change?
Thanks
After transfering hte WSDL file in a class for .net, I have the same issue.
To solve it, I have updated the class file to search and replace
ListViewRecordColumn[][]
and replace it with
ListViewRecordColumn[]
It have solve the login issue.
All Answers
After transfering hte WSDL file in a class for .net, I have the same issue.
To solve it, I have updated the class file to search and replace
ListViewRecordColumn[][]
and replace it with
ListViewRecordColumn[]
It have solve the login issue.
The array definition ios NOT in the WSDL, it is in the Reference.cs class in more than one place. If the service refernce is used in different projects, it needs to be update dinall of them as well.
I have a VB.NET webservice which connects to salesforce via SOAP using the older wsdl from version 24 and when I try to update the wsdl to version 32, I get this error. I haven't found a solution yet. Any guidance would be appreciated.
removed extra () after recordsField() - recordsField()() became recordsField()
removed extra () after ListViewRecordColumn() - ListViewRecordColumn()() became ListViewRecordColumn()
The definitions inside the WSDL don't look like they have any issues.
I have no idea why the .NET WSDL.EXE (WSDL to proxy class tool) caused it to be generated that way.
In any case, it seems to have fixed the issue.
Open2,
look for the reference.vb file generated by either updating the service reference or adding it.
In you project file structure you should have a folder called ServiceReferences
example:
drive letter:\[project path]\[Project Name]\Service References\
and then in that folder/directory a folder for each service reference tah was added to you project
drive letter:\[project path]\[Project Name]\Service References\SalesforceEnterpriseWSDL
This is where the proxy classes are created on your system. MS protects you from your self and does not make them available in your project. You have to dig around for them.
Reference.cs or Reference.vb depending on you language is the one that needs to be fixed manually.
for cs files look for [][] and replace with []
for vb files look for ()() and replace with ()
Hope this helps.
Terry
Edit your wsdl.xml file like this:
In the above snippet, I've changed the maxOccurs from "unbounded" to maxOccurs="1"
Sometimes Visual Studio tricks me and rebuilds the Reference class, so, fixing it at the WSDL level really helps