The Artima Developer Community
Sponsored Link

Java Buzz Forum
I Wrote a Web Service :)

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
Weiqi Gao

Posts: 1808
Nickname: weiqigao
Registered: Jun, 2003

Weiqi Gao is a Java programmer.
I Wrote a Web Service :) Posted: May 8, 2004 7:55 PM
Reply to this message Reply

This post originated from an RSS feed registered with Java Buzz by Weiqi Gao.
Original Post: I Wrote a Web Service :)
Feed Title: Weiqi Gao's Weblog
Feed URL: http://www.weiqigao.com/blog/rss.xml
Feed Description: Sharing My Experience...
Latest Java Buzz Posts
Latest Java Buzz Posts by Weiqi Gao
Latest Posts From Weiqi Gao's Weblog

Advertisement

I have never wrote a Web ServiceTM. Until today, that is.

I've heard all about Axis, WSDL, SOAP, doc/literal, rpc/encoded, JAX-RPC, SAAJ, etc. But the process of setting everything up and actually writing and testing a Web Service in Java just seemed so daunting. And I never got around to try it.

The Beta 1 release of Mono contains a ASP.NET/Web Services host called XSP. So I decided to take it for a spin.

[weiqi@gao] $ cat hello.asmx

using System;
using System.Web.Services;
 
public class Hello : WebService {
    [WebMethod()]
    public string SayHello() {
        return "Hello, World!";
    }
}

[weiqi@gao] $ mono /usr/bin/xsp.exe
Listening on port: 8080
Listening on address: 0.0.0.0
Root directory: /home/weiqi/temp/src/webservice
Hit Return to stop the server

The URL http://localhost:8080/hello.asmx gives me the WSDL and client proxy code. I took the client code, added a Main() method, compiled, and run it. It worked as expected.

[weiqi@gao] $ mcs -r:System.Web.Services hello.cs
Compilation succeeded
[weiqi@gao] $ mono hello.exe
Hello, World!

Read: I Wrote a Web Service :)

Topic: J2ME - CLDC - MIDL Previous Topic   Next Topic Topic: XDoclet talk at Houston JUG

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use