--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>\r
+<endpoints xmlns='http://java.sun.com/xml/ns/jax-ws/ri/runtime' version='2.0'>\r
+ <endpoint name='JpredWS'\r
+ implementation='compbio.ws.jpred.Jpred'\r
+ url-pattern='/JpredWS'/>\r
+</endpoints>\r
--- /dev/null
+package compbio.ws.jpred;
+
+
+import javax.jws.WebParam;
+import javax.jws.WebService;
+
+@WebService(targetNamespace = "http://server.ws.compbio")
+public interface Jpred {
+
+ public String findSequence(
+ @WebParam(name = "sequence") String sequence);
+
+}
--- /dev/null
+
+/**
+ * Please modify this class to meet your needs
+ * This class is not complete
+ */
+
+package compbio.ws.jpred;
+
+import java.util.Properties;
+
+import javax.xml.ws.Service;
+import javax.xml.namespace.QName;
+
+import java.net.URL;
+
+/**
+ * This class was generated by Apache CXF 2.7.8
+ * 2013-12-09T11:22:58.858Z
+ * Generated source version: 2.7.8
+ *
+ */
+public class JpredClient {
+
+ public static void main(String[] args) throws Exception {
+ Properties properties = new Properties();
+ properties.setProperty("openejb.embedded.remotable", "true");
+ QName qname = new QName("http://server.ws.compbio", "JpredWS");
+ Service service = Service.create(new URL("http://localhost:1236/proteocache/services"), qname);
+ Jpred sequense = service.getPort(Jpred.class);
+ System.out.println(" : " + sequense.findSequence("MDVQAAPALMLCSATPALRRHGGMTGPVRLSGDIRC"));
+ }
+
+}
--- /dev/null
+package compbio.ws.jpred;
+
+import javax.jws.WebService;
+
+import compbio.cassandra.CassandraNativeConnector;
+import compbio.statistic.CassandraRequester;
+
+
+@WebService(endpointInterface = "compbio.ws.jpred.Jpred",
+targetNamespace = "http://server.ws.compbio", serviceName = "JpredWS")
+public class JpredWS implements Jpred {
+
+ @Override
+ public String findSequence(String sequence) {
+ CassandraNativeConnector dbconnector = new CassandraNativeConnector();
+ CassandraRequester cr = new CassandraRequester();
+ System.out.println("YES");
+ if (cr.readProteins(sequence, "whole") != null)
+ return "The sequence is " + sequence;
+ else
+ return "No sequence " + sequence;
+ }
+
+}
--- /dev/null
+package compbio.ws.jpred;
+
+import javax.xml.ws.Endpoint;
+
+public class WSPublisher {
+
+ public static void main(String[] args) {
+ Endpoint.publish("http://localhost:1236/proteocache/services", new JpredWS());
+
+ System.out.println("Service is published!");
+ }
+}
--- /dev/null
+package compbio.ws.jpred;
+
+
+import javax.jws.WebParam;
+import javax.jws.WebService;
+
+@WebService(targetNamespace = "http://server.ws.compbio")
+public interface Jpred {
+
+ public String findSequence(
+ @WebParam(name = "sequence") String sequence);
+
+}
--- /dev/null
+
+/**
+ * Please modify this class to meet your needs
+ * This class is not complete
+ */
+
+package compbio.ws.server;
+
+import java.util.Properties;
+
+import javax.xml.ws.Service;
+import javax.xml.namespace.QName;
+
+import java.net.URL;
+
+/**
+ * This class was generated by Apache CXF 2.7.8
+ * 2013-12-09T11:22:58.858Z
+ * Generated source version: 2.7.8
+ *
+ */
+public class JpredClient {
+
+ public static void main(String[] args) throws Exception {
+ Properties properties = new Properties();
+ properties.setProperty("openejb.embedded.remotable", "true");
+ QName qname = new QName("http://server.ws.compbio", "JpredWSService");
+ Service service = Service.create(new URL("http://localhost:8080/proteocache/services/JpredWS?wsdl"),
+ qname);
+
+ // QName qq = service.getServiceName();
+ //
+ Jpred sequense = service.getPort(service.getPorts().next(), Jpred.class);
+ System.out.println(" : " + sequense.findSequence("erwerw"));
+ }
+
+}
--- /dev/null
+package compbio.ws.server;
+
+import javax.jws.WebService;
+
+import compbio.statistic.CassandraRequester;
+
+
+@WebService(endpointInterface = "compbio.ws.server.Jpred",
+targetNamespace = "http://server.ws.compbio", serviceName = "JpredWS")
+public class JpredWS implements Jpred {
+
+ @Override
+ public String findSequence(String sequence) {
+ CassandraRequester cr = new CassandraRequester();
+ System.out.println("YES");
+ if (cr.readProteins(sequence, "whole") != null)
+ return "The sequence is " + sequence;
+ else
+ return "No sequence " + sequence;
+ }
+
+}
--- /dev/null
+
+package compbio.ws.jpred.jaxws;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlType;
+
+@XmlRootElement(name = "findSequence", namespace = "http://server.ws.compbio")
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "findSequence", namespace = "http://server.ws.compbio")
+public class FindSequence {
+
+ @XmlElement(name = "sequence", namespace = "")
+ private String sequence;
+
+ /**
+ *
+ * @return
+ * returns String
+ */
+ public String getSequence() {
+ return this.sequence;
+ }
+
+ /**
+ *
+ * @param sequence
+ * the value for the sequence property
+ */
+ public void setSequence(String sequence) {
+ this.sequence = sequence;
+ }
+
+}
--- /dev/null
+
+package compbio.ws.jpred.jaxws;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlType;
+
+@XmlRootElement(name = "findSequenceResponse", namespace = "http://server.ws.compbio")
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "findSequenceResponse", namespace = "http://server.ws.compbio")
+public class FindSequenceResponse {
+
+ @XmlElement(name = "return", namespace = "")
+ private String _return;
+
+ /**
+ *
+ * @return
+ * returns String
+ */
+ public String getReturn() {
+ return this._return;
+ }
+
+ /**
+ *
+ * @param _return
+ * the value for the _return property
+ */
+ public void setReturn(String _return) {
+ this._return = _return;
+ }
+
+}
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<!-- Generated by JAX-WS RI at http://jax-ws.dev.java.net. RI's version is Metro/2.1 (branches/2.1-6728; 2011-02-03T14:14:58+0000) JAXWS-RI/2.2.3 JAXWS/2.2. -->
+<definitions targetNamespace="http://server.ws.compbio" name="JpredWS" xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:wsp="http://www.w3.org/ns/ws-policy" xmlns:tns="http://server.ws.compbio" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:wsp1_2="http://schemas.xmlsoap.org/ws/2004/09/policy" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:wsam="http://www.w3.org/2007/05/addressing/metadata" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
+ <types>
+ <xsd:schema>
+ <xsd:import namespace="http://server.ws.compbio" schemaLocation="JpredWS_schema1.xsd"/>
+ </xsd:schema>
+ </types>
+ <message name="findSequence">
+ <part name="parameters" element="tns:findSequence"/>
+ </message>
+ <message name="findSequenceResponse">
+ <part name="parameters" element="tns:findSequenceResponse"/>
+ </message>
+ <portType name="Jpred">
+ <operation name="findSequence">
+ <input wsam:Action="http://server.ws.compbio/Jpred/findSequenceRequest" message="tns:findSequence"/>
+ <output wsam:Action="http://server.ws.compbio/Jpred/findSequenceResponse" message="tns:findSequenceResponse"/>
+ </operation>
+ </portType>
+ <binding name="JpredWSPortBinding" type="tns:Jpred">
+ <soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document"/>
+ <operation name="findSequence">
+ <soap:operation soapAction=""/>
+ <input>
+ <soap:body use="literal"/>
+ </input>
+ <output>
+ <soap:body use="literal"/>
+ </output>
+ </operation>
+ </binding>
+ <service name="JpredWS">
+ <port name="JpredWSPort" binding="tns:JpredWSPortBinding">
+ <soap:address location="REPLACE_WITH_ACTUAL_URL"/>
+ </port>
+ </service>
+</definitions>
+
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<xs:schema version="1.0" targetNamespace="http://server.ws.compbio" xmlns:tns="http://server.ws.compbio" xmlns:xs="http://www.w3.org/2001/XMLSchema">
+
+ <xs:element name="findSequence" type="tns:findSequence"/>
+
+ <xs:element name="findSequenceResponse" type="tns:findSequenceResponse"/>
+
+ <xs:complexType name="findSequence">
+ <xs:sequence>
+ <xs:element name="sequence" type="xs:string" minOccurs="0"/>
+ </xs:sequence>
+ </xs:complexType>
+
+ <xs:complexType name="findSequenceResponse">
+ <xs:sequence>
+ <xs:element name="return" type="xs:string" minOccurs="0"/>
+ </xs:sequence>
+ </xs:complexType>
+</xs:schema>
+
--- /dev/null
+<?xml version="1.0"?>
+
+<project default="main" name="compbio-ws" basedir=".">
+
+ <!-- java -->
+ <property name="classes" location="${basedir}/WEB-INF/classes" />
+ <property name="lib.path" location="${basedir}/WEB-INF/lib" />
+
+ <path id="classes.path">
+ <pathelement location="${classes}" />
+ </path>
+
+ <!-- add libraries -->
+ <path id="project.classpath">
+ <fileset dir="${lib.path}">
+ <include name="*.jar" />
+ </fileset>
+ </path>
+
+ <property name="wsdl.dir" location="${basedir}/webapp/resources" />
+ <property name="jpred.wsdl" location="${wsdl.dir}/JpredWS.wsdl" />
+
+ <taskdef name="wsgen" onerror="report" classname="com.sun.tools.ws.ant.WsGen">
+ <classpath refid="project.classpath" />
+ </taskdef>
+
+ <target name="main">
+ <!-- TODO this runs file from Eclipse, but with Ant only this need to depends on clean and build! -->
+ <property name="server.artifacts.dir" location="${basedir}/webapp/compbio/ws/jpred/jaxws/" />
+
+ <mkdir dir="${server.artifacts.dir}" />
+ <mkdir dir="${wsdl.dir}" />
+ <delete quiet="false" verbose="true" failonerror="false">
+ <fileset dir="${server.artifacts.dir}">
+ <include name="*.java" />
+ </fileset>
+ <fileset dir="${wsdl.dir}">
+ </fileset>
+ </delete>
+
+ <!-- destdir - Where to put generated classes -->
+ <!-- sourcedestdir - Where to put generated source files -->
+ <!-- resourcedestdir - Where to put generated source files -->
+ <wsgen sei="compbio.ws.jpred.JpredWS"
+ sourcedestdir="${basedir}/webapp"
+ destdir="${classes}"
+ resourcedestdir="${wsdl.dir}"
+ keep="true"
+ genwsdl="true"
+ extension="false"
+ xendorsed="true"
+ verbose="true">
+ <classpath refid="classes.path" />
+ <classpath refid="project.classpath" />
+ </wsgen>
+ </target>
+ </project>