HomeDigital EditionSys-Con RadioSearch Web Services Cd
B2B Beginning WS Business Process Management Case Studies Content Management Distributing Computing e-Business Electronic Data Interchange Enterprise Industry Insight Integration Interviews Java & Web Services .NET Portal Product Reviews Scalability & Performance Security SOAP Source Code UDDI Wireless WS Standards WS Tips & Techniques WSDL WS Editorials XML

WASP: Taking the sting Out of Web Services Development by Kyle Gabhart
WSJ Vol 03 Issue 1 - pg.15

	


Listing 1

eclipse -vmargs -Xbootclasspath/a:ECLIPSE_HOME/plugins/com.systinet.wasp_4.0.0
/lib/security-ng.jar 

Listing 2

package wasp_examples.hello;


public class HelloWorld {
	
	protected String message = " Howdy Ya'll ";
	
	public String getMessage() {
		return message;
	}//end getMessage()	
}//end HelloWorld

Listing 3

package wasp_examples.hello;

import org.idoox.webservice.client.WebServiceLookup;
import org.idoox.wasp.Context;
import wasp_examples.hello.iface.HelloWorld;


public class HelloWorldClient extends Object {

    /** Constructor */
    public HelloWorldClient() {
    }

    /**
    * @param args the command line arguments
    */
    public static void main (String args[]) throws Exception {
        wasp_examples.hello.iface.HelloWorld service;
	  // The actual server name must be used for SOAPSpy to work
        String serviceURI = "http://localhost:6060/HelloWorld/";
        String wsdlURI = "http://localhost:6060/HelloWorld/";

         // init the lookup
WebServiceLookup lookup =(WebServiceLookup)
Context.getInstance(Context.WEBSERVICE_LOOKUP);
// get the instance of the Web Service interface from the lookup
service = (wasp_examples.hello.iface.HelloWorld) lookup.lookup
(wsdlURI, wasp_examples.hello.iface.HelloWorld.class, serviceURI);
        // now, call the methods on your Web Service interface
        //eg. service.getMessage();
	    System.out.println( service.echo( "Hi there" ) );
    }
}