rough JPredService client copied from WebServices project.
authorjprocter <Jim Procter>
Fri, 18 Mar 2005 17:42:35 +0000 (17:42 +0000)
committerjprocter <Jim Procter>
Fri, 18 Mar 2005 17:42:35 +0000 (17:42 +0000)
src/ext/vamsas/JPredWS.java [new file with mode: 0755]
src/ext/vamsas/JPredWSService.java [new file with mode: 0755]
src/ext/vamsas/JPredWSServiceLocator.java [new file with mode: 0755]
src/ext/vamsas/JpredSoapBindingStub.java [new file with mode: 0755]
src/ext/vamsas/Secstructpred.java [new file with mode: 0755]
src/ext/vamsas/Sequence.java [new file with mode: 0755]

diff --git a/src/ext/vamsas/JPredWS.java b/src/ext/vamsas/JPredWS.java
new file mode 100755 (executable)
index 0000000..86226c0
--- /dev/null
@@ -0,0 +1,13 @@
+/**
+ * JPredWS.java
+ *
+ * This file was auto-generated from WSDL
+ * by the Apache Axis WSDL2Java emitter.
+ */
+
+package ext.vamsas;
+
+public interface JPredWS extends java.rmi.Remote {
+    public java.lang.String predict(ext.vamsas.Sequence in0) throws java.rmi.RemoteException;
+    public ext.vamsas.Secstructpred getpredict(java.lang.String in0) throws java.rmi.RemoteException;
+}
diff --git a/src/ext/vamsas/JPredWSService.java b/src/ext/vamsas/JPredWSService.java
new file mode 100755 (executable)
index 0000000..c97627f
--- /dev/null
@@ -0,0 +1,16 @@
+/**
+ * JPredWSService.java
+ *
+ * This file was auto-generated from WSDL
+ * by the Apache Axis WSDL2Java emitter.
+ */
+
+package ext.vamsas;
+
+public interface JPredWSService extends javax.xml.rpc.Service {
+    public java.lang.String getjpredAddress();
+
+    public ext.vamsas.JPredWS getjpred() throws javax.xml.rpc.ServiceException;
+
+    public ext.vamsas.JPredWS getjpred(java.net.URL portAddress) throws javax.xml.rpc.ServiceException;
+}
diff --git a/src/ext/vamsas/JPredWSServiceLocator.java b/src/ext/vamsas/JPredWSServiceLocator.java
new file mode 100755 (executable)
index 0000000..976d2fd
--- /dev/null
@@ -0,0 +1,105 @@
+/**
+ * JPredWSServiceLocator.java
+ *
+ * This file was auto-generated from WSDL
+ * by the Apache Axis WSDL2Java emitter.
+ */
+
+package ext.vamsas;
+
+public class JPredWSServiceLocator extends org.apache.axis.client.Service implements ext.vamsas.JPredWSService {
+
+    // Use to get a proxy class for jpred
+    private final java.lang.String jpred_address = "http://anaplog.compbio.dundee.ac.uk:8080/axis/services/jpred";
+
+    public java.lang.String getjpredAddress() {
+        return jpred_address;
+    }
+
+    // The WSDD service name defaults to the port name.
+    private java.lang.String jpredWSDDServiceName = "jpred";
+
+    public java.lang.String getjpredWSDDServiceName() {
+        return jpredWSDDServiceName;
+    }
+
+    public void setjpredWSDDServiceName(java.lang.String name) {
+        jpredWSDDServiceName = name;
+    }
+
+    public ext.vamsas.JPredWS getjpred() throws javax.xml.rpc.ServiceException {
+       java.net.URL endpoint;
+        try {
+            endpoint = new java.net.URL(jpred_address);
+        }
+        catch (java.net.MalformedURLException e) {
+            throw new javax.xml.rpc.ServiceException(e);
+        }
+        return getjpred(endpoint);
+    }
+
+    public ext.vamsas.JPredWS getjpred(java.net.URL portAddress) throws javax.xml.rpc.ServiceException {
+        try {
+            ext.vamsas.JpredSoapBindingStub _stub = new ext.vamsas.JpredSoapBindingStub(portAddress, this);
+            _stub.setPortName(getjpredWSDDServiceName());
+            return _stub;
+        }
+        catch (org.apache.axis.AxisFault e) {
+            return null;
+        }
+    }
+
+    /**
+     * For the given interface, get the stub implementation.
+     * If this service has no port for the given interface,
+     * then ServiceException is thrown.
+     */
+    public java.rmi.Remote getPort(Class serviceEndpointInterface) throws javax.xml.rpc.ServiceException {
+        try {
+            if (ext.vamsas.JPredWS.class.isAssignableFrom(serviceEndpointInterface)) {
+                ext.vamsas.JpredSoapBindingStub _stub = new ext.vamsas.JpredSoapBindingStub(new java.net.URL(jpred_address), this);
+                _stub.setPortName(getjpredWSDDServiceName());
+                return _stub;
+            }
+        }
+        catch (java.lang.Throwable t) {
+            throw new javax.xml.rpc.ServiceException(t);
+        }
+        throw new javax.xml.rpc.ServiceException("There is no stub implementation for the interface:  " + (serviceEndpointInterface == null ? "null" : serviceEndpointInterface.getName()));
+    }
+
+    /**
+     * For the given interface, get the stub implementation.
+     * If this service has no port for the given interface,
+     * then ServiceException is thrown.
+     */
+    public java.rmi.Remote getPort(javax.xml.namespace.QName portName, Class serviceEndpointInterface) throws javax.xml.rpc.ServiceException {
+        if (portName == null) {
+            return getPort(serviceEndpointInterface);
+        }
+        String inputPortName = portName.getLocalPart();
+        if ("jpred".equals(inputPortName)) {
+            return getjpred();
+        }
+        else  {
+            java.rmi.Remote _stub = getPort(serviceEndpointInterface);
+            ((org.apache.axis.client.Stub) _stub).setPortName(portName);
+            return _stub;
+        }
+    }
+
+    public javax.xml.namespace.QName getServiceName() {
+        return new javax.xml.namespace.QName("vamsas", "JPredWSService");
+    }
+
+    private java.util.HashSet ports = null;
+
+    public java.util.Iterator getPorts() {
+        if (ports == null) {
+            ports = new java.util.HashSet();
+            ports.add(new javax.xml.namespace.QName("jpred"));
+        }
+        return ports.iterator();
+    }
+
+}
diff --git a/src/ext/vamsas/JpredSoapBindingStub.java b/src/ext/vamsas/JpredSoapBindingStub.java
new file mode 100755 (executable)
index 0000000..20ca810
--- /dev/null
@@ -0,0 +1,201 @@
+/**
+ * JpredSoapBindingStub.java
+ *
+ * This file was auto-generated from WSDL
+ * by the Apache Axis WSDL2Java emitter.
+ */
+
+package ext.vamsas;
+
+public class JpredSoapBindingStub extends org.apache.axis.client.Stub implements ext.vamsas.JPredWS {
+    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();
+
+    static org.apache.axis.description.OperationDesc [] _operations;
+
+    static {
+        _operations = new org.apache.axis.description.OperationDesc[2];
+        org.apache.axis.description.OperationDesc oper;
+        oper = new org.apache.axis.description.OperationDesc();
+        oper.setName("predict");
+        oper.addParameter(new javax.xml.namespace.QName("vamsas", "in0"), new javax.xml.namespace.QName("http://dataTypes.vamsas", "Sequence"), ext.vamsas.Sequence.class, org.apache.axis.description.ParameterDesc.IN, false, false);
+        oper.setReturnType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string"));
+        oper.setReturnClass(java.lang.String.class);
+        oper.setReturnQName(new javax.xml.namespace.QName("vamsas", "predictReturn"));
+        oper.setStyle(org.apache.axis.enum.Style.WRAPPED);
+        oper.setUse(org.apache.axis.enum.Use.LITERAL);
+        _operations[0] = oper;
+
+        oper = new org.apache.axis.description.OperationDesc();
+        oper.setName("getpredict");
+        oper.addParameter(new javax.xml.namespace.QName("vamsas", "in0"), new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string"), java.lang.String.class, org.apache.axis.description.ParameterDesc.IN, false, false);
+        oper.setReturnType(new javax.xml.namespace.QName("http://dataTypes.vamsas", "Secstructpred"));
+        oper.setReturnClass(ext.vamsas.Secstructpred.class);
+        oper.setReturnQName(new javax.xml.namespace.QName("vamsas", "getpredictReturn"));
+        oper.setStyle(org.apache.axis.enum.Style.WRAPPED);
+        oper.setUse(org.apache.axis.enum.Use.LITERAL);
+        _operations[1] = oper;
+
+    }
+
+    public JpredSoapBindingStub() throws org.apache.axis.AxisFault {
+         this(null);
+    }
+
+    public JpredSoapBindingStub(java.net.URL endpointURL, javax.xml.rpc.Service service) throws org.apache.axis.AxisFault {
+         this(service);
+         super.cachedEndpoint = endpointURL;
+    }
+
+    public JpredSoapBindingStub(javax.xml.rpc.Service service) throws org.apache.axis.AxisFault {
+        if (service == null) {
+            super.service = new org.apache.axis.client.Service();
+        } else {
+            super.service = service;
+        }
+            java.lang.Class cls;
+            javax.xml.namespace.QName qName;
+            java.lang.Class beansf = org.apache.axis.encoding.ser.BeanSerializerFactory.class;
+            java.lang.Class beandf = org.apache.axis.encoding.ser.BeanDeserializerFactory.class;
+            java.lang.Class enumsf = org.apache.axis.encoding.ser.EnumSerializerFactory.class;
+            java.lang.Class enumdf = org.apache.axis.encoding.ser.EnumDeserializerFactory.class;
+            java.lang.Class arraysf = org.apache.axis.encoding.ser.ArraySerializerFactory.class;
+            java.lang.Class arraydf = org.apache.axis.encoding.ser.ArrayDeserializerFactory.class;
+            java.lang.Class simplesf = org.apache.axis.encoding.ser.SimpleSerializerFactory.class;
+            java.lang.Class simpledf = org.apache.axis.encoding.ser.SimpleDeserializerFactory.class;
+            qName = new javax.xml.namespace.QName("http://dataTypes.vamsas", "Sequence");
+            cachedSerQNames.add(qName);
+            cls = ext.vamsas.Sequence.class;
+            cachedSerClasses.add(cls);
+            cachedSerFactories.add(beansf);
+            cachedDeserFactories.add(beandf);
+
+            qName = new javax.xml.namespace.QName("http://dataTypes.vamsas", "Secstructpred");
+            cachedSerQNames.add(qName);
+            cls = ext.vamsas.Secstructpred.class;
+            cachedSerClasses.add(cls);
+            cachedSerFactories.add(beansf);
+            cachedDeserFactories.add(beandf);
+
+    }
+
+    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);
+            }
+            if (super.cachedPortName != null) {
+                _call.setPortName(super.cachedPortName);
+            }
+            java.util.Enumeration keys = super.cachedProperties.keys();
+            while (keys.hasMoreElements()) {
+                java.lang.String key = (java.lang.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.
+            synchronized (this) {
+                if (firstCall()) {
+                    // must set encoding style before registering serializers
+                    _call.setEncodingStyle(null);
+                    for (int i = 0; i < cachedSerFactories.size(); ++i) {
+                        java.lang.Class cls = (java.lang.Class) cachedSerClasses.get(i);
+                        javax.xml.namespace.QName qName =
+                                (javax.xml.namespace.QName) cachedSerQNames.get(i);
+                        java.lang.Class sf = (java.lang.Class)
+                                 cachedSerFactories.get(i);
+                        java.lang.Class df = (java.lang.Class)
+                                 cachedDeserFactories.get(i);
+                        _call.registerTypeMapping(cls, qName, sf, df, false);
+                    }
+                }
+            }
+            return _call;
+        }
+        catch (java.lang.Throwable t) {
+            throw new org.apache.axis.AxisFault("Failure trying to get the Call object", t);
+        }
+    }
+
+    public java.lang.String predict(ext.vamsas.Sequence in0) throws java.rmi.RemoteException {
+        if (super.cachedEndpoint == null) {
+            throw new org.apache.axis.NoEndPointException();
+        }
+        org.apache.axis.client.Call _call = createCall();
+        _call.setOperation(_operations[0]);
+        _call.setUseSOAPAction(true);
+        _call.setSOAPActionURI("");
+        _call.setEncodingStyle(null);
+        _call.setProperty(org.apache.axis.client.Call.SEND_TYPE_ATTR, Boolean.FALSE);
+        _call.setProperty(org.apache.axis.AxisEngine.PROP_DOMULTIREFS, Boolean.FALSE);
+        _call.setSOAPVersion(org.apache.axis.soap.SOAPConstants.SOAP11_CONSTANTS);
+        _call.setOperationName(new javax.xml.namespace.QName("vamsas", "predict"));
+
+        setRequestHeaders(_call);
+        setAttachments(_call);
+        java.lang.Object _resp = _call.invoke(new java.lang.Object[] {in0});
+
+        if (_resp instanceof java.rmi.RemoteException) {
+            throw (java.rmi.RemoteException)_resp;
+        }
+        else {
+            extractAttachments(_call);
+            try {
+                return (java.lang.String) _resp;
+            } catch (java.lang.Exception _exception) {
+                return (java.lang.String) org.apache.axis.utils.JavaUtils.convert(_resp, java.lang.String.class);
+            }
+        }
+    }
+
+    public ext.vamsas.Secstructpred getpredict(java.lang.String in0) throws java.rmi.RemoteException {
+        if (super.cachedEndpoint == null) {
+            throw new org.apache.axis.NoEndPointException();
+        }
+        org.apache.axis.client.Call _call = createCall();
+        _call.setOperation(_operations[1]);
+        _call.setUseSOAPAction(true);
+        _call.setSOAPActionURI("");
+        _call.setEncodingStyle(null);
+        _call.setProperty(org.apache.axis.client.Call.SEND_TYPE_ATTR, Boolean.FALSE);
+        _call.setProperty(org.apache.axis.AxisEngine.PROP_DOMULTIREFS, Boolean.FALSE);
+        _call.setSOAPVersion(org.apache.axis.soap.SOAPConstants.SOAP11_CONSTANTS);
+        _call.setOperationName(new javax.xml.namespace.QName("vamsas", "getpredict"));
+
+        setRequestHeaders(_call);
+        setAttachments(_call);
+        java.lang.Object _resp = _call.invoke(new java.lang.Object[] {in0});
+
+        if (_resp instanceof java.rmi.RemoteException) {
+            throw (java.rmi.RemoteException)_resp;
+        }
+        else {
+            extractAttachments(_call);
+            try {
+                return (ext.vamsas.Secstructpred) _resp;
+            } catch (java.lang.Exception _exception) {
+                return (ext.vamsas.Secstructpred) org.apache.axis.utils.JavaUtils.convert(_resp, ext.vamsas.Secstructpred.class);
+            }
+        }
+    }
+
+}
diff --git a/src/ext/vamsas/Secstructpred.java b/src/ext/vamsas/Secstructpred.java
new file mode 100755 (executable)
index 0000000..cac8ff3
--- /dev/null
@@ -0,0 +1,101 @@
+/**
+ * Secstructpred.java
+ *
+ * This file was auto-generated from WSDL
+ * by the Apache Axis WSDL2Java emitter.
+ */
+
+package ext.vamsas;
+
+public class Secstructpred  implements java.io.Serializable {
+    private java.lang.String output;
+
+    public Secstructpred() {
+    }
+
+    public java.lang.String getOutput() {
+        return output;
+    }
+
+    public void setOutput(java.lang.String output) {
+        this.output = output;
+    }
+
+    private java.lang.Object __equalsCalc = null;
+    public synchronized boolean equals(java.lang.Object obj) {
+        if (!(obj instanceof Secstructpred)) return false;
+        Secstructpred other = (Secstructpred) obj;
+        if (obj == null) return false;
+        if (this == obj) return true;
+        if (__equalsCalc != null) {
+            return (__equalsCalc == obj);
+        }
+        __equalsCalc = obj;
+        boolean _equals;
+        _equals = true && 
+            ((this.output==null && other.getOutput()==null) || 
+             (this.output!=null &&
+              this.output.equals(other.getOutput())));
+        __equalsCalc = null;
+        return _equals;
+    }
+
+    private boolean __hashCodeCalc = false;
+    public synchronized int hashCode() {
+        if (__hashCodeCalc) {
+            return 0;
+        }
+        __hashCodeCalc = true;
+        int _hashCode = 1;
+        if (getOutput() != null) {
+            _hashCode += getOutput().hashCode();
+        }
+        __hashCodeCalc = false;
+        return _hashCode;
+    }
+
+    // Type metadata
+    private static org.apache.axis.description.TypeDesc typeDesc =
+        new org.apache.axis.description.TypeDesc(Secstructpred.class);
+
+    static {
+        typeDesc.setXmlType(new javax.xml.namespace.QName("http://dataTypes.vamsas", "Secstructpred"));
+        org.apache.axis.description.ElementDesc elemField = new org.apache.axis.description.ElementDesc();
+        elemField.setFieldName("output");
+        elemField.setXmlName(new javax.xml.namespace.QName("http://dataTypes.vamsas", "output"));
+        elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string"));
+        typeDesc.addFieldDesc(elemField);
+    }
+
+    /**
+     * Return type metadata object
+     */
+    public static org.apache.axis.description.TypeDesc getTypeDesc() {
+        return typeDesc;
+    }
+
+    /**
+     * Get Custom Serializer
+     */
+    public static org.apache.axis.encoding.Serializer getSerializer(
+           java.lang.String mechType, 
+           java.lang.Class _javaType,  
+           javax.xml.namespace.QName _xmlType) {
+        return 
+          new  org.apache.axis.encoding.ser.BeanSerializer(
+            _javaType, _xmlType, typeDesc);
+    }
+
+    /**
+     * Get Custom Deserializer
+     */
+    public static org.apache.axis.encoding.Deserializer getDeserializer(
+           java.lang.String mechType, 
+           java.lang.Class _javaType,  
+           javax.xml.namespace.QName _xmlType) {
+        return 
+          new  org.apache.axis.encoding.ser.BeanDeserializer(
+            _javaType, _xmlType, typeDesc);
+    }
+
+}
diff --git a/src/ext/vamsas/Sequence.java b/src/ext/vamsas/Sequence.java
new file mode 100755 (executable)
index 0000000..2ee347a
--- /dev/null
@@ -0,0 +1,121 @@
+/**
+ * Sequence.java
+ *
+ * This file was auto-generated from WSDL
+ * by the Apache Axis WSDL2Java emitter.
+ */
+
+package ext.vamsas;
+
+public class Sequence  implements java.io.Serializable {
+    private java.lang.String id;
+    private java.lang.String seq;
+
+    public Sequence() {
+    }
+
+    public java.lang.String getId() {
+        return id;
+    }
+
+    public void setId(java.lang.String id) {
+        this.id = id;
+    }
+
+    public java.lang.String getSeq() {
+        return seq;
+    }
+
+    public void setSeq(java.lang.String seq) {
+        this.seq = seq;
+    }
+
+    private java.lang.Object __equalsCalc = null;
+    public synchronized boolean equals(java.lang.Object obj) {
+        if (!(obj instanceof Sequence)) return false;
+        Sequence other = (Sequence) obj;
+        if (obj == null) return false;
+        if (this == obj) return true;
+        if (__equalsCalc != null) {
+            return (__equalsCalc == obj);
+        }
+        __equalsCalc = obj;
+        boolean _equals;
+        _equals = true && 
+            ((this.id==null && other.getId()==null) || 
+             (this.id!=null &&
+              this.id.equals(other.getId()))) &&
+            ((this.seq==null && other.getSeq()==null) || 
+             (this.seq!=null &&
+              this.seq.equals(other.getSeq())));
+        __equalsCalc = null;
+        return _equals;
+    }
+
+    private boolean __hashCodeCalc = false;
+    public synchronized int hashCode() {
+        if (__hashCodeCalc) {
+            return 0;
+        }
+        __hashCodeCalc = true;
+        int _hashCode = 1;
+        if (getId() != null) {
+            _hashCode += getId().hashCode();
+        }
+        if (getSeq() != null) {
+            _hashCode += getSeq().hashCode();
+        }
+        __hashCodeCalc = false;
+        return _hashCode;
+    }
+
+    // Type metadata
+    private static org.apache.axis.description.TypeDesc typeDesc =
+        new org.apache.axis.description.TypeDesc(Sequence.class);
+
+    static {
+        typeDesc.setXmlType(new javax.xml.namespace.QName("http://dataTypes.vamsas", "Sequence"));
+        org.apache.axis.description.ElementDesc elemField = new org.apache.axis.description.ElementDesc();
+        elemField.setFieldName("id");
+        elemField.setXmlName(new javax.xml.namespace.QName("http://dataTypes.vamsas", "id"));
+        elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string"));
+        typeDesc.addFieldDesc(elemField);
+        elemField = new org.apache.axis.description.ElementDesc();
+        elemField.setFieldName("seq");
+        elemField.setXmlName(new javax.xml.namespace.QName("http://dataTypes.vamsas", "seq"));
+        elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string"));
+        typeDesc.addFieldDesc(elemField);
+    }
+
+    /**
+     * Return type metadata object
+     */
+    public static org.apache.axis.description.TypeDesc getTypeDesc() {
+        return typeDesc;
+    }
+
+    /**
+     * Get Custom Serializer
+     */
+    public static org.apache.axis.encoding.Serializer getSerializer(
+           java.lang.String mechType, 
+           java.lang.Class _javaType,  
+           javax.xml.namespace.QName _xmlType) {
+        return 
+          new  org.apache.axis.encoding.ser.BeanSerializer(
+            _javaType, _xmlType, typeDesc);
+    }
+
+    /**
+     * Get Custom Deserializer
+     */
+    public static org.apache.axis.encoding.Deserializer getDeserializer(
+           java.lang.String mechType, 
+           java.lang.Class _javaType,  
+           javax.xml.namespace.QName _xmlType) {
+        return 
+          new  org.apache.axis.encoding.ser.BeanDeserializer(
+            _javaType, _xmlType, typeDesc);
+    }
+
+}