Placement entity query- PHP Fatal error: SOAP-ERROR: Encoding: Violation of encoding rules

Forum for users and developers of Bullhorn's Webservices API suite

Moderators: StaffingSupport, s.emmons, BullhornSupport

Post Reply
jamithireddy
User
Posts: 6
Joined: Thu May 03, 2012 11:22 pm

Placement entity query- PHP Fatal error: SOAP-ERROR: Encoding: Violation of encoding rules

Post by jamithireddy » Sun Nov 19, 2017 11:17 pm

Hi All,
I'm currently using https://api.bullhornstaffing.com/webservices-2.5/?wsdl

When I try to set the placement id as XSD_INT and getting a PHP-FATAL error. Did some research and seems like the issue is in the XML request: bullhorn expecting xmlns:xs, but the request is referencing xmlns:xsd. Tried setting up the XML schema using PHP code, but luck.

Can anyone respond .. if they ran into similar issues ?

Thanks

PHP Code:
$id = new SoapVar($placementId,XSD_INT,"int", "http://www.w3.org/2001/XMLSchema");

// Request array
$find_request = array (
'session' => $this->bhSession,
'entityName' => 'Placement',
'id' => $id
);

// Use find method to get the candidate data
try {

$findResult = $this->bhClient->find($find_request);
}

PHP Error:
PHP Fatal error: SOAP-ERROR: Encoding: Violation of encoding rules



--- SOAP REQUEST ----
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ns1="http://apiservice.bullhorn.com/"><SOAP- ... tyName><id xsi:type="xsd:int">2489</id></ns1:find></SOAP-ENV:Body></SOAP-ENV:Envelope>

Post Reply