
package client.services;

/**
 * Please modify this class to meet your needs
 * This class is not complete
 */

import java.io.File;
import java.net.MalformedURLException;
import java.net.URL;
import javax.xml.namespace.QName;
import javax.jws.WebMethod;
import javax.jws.WebParam;
import javax.jws.WebResult;
import javax.jws.WebService;
import javax.xml.bind.annotation.XmlSeeAlso;
import javax.xml.ws.RequestWrapper;
import javax.xml.ws.ResponseWrapper;

/**
 * This class was generated by Apache CXF 2.2.3
 * Thu Nov 11 17:10:22 CET 2010
 * Generated source version: 2.2.3
 * 
 */

public final class SupplierService_SupplierPT_Client {

    private static final QName SERVICE_NAME = new QName("http://infosys.tuwien.ac.at/aic10/ass1/dto/supplier", "SupplierService");

    private SupplierService_SupplierPT_Client() {
    }

    public static void main(String args[]) throws Exception {
        URL wsdlURL = SupplierService_Service.WSDL_LOCATION;
        if (args.length > 0) { 
            File wsdlFile = new File(args[0]);
            try {
                if (wsdlFile.exists()) {
                    wsdlURL = wsdlFile.toURI().toURL();
                } else {
                    wsdlURL = new URL(args[0]);
                }
            } catch (MalformedURLException e) {
                e.printStackTrace();
            }
        }
      
        SupplierService_Service ss = new SupplierService_Service(wsdlURL, SERVICE_NAME);
        SupplierService port = ss.getSupplierPT();  
        
        {
        System.out.println("Invoking order...");
        client.services.Product _order_p = null;
        int _order_amount = 0;
        try {
            java.math.BigDecimal _order__return = port.order(_order_p, _order_amount);
            System.out.println("order.result=" + _order__return);

        } catch (UnknownProductFault_Exception e) { 
            System.out.println("Expected exception: UnknownProductFault has occurred.");
            System.out.println(e.toString());
        }
            }

        System.exit(0);
    }

}
