--- /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.JpredWS'\r
+ url-pattern='/ProteoCacheWS'/>\r
+</endpoints>\r
<listener>\r
<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>\r
</listener>\r
-\r
+ <listener>\r
+ <listener-class>com.sun.xml.ws.transport.http.servlet.WSServletContextListener</listener-class>\r
+ </listener>\r
+ \r
<context-param>\r
<param-name>contextConfigLocation</param-name>\r
<param-value>\r
<listener>\r
<listener-class>compbio.listeners.ContextListener</listener-class>\r
</listener>\r
+ <listener>\r
+ <listener-class>com.sun.xml.ws.transport.http.servlet.WSServletContextListener</listener-class>\r
+ </listener>\r
+ <servlet>\r
+ <servlet-name>JpredWS</servlet-name>\r
+ <servlet-class>com.sun.xml.ws.transport.http.servlet.WSServlet</servlet-class>\r
+ <load-on-startup>1</load-on-startup>\r
+ </servlet>\r
+ <servlet-mapping>\r
+ <servlet-name>JpredWS</servlet-name>\r
+ <url-pattern>/JpredWS</url-pattern>\r
+ </servlet-mapping>\r
\r
<!-- Session timeout in minutes -->\r
<session-config>\r
--- /dev/null
+package compbio.ws.jpred;
+
+import javax.jws.WebMethod;
+import javax.jws.WebParam;
+import javax.jws.WebService;
+
+@WebService(targetNamespace = "http://server.proteocache.ws")
+public interface Jpred {
+ @WebMethod
+ public String findSequence(@WebParam(name = "sequence") String sequence, @WebParam(name = "program") String program,
+ @WebParam(name = "version") String version);
+}
--- /dev/null
+package compbio.ws.jpred;
+
+import javax.xml.ws.Service;
+import javax.xml.namespace.QName;
+
+import java.net.URL;
+
+/**
+ *
+ */
+public class JpredClient {
+
+ public static void main(String[] args) throws Exception {
+ QName qname = new QName("http://server.proteocache.ws", "ProteoCacheWS");
+
+ Service service = Service.create(new URL("http://localhost:8080/proteocache-1.0/ProteoCacheWS"), qname);
+ Jpred sequense = service.getPort(Jpred.class);
+ String result = sequense.findSequence("EQCGRQAGGKLCPNNLCCSQWGWCGSTDEYCS", "Jpred", "3.0.1");
+
+ System.out.println("Result : " + result);
+ }
+
+}
--- /dev/null
+package compbio.ws.jpred;
+
+import javax.jws.WebService;
+
+import org.apache.log4j.Logger;
+
+import compbio.cassandra.CassandraNativeConnector;
+import compbio.cassandra.readers.SequenceReader;
+
+@WebService(endpointInterface = "compbio.ws.jpred.Jpred", targetNamespace = "http://server.proteocache.ws", serviceName = "ProteoCacheWS", portName = "ProteoCacheWSPort")
+public class JpredWS implements Jpred {
+ private static Logger log = Logger.getLogger(CassandraNativeConnector.class);
+
+ @Override
+ public String findSequence(String sequence, String program, String version) {
+ CassandraNativeConnector dbconnector = new CassandraNativeConnector();
+ SequenceReader reader = new SequenceReader();
+ reader.setSession(dbconnector.getSession());
+ log.debug("ProteoCacheWS is connected:\n search for sequence: " + sequence + "\ncalculated wih " + program + " (version; "
+ + version + ")");
+ if (null != reader.readProteins(sequence, "whole")) {
+ return "The sequence " + sequence + " found. Calculated with " + program + "(" + version + ")";
+ }
+ return "The sequence " + sequence + " not found";
+ }
+
+}
--- /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 = "findJobForSequence", namespace = "http://server.proteocache.ws")
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "findJobForSequence", namespace = "http://server.proteocache.ws", propOrder = {
+ "sequence",
+ "program",
+ "version"
+})
+public class FindJobForSequence {
+
+ @XmlElement(name = "sequence", namespace = "")
+ private String sequence;
+ @XmlElement(name = "program", namespace = "")
+ private String program;
+ @XmlElement(name = "version", namespace = "")
+ private String version;
+
+ /**
+ *
+ * @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;
+ }
+
+ /**
+ *
+ * @return
+ * returns String
+ */
+ public String getProgram() {
+ return this.program;
+ }
+
+ /**
+ *
+ * @param program
+ * the value for the program property
+ */
+ public void setProgram(String program) {
+ this.program = program;
+ }
+
+ /**
+ *
+ * @return
+ * returns String
+ */
+ public String getVersion() {
+ return this.version;
+ }
+
+ /**
+ *
+ * @param version
+ * the value for the version property
+ */
+ public void setVersion(String version) {
+ this.version = version;
+ }
+
+}
--- /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 = "findJobForSequenceResponse", namespace = "http://server.proteocache.ws")
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "findJobForSequenceResponse", namespace = "http://server.proteocache.ws")
+public class FindJobForSequenceResponse {
+
+ @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
+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.proteocache.ws")
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "findSequence", namespace = "http://server.proteocache.ws", propOrder = { "sequence", "program", "version" })
+public class FindSequence {
+
+ @XmlElement(name = "sequence", namespace = "")
+ private String sequence;
+ @XmlElement(name = "program", namespace = "")
+ private String program;
+ @XmlElement(name = "version", namespace = "")
+ private String version;
+
+ /**
+ *
+ * @return returns String
+ */
+ public String getSequence() {
+ System.out.println("FindSequence.setSequence: output sequence " + this.sequence);
+ return this.sequence;
+ }
+
+ /**
+ *
+ * @param sequence
+ * the value for the sequence property
+ */
+ public void setSequence(String sequence) {
+ System.out.println("FindSequence.setSequence: input sequence " + sequence);
+ this.sequence = sequence;
+ }
+
+ /**
+ *
+ * @return returns String
+ */
+ public String getProgram() {
+ System.out.println("FindSequence.setProgram: output program " + this.program);
+ return this.program;
+ }
+
+ /**
+ *
+ * @param program
+ * the value for the program property
+ */
+ public void setProgram(String program) {
+ System.out.println("FindSequence.setProgram: input program " + program);
+ this.program = program;
+ }
+
+ /**
+ *
+ * @return returns String
+ */
+ public String getVersion() {
+ System.out.println("FindSequence.setVersion: output version " + this.version);
+ return this.version;
+ }
+
+ /**
+ *
+ * @param version
+ * the value for the version property
+ */
+ public void setVersion(String version) {
+ System.out.println("FindSequence.setVersion: input version " + version);
+ this.version = version;
+ }
+
+}
--- /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.proteocache.ws")
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "findSequenceResponse", namespace = "http://server.proteocache.ws")
+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
+
+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 = "getArchive", namespace = "http://server.proteocache.ws")
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "getArchive", namespace = "http://server.proteocache.ws")
+public class GetArchive {
+
+ @XmlElement(name = "job", namespace = "")
+ private String job;
+
+ /**
+ *
+ * @return
+ * returns String
+ */
+ public String getJob() {
+ return this.job;
+ }
+
+ /**
+ *
+ * @param job
+ * the value for the job property
+ */
+ public void setJob(String job) {
+ this.job = job;
+ }
+
+}
--- /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 = "getArchiveResponse", namespace = "http://server.proteocache.ws")
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "getArchiveResponse", namespace = "http://server.proteocache.ws")
+public class GetArchiveResponse {
+
+ @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.proteocache.ws" name="ProteoCacheWS" xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:wsp="http://www.w3.org/ns/ws-policy" xmlns:tns="http://server.proteocache.ws" 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.proteocache.ws" schemaLocation="ProteoCacheWS_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.proteocache.ws/Jpred/findSequenceRequest" message="tns:findSequence"/>
+ <output wsam:Action="http://server.proteocache.ws/Jpred/findSequenceResponse" message="tns:findSequenceResponse"/>
+ </operation>
+ </portType>
+ <binding name="ProteoCacheWSPortBinding" 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="ProteoCacheWS">
+ <port name="ProteoCacheWSPort" binding="tns:ProteoCacheWSPortBinding">
+ <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.proteocache.ws" xmlns:tns="http://server.proteocache.ws" 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:element name="program" type="xs:string" minOccurs="0"/>
+ <xs:element name="version" 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" 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>
+
<jsp:include page="../fragments/header.jsp" />
<body>
<div class="container">
- <jsp:include page="../fragments/mainmenu.jsp" />
+ <sec:authorize access="hasRole('ROLE_USER')">
+ <jsp:include page="../fragments/mainmenu.jsp" />
+ </sec:authorize>
+ <sec:authorize access="isAnonymous()">
+ <jsp:include page="../fragments/publicmenu.jsp" />
+ </sec:authorize>
+
<spring:url value="/sequence/results" var="sequence_query" />
<spring:url value="/admin/ip/results" var="ip_query" />
<spring:url value="/job/results?IdJob=${IdJob}" var="the_query" />
--- /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}/server/compbio/ws/resources" />
+ <property name="jpred.wsdl" location="${wsdl.dir}/ProteoCacheWS.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}/server/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}/server"
+ 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>