开发者

mapping WCF getURL to string always returns NULL (Taleo SOAP)

QUICK SUMMARY:

Taleo has a single operation "Dispatcher WSDL" that is supposed to return a URL for use with its WebAPI WSDL ... the purpose is to allow the URL to be for all intents and purposes soft coded.

For operation getURL, WcfTestClient.exe XML view shows that in the SOAP envelope a URL has been returned.

However, WcfTestClient.exe formatted view shows

Name: (return) Value: (null) Type: NullObject

My c# vs2010 .NET 4 code; taleoURL is always null

DispatcherAPIClient dispatcherClient = new DispatcherAPIClient("rpcrouter");
string taleoOrgCode = "TALEOSK";
string taleoURL = dispatcherClient.getURL(taleoOrgCode);
if (taleoURL == null) Console.WriteLine("null returned for " + taleoOrgCode);

This null is strange because here is the XML response from WcfTestClient.exe:

<SOAP-ENV:Envelope
 xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
 xmlns:xsd="http://www.w3.org/2001/XMLSchema">
  <s:Header xmlns:s="http://schemas.xmlsoap.org/soap/envelope/" />
  <SOAP-ENV:Body>
<ns1:getURLResponse xmlns:ns1="urn:TBEDispatcherAPI" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<return xsi:type="xsd:string">https://tbe.taleo.net/NA12/ats/services/rpcrouter</return>
</ns1:getURLResponse>

</SOAP-ENV:Body>
</SOAP-ENV:Envelope>

https://tbe.taleo.net/NA12/ats/services/rpcrouter is the value of the <return> element.

To be able to use the above link, obviously I need taleoURL to be not null.

Pages 154-155 of the Taleo API guide say that getURL's defined as string getURL(string or开发者_如何学JAVAgCode)

http://tbe.taleo.net/products/TBE_API_Guide.pdf from

http://www.taleo.com/solutions/taleo-business-edition-web-integration-api

also

http://tbe.taleo.net/wsdl/DispatcherAPI.wsdl

http://tbe.taleo.net/wsdl/WebAPI.wsdl

Here's the Request/Response part of DispatcherAPI.wsdl:

 <wsdl:message name="getURLRequest">
    <wsdl:part name="orgCode" type="xsd:string" />
  </wsdl:message>
  <wsdl:message name="getURLResponse">
    <wsdl:part name="getURLReturn" type="xsd:string" />
  </wsdl:message>

My best guess is that I'm missing something.

This is a case where my own ignorance is not bliss.

MSDN and Google have not helped.

Thank you ... Gerry


I just started working with the Taleo WebAPI and I'm having the same issue.

Update: I changed the reference from a VS2010 C# Service Reference to an "old school" Web Reference and then it worked. I'm still working on a "real" solution, but that does work.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜