how to create a web service

前端 未结 2 579
伪装坚强ぢ
伪装坚强ぢ 2020-12-29 00:22

I building a website with Ruby on Rails framework. The site will contain a flash application that will interact with the rails application using web service. My partner buil

2条回答
  •  长情又很酷
    2020-12-29 01:00

    You'll be going through more pain than you need to by using WSDL.

    Instead, I recommend creating a REST interface that returns json (or xml) -- you'll find in rails it will just work.

    So you'll have things like:

    /books # returns a list of books. Also do Searching here
    /books/1 # return the detail of a book with ID of 1
    

    Search for "REST Rails" and you'll get examples of controllers that will return JSON and XML depending on what the client requests.

提交回复
热议问题