Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Taleo Find Service - web service reference in the visual studio creates two-dimensional arrays

I added a web service reference in the visual studio to Taleo Find Service as per the instructions from Taleo Enterprise - Taleo Web Services - User Guide

But the VS.NET creates two-dimensional arrays for some of the entities incorrectly. For ex:

private AddressBookHistory[][] addressBookHistoryField; 

Also, the generated Requisition class has ContestNumber property which is incorrectly created as array:

[System.Xml.Serialization.XmlElementAttribute("ContestNumber")] 
public string[] ContestNumber { 
get { 
return this.contestNumberField; 
} 
set { 
this.contestNumberField = value; 
} 
} 

The similar issue has been discussed online here:

.NET Web service unable to generate a temporary class

Unable to generate a temporary class (result=1). error CS0030: Cannot convert type 'Type[]' to 'Type'?

https://support.microsoft.com/en-us/kb/2486643

I replaced [][] with [] and I was able to call the find service. TaleoFindService.Entities pagedResults = findService.findPartialEntities(mappingVersion, sqxmlquery, attrs);

But now the pagedResults.Entity property is null. However the other properties such as entityCount and pageCount are correctly populated.

like image 347
user1663715 Avatar asked Oct 30 '22 02:10

user1663715


1 Answers

I think the problem is the fact that the WSDL created the classes based on one namespace but the Guide tells you to use a mapping version string which is a different namespace and so the returning XML doesn't match the wsdl.

Changing the mapping version I passed in to http://www.taleo.com/ws/tee800/2009/01 sorted it for me. Have a look to see what Namespace the class is expecting and use Postman or something similar to see what Namespace is coming back. Good luck to anyone else who finds this post.

My biggest suggestion is to not buy Oracle though.

like image 139
Matt Avatar answered Nov 15 '22 09:11

Matt