weedave
weedave

Reputation: 237

How do you build a website that uses SOAP requests and responses?

Basically, I'm looking to create a simple music playlist platform but in the form of webpages. Users create playlist, add songs to it, and other users can view these playlists.

But the website must use SOAP to send and retrieve data. How is this possible? Is this possible?

Upvotes: 1

Views: 3760

Answers (5)

Ryan Lynch
Ryan Lynch

Reputation: 7776

If you want to implement a Javascript solution on the client, you'll need to write some client code to make the requests and parse the returned xml. Google 'javascript soap client' and you'll find code and tutorials, like this jQuery plugin. If you use something like Flash on your page, it already has classes that you can use to abstract the interface to the remote service in your application. The server side part of it really depends on what you are using there, so you'll have to look at the documentation for your server / framework for how to go about setting up a SOAP service.

Upvotes: 1

Josh Warner-Burke
Josh Warner-Burke

Reputation: 1427

ASP.net with Visual Studio makes creating and consuming web services pretty simple. Someone mentioned javascript. You may want to create a web service as part of a website, then let the site create javascript proxy methods for interacting with the web service or services.

This page was helpful when I did something like this

http://www.asp.net/AJAX/Documentation/Live/Tutorials/ConsumingWebServicesWithAJAXTutorial.aspx

Upvotes: 1

Andrew Borley
Andrew Borley

Reputation: 1784

If you want to use SOAP, a good place to start would be with Apache Axis which is a Java-based SOAP/WSDL framework - Axis also has the advantage of supporting RESTful services, which is perhaps more what you want.

To get started you want to:

  1. Define your playlist data structures that will be passed around by your services and stored in your system
  2. Define the service interface - what are the list of operations you want the service to be able to do? What would be the inputs and outputs to each operation?
  3. Decide what your storage is going to be - flat file, DB, etc, and what is going to be stored & how.
  4. Implement it! If you're doing SOAP you'll want WSDL, XML schemas and service and client implementations.

If you want your user interface to be Web browser based, but still must use SOAP, then you will need to create an HTML presentation layer that contains a SOAP client, that itself calls your SOAP service. For the HTML/SOAP client layer, you could use use one of the SOAP libraries for PHP or Javascript or something like Java servlets or JSPs.

Upvotes: 2

Mike Atlas
Mike Atlas

Reputation: 8231

SOAP is designed to enable computers and programs to talk to each other. You would be a sadist to make users interact directly with a website via SOAP ;)

If your want your site to allow users to submit their data with custom clients (not web browsers) for example, a music player that automatically uploads playlists to a website, then SOAP might be a perfectly good protocol for the player and your site to communicate said data.

Your site can take advantage of pre-written SOAP implementations such as Apache Axis, as suggested by ajborley, and then the client side (e.g., a music player plugin) might need to be your own implementation.

Upvotes: 2

Sergey Ilinsky
Sergey Ilinsky

Reputation: 31535

SOAP can play a good role in the infrastructure of a complex back-end implemented in different technologies. I had experience developing client-side application which communicated to back-end in SOAP through a tiny JSON2SOAP server-side front-end. I doubt this is neccessary in your case though.

Upvotes: 0

Related Questions