Results 1 to 9 of 9

Thread: Soap

  1. #1
    The King of Vague Steve B's Avatar
    Join Date
    Oct 2005
    Location
    Glasgow
    Posts
    5,051
    Thanks
    116
    Thanked
    67 times in 63 posts

    Soap

    Just wondering if anyones ever used this and could perhaps give me a hand in actually getting something down that I can actually see functioning. I've read the wiki, and a book called "Understanding Web Services" by Eric Newcomer, but would appreciate any input.
    Thanks guys,
    Steve

  2. #2
    honed at getting pwned
    Join Date
    Sep 2006
    Location
    Lancashire, UK
    Posts
    449
    Thanks
    4
    Thanked
    4 times in 4 posts
    If you are using Java then check out Apache AXIS:
    http://ws.apache.org/axis/

    It's the easiest way (in Java at least) to consume web services.

  3. #3
    The King of Vague Steve B's Avatar
    Join Date
    Oct 2005
    Location
    Glasgow
    Posts
    5,051
    Thanks
    116
    Thanked
    67 times in 63 posts
    no java im afraid
    its a couple of C programs to spout some information over the ether.

  4. #4
    Flower Child stytagm's Avatar
    Join Date
    Aug 2004
    Location
    London
    Posts
    754
    Thanks
    47
    Thanked
    23 times in 18 posts
    Hi Steve,

    What languages are you using? I've used web services in ASP.Net (C#) quite a bit recently but I've no idea how you'd do it in say, Java or Python.

    Certainly within .Net it's easy peasy, as there are big libraries that wrap up most of the really difficult stuff, so you just have to worry about what you want the web service to do.

    To create a web service (for other people to consume) in .Net is pretty much like any other web page. You just add a using reference and mark the relevant public methods as [WebMethod]
    The Code behind (HelloWorld.asmx.cs)would look something like:
    Code:
    using System;
    using System.Data;
    using System.Web;
    using System.Collections;
    using System.Web.Services;
    using System.Web.Services.Protocols;
    using System.ComponentModel;
    
    namespace ProductReviews.WebService
    {
    	/// <summary>
    	/// Summary description for HelloWorld
    	/// </summary>
    	[WebService(Namespace = "http://tempuri.org/")]
    	[WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
    	[ToolboxItem(false)]
    	public class HelloWorld : System.Web.Services.WebService
    	{
    
    		[WebMethod]
    		public string HelloWorld()
    		{
    			return "Hello World";
    		}
    	}
    }
    Then just dump that on an IIS or Mod_Mono server and Robert's your father's brother.

    To consume the Web Service is in some ways even easier, but in others a bit confusing. Visual Studio (The .net dev environment) tries to be a bit too clever, so I use a command line tool to generate some c# proxy classes, that you then use like any other class.

    Eg on my box, to generate the proxy class I fire up the Visual Studio command promt and type:
    Code:
    wsdl http://localhost/HelloWorld.asmx?WSDL
    this will generate a file called "HelloWorld.cs" that I can include in my consuming project. It will expose some public methods that call the web service for me. Easy Peasy, and there are loads of good guides on Google.

    I believe that most modern languages are just as easy, but different.
    Last edited by stytagm; 04-07-2007 at 12:54 PM. Reason: Edit: Beaten To it!
    They told me I was gullible ... and I believed them.

  5. Received thanks from:

    Steve B (04-07-2007)

  6. #5
    Flower Child stytagm's Avatar
    Join Date
    Aug 2004
    Location
    London
    Posts
    754
    Thanks
    47
    Thanked
    23 times in 18 posts
    Quote Originally Posted by Steve B View Post
    no java im afraid
    its a couple of C programs to spout some information over the ether.
    Umm, might be a lot trickier. You could have a look at this: http://gsoap2.sourceforge.net/ (scroll down to see a couple of examples)
    They told me I was gullible ... and I believed them.

  7. #6
    Large Member
    Join Date
    Apr 2004
    Posts
    3,720
    Thanks
    47
    Thanked
    99 times in 64 posts
    You don't have to immediately think web services with SOAP. What is it you are trying to learn. The protocol itself? It's uses? Or somthing more practical?

    Try looking into .net''s 'MarshalByRefObject'.
    To err is human. To really foul things up ... you need a computer.

  8. #7
    The King of Vague Steve B's Avatar
    Join Date
    Oct 2005
    Location
    Glasgow
    Posts
    5,051
    Thanks
    116
    Thanked
    67 times in 63 posts
    ive got the gSOAP library installed on the macbook, running ubuntu.
    Basically, ive got a server and a client. My understanding of it is that every time the client joins the network, it connects to the server, and downloads an XML document containing routing policies. My boss is in france and things at various conferences, but i'd like to have something to show him when he gets back on Monday.
    I'm trying to create a SOAP server with PHP, which i've just managed to get working. Its the getQuote example one, so i know that the PHP SOAP stuff works. I've got a WSDL file too, which I can post.
    I've created a php script for managing the policies, which is server-side.

  9. #8
    Registered+
    Join Date
    Jul 2005
    Location
    Richmond, London
    Posts
    75
    Thanks
    0
    Thanked
    0 times in 0 posts
    SOAP is a pretty heavyweight introduction to web services. Quite a lot of the newer ones provided by the likes of Flickr and Upcoming etc. use REST, which is a lot easier to pick up. I'm not sure of resources to point to for ASP.NET developers, but Google is your friend here.

  10. #9
    The King of Vague Steve B's Avatar
    Join Date
    Oct 2005
    Location
    Glasgow
    Posts
    5,051
    Thanks
    116
    Thanked
    67 times in 63 posts
    REST has been suggested by one of the other guys working on RUBY, but I have to follow the specification and the specification says SOAP
    I'm getting there now though, WSDL is coming alot easier

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Soap star!
    By kickstart 1 in forum General Discussion
    Replies: 8
    Last Post: 16-05-2007, 02:23 PM
  2. Replies: 2
    Last Post: 02-05-2006, 11:52 AM
  3. Metropolis - April 13th : Sankeys Soap - Manchester
    By Lee H in forum Movies, TV, Music and Books
    Replies: 0
    Last Post: 20-02-2006, 12:06 PM
  4. Is soap redundant in today's society?
    By Steven W in forum General Discussion
    Replies: 63
    Last Post: 12-02-2006, 03:58 PM
  5. SOAP and responses
    By TiG in forum Software
    Replies: 4
    Last Post: 07-01-2004, 02:10 PM

Posting Permissions

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