AdapterService.java 4.3 KB

package StSys.RoyoTech.client;

import java.net.MalformedURLException;
import java.net.URL;
import javax.xml.namespace.QName;
import javax.xml.ws.Service;
import javax.xml.ws.WebEndpoint;
import javax.xml.ws.WebServiceClient;
import javax.xml.ws.WebServiceException;
import javax.xml.ws.WebServiceFeature;


/**
 * This class was generated by the JAX-WS RI.
 * JAX-WS RI 2.2.9-b130926.1035
 * Generated source version: 2.2
 * http://10.42.23.228/WCF_ForSTSys2.0/AdapterService.svc?wsdl
 */
@WebServiceClient(name = "AdapterService", targetNamespace = "http://tempuri.org/", wsdlLocation = "http://10.42.23.228/WCF_ForSTSys2.0/AdapterService.svc?wsdl")
public class AdapterService
    extends Service
{

    //private static String wsdlStr = "http://10.42.23.228/WCF_ForSTSys2.0/AdapterService.svc?wsdl";
    private static String wsdlStr = "http://10.49.200.122:5556/WCF_ForSTSys2.0/AdapterService.svc?wsdl";
    private static URL ADAPTERSERVICE_WSDL_LOCATION;
    private static WebServiceException ADAPTERSERVICE_EXCEPTION;
    private static QName ADAPTERSERVICE_QNAME = new QName("http://tempuri.org/", "AdapterService");

    public static void init(String urlStr){
        if(urlStr.equalsIgnoreCase(wsdlStr)){
            return;
        }
        wsdlStr = urlStr;
        URL url = null;
        WebServiceException e = null;
        try {
            url = new URL(urlStr);
            //url = new URL("http://10.42.73.97:8080/services/SmdService?wsdl");
        } catch (MalformedURLException ex) {
            e = new WebServiceException(ex);
        }
        ADAPTERSERVICE_WSDL_LOCATION = url;
        ADAPTERSERVICE_EXCEPTION = e;
    }

    static {
        //String urlStr = "http://172.30.60.211/WCF_ForSTSys2.0/AdapterService.svc?wsdl";
        init(wsdlStr);
    }

    public AdapterService() {
        super(__getWsdlLocation(), ADAPTERSERVICE_QNAME);
    }

    public AdapterService(WebServiceFeature... features) {
        super(__getWsdlLocation(), ADAPTERSERVICE_QNAME, features);
    }

    public AdapterService(URL wsdlLocation) {
        super(wsdlLocation, ADAPTERSERVICE_QNAME);
    }

    public AdapterService(URL wsdlLocation, WebServiceFeature... features) {
        super(wsdlLocation, ADAPTERSERVICE_QNAME, features);
    }

    public AdapterService(URL wsdlLocation, QName serviceName) {
        super(wsdlLocation, serviceName);
    }

    public AdapterService(URL wsdlLocation, QName serviceName, WebServiceFeature... features) {
        super(wsdlLocation, serviceName, features);
    }

    /**
     * 
     * @return
     *     returns IWSAdapter
     */
    @WebEndpoint(name = "BasicHttpBinding_IWSAdapter")
    public IWSAdapter getBasicHttpBindingIWSAdapter() {
        return super.getPort(new QName("http://tempuri.org/", "BasicHttpBinding_IWSAdapter"), IWSAdapter.class);
    }

    /**
     * 
     * @param features
     *     A list of {@link javax.xml.ws.WebServiceFeature} to configure on the proxy.  Supported features not in the <code>features</code> parameter will have their default values.
     * @return
     *     returns IWSAdapter
     */
    @WebEndpoint(name = "BasicHttpBinding_IWSAdapter")
    public IWSAdapter getBasicHttpBindingIWSAdapter(WebServiceFeature... features) {
        return super.getPort(new QName("http://tempuri.org/", "BasicHttpBinding_IWSAdapter"), IWSAdapter.class, features);
    }

    /**
     * 
     * @return
     *     returns IArmService
     */
    @WebEndpoint(name = "BasicHttpBinding_IArmService")
    public IArmService getBasicHttpBindingIArmService() {
        return super.getPort(new QName("http://tempuri.org/", "BasicHttpBinding_IArmService"), IArmService.class);
    }

    /**
     * 
     * @param features
     *     A list of {@link javax.xml.ws.WebServiceFeature} to configure on the proxy.  Supported features not in the <code>features</code> parameter will have their default values.
     * @return
     *     returns IArmService
     */
    @WebEndpoint(name = "BasicHttpBinding_IArmService")
    public IArmService getBasicHttpBindingIArmService(WebServiceFeature... features) {
        return super.getPort(new QName("http://tempuri.org/", "BasicHttpBinding_IArmService"), IArmService.class, features);
    }

    private static URL __getWsdlLocation() {
        if (ADAPTERSERVICE_EXCEPTION!= null) {
            throw ADAPTERSERVICE_EXCEPTION;
        }
        return ADAPTERSERVICE_WSDL_LOCATION;
    }

}