package examples.mega.client;

public class PortableClient{

  public static void main( String[] args ) throws Exception{

    if( args.length != 2 ){
      throw new IllegalArgumentException( "usage: PortableClient host port" );
    }

    String host = args[0];
    String port = args[1];

    String url = "http://" + host + ":" + port + 
      "/mega/SimpleTest?WSDL";

    SimpleTest service = new SimpleTest_Impl( url );
    SimpleTestSoap simpleTest = service.getSimpleTestSoap();
    System.out.println( simpleTest.echoString( "hi there" ) );

    SOAPStruct input = new SOAPStruct();
    SOAPStruct output = simpleTest.echoStruct( input );
    System.out.println( output ); 
  }
}

