MIS Systems Thread, Facility API XML request in Technical; I have written a lot of php scripts that interface with the facility SQL database, however with Progresso looming I ...
19th October 2011, 01:21 PM #1
Facility API XML request
I have written a lot of php scripts that interface with the facility SQL database, however with Progresso looming I need to convert them over to using the Facility API. Serco have given me access to it and a "Developers Manual" which looks more like a spec sheet.
I have got the API service working however I am having problems working out what my XML requests should look like to the server. At the moment I am trying to simply pull a list of students off, I have got this xml so far, but believe it is very wrong. Any one else got this working?
<?xml version="1.0" encoding="UTF-8" ?>
<soap:Envelope xmlns:soap="http://www.w3.org/2001/12/soap-envelope" xmlns:ns2="http://webservice.api.serco.ie">
Last edited by PyROm; 19th October 2011 at 01:58 PM.
IDG Tech News
19th October 2011, 03:24 PM #2
- Rep Power
I'm led to believe that Progresso uses SQL reporting services. Unless your publishing your data straight to a web page then this might be the wrong avenue to explore.
19th October 2011, 03:31 PM #3
My understanding is that Progresso will use SQL reporting services for report writing within Progresso, however if you want to get the infomation out to use in anything else (eg to use live information rather then having to export a spreadsheet) you have to use the API. Serco told me that if I write anything that uses the API and works with Facility it will work with the API for Progresso (ie. the API will be the same). Because Progresso will be hosted remotely by serco we wont have access to the SQL database directly (although I think we will probably be waiting until they release the locally hosted version).
Last edited by PyROm; 19th October 2011 at 03:43 PM.
20th October 2011, 09:46 AM #4
The last Serco Partners event I went to we were told it was a completely new API.
20th October 2011, 10:30 AM #5
Was the event the one in derby? Its still a soap based API but it will have a lot more methods you can call.
Originally Posted by rpwillis
21st October 2011, 11:03 AM #6
Hi, I was told it would work with programs written for the Facility API at the Derbyshire CMIS meetings (at Matlock) by a Serco staff member. Im assuming that they will extend the API for Progresso leaving the old Facility API calls in for legacy programs.
29th May 2012, 01:21 PM #7
XML Request - Serco Facility
I noticed that you asked a specific question and didn't really get an answer.
Yes, we've got it working and use it to import school data into the VLE we have developed.
You're extremely close
Here's the actual XML Request you should send.
(Could probably shorten it down a bit but it works)
PS - I've been fortunate enough to have IntegrisG2 as a backbone for comparing with Serco's Facility as their XML Request/Responses are quite similar
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
I've not found a manual yet for Serco Facility. Integris G2 had one (it was a bit vague) but their support team were very helpful.
I will leave how you handle the response all to you!
Last edited by mylearningltd; 29th May 2012 at 01:27 PM.
Reason: Code was not on new lines
12th June 2012, 04:03 PM #8
Hi, thanks for the reply, sorry for taking so long to get back, only just noticed this. Is this the request for progresso or facility? still getting epr errors when trying this against facility.
12th June 2012, 04:11 PM #9
Correction... I have now got a new error com.ctc.wstx.exc.WstxParsingException: Illegal processing instruction target ("xml");
12th June 2012, 05:54 PM #10
Facility or Progresso
My code is for Facility.
The error message might be related to the term 'xml' being used in the wrong place or out of context.
I've had an issue where, in PHP, if I didn't print the first line of my XML header in single quotes, PHP would remove the '<?' meaning that
the header was sent incorrect as if starting 'xml version=' etc...
Also, if you have a tag in there such as <xml> that might be reported as a reserved word??
That's just a guess though, might be nothing to do with it. But it would be worth changing anything that looks
out of place, maybe a namespace just called xml: instead of xmlns: etc...
Regarding the error, it will be difficult to help as I've never seen it but I hope this
helps in some way! Good luck!
14th June 2012, 07:24 PM #11
Thanks for the reply, with a lot of help from our technician its now working after putting your xml in we realised it was something wrong with the headers we were sending. The error I was getting was because I had a newline at the end of the header, which put the <?xml on line 2, which is not allowed. Our technician spotted that I wasnt sending a WSA request in the header and corrected it.
15th June 2012, 10:20 AM #12
Glad you got it working!
I was close on my guess..I guess?
That's another gotcha you've found that I've forgot to mention but have experienced too!
All the best
By pbaddhan in forum MIS Systems
Last Post: 6th June 2013, 12:30 PM
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)