Page 1 of 1

Error Using query method on Candidate entity

Posted: Tue Mar 08, 2016 2:18 pm
by sri333
Hi,
I am trying to access and test an Entity using the query method. Below is my code and the response it says it has errors. Can you please help me on this?

Request

Code: Select all

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:apis="http://apiservice.bullhorn.com/">
   <soapenv:Header/>
   <soapenv:Body>
      <apis:query>
         <!--Optional:-->
         <session>****************</session>
         <!--Optional:-->
         <query>
            <!--Optional:-->
            <alias></alias>
            <distinct></distinct>
            <!--Optional:-->
            <entityName>Candidate</entityName>
            <!--Optional:-->
            <maxResults></maxResults>
            <!--Zero or more repetitions:-->
            <orderBys></orderBys>
            <parameters>
               <!--Zero or more repetitions:-->
               <entry>
                  <!--Optional:-->
                  <key></key>
                  <!--Optional:-->
                  <value></value>
               </entry>
            </parameters>
            <!--Optional:-->
            <where></where>
         </query>
      </apis:query>
   </soapenv:Body>
</soapenv:Envelope>
Response

Code: Select all

<S:Envelope><S:Body><S:Fault><faultcode>S:Server</faultcode><faultstring>javax.xml.bind.UnmarshalException
 - with linked exception:
[javax.xml.bind.UnmarshalException: com/sun/xml/bind/v2/runtime/reflect/opt/Const]</faultstring><detail><ns2:exception class="javax.xml.ws.WebServiceException" note="To disable this feature, set com.sun.xml.ws.fault.SOAPFaultBuilder.disableCaptureStackTrace system property to false"><message>javax.xml.bind.UnmarshalException
 - with linked exception:
[javax.xml.bind.UnmarshalException: com/sun/xml/bind/v2/runtime/reflect/opt/Const]</message><ns2:stackTrace><ns2:frame class="com.sun.xml.ws.server.sei.EndpointMethodHandler" file="EndpointMethodHandler.java" line="245" method="invoke"/><ns2:frame class="com.sun.xml.ws.server.sei.SEIInvokerTube" file="SEIInvokerTube.java" line="93" method="processRequest"/><ns2:frame class="com.sun.xml.ws.api.pipe.Fiber" file="Fiber.java" line="598" method="__doRun"/><ns2:frame class="com.sun.xml.ws.api.pipe.Fiber" file="Fiber.java" line="557" method="_doRun"/><ns2:frame class="com.sun.xml.ws.api.pipe.Fiber" file="Fiber.java" line="542" method="doRun"/><ns2:frame class="com.sun.xml.ws.api.pipe.Fiber" file="Fiber.java" line="439" method="runSync"/><ns2:frame class="com.sun.xml.ws.server.WSEndpointImpl$2" file="WSEndpointImpl.java" line="243" method="process"/><ns2:frame class="com.sun.xml.ws.transport.http.HttpAdapter$HttpToolkit" file="HttpAdapter.java" line="471" method="handle"/>...........


Any immediate help is really appreciated :)

Re: Error Using query method on Candidate entity

Posted: Tue Mar 08, 2016 4:28 pm
by sri333
I BADLY need help on this ASAP. Any help from Bullhorn Support??

Re: Error Using query method on Candidate entity

Posted: Fri Mar 18, 2016 11:10 am
by pmularski
Good Morning sri333,

I apologize for the long wait on a response. In terms of your code, it does not look like you are querying anything specifically. For example, my test code request for a query would look like the following.

<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:apis="http://apiservice.bullhorn.com/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xs="http://www.w3.org/2001/XMLSchema">
<soapenv:Header/>
<soapenv:Body>
<apis:query>
<!--Optional:-->
<session></session>

<!--Optional:-->
<query>
<!--Optional:-->
<entityName>Candidate</entityName>
<Select>Top 100</Select>
<where>isDeleted = '1' AND status = 'formatted'</where>
</query>
</apis:query>
</soapenv:Body>
</soapenv:Envelope>

This would complete a candidate query, and returns the appropriate results. What specifically are you attempted to find using your code?