3

I am attempting to connect to the Taleo API from my solution in Visual Studio. The Enterprise API (not to be confused with the Taleo Business Edition API) is a SOAP-based Web Service with a number of WSDL endpoints.

I can successfully query the API in SoapUI, however, I am not having luck when attempting to add a Service Reference in Visual Studio.

Here's what I've tried:

  1. Added a reference to the WSDL (Note the Operations that appear). So far so good...

    enter image description here

  2. Visual Studio successfully generates the necessary classes, however, the methods circled above are nowhere to be found. I've searched the API for hours and even ran a few searches in Reflector... they are truly MIA.

    enter image description here

A few observations:

  • I can see the methods when viewing the raw WSDL XML in a browser (if you need a sample, I can post it)
  • I can query the three methods just fine in SoapUI
  • It's my understanding that the methods only support HTTP POST, so perhaps Visual Studio is performing a GET and the service is rejecting it? (I've FIDDLED this, and all I see is a 200 response)
  • I am behind a Proxy (although, I was able to connect in SoapUI without having to configure a proxy)

At this point, I'm considering writing my own SOAP client to perform the queries using an HttpWebRequest, but I thought I would try and figure out what's wrong before diving too deep into that.

Any idea what I'm doing wrong here?

Community
  • 1
  • 1
Derek Hunziker
  • 12,996
  • 4
  • 57
  • 105

2 Answers2

2

I was also having trouble with the API. When I tried adding the service reference as described by the OP, I received a series of errors in the Error List including the following:

Error: Member BusinessGoal.Items of type System.Object[] hides base class member BaseMultilingualEntity.Items of type multilingualStringField[]. Use XmlElementAttribute or XmlAttributeAttribute to specify a new name.

I was able to use the older Web Reference mechanism to generate the proxy classes. You can find this under Add Service Reference → Advanced → Add Web Reference. This will generate a Reference.cs file that contains the proxy class code for the service. You will need to have Show All Files selected in Visual Studio to see this file buried under the generated Web Reference. (You can also use the WSDL.exe command line tool included with Visual Studio to generate the Reference.cs file)

Using this approach, my proxy class included the methods that were missing, but I still needed to manually edit the Reference.cs file to replace all "[][]" with "[]" as many of the generated types were erroneously created as jagged arrays.

Brian Merrell
  • 1,144
  • 14
  • 20
  • I found you could add the `[XmlIgnore]` attribute to the members that were causing this and it "fixed" the issue. Hacky. And then you still need to do the replace of [][] with [] to change jagged arrays to single dimension. Even more hacky. Yuck. – Dan Diplo Jul 04 '18 at 14:15
1

I was unable to add a reference to the Taleo API either through the "Add Service Reference" wizard, or though the legacy "Web Reference" method. I ended up writing my own SOAP client using a HttpWebRequest to get and post the XML directly.

Derek Hunziker
  • 12,996
  • 4
  • 57
  • 105
  • Can you share this? I am having the same problem. In my case I cannot instantiate the object taleo.findSvc.FindService mentioned in the Taleo Enterprise Web Services User Guide http://docs.oracle.com/cd/E37454_01/TCWSFP12B_UG_ENus.pdf – franciscovalera Dec 19 '12 at 19:01