Jump to:

21285 Posts in 5732 Topics by 2602 members

General Questions

SilverStripe Forums » General Questions » Restful Server -> Dataobject

General questions about getting started with SilverStripe that don't fit in any of the categories above.

Moderators: martimiz, Howard, Sean, Ryan M., biapar, Willr, Ingo, swaiba, simon_w

Page: 1
Go to End
Author Topic: 1316 Views
  • Dig
    Avatar
    Community Member
    28 Posts

    Restful Server -> Dataobject Link to this post

    I have a requirement where client sites need to report certain activities back to our crm (which is also built on silverstripe). I'm using RestfulServer and RestfulService to manage this communication.

    Example, certain activities on the site generate billable services. These are sent to the crm system so we can invoice later and keep a record of these billable activities. The client site also needs access to their pending and overdue invoices. While I have this working to some extent it would be a lot simpler if at the client end I could 'convert' the xml response into a DataObject set before running any further actions on it. Both ends of the system have the same dataobject classes where they overlap.

    Before I get started on coding it myself, I was wondering if there is an existing solution for converting the xml output of RestfulServer back to a DataObject (or DataObject set) at the other end. I can think of so many useful applications for a feature like this, surely someone has thought of it already.

    Thanks in advance.

  • Anonymous user
    Avatar
    Community Member
    1 Post

    Re: Restful Server -> Dataobject Link to this post

    This may not be helpful if you already have a partial solution, but you could have a look at the messagequeue module (by Mark Stephens). This module can be used to send messages between SilverStripe instances (and to other systems), and can send serialized data if required.

    See here:
    http://www.silverstripe.org/message-queue-module/

    Otherwise, you could use the RestfulServer and consume the JSON output instead, using Convert::json2array and then loop through the fields... ?

    Cheers,
    - Luke

    1316 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.