From: Natasha Sherstneva Date: Tue, 10 Dec 2013 22:06:53 +0000 (+0000) Subject: Still not working WS for querinh proteochache (probably due to interaction with Spring) X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=2b24ce792ba524bf7e85bc8b2676495958701260;p=proteocache.git Still not working WS for querinh proteochache (probably due to interaction with Spring) --- diff --git a/WEB-INF/lib/webservices-rt.jar b/WEB-INF/lib/webservices-rt.jar new file mode 100644 index 0000000..6741549 Binary files /dev/null and b/WEB-INF/lib/webservices-rt.jar differ diff --git a/WEB-INF/lib/webservices-tools.jar b/WEB-INF/lib/webservices-tools.jar new file mode 100644 index 0000000..e0426b8 Binary files /dev/null and b/WEB-INF/lib/webservices-tools.jar differ diff --git a/WEB-INF/sun-jaxws.xml b/WEB-INF/sun-jaxws.xml new file mode 100644 index 0000000..7cc435f --- /dev/null +++ b/WEB-INF/sun-jaxws.xml @@ -0,0 +1,6 @@ + + + + diff --git a/server/compbio/ws/jpred/Jpred.java b/server/compbio/ws/jpred/Jpred.java new file mode 100644 index 0000000..7d5f586 --- /dev/null +++ b/server/compbio/ws/jpred/Jpred.java @@ -0,0 +1,13 @@ +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); + +} diff --git a/server/compbio/ws/jpred/JpredClient.java b/server/compbio/ws/jpred/JpredClient.java new file mode 100644 index 0000000..ae89eec --- /dev/null +++ b/server/compbio/ws/jpred/JpredClient.java @@ -0,0 +1,33 @@ + +/** + * 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")); + } + +} diff --git a/server/compbio/ws/jpred/JpredWS.java b/server/compbio/ws/jpred/JpredWS.java new file mode 100644 index 0000000..32b5399 --- /dev/null +++ b/server/compbio/ws/jpred/JpredWS.java @@ -0,0 +1,24 @@ +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; + } + +} diff --git a/server/compbio/ws/jpred/WSPublisher.java b/server/compbio/ws/jpred/WSPublisher.java new file mode 100644 index 0000000..f3045cd --- /dev/null +++ b/server/compbio/ws/jpred/WSPublisher.java @@ -0,0 +1,12 @@ +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!"); + } +} diff --git a/server/compbio/ws/jpred/proteocache-WS/Jpred.java b/server/compbio/ws/jpred/proteocache-WS/Jpred.java new file mode 100644 index 0000000..7d5f586 --- /dev/null +++ b/server/compbio/ws/jpred/proteocache-WS/Jpred.java @@ -0,0 +1,13 @@ +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); + +} diff --git a/server/compbio/ws/jpred/proteocache-WS/JpredClient.java b/server/compbio/ws/jpred/proteocache-WS/JpredClient.java new file mode 100644 index 0000000..78d7d95 --- /dev/null +++ b/server/compbio/ws/jpred/proteocache-WS/JpredClient.java @@ -0,0 +1,37 @@ + +/** + * 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")); + } + +} diff --git a/server/compbio/ws/jpred/proteocache-WS/JpredWS.java b/server/compbio/ws/jpred/proteocache-WS/JpredWS.java new file mode 100644 index 0000000..15977aa --- /dev/null +++ b/server/compbio/ws/jpred/proteocache-WS/JpredWS.java @@ -0,0 +1,22 @@ +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; + } + +} diff --git a/webapp/compbio/ws/jpred/jaxws/FindSequence.java b/webapp/compbio/ws/jpred/jaxws/FindSequence.java new file mode 100644 index 0000000..978ffeb --- /dev/null +++ b/webapp/compbio/ws/jpred/jaxws/FindSequence.java @@ -0,0 +1,36 @@ + +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; + } + +} diff --git a/webapp/compbio/ws/jpred/jaxws/FindSequenceResponse.java b/webapp/compbio/ws/jpred/jaxws/FindSequenceResponse.java new file mode 100644 index 0000000..b53fb20 --- /dev/null +++ b/webapp/compbio/ws/jpred/jaxws/FindSequenceResponse.java @@ -0,0 +1,36 @@ + +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; + } + +} diff --git a/webapp/resources/JpredWS.wsdl b/webapp/resources/JpredWS.wsdl new file mode 100644 index 0000000..98b4f77 --- /dev/null +++ b/webapp/resources/JpredWS.wsdl @@ -0,0 +1,39 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/webapp/resources/JpredWS_schema1.xsd b/webapp/resources/JpredWS_schema1.xsd new file mode 100644 index 0000000..7d32d9c --- /dev/null +++ b/webapp/resources/JpredWS_schema1.xsd @@ -0,0 +1,20 @@ + + + + + + + + + + + + + + + + + + + + diff --git a/wsbuild.xml b/wsbuild.xml new file mode 100644 index 0000000..17b4995 --- /dev/null +++ b/wsbuild.xml @@ -0,0 +1,57 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +