+ Post New Thread
Results 1 to 12 of 12
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 ...
  1. #1

    Join Date
    Jan 2008
    Location
    Chesterfield, Derbyshire
    Posts
    194
    Thank Post
    11
    Thanked 35 Times in 25 Posts
    Rep Power
    21

    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?

    Code:
    <?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">
        <soap:Body>
            <ns2:getStudents />
        </soap:Body>
    </soap:Envelope>
    Last edited by PyROm; 19th October 2011 at 12:58 PM.

  2. #2

    Join Date
    Mar 2010
    Location
    UK
    Posts
    169
    Thank Post
    0
    Thanked 16 Times in 15 Posts
    Rep Power
    17
    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.

  3. #3

    Join Date
    Jan 2008
    Location
    Chesterfield, Derbyshire
    Posts
    194
    Thank Post
    11
    Thanked 35 Times in 25 Posts
    Rep Power
    21
    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 02:43 PM.

  4. #4
    rpwillis's Avatar
    Join Date
    Aug 2007
    Location
    SalamanderSoft Ltd
    Posts
    178
    Thank Post
    43
    Thanked 61 Times in 49 Posts
    Rep Power
    26
    The last Serco Partners event I went to we were told it was a completely new API.

  5. #5
    penfold_99's Avatar
    Join Date
    Feb 2008
    Location
    East Sussex
    Posts
    960
    Thank Post
    58
    Thanked 163 Times in 115 Posts
    Rep Power
    67
    Quote Originally Posted by rpwillis View Post
    The last Serco Partners event I went to we were told it was a completely new API.
    Was the event the one in derby? Its still a soap based API but it will have a lot more methods you can call.

  6. #6

    Join Date
    Jan 2008
    Location
    Chesterfield, Derbyshire
    Posts
    194
    Thank Post
    11
    Thanked 35 Times in 25 Posts
    Rep Power
    21
    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.

  7. #7
    mylearningltd's Avatar
    Join Date
    Feb 2011
    Location
    Shropshire
    Posts
    13
    Thank Post
    0
    Thanked 1 Time in 1 Post
    Rep Power
    0

    XML Request - Serco Facility

    Hi there,
    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)

    Code:
    <?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">
    <soap:Body><getStudents xmlns="http://webservice.api.serco.ie">
    <serviceReq></serviceReq>
    </getStudents></soap:Body></soap:Envelope>
    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
    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!

    Adam
    Last edited by mylearningltd; 29th May 2012 at 12:27 PM. Reason: Code was not on new lines

  8. #8

    Join Date
    Jan 2008
    Location
    Chesterfield, Derbyshire
    Posts
    194
    Thank Post
    11
    Thanked 35 Times in 25 Posts
    Rep Power
    21
    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.

    Thanks
    Robin

  9. #9

    Join Date
    Jan 2008
    Location
    Chesterfield, Derbyshire
    Posts
    194
    Thank Post
    11
    Thanked 35 Times in 25 Posts
    Rep Power
    21
    Correction... I have now got a new error com.ctc.wstx.exc.WstxParsingException: Illegal processing instruction target ("xml");

  10. #10
    mylearningltd's Avatar
    Join Date
    Feb 2011
    Location
    Shropshire
    Posts
    13
    Thank Post
    0
    Thanked 1 Time in 1 Post
    Rep Power
    0

    Wink Facility or Progresso

    Good question,
    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!

  11. #11

    Join Date
    Jan 2008
    Location
    Chesterfield, Derbyshire
    Posts
    194
    Thank Post
    11
    Thanked 35 Times in 25 Posts
    Rep Power
    21
    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.

  12. #12
    mylearningltd's Avatar
    Join Date
    Feb 2011
    Location
    Shropshire
    Posts
    13
    Thank Post
    0
    Thanked 1 Time in 1 Post
    Rep Power
    0

    Horrar!

    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
    Adam

SHARE:
+ Post New Thread

Similar Threads

  1. [ACS] Facility Connect API
    By pbaddhan in forum MIS Systems
    Replies: 12
    Last Post: 6th June 2013, 11:30 AM

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •