Example Web Service Calling Code
Click here to get PHP code using the ‘Nusoap’ library which shows real world working examples of calling these web services. Below are example XML SOAP requests and responses for calling each of the web services functions.
Function: GetJobInfo
Example Request:
<?xml version=”1.0″ encoding=”ISO-8859-1″?>
<SOAP-ENV:Envelope
SOAP-ENV:encodingStyle=”http://schemas.xmlsoap.org/soap/encoding/”
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:SOAP-ENC=”http://schemas.xmlsoap.org/soap/encoding/”>
<SOAP-ENV:Body>
<ns4653:GetJobInfo xmlns:ns4653=”http://tempuri.org”>
<accesskey xsi:type=”xsd:string”>bx23a</accesskey>
<Jobid xsi:type=”xsd:int”>48</Jobid>
</ns4653:GetJobInfo>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
Example Response:
<?xml version=”1.0″ encoding=”ISO-8859-1″?>
<SOAP-ENV:Envelope
SOAP-ENV:encodingStyle=”http://schemas.xmlsoap.org/soap/encoding/” 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:SOAP-ENC=”http://schemas.xmlsoap.org/soap/encoding/” xmlns:tns=”urn:hellowsdl”>
<SOAP-ENV:Body>
<ns1:GetJobInfoResponse xmlns:ns1=”http://tempuri.org”>
<return xsi:type=”tns:jobInfo”>
<errorcode xsi:type=”xsd:int”>0</errorcode>
<error xsi:type=”xsd:string”></error>
<id xsi:type=”xsd:int”>48</id>
<jobtitle xsi:type=”xsd:string”>A test of advertising</jobtitle>
<adverthtml xsi:type=”xsd:string”><ul>
<li>
&nbsp;</li>
<li>
mysite advert</li>
</adverthtml>
<jobcityarea xsi:type=”xsd:string”>11</jobcityarea>
<jobstate xsi:type=”xsd:string”>TAS</jobstate>
<jobsuburb xsi:type=”xsd:string”>HOBART</jobsuburb>
<jobcountry xsi:type=”xsd:string”>AU</jobcountry>
<salary xsi:nil=”true” xsi:type=”xsd:string”/>
<teaser xsi:type=”xsd:string”>This is a great test job…</teaser>
<worktype xsi:type=”xsd:string”>permft</worktype>
</return>
</ns1:GetJobInfoResponse>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
Function:SearchJobs
Example Request:
<?xml version=”1.0″ encoding=”ISO-8859-1″?>
<SOAP-ENV:Envelope
SOAP-ENV:encodingStyle=”http://schemas.xmlsoap.org/soap/encoding/” 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:SOAP-ENC=”http://schemas.xmlsoap.org/soap/encoding/”>
<SOAP-ENV:Body>
<ns2347:SearchJobs xmlns:ns2347=”http://tempuri.org”>
<searchParams>
<accesskey xsi:type=”xsd:string”>bx23a</accesskey>
<offset xsi:type=”xsd:int”>0</offset>
<limit xsi:type=”xsd:int”>2</limit>
<keyword xsi:type=”xsd:string”></keyword>
<status xsi:type=”xsd:string”>advertised</status>
<country xsi:type=”xsd:string”></country>
</searchParams>
</ns2347:SearchJobs>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
Example Response:
<?xml version=”1.0″ encoding=”ISO-8859-1″?>
<SOAP-ENV:Envelope
SOAP-ENV:encodingStyle=”http://schemas.xmlsoap.org/soap/encoding/” 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:SOAP-ENC=”http://schemas.xmlsoap.org/soap/encoding/” xmlns:tns=”urn:hellowsdl”>
<SOAP-ENV:Body>
<ns1:SearchJobsResponse xmlns:ns1=”http://tempuri.org”>
<return xsi:type=”tns:jobArray”>
<errorcode xsi:type=”xsd:int”>0</errorcode>
<error xsi:type=”xsd:string”></error>
<jobs xsi:type=”SOAP-ENC:Array” SOAP-ENC:arrayType=”tns:job[2]”>
<item xsi:type=”tns:job”>
<id xsi:type=”xsd:int”>43</id>
<jobtitle xsi:type=”xsd:string”>Example Job 1</jobtitle>
<jobcountry xsi:type=”xsd:string”>AU</jobcountry>
<salary xsi:type=”xsd:string”>$500 to $700 + fun</salary>
<teaser xsi:type=”xsd:string”>a teaser</teaser>
<worktype xsi:type=”xsd:string”>contft</worktype>
</item>
<item xsi:type=”tns:job”>
<id xsi:type=”xsd:int”>44</id>
<jobtitle xsi:type=”xsd:string”>Example Job 2</jobtitle>
<jobcountry xsi:type=”xsd:string”>AU</jobcountry>
<salary xsi:type=”xsd:string”>ffdf</salary>
<teaser xsi:type=”xsd:string”>another teaser</teaser>
<worktype xsi:type=”xsd:string”>contft</worktype>
</item>
</jobs>
</return>
</ns1:SearchJobsResponse>
</SOAP-ENV:Body></SOAP-ENV:Envelope>
Function: CreateApplication
Example Request:
<?xml version=”1.0″ encoding=”ISO-8859-1″?>
<SOAP-ENV:Envelope
SOAP-ENV:encodingStyle=”http://schemas.xmlsoap.org/soap/encoding/” 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:SOAP-ENC=”http://schemas.xmlsoap.org/soap/encoding/”>
<SOAP-ENV:Body>
<ns5060:CreateApplication xmlns:ns5060=”http://tempuri.org”>
<appDetails>
<accesskey xsi:type=”xsd:string”>bx23a</accesskey>
<jobid xsi:type=”xsd:string”>25</jobid>
<candid xsi:type=”xsd:int”>-1</candid>
<surname xsi:type=”xsd:string”>Obama</surname>
<firstname xsi:type=”xsd:string”>Barack</firstname>
<email xsi:type=”xsd:string”>pres@gov</email>
<mobile xsi:type=”xsd:string”>012345678</mobile>
<homephone xsi:type=”xsd:string”>876543210</homephone>
<country xsi:type=”xsd:string”>AU</country>
<state xsi:type=”xsd:string”>Vic</state>
<password xsi:type=”xsd:string”>captain</password>
<suburb xsi:type=”xsd:string”>Melbourne</suburb>
<resumedata xsi:type=”xsd:string”>(base 64 encoded resume data)</resumedata>
<resumename xsi:type=”xsd:string”><![CDATA[mycv.doc]]></resumename>
</appDetails>
</ns5060:CreateApplication>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
Example Response:
<?xml version=”1.0″ encoding=”ISO-8859-1″?>
<SOAP-ENV:Envelope
SOAP-ENV:encodingStyle=”http://schemas.xmlsoap.org/soap/encoding/”
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:SOAP-ENC=”http://schemas.xmlsoap.org/soap/encoding/” xmlns:tns=”urn:hellowsdl”>
<SOAP-ENV:Body>
<ns1:CreateApplicationResponse xmlns:ns1=”http://tempuri.org”>
<return xsi:type=”tns:appInfo”>
<appid xsi:type=”xsd:int”>2</appid>
<candid xsi:type=”xsd:int”>2</candid>
<errorcode xsi:type=”xsd:int”>0</errorcode>
<error xsi:type=”xsd:string”></error>
</return>
</ns1:CreateApplicationResponse>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
Function: UpdateApplication
Example Request:
<?xml version=”1.0″ encoding=”ISO-8859-1″?>
<SOAP-ENV:Envelope
SOAP-ENV:encodingStyle=”http://schemas.xmlsoap.org/soap/encoding/” 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:SOAP-ENC=”http://schemas.xmlsoap.org/soap/encoding/”>
<SOAP-ENV:Body>
<ns5263:UpdateApplication xmlns:ns5263=”http://tempuri.org”>
<appDetails>
<accesskey xsi:type=”xsd:string”>bx23a</accesskey>
<appid xsi:type=”xsd:string”>1</appid>
<surname xsi:type=”xsd:string”>lastnamechange</surname>
<firstname xsi:type=”xsd:string”>namechange1</firstname>
<email xsi:type=”xsd:string”>newemailchange@com</email>
<mobile xsi:type=”xsd:string”>111111111</mobile>
<homephone xsi:type=”xsd:string”>22222222222</homephone>
<country xsi:type=”xsd:string”>NZ</country>
<state xsi:type=”xsd:string”>NSW</state>
<password xsi:type=”xsd:string”>major</password>
<suburb xsi:type=”xsd:string”>Toormina</suburb>
<resumedata xsi:type=”xsd:string”>(base 64 encoded resume data)</resumedata>
<resumename xsi:type=”xsd:string”>my new resume.doc</resumename>
</appDetails>
</ns5263:UpdateApplication>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
Example Response:
<?xml version=”1.0″ encoding=”ISO-8859-1″?>
<SOAP-ENV:Envelope SOAP-ENV:encodingStyle=”http://schemas.xmlsoap.org/soap/encoding/”
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:SOAP-ENC=”http://schemas.xmlsoap.org/soap/encoding/” xmlns:tns=”urn:hellowsdl”>
<SOAP-ENV:Body>
<ns1:UpdateApplicationResponse xmlns:ns1=”http://tempuri.org”>
<return xsi:type=”tns:appInfo”>
<appid xsi:type=”xsd:int”>1</appid>
<candid xsi:type=”xsd:int”>1</candid>
<errorcode xsi:type=”xsd:int”>0</errorcode>
<error xsi:type=”xsd:string”></error>
</return>
</ns1:UpdateApplicationResponse>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
Can I alter the web application page to request that candidates can enter their own referee’s details?
Yes, contact support for a quote