Package org.apache.axis.utils

Examples of org.apache.axis.utils.Options


        }
        axisServer.setServerSocket(socket);
        try {
            axisServer.start(true);
            AdminClient admin = new AdminClient();
            Options opts = new Options(new String[] {"-p", Integer.toString(AXIS_PORT)});
            InputStream is = getClass().getResourceAsStream("resources/echoDeploy.wsdd");
            String result = admin.process(opts, is);
            if (null == result || result.contains("AxisFault")) {
                throw new Exception("Failed to start axis server");
            }
View Full Code Here


    }

    protected boolean verify(Logger l) {
        AdminClient admin = new AdminClient();
        try {
            Options opts = new Options(new String[] {"-p", Integer.toString(AXIS_PORT)});
            InputStream is = getClass().getResourceAsStream("resources/echoUndeploy.wsdd");
            String result = admin.process(opts, is);
            if (null == result || result.contains("AxisFault")) {
                return false;
            }
View Full Code Here

/**
* Simple test driver for our message service.
*/
public class TestMsg {
    public String doit(String[] args) throws Exception {
        Options opts = new Options(args);
        opts.setDefaultURL("http://localhost:8080/services/MessageService");

        Service  service = new Service();
        Call     call    = (Call) service.createCall();

        call.setTargetEndpointAddress( new URL(opts.getURL()) );
        SOAPBodyElement[] input = new SOAPBodyElement[3];

        input[0] = new SOAPBodyElement(XMLUtils.StringToElement("urn:foo",
                                                                "e1", "Hello"));
        input[1] = new SOAPBodyElement(XMLUtils.StringToElement("urn:foo",
View Full Code Here

     * @param args the command line arguments (mainly for specifying URL)
     * @param service an optional service argument, which will be used for
     * specifying the transport-level service
     */
    public static String doTest (String args[], String service) throws Exception {
      Options      opts    = new Options( args );
      String       url     = opts.getURL();
      String       action  = "EchoService" ;
       
        if (service != null) {
            action = service;
        }

      args = opts.getRemainingArgs();
      if ( args != null ) action = args[0];

      ServiceClient client = new ServiceClient(new HTTPTransport());
      client.set(HTTPTransport.URL, url);
      client.set(HTTPTransport.ACTION, action);
View Full Code Here

import org.apache.axis.utils.Options;

public class CalcClient
{
   public static void main(String [] args) throws Exception {
       Options options = new Options(args);
      
       String endpoint = "http://localhost:" + options.getPort() +
                         "/axis/Calculator.jws";
      
       args = options.getRemainingArgs();
      
       if (args.length != 3) {
           System.err.println("Usage: CalcClient <add|subtract> arg1 arg2");
           return;
       }
View Full Code Here

        printAddress (resp);
        return resp;
    }
   
    public static void main (String[] args) throws Exception {
        Options opts = new Options(args);
        URL serviceURL = new URL(opts.getURL());
       
        System.err.println ("Using proxy without session maintenance.");
        AddressBookProxy ab1 = new AddressBookProxy ("urn:AddressFetcher2");
        if (serviceURL != null) {
            ab1.setEndPoint (serviceURL);
View Full Code Here

  public static void main(String args[]) throws Exception {
    FileReader  reader = new FileReader();
    reader.setDaemon(true);
    reader.start();

    Options opts = new Options( args );
   
    args = opts.getRemainingArgs();
   
    if ( args == null ) {
      System.err.println( "Usage: GetQuote <symbol>" );
      System.exit(1);
    }
   
    String   symbol = args[0] ;
    ServiceClient call = new ServiceClient();
    ServiceDescription sd = new ServiceDescription("stockQuotes", true);
    sd.addOutputParam("return", SOAPTypeMappingRegistry.XSD_FLOAT);
    call.setServiceDescription(sd);
 
    call.set(Transport.USER, opts.getUser() );
    call.set(Transport.PASSWORD, opts.getPassword() );
    call.setTransport( new FileTransport() );
    call.setTimeout(10000);
 
    Float res = new Float(0.0F);
    res = (Float) call.invoke( "urn:xmltoday-delayed-quotes",
View Full Code Here

public class Client
{
    public static void main(String [] args)
    {
        try {
            Options options = new Options(args);
           
            String endpointURL = options.getURL();
           
            ServiceClient client = new ServiceClient(endpointURL);
           
            client.invoke("LogTestService", "testMethod", new Object [] {});
        } catch (Exception e) {
View Full Code Here

                                          
public class Client
{
    public static void main(String [] args) throws Exception
    {
        Options options = new Options(args);
       
        Order order = new Order();
        order.setCustomerName("Glen Daniels");
        order.setShippingAddress("275 Grove Street, Newton, MA");
       
        String [] items = new String[] { "mp3jukebox", "1600mahBattery" };
        int [] quantities = new int [] { 1, 4 };
       
        order.setItemCodes(items);
        order.setQuantities(quantities);
       
        ServiceClient client = new ServiceClient(options.getURL());
        client.addSerializer(Order.class, new QName("urn:BeanService", "Order"),
                             new org.apache.axis.encoding.BeanSerializer(Order.class));
       
        String result;
        try {
View Full Code Here

    }

    public void testOptionsConstructor() throws MalformedURLException
    {
        String[] fake_args = { "-h 127.0.0.1","-p 8081","-u scott","-w tiger" };
        Options ops = new Options(fake_args);
    }  
View Full Code Here

TOP

Related Classes of org.apache.axis.utils.Options

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.