FileDocCategorySizeDatePackage
Client.javaAPI DocJBoss 4.2.11894Fri Jul 13 20:54:54 BST 2007org.jboss.tutorial.webservice.client

Client

public class Client extends Object

Fields Summary
Constructors Summary
Methods Summary
public static voidmain(java.lang.String[] args)

      URL url = new URL("http://localhost:8080/tutorial/CalculatorBean?wsdl");
      QName qname = new QName("http://bean.webservice.tutorial.jboss.org/jaws",
              "CalculatorService");

      ServiceFactory factory = ServiceFactory.newInstance();
      Service service = factory.createService(url, qname);

      Calculator calculator = (Calculator) service.getPort(Calculator.class);

      System.out.println("1 + 1 = " + calculator.add(1, 1));
      System.out.println("1 - 1 = " + calculator.subtract(1, 1));