FileDocCategorySizeDatePackage
SOAPClientPlugin.javaAPI DocExample1390Fri Dec 06 20:35:22 GMT 2002com.wiverson.macosbook.webservices

SOAPClientPlugin

public class SOAPClientPlugin extends Object implements com.wiverson.macosbook.SimpleEditPlugin

Fields Summary
Constructors Summary
public SOAPClientPlugin()

    
Methods Summary
public voiddoAction(com.wiverson.macosbook.SimpleEdit frame, java.awt.event.ActionEvent evt)

        frame.appendDocumentText(this.remoteCall());
    
public java.lang.StringgetAction()

        return "SOAP Client";
    
public voidinit(com.wiverson.macosbook.SimpleEdit frame)

    
public static voidmain(java.lang.String[] args)

        System.out.println(new SOAPClientPlugin().remoteCall());
    
public java.lang.StringremoteCall()

        try
        {
            String webserviceLocation =
            "http://localhost:8080/axis/SimpleWebService.jws";
            
            Service service = new Service();
            Call call    = (Call) service.createCall();
            
            call.setTargetEndpointAddress(new java.net.URL(webserviceLocation));
            
            return (String) call.invoke("now", null);
            
        } catch (Exception e)
        {
            System.err.println(e.toString());
        }
        return "Unable to connect.";