www.pudn.com > google_examples.zip > XMethodsFilesystemBindingStub.java, change:2002-05-01,size:16805b


/** 
 * XMethodsFilesystemBindingStub.java 
 * 
 * This file was auto-generated from WSDL 
 * by the Apache Axis Wsdl2java emitter. 
 */ 
 
package net.xmethods.www; 
 
public class XMethodsFilesystemBindingStub extends org.apache.axis.client.Stub implements net.xmethods.www.XMethodsFilesystemPortType { 
    private java.util.Vector cachedSerClasses = new java.util.Vector(); 
    private java.util.Vector cachedSerQNames = new java.util.Vector(); 
    private java.util.Vector cachedSerFactories = new java.util.Vector(); 
    private java.util.Vector cachedDeserFactories = new java.util.Vector(); 
 
    public XMethodsFilesystemBindingStub() throws org.apache.axis.AxisFault { 
         this(null); 
    } 
 
    public XMethodsFilesystemBindingStub(java.net.URL endpointURL, javax.xml.rpc.Service service) throws org.apache.axis.AxisFault { 
         this(service); 
         super.cachedEndpoint = endpointURL; 
    } 
 
    public XMethodsFilesystemBindingStub(javax.xml.rpc.Service service) throws org.apache.axis.AxisFault { 
        try { 
            if (service == null) { 
                super.service = new org.apache.axis.client.Service(); 
            } else { 
                super.service = service; 
            } 
        } 
        catch(java.lang.Exception t) { 
            throw org.apache.axis.AxisFault.makeFault(t); 
        } 
    } 
 
    private org.apache.axis.client.Call createCall() throws java.rmi.RemoteException { 
        try { 
            org.apache.axis.client.Call call = 
                    (org.apache.axis.client.Call) super.service.createCall(); 
            if (super.maintainSessionSet) { 
                call.setMaintainSession(super.maintainSession); 
            } 
            if (super.cachedUsername != null) { 
                call.setUsername(super.cachedUsername); 
            } 
            if (super.cachedPassword != null) { 
                call.setPassword(super.cachedPassword); 
            } 
            if (super.cachedEndpoint != null) { 
                call.setTargetEndpointAddress(super.cachedEndpoint); 
            } 
            if (super.cachedTimeout != null) { 
                call.setTimeout(super.cachedTimeout); 
            } 
            java.util.Enumeration keys = super.cachedProperties.keys(); 
            while (keys.hasMoreElements()) { 
                String key = (String) keys.nextElement(); 
                call.setProperty(key, super.cachedProperties.get(key)); 
            } 
            // All the type mapping information is registered 
            // when the first call is made. 
            // The type mapping information is actually registered in 
            // the TypeMappingRegistry of the service, which 
            // is the reason why registration is only needed for the first call. 
            if (firstCall()) { 
                // must set encoding style before registering serializers 
                call.setEncodingStyle(org.apache.axis.Constants.URI_SOAP_ENC); 
                for (int i = 0; i < cachedSerFactories.size(); ++i) { 
                    Class cls = (Class) cachedSerClasses.get(i); 
                    javax.xml.rpc.namespace.QName qName = 
                            (javax.xml.rpc.namespace.QName) cachedSerQNames.get(i); 
                    Class sf = (Class) 
                             cachedSerFactories.get(i); 
                    Class df = (Class) 
                             cachedDeserFactories.get(i); 
                    call.registerTypeMapping(cls, qName, sf, df, false); 
                } 
            } 
            return call; 
        } 
        catch (Throwable t) { 
            throw new org.apache.axis.AxisFault("Failure trying to get the Call object", t); 
        } 
    } 
 
    public java.lang.String readFile(java.lang.String userid, java.lang.String filename) throws java.rmi.RemoteException{ 
        if (super.cachedEndpoint == null) { 
            throw new org.apache.axis.NoEndPointException(); 
        } 
        org.apache.axis.client.Call call = createCall(); 
        javax.xml.rpc.namespace.QName p0QName = new javax.xml.rpc.namespace.QName("", "userid"); 
        call.addParameter(p0QName, new javax.xml.rpc.namespace.QName("http://www.w3.org/1999/XMLSchema", "string"), java.lang.String.class, javax.xml.rpc.ParameterMode.IN); 
        javax.xml.rpc.namespace.QName p1QName = new javax.xml.rpc.namespace.QName("", "filename"); 
        call.addParameter(p1QName, new javax.xml.rpc.namespace.QName("http://www.w3.org/1999/XMLSchema", "string"), java.lang.String.class, javax.xml.rpc.ParameterMode.IN); 
        call.setReturnType(new javax.xml.rpc.namespace.QName("http://www.w3.org/1999/XMLSchema", "string")); 
        call.setUseSOAPAction(true); 
        call.setSOAPActionURI(""); 
        call.setOperationStyle("rpc"); 
        call.setOperationName(new javax.xml.rpc.namespace.QName("urn:xmethodsXFS", "readFile")); 
 
        Object resp = call.invoke(new Object[] {userid, filename}); 
 
        if (resp instanceof java.rmi.RemoteException) { 
            throw (java.rmi.RemoteException)resp; 
        } 
        else { 
            try { 
                return (java.lang.String) resp; 
            } catch (java.lang.Exception e) { 
                return (java.lang.String) org.apache.axis.utils.JavaUtils.convert(resp, java.lang.String.class); 
            } 
        } 
    } 
 
    public java.lang.String readFile(java.lang.String userid, java.lang.String filename, java.lang.String password) throws java.rmi.RemoteException{ 
        if (super.cachedEndpoint == null) { 
            throw new org.apache.axis.NoEndPointException(); 
        } 
        org.apache.axis.client.Call call = createCall(); 
        javax.xml.rpc.namespace.QName p0QName = new javax.xml.rpc.namespace.QName("", "userid"); 
        call.addParameter(p0QName, new javax.xml.rpc.namespace.QName("http://www.w3.org/1999/XMLSchema", "string"), java.lang.String.class, javax.xml.rpc.ParameterMode.IN); 
        javax.xml.rpc.namespace.QName p1QName = new javax.xml.rpc.namespace.QName("", "filename"); 
        call.addParameter(p1QName, new javax.xml.rpc.namespace.QName("http://www.w3.org/1999/XMLSchema", "string"), java.lang.String.class, javax.xml.rpc.ParameterMode.IN); 
        javax.xml.rpc.namespace.QName p2QName = new javax.xml.rpc.namespace.QName("", "password"); 
        call.addParameter(p2QName, new javax.xml.rpc.namespace.QName("http://www.w3.org/1999/XMLSchema", "string"), java.lang.String.class, javax.xml.rpc.ParameterMode.IN); 
        call.setReturnType(new javax.xml.rpc.namespace.QName("http://www.w3.org/1999/XMLSchema", "string")); 
        call.setUseSOAPAction(true); 
        call.setSOAPActionURI(""); 
        call.setOperationStyle("rpc"); 
        call.setOperationName(new javax.xml.rpc.namespace.QName("urn:xmethodsXFS", "readFile")); 
 
        Object resp = call.invoke(new Object[] {userid, filename, password}); 
 
        if (resp instanceof java.rmi.RemoteException) { 
            throw (java.rmi.RemoteException)resp; 
        } 
        else { 
            try { 
                return (java.lang.String) resp; 
            } catch (java.lang.Exception e) { 
                return (java.lang.String) org.apache.axis.utils.JavaUtils.convert(resp, java.lang.String.class); 
            } 
        } 
    } 
 
    public java.lang.String writeFile(java.lang.String userid, java.lang.String filedata, java.lang.String filename) throws java.rmi.RemoteException{ 
        if (super.cachedEndpoint == null) { 
            throw new org.apache.axis.NoEndPointException(); 
        } 
        org.apache.axis.client.Call call = createCall(); 
        javax.xml.rpc.namespace.QName p0QName = new javax.xml.rpc.namespace.QName("", "userid"); 
        call.addParameter(p0QName, new javax.xml.rpc.namespace.QName("http://www.w3.org/1999/XMLSchema", "string"), java.lang.String.class, javax.xml.rpc.ParameterMode.IN); 
        javax.xml.rpc.namespace.QName p1QName = new javax.xml.rpc.namespace.QName("", "filedata"); 
        call.addParameter(p1QName, new javax.xml.rpc.namespace.QName("http://www.w3.org/1999/XMLSchema", "string"), java.lang.String.class, javax.xml.rpc.ParameterMode.IN); 
        javax.xml.rpc.namespace.QName p2QName = new javax.xml.rpc.namespace.QName("", "filename"); 
        call.addParameter(p2QName, new javax.xml.rpc.namespace.QName("http://www.w3.org/1999/XMLSchema", "string"), java.lang.String.class, javax.xml.rpc.ParameterMode.IN); 
        call.setReturnType(new javax.xml.rpc.namespace.QName("http://www.w3.org/1999/XMLSchema", "string")); 
        call.setUseSOAPAction(true); 
        call.setSOAPActionURI(""); 
        call.setOperationStyle("rpc"); 
        call.setOperationName(new javax.xml.rpc.namespace.QName("urn:xmethodsXFS", "writeFile")); 
 
        Object resp = call.invoke(new Object[] {userid, filedata, filename}); 
 
        if (resp instanceof java.rmi.RemoteException) { 
            throw (java.rmi.RemoteException)resp; 
        } 
        else { 
            try { 
                return (java.lang.String) resp; 
            } catch (java.lang.Exception e) { 
                return (java.lang.String) org.apache.axis.utils.JavaUtils.convert(resp, java.lang.String.class); 
            } 
        } 
    } 
 
    public java.lang.String writeFile(java.lang.String userid, java.lang.String filedata, java.lang.String filename, java.lang.String password) throws java.rmi.RemoteException{ 
        if (super.cachedEndpoint == null) { 
            throw new org.apache.axis.NoEndPointException(); 
        } 
        org.apache.axis.client.Call call = createCall(); 
        javax.xml.rpc.namespace.QName p0QName = new javax.xml.rpc.namespace.QName("", "userid"); 
        call.addParameter(p0QName, new javax.xml.rpc.namespace.QName("http://www.w3.org/1999/XMLSchema", "string"), java.lang.String.class, javax.xml.rpc.ParameterMode.IN); 
        javax.xml.rpc.namespace.QName p1QName = new javax.xml.rpc.namespace.QName("", "filedata"); 
        call.addParameter(p1QName, new javax.xml.rpc.namespace.QName("http://www.w3.org/1999/XMLSchema", "string"), java.lang.String.class, javax.xml.rpc.ParameterMode.IN); 
        javax.xml.rpc.namespace.QName p2QName = new javax.xml.rpc.namespace.QName("", "filename"); 
        call.addParameter(p2QName, new javax.xml.rpc.namespace.QName("http://www.w3.org/1999/XMLSchema", "string"), java.lang.String.class, javax.xml.rpc.ParameterMode.IN); 
        javax.xml.rpc.namespace.QName p3QName = new javax.xml.rpc.namespace.QName("", "password"); 
        call.addParameter(p3QName, new javax.xml.rpc.namespace.QName("http://www.w3.org/1999/XMLSchema", "string"), java.lang.String.class, javax.xml.rpc.ParameterMode.IN); 
        call.setReturnType(new javax.xml.rpc.namespace.QName("http://www.w3.org/1999/XMLSchema", "string")); 
        call.setUseSOAPAction(true); 
        call.setSOAPActionURI(""); 
        call.setOperationStyle("rpc"); 
        call.setOperationName(new javax.xml.rpc.namespace.QName("urn:xmethodsXFS", "writeFile")); 
 
        Object resp = call.invoke(new Object[] {userid, filedata, filename, password}); 
 
        if (resp instanceof java.rmi.RemoteException) { 
            throw (java.rmi.RemoteException)resp; 
        } 
        else { 
            try { 
                return (java.lang.String) resp; 
            } catch (java.lang.Exception e) { 
                return (java.lang.String) org.apache.axis.utils.JavaUtils.convert(resp, java.lang.String.class); 
            } 
        } 
    } 
 
    public java.lang.String removeFile(java.lang.String userid, java.lang.String filename) throws java.rmi.RemoteException{ 
        if (super.cachedEndpoint == null) { 
            throw new org.apache.axis.NoEndPointException(); 
        } 
        org.apache.axis.client.Call call = createCall(); 
        javax.xml.rpc.namespace.QName p0QName = new javax.xml.rpc.namespace.QName("", "userid"); 
        call.addParameter(p0QName, new javax.xml.rpc.namespace.QName("http://www.w3.org/1999/XMLSchema", "string"), java.lang.String.class, javax.xml.rpc.ParameterMode.IN); 
        javax.xml.rpc.namespace.QName p1QName = new javax.xml.rpc.namespace.QName("", "filename"); 
        call.addParameter(p1QName, new javax.xml.rpc.namespace.QName("http://www.w3.org/1999/XMLSchema", "string"), java.lang.String.class, javax.xml.rpc.ParameterMode.IN); 
        call.setReturnType(new javax.xml.rpc.namespace.QName("http://www.w3.org/1999/XMLSchema", "string")); 
        call.setUseSOAPAction(true); 
        call.setSOAPActionURI(""); 
        call.setOperationStyle("rpc"); 
        call.setOperationName(new javax.xml.rpc.namespace.QName("urn:xmethodsXFS", "removeFile")); 
 
        Object resp = call.invoke(new Object[] {userid, filename}); 
 
        if (resp instanceof java.rmi.RemoteException) { 
            throw (java.rmi.RemoteException)resp; 
        } 
        else { 
            try { 
                return (java.lang.String) resp; 
            } catch (java.lang.Exception e) { 
                return (java.lang.String) org.apache.axis.utils.JavaUtils.convert(resp, java.lang.String.class); 
            } 
        } 
    } 
 
    public java.lang.String removeFile(java.lang.String userid, java.lang.String filename, java.lang.String password) throws java.rmi.RemoteException{ 
        if (super.cachedEndpoint == null) { 
            throw new org.apache.axis.NoEndPointException(); 
        } 
        org.apache.axis.client.Call call = createCall(); 
        javax.xml.rpc.namespace.QName p0QName = new javax.xml.rpc.namespace.QName("", "userid"); 
        call.addParameter(p0QName, new javax.xml.rpc.namespace.QName("http://www.w3.org/1999/XMLSchema", "string"), java.lang.String.class, javax.xml.rpc.ParameterMode.IN); 
        javax.xml.rpc.namespace.QName p1QName = new javax.xml.rpc.namespace.QName("", "filename"); 
        call.addParameter(p1QName, new javax.xml.rpc.namespace.QName("http://www.w3.org/1999/XMLSchema", "string"), java.lang.String.class, javax.xml.rpc.ParameterMode.IN); 
        javax.xml.rpc.namespace.QName p2QName = new javax.xml.rpc.namespace.QName("", "password"); 
        call.addParameter(p2QName, new javax.xml.rpc.namespace.QName("http://www.w3.org/1999/XMLSchema", "string"), java.lang.String.class, javax.xml.rpc.ParameterMode.IN); 
        call.setReturnType(new javax.xml.rpc.namespace.QName("http://www.w3.org/1999/XMLSchema", "string")); 
        call.setUseSOAPAction(true); 
        call.setSOAPActionURI(""); 
        call.setOperationStyle("rpc"); 
        call.setOperationName(new javax.xml.rpc.namespace.QName("urn:xmethodsXFS", "removeFile")); 
 
        Object resp = call.invoke(new Object[] {userid, filename, password}); 
 
        if (resp instanceof java.rmi.RemoteException) { 
            throw (java.rmi.RemoteException)resp; 
        } 
        else { 
            try { 
                return (java.lang.String) resp; 
            } catch (java.lang.Exception e) { 
                return (java.lang.String) org.apache.axis.utils.JavaUtils.convert(resp, java.lang.String.class); 
            } 
        } 
    } 
 
    public java.lang.String listFiles(java.lang.String userid, java.lang.String password) throws java.rmi.RemoteException{ 
        if (super.cachedEndpoint == null) { 
            throw new org.apache.axis.NoEndPointException(); 
        } 
        org.apache.axis.client.Call call = createCall(); 
        javax.xml.rpc.namespace.QName p0QName = new javax.xml.rpc.namespace.QName("", "userid"); 
        call.addParameter(p0QName, new javax.xml.rpc.namespace.QName("http://www.w3.org/1999/XMLSchema", "string"), java.lang.String.class, javax.xml.rpc.ParameterMode.IN); 
        javax.xml.rpc.namespace.QName p1QName = new javax.xml.rpc.namespace.QName("", "password"); 
        call.addParameter(p1QName, new javax.xml.rpc.namespace.QName("http://www.w3.org/1999/XMLSchema", "string"), java.lang.String.class, javax.xml.rpc.ParameterMode.IN); 
        call.setReturnType(new javax.xml.rpc.namespace.QName("http://www.w3.org/1999/XMLSchema", "string")); 
        call.setUseSOAPAction(true); 
        call.setSOAPActionURI(""); 
        call.setOperationStyle("rpc"); 
        call.setOperationName(new javax.xml.rpc.namespace.QName("urn:xmethodsXFS", "listFiles")); 
 
        Object resp = call.invoke(new Object[] {userid, password}); 
 
        if (resp instanceof java.rmi.RemoteException) { 
            throw (java.rmi.RemoteException)resp; 
        } 
        else { 
            try { 
                return (java.lang.String) resp; 
            } catch (java.lang.Exception e) { 
                return (java.lang.String) org.apache.axis.utils.JavaUtils.convert(resp, java.lang.String.class); 
            } 
        } 
    } 
 
}