diff --git a/.gitignore b/.gitignore new file mode 100644 index 00000000..453d4d5f --- /dev/null +++ b/.gitignore @@ -0,0 +1,8 @@ +/WebApplication1/nbproject/private/ +/StackExchange Client/nbproject/private/ +/StackExchange WS/nbproject/private/ +/StackExchange WS/build/ +/StackExchange Client/build/ +/StackExchange WS/dist/ +/StackExchange Client/dist/ +/Identity_Service/dist/ \ No newline at end of file diff --git a/Identity_Service/build.xml b/Identity_Service/build.xml new file mode 100644 index 00000000..1164c8e4 --- /dev/null +++ b/Identity_Service/build.xml @@ -0,0 +1,71 @@ + + + + + + + + + + + Builds, tests, and runs the project Identity_Service. + + + diff --git a/Identity_Service/build/web/META-INF/MANIFEST.MF b/Identity_Service/build/web/META-INF/MANIFEST.MF new file mode 100644 index 00000000..59499bce --- /dev/null +++ b/Identity_Service/build/web/META-INF/MANIFEST.MF @@ -0,0 +1,2 @@ +Manifest-Version: 1.0 + diff --git a/Identity_Service/build/web/WEB-INF/classes/.netbeans_automatic_build b/Identity_Service/build/web/WEB-INF/classes/.netbeans_automatic_build new file mode 100644 index 00000000..e69de29b diff --git a/Identity_Service/build/web/WEB-INF/classes/.netbeans_update_resources b/Identity_Service/build/web/WEB-INF/classes/.netbeans_update_resources new file mode 100644 index 00000000..e69de29b diff --git a/Identity_Service/build/web/WEB-INF/classes/connection/DB.class b/Identity_Service/build/web/WEB-INF/classes/connection/DB.class new file mode 100644 index 00000000..c48b6be6 Binary files /dev/null and b/Identity_Service/build/web/WEB-INF/classes/connection/DB.class differ diff --git a/Identity_Service/build/web/WEB-INF/classes/mysql/LoadDrive.class b/Identity_Service/build/web/WEB-INF/classes/mysql/LoadDrive.class new file mode 100644 index 00000000..5b1df360 Binary files /dev/null and b/Identity_Service/build/web/WEB-INF/classes/mysql/LoadDrive.class differ diff --git a/Identity_Service/build/web/WEB-INF/classes/service/auth.class b/Identity_Service/build/web/WEB-INF/classes/service/auth.class new file mode 100644 index 00000000..6b8da79b Binary files /dev/null and b/Identity_Service/build/web/WEB-INF/classes/service/auth.class differ diff --git a/Identity_Service/build/web/WEB-INF/classes/service/login.class b/Identity_Service/build/web/WEB-INF/classes/service/login.class new file mode 100644 index 00000000..36cdd08c Binary files /dev/null and b/Identity_Service/build/web/WEB-INF/classes/service/login.class differ diff --git a/Identity_Service/build/web/WEB-INF/classes/service/service.class b/Identity_Service/build/web/WEB-INF/classes/service/service.class new file mode 100644 index 00000000..1c8a1b48 Binary files /dev/null and b/Identity_Service/build/web/WEB-INF/classes/service/service.class differ diff --git a/Identity_Service/build/web/WEB-INF/glassfish-web.xml b/Identity_Service/build/web/WEB-INF/glassfish-web.xml new file mode 100644 index 00000000..13e0059f --- /dev/null +++ b/Identity_Service/build/web/WEB-INF/glassfish-web.xml @@ -0,0 +1,10 @@ + + + + + + + Keep a copy of the generated servlet class' java code. + + + diff --git a/Identity_Service/build/web/WEB-INF/lib/bean-validator.jar b/Identity_Service/build/web/WEB-INF/lib/bean-validator.jar new file mode 100644 index 00000000..4c397af4 Binary files /dev/null and b/Identity_Service/build/web/WEB-INF/lib/bean-validator.jar differ diff --git a/Identity_Service/build/web/WEB-INF/lib/javax.annotation-api.jar b/Identity_Service/build/web/WEB-INF/lib/javax.annotation-api.jar new file mode 100644 index 00000000..00523c78 Binary files /dev/null and b/Identity_Service/build/web/WEB-INF/lib/javax.annotation-api.jar differ diff --git a/Identity_Service/build/web/WEB-INF/lib/javax.batch-api.jar b/Identity_Service/build/web/WEB-INF/lib/javax.batch-api.jar new file mode 100644 index 00000000..50e9c68a Binary files /dev/null and b/Identity_Service/build/web/WEB-INF/lib/javax.batch-api.jar differ diff --git a/Identity_Service/build/web/WEB-INF/lib/javax.ejb-api.jar b/Identity_Service/build/web/WEB-INF/lib/javax.ejb-api.jar new file mode 100644 index 00000000..a5635fed Binary files /dev/null and b/Identity_Service/build/web/WEB-INF/lib/javax.ejb-api.jar differ diff --git a/Identity_Service/build/web/WEB-INF/lib/javax.el.jar b/Identity_Service/build/web/WEB-INF/lib/javax.el.jar new file mode 100644 index 00000000..ee5e4e3e Binary files /dev/null and b/Identity_Service/build/web/WEB-INF/lib/javax.el.jar differ diff --git a/Identity_Service/build/web/WEB-INF/lib/javax.enterprise.concurrent-api.jar b/Identity_Service/build/web/WEB-INF/lib/javax.enterprise.concurrent-api.jar new file mode 100644 index 00000000..faf87b38 Binary files /dev/null and b/Identity_Service/build/web/WEB-INF/lib/javax.enterprise.concurrent-api.jar differ diff --git a/Identity_Service/build/web/WEB-INF/lib/javax.enterprise.concurrent.jar b/Identity_Service/build/web/WEB-INF/lib/javax.enterprise.concurrent.jar new file mode 100644 index 00000000..5807e312 Binary files /dev/null and b/Identity_Service/build/web/WEB-INF/lib/javax.enterprise.concurrent.jar differ diff --git a/Identity_Service/build/web/WEB-INF/lib/javax.enterprise.deploy-api.jar b/Identity_Service/build/web/WEB-INF/lib/javax.enterprise.deploy-api.jar new file mode 100644 index 00000000..e348f030 Binary files /dev/null and b/Identity_Service/build/web/WEB-INF/lib/javax.enterprise.deploy-api.jar differ diff --git a/Identity_Service/build/web/WEB-INF/lib/javax.faces.jar b/Identity_Service/build/web/WEB-INF/lib/javax.faces.jar new file mode 100644 index 00000000..81df198a Binary files /dev/null and b/Identity_Service/build/web/WEB-INF/lib/javax.faces.jar differ diff --git a/Identity_Service/build/web/WEB-INF/lib/javax.inject.jar b/Identity_Service/build/web/WEB-INF/lib/javax.inject.jar new file mode 100644 index 00000000..a3e0ee33 Binary files /dev/null and b/Identity_Service/build/web/WEB-INF/lib/javax.inject.jar differ diff --git a/Identity_Service/build/web/WEB-INF/lib/javax.interceptor-api.jar b/Identity_Service/build/web/WEB-INF/lib/javax.interceptor-api.jar new file mode 100644 index 00000000..8587429a Binary files /dev/null and b/Identity_Service/build/web/WEB-INF/lib/javax.interceptor-api.jar differ diff --git a/Identity_Service/build/web/WEB-INF/lib/javax.jms-api.jar b/Identity_Service/build/web/WEB-INF/lib/javax.jms-api.jar new file mode 100644 index 00000000..e2d680d7 Binary files /dev/null and b/Identity_Service/build/web/WEB-INF/lib/javax.jms-api.jar differ diff --git a/Identity_Service/build/web/WEB-INF/lib/javax.json.jar b/Identity_Service/build/web/WEB-INF/lib/javax.json.jar new file mode 100644 index 00000000..51799ee6 Binary files /dev/null and b/Identity_Service/build/web/WEB-INF/lib/javax.json.jar differ diff --git a/Identity_Service/build/web/WEB-INF/lib/javax.mail.jar b/Identity_Service/build/web/WEB-INF/lib/javax.mail.jar new file mode 100644 index 00000000..6fc251e3 Binary files /dev/null and b/Identity_Service/build/web/WEB-INF/lib/javax.mail.jar differ diff --git a/Identity_Service/build/web/WEB-INF/lib/javax.management.j2ee-api.jar b/Identity_Service/build/web/WEB-INF/lib/javax.management.j2ee-api.jar new file mode 100644 index 00000000..9006ce7e Binary files /dev/null and b/Identity_Service/build/web/WEB-INF/lib/javax.management.j2ee-api.jar differ diff --git a/Identity_Service/build/web/WEB-INF/lib/javax.persistence.jar b/Identity_Service/build/web/WEB-INF/lib/javax.persistence.jar new file mode 100644 index 00000000..a4dd3861 Binary files /dev/null and b/Identity_Service/build/web/WEB-INF/lib/javax.persistence.jar differ diff --git a/Identity_Service/build/web/WEB-INF/lib/javax.resource-api.jar b/Identity_Service/build/web/WEB-INF/lib/javax.resource-api.jar new file mode 100644 index 00000000..fb60ebd9 Binary files /dev/null and b/Identity_Service/build/web/WEB-INF/lib/javax.resource-api.jar differ diff --git a/Identity_Service/build/web/WEB-INF/lib/javax.security.auth.message-api.jar b/Identity_Service/build/web/WEB-INF/lib/javax.security.auth.message-api.jar new file mode 100644 index 00000000..bafd6d5a Binary files /dev/null and b/Identity_Service/build/web/WEB-INF/lib/javax.security.auth.message-api.jar differ diff --git a/Identity_Service/build/web/WEB-INF/lib/javax.security.jacc-api.jar b/Identity_Service/build/web/WEB-INF/lib/javax.security.jacc-api.jar new file mode 100644 index 00000000..0b03d7a1 Binary files /dev/null and b/Identity_Service/build/web/WEB-INF/lib/javax.security.jacc-api.jar differ diff --git a/Identity_Service/build/web/WEB-INF/lib/javax.servlet-api.jar b/Identity_Service/build/web/WEB-INF/lib/javax.servlet-api.jar new file mode 100644 index 00000000..e5da3a1b Binary files /dev/null and b/Identity_Service/build/web/WEB-INF/lib/javax.servlet-api.jar differ diff --git a/Identity_Service/build/web/WEB-INF/lib/javax.servlet.jsp-api.jar b/Identity_Service/build/web/WEB-INF/lib/javax.servlet.jsp-api.jar new file mode 100644 index 00000000..0df9d06d Binary files /dev/null and b/Identity_Service/build/web/WEB-INF/lib/javax.servlet.jsp-api.jar differ diff --git a/Identity_Service/build/web/WEB-INF/lib/javax.servlet.jsp.jar b/Identity_Service/build/web/WEB-INF/lib/javax.servlet.jsp.jar new file mode 100644 index 00000000..25b5d8c0 Binary files /dev/null and b/Identity_Service/build/web/WEB-INF/lib/javax.servlet.jsp.jar differ diff --git a/Identity_Service/build/web/WEB-INF/lib/javax.servlet.jsp.jstl-api.jar b/Identity_Service/build/web/WEB-INF/lib/javax.servlet.jsp.jstl-api.jar new file mode 100644 index 00000000..e58a6dcf Binary files /dev/null and b/Identity_Service/build/web/WEB-INF/lib/javax.servlet.jsp.jstl-api.jar differ diff --git a/Identity_Service/build/web/WEB-INF/lib/javax.servlet.jsp.jstl.jar b/Identity_Service/build/web/WEB-INF/lib/javax.servlet.jsp.jstl.jar new file mode 100644 index 00000000..398adf60 Binary files /dev/null and b/Identity_Service/build/web/WEB-INF/lib/javax.servlet.jsp.jstl.jar differ diff --git a/Identity_Service/build/web/WEB-INF/lib/javax.transaction-api.jar b/Identity_Service/build/web/WEB-INF/lib/javax.transaction-api.jar new file mode 100644 index 00000000..56aabcc3 Binary files /dev/null and b/Identity_Service/build/web/WEB-INF/lib/javax.transaction-api.jar differ diff --git a/Identity_Service/build/web/WEB-INF/lib/javax.websocket-api.jar b/Identity_Service/build/web/WEB-INF/lib/javax.websocket-api.jar new file mode 100644 index 00000000..e6075629 Binary files /dev/null and b/Identity_Service/build/web/WEB-INF/lib/javax.websocket-api.jar differ diff --git a/Identity_Service/build/web/WEB-INF/lib/javax.ws.rs-api.jar b/Identity_Service/build/web/WEB-INF/lib/javax.ws.rs-api.jar new file mode 100644 index 00000000..f40a9d3f Binary files /dev/null and b/Identity_Service/build/web/WEB-INF/lib/javax.ws.rs-api.jar differ diff --git a/Identity_Service/build/web/WEB-INF/lib/javax.xml.registry-api.jar b/Identity_Service/build/web/WEB-INF/lib/javax.xml.registry-api.jar new file mode 100644 index 00000000..734943bc Binary files /dev/null and b/Identity_Service/build/web/WEB-INF/lib/javax.xml.registry-api.jar differ diff --git a/Identity_Service/build/web/WEB-INF/lib/javax.xml.rpc-api.jar b/Identity_Service/build/web/WEB-INF/lib/javax.xml.rpc-api.jar new file mode 100644 index 00000000..ff5c1d88 Binary files /dev/null and b/Identity_Service/build/web/WEB-INF/lib/javax.xml.rpc-api.jar differ diff --git a/Identity_Service/build/web/WEB-INF/lib/jaxb-api.jar b/Identity_Service/build/web/WEB-INF/lib/jaxb-api.jar new file mode 100644 index 00000000..cc557ecd Binary files /dev/null and b/Identity_Service/build/web/WEB-INF/lib/jaxb-api.jar differ diff --git a/Identity_Service/build/web/WEB-INF/lib/jaxb-osgi.jar b/Identity_Service/build/web/WEB-INF/lib/jaxb-osgi.jar new file mode 100644 index 00000000..8431c7af Binary files /dev/null and b/Identity_Service/build/web/WEB-INF/lib/jaxb-osgi.jar differ diff --git a/Identity_Service/build/web/WEB-INF/lib/jaxm-api.jar b/Identity_Service/build/web/WEB-INF/lib/jaxm-api.jar new file mode 100644 index 00000000..8a13a17b Binary files /dev/null and b/Identity_Service/build/web/WEB-INF/lib/jaxm-api.jar differ diff --git a/Identity_Service/build/web/WEB-INF/lib/json-20131018.jar b/Identity_Service/build/web/WEB-INF/lib/json-20131018.jar new file mode 100644 index 00000000..394caded Binary files /dev/null and b/Identity_Service/build/web/WEB-INF/lib/json-20131018.jar differ diff --git a/Identity_Service/build/web/WEB-INF/lib/mysql-connector-java-5.1.23-bin.jar b/Identity_Service/build/web/WEB-INF/lib/mysql-connector-java-5.1.23-bin.jar new file mode 100644 index 00000000..1f904143 Binary files /dev/null and b/Identity_Service/build/web/WEB-INF/lib/mysql-connector-java-5.1.23-bin.jar differ diff --git a/Identity_Service/build/web/WEB-INF/lib/webservices-api-osgi.jar b/Identity_Service/build/web/WEB-INF/lib/webservices-api-osgi.jar new file mode 100644 index 00000000..f7707b3c Binary files /dev/null and b/Identity_Service/build/web/WEB-INF/lib/webservices-api-osgi.jar differ diff --git a/Identity_Service/build/web/WEB-INF/lib/webservices-osgi.jar b/Identity_Service/build/web/WEB-INF/lib/webservices-osgi.jar new file mode 100644 index 00000000..a3b47d32 Binary files /dev/null and b/Identity_Service/build/web/WEB-INF/lib/webservices-osgi.jar differ diff --git a/Identity_Service/build/web/WEB-INF/lib/weld-osgi-bundle.jar b/Identity_Service/build/web/WEB-INF/lib/weld-osgi-bundle.jar new file mode 100644 index 00000000..2a837036 Binary files /dev/null and b/Identity_Service/build/web/WEB-INF/lib/weld-osgi-bundle.jar differ diff --git a/Identity_Service/build/web/WEB-INF/mysql-connector-java-5.1.23-bin.jar b/Identity_Service/build/web/WEB-INF/mysql-connector-java-5.1.23-bin.jar new file mode 100644 index 00000000..1f904143 Binary files /dev/null and b/Identity_Service/build/web/WEB-INF/mysql-connector-java-5.1.23-bin.jar differ diff --git a/Identity_Service/build/web/WEB-INF/sun-jaxws.xml b/Identity_Service/build/web/WEB-INF/sun-jaxws.xml new file mode 100644 index 00000000..a34f6eeb --- /dev/null +++ b/Identity_Service/build/web/WEB-INF/sun-jaxws.xml @@ -0,0 +1,4 @@ + + + + diff --git a/Identity_Service/build/web/WEB-INF/sun-web.xml b/Identity_Service/build/web/WEB-INF/sun-web.xml new file mode 100644 index 00000000..1ac7af40 --- /dev/null +++ b/Identity_Service/build/web/WEB-INF/sun-web.xml @@ -0,0 +1,11 @@ + + + + + + + Keep a copy of the generated servlet class' java code. + + + + diff --git a/Identity_Service/build/web/WEB-INF/web.xml b/Identity_Service/build/web/WEB-INF/web.xml new file mode 100644 index 00000000..2d695c2b --- /dev/null +++ b/Identity_Service/build/web/WEB-INF/web.xml @@ -0,0 +1,28 @@ + + + + + login + service.login + + + login + /login + + + auth + service.auth + + + auth + /auth + + + + 30 + + + diff --git a/Identity_Service/build/web/gfv3ee6.dpf b/Identity_Service/build/web/gfv3ee6.dpf new file mode 100644 index 00000000..13e0059f --- /dev/null +++ b/Identity_Service/build/web/gfv3ee6.dpf @@ -0,0 +1,10 @@ + + + + + + + Keep a copy of the generated servlet class' java code. + + + diff --git a/Identity_Service/build/web/index.html b/Identity_Service/build/web/index.html new file mode 100644 index 00000000..c627c249 --- /dev/null +++ b/Identity_Service/build/web/index.html @@ -0,0 +1,16 @@ + + + + + TODO supply a title + + + + +
TODO write content
+ + diff --git a/Identity_Service/nbproject/ant-deploy.xml b/Identity_Service/nbproject/ant-deploy.xml new file mode 100644 index 00000000..2d5f8778 --- /dev/null +++ b/Identity_Service/nbproject/ant-deploy.xml @@ -0,0 +1,111 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Identity_Service/nbproject/build-impl.xml b/Identity_Service/nbproject/build-impl.xml new file mode 100644 index 00000000..9b30294a --- /dev/null +++ b/Identity_Service/nbproject/build-impl.xml @@ -0,0 +1,1449 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must set src.dir + Must set test.src.dir + Must set build.dir + Must set build.web.dir + Must set build.generated.dir + Must set dist.dir + Must set build.classes.dir + Must set dist.javadoc.dir + Must set build.test.classes.dir + Must set build.test.results.dir + Must set build.classes.excludes + Must set dist.war + + + + + + + + + +The Java EE server classpath is not correctly set up - server home directory is missing. +Either open the project in the IDE and assign the server or setup the server classpath manually. +For example like this: + ant -Dj2ee.server.home=<app_server_installation_directory> + + +The Java EE server classpath is not correctly set up. Your active server type is ${j2ee.server.type}. +Either open the project in the IDE and assign the server or setup the server classpath manually. +For example like this: + ant -Duser.properties.file=<path_to_property_file> (where you put the property "j2ee.platform.classpath" in a .properties file) +or ant -Dj2ee.platform.classpath=<server_classpath> (where no properties file is used) + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must set javac.includes + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + No tests executed. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +The libs.CopyLibs.classpath property is not set up. +This property must point to +org-netbeans-modules-java-j2seproject-copylibstask.jar file which is part +of NetBeans IDE installation and is usually located at +<netbeans_installation>/java<version>/ant/extra folder. +Either open the project in the IDE and make sure CopyLibs library +exists or setup the property manually. For example like this: + ant -Dlibs.CopyLibs.classpath=a/path/to/org-netbeans-modules-java-j2seproject-copylibstask.jar + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must set JVM to use for profiling in profiler.info.jvm + Must set profiler agent JVM arguments in profiler.info.jvmargs.agent + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must select some files in the IDE or set javac.includes + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must select some files in the IDE or set javac.jsp.includes + + + + + + + + + + + + + + + + + + + + + + + + + + Must select a file in the IDE or set jsp.includes + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Browser not found, cannot launch the deployed application. Try to set the BROWSER environment variable. + + + Launching ${browse.url} + + + + + + Must select one file in the IDE or set run.class + + + + Must select one file in the IDE or set run.class + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must select one file in the IDE or set debug.class + + + + + + + + + + + + Must select one file in the IDE or set debug.class + + + + + Must set fix.includes + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + This target only works when run from inside the NetBeans IDE. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must select some files in the IDE or set javac.includes + + + + + + + + + + + + + + + + + + + Some tests failed; see details above. + + + + + + + + + Must select some files in the IDE or set test.includes + + + + Some tests failed; see details above. + + + + Must select some files in the IDE or set test.class + Must select some method in the IDE or set test.method + + + + Some tests failed; see details above. + + + + + Must select one file in the IDE or set test.class + + + + Must select one file in the IDE or set test.class + Must select some method in the IDE or set test.method + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Identity_Service/nbproject/genfiles.properties b/Identity_Service/nbproject/genfiles.properties new file mode 100644 index 00000000..df1d75c4 --- /dev/null +++ b/Identity_Service/nbproject/genfiles.properties @@ -0,0 +1,9 @@ +build.xml.data.CRC32=c835820f +build.xml.script.CRC32=117c6aa5 +build.xml.stylesheet.CRC32=651128d4@1.68.1.1 +# This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml. +# Do not edit this file. You may delete it but then the IDE will never regenerate such files for you. +nbproject/build-impl.xml.data.CRC32=c835820f +nbproject/build-impl.xml.script.CRC32=5064f1bd +nbproject/build-impl.xml.stylesheet.CRC32=99ea4b56@1.68.1.1 +nbproject/jaxws-build.xml.stylesheet.CRC32=6608c2cf diff --git a/Identity_Service/nbproject/jax-ws.xml b/Identity_Service/nbproject/jax-ws.xml new file mode 100644 index 00000000..03011da8 --- /dev/null +++ b/Identity_Service/nbproject/jax-ws.xml @@ -0,0 +1,9 @@ + + + + + service.service + + + + diff --git a/Identity_Service/nbproject/jaxws-build.xml b/Identity_Service/nbproject/jaxws-build.xml new file mode 100644 index 00000000..fba75e66 --- /dev/null +++ b/Identity_Service/nbproject/jaxws-build.xml @@ -0,0 +1,35 @@ + + + + + + + + + + + + + + + + + + + + + diff --git a/Identity_Service/nbproject/private/private.properties b/Identity_Service/nbproject/private/private.properties new file mode 100644 index 00000000..040f5047 --- /dev/null +++ b/Identity_Service/nbproject/private/private.properties @@ -0,0 +1,19 @@ +<<<<<<< HEAD +deploy.ant.properties.file=C:\\Users\\zainelwati\\AppData\\Roaming\\NetBeans\\8.0.2\\config\\GlassFishEE6\\Properties\\gfv352925856.properties +j2ee.platform.is.jsr109=true +j2ee.server.domain=C:/Users/zainelwati/GlassFish_Server/glassfish/domains/domain-IS +j2ee.server.home=C:/Users/Venny/GlassFish_Server/glassfish +j2ee.server.instance=[C:\\Users\\zainelwati\\GlassFish_Server\\glassfish;C:\\Users\\zainelwati\\GlassFish_Server\\glassfish\\domains\\domain-IS]deployer:gfv3ee6wc:localhost:23778 +j2ee.server.middleware=C:/Users/zainelwati/GlassFish_Server +======= +deploy.ant.properties.file=C:\\Users\\Venny\\AppData\\Roaming\\NetBeans\\8.1\\config\\GlassFishEE6\\Properties\\gfv31590470762.properties +j2ee.platform.is.jsr109=true +j2ee.server.domain=C:/Users/Venny/GlassFish_Server/glassfish/domains/domain-client +j2ee.server.home=C:/Users/Venny/GlassFish_Server/glassfish +j2ee.server.instance=[C:\\Users\\Venny\\GlassFish_Server\\glassfish;C:\\Users\\Venny\\GlassFish_Server\\glassfish\\domains\\domain-client]deployer:gfv3ee6wc:localhost:24898 +j2ee.server.middleware=C:/Users/Venny/GlassFish_Server +>>>>>>> 3204b3ff973c155af8d03c58835a989e74502cff +javac.debug=true +javadoc.preview=true +selected.browser=Chrome +user.properties.file=C:\\Users\\Venny\\AppData\\Roaming\\NetBeans\\8.1\\build.properties diff --git a/Identity_Service/nbproject/private/private.xml b/Identity_Service/nbproject/private/private.xml new file mode 100644 index 00000000..0fb97380 --- /dev/null +++ b/Identity_Service/nbproject/private/private.xml @@ -0,0 +1,10 @@ + + + + + + file:/C:/Users/Venny/Documents/NetBeansProjects/IF3110-2015-T2/Identity_Service/src/java/service/login.java + file:/C:/Users/Venny/Documents/NetBeansProjects/IF3110-2015-T2/Identity_Service/src/java/connection/DB.java + + + diff --git a/Identity_Service/nbproject/project.properties b/Identity_Service/nbproject/project.properties new file mode 100644 index 00000000..288816e5 --- /dev/null +++ b/Identity_Service/nbproject/project.properties @@ -0,0 +1,93 @@ +annotation.processing.enabled=true +annotation.processing.enabled.in.editor=true +annotation.processing.processors.list= +annotation.processing.run.all.processors=true +annotation.processing.source.output=${build.generated.sources.dir}/ap-source-output +build.classes.dir=${build.web.dir}/WEB-INF/classes +build.classes.excludes=**/*.java,**/*.form +build.dir=build +build.generated.dir=${build.dir}/generated +build.generated.sources.dir=${build.dir}/generated-sources +build.test.classes.dir=${build.dir}/test/classes +build.test.results.dir=${build.dir}/test/results +build.web.dir=${build.dir}/web +build.web.excludes=${build.classes.excludes} +client.urlPart= +compile.jsps=false +conf.dir=${source.root}/conf +debug.classpath=${build.classes.dir}:${javac.classpath} +debug.test.classpath=\ + ${run.test.classpath} +display.browser=true +# Files to be excluded from distribution war +dist.archive.excludes= +dist.dir=dist +dist.ear.war=${dist.dir}/${war.ear.name} +dist.javadoc.dir=${dist.dir}/javadoc +dist.war=${dist.dir}/${war.name} +endorsed.classpath=\ + ${libs.javaee-endorsed-api-6.0.classpath} +excludes= +file.reference.json-20131018.jar=..\\json-20131018.jar +file.reference.mysql-connector-java-5.1.23-bin.jar=web\\WEB-INF\\mysql-connector-java-5.1.23-bin.jar +includes=** +j2ee.compile.on.save=true +j2ee.copy.static.files.on.save=true +j2ee.deploy.on.save=true +j2ee.platform=1.7-web +j2ee.platform.classpath=${j2ee.server.home}/modules/endorsed/javax.annotation-api.jar:${j2ee.server.home}/modules/endorsed/jaxb-api.jar:${j2ee.server.home}/modules/endorsed/webservices-api-osgi.jar:${j2ee.server.home}/modules/bean-validator.jar:${j2ee.server.home}/modules/cdi-api.jar:${j2ee.server.home}/modules/javax.batch-api.jar:${j2ee.server.home}/modules/javax.ejb-api.jar:${j2ee.server.home}/modules/javax.el.jar:${j2ee.server.home}/modules/javax.enterprise.concurrent-api.jar:${j2ee.server.home}/modules/javax.enterprise.concurrent.jar:${j2ee.server.home}/modules/javax.enterprise.deploy-api.jar:${j2ee.server.home}/modules/javax.faces.jar:${j2ee.server.home}/modules/javax.inject.jar:${j2ee.server.home}/modules/javax.interceptor-api.jar:${j2ee.server.home}/modules/javax.jms-api.jar:${j2ee.server.home}/modules/javax.json.jar:${j2ee.server.home}/modules/javax.mail.jar:${j2ee.server.home}/modules/javax.management.j2ee-api.jar:${j2ee.server.home}/modules/javax.persistence.jar:${j2ee.server.home}/modules/javax.resource-api.jar:${j2ee.server.home}/modules/javax.security.auth.message-api.jar:${j2ee.server.home}/modules/javax.security.jacc-api.jar:${j2ee.server.home}/modules/javax.servlet-api.jar:${j2ee.server.home}/modules/javax.servlet.jsp-api.jar:${j2ee.server.home}/modules/javax.servlet.jsp.jar:${j2ee.server.home}/modules/javax.servlet.jsp.jstl-api.jar:${j2ee.server.home}/modules/javax.servlet.jsp.jstl.jar:${j2ee.server.home}/modules/javax.transaction-api.jar:${j2ee.server.home}/modules/javax.websocket-api.jar:${j2ee.server.home}/modules/javax.ws.rs-api.jar:${j2ee.server.home}/modules/javax.xml.registry-api.jar:${j2ee.server.home}/modules/javax.xml.rpc-api.jar:${j2ee.server.home}/modules/jaxb-osgi.jar:${j2ee.server.home}/modules/webservices-osgi.jar:${j2ee.server.home}/modules/weld-osgi-bundle.jar:${j2ee.server.middleware}/mq/lib/jaxm-api.jar +j2ee.platform.embeddableejb.classpath=${j2ee.server.home}/lib/embedded/glassfish-embedded-static-shell.jar +j2ee.platform.wscompile.classpath=${j2ee.server.home}/modules/webservices-osgi.jar +j2ee.platform.wsgen.classpath=${j2ee.server.home}/modules/webservices-osgi.jar:${j2ee.server.home}/modules/endorsed/webservices-api-osgi.jar:${j2ee.server.home}/modules/jaxb-osgi.jar:${j2ee.server.home}/modules/endorsed/jaxb-api.jar +j2ee.platform.wsimport.classpath=${j2ee.server.home}/modules/webservices-osgi.jar:${j2ee.server.home}/modules/endorsed/webservices-api-osgi.jar:${j2ee.server.home}/modules/jaxb-osgi.jar:${j2ee.server.home}/modules/endorsed/jaxb-api.jar +j2ee.platform.wsit.classpath= +j2ee.server.type=gfv3ee6 +jar.compress=false +javac.classpath=\ + ${file.reference.json-20131018.jar}:\ + ${libs.Java-EE-GlassFish-v3-Prelude.classpath}:\ + ${file.reference.mysql-connector-java-5.1.23-bin.jar} +# Space-separated list of extra javac options +javac.compilerargs= +javac.debug=true +javac.deprecation=false +javac.processorpath=\ + ${javac.classpath} +javac.source=1.8 +javac.target=1.8 +javac.test.classpath=\ + ${javac.classpath}:\ + ${build.classes.dir} +javac.test.processorpath=\ + ${javac.test.classpath} +javadoc.additionalparam= +javadoc.author=false +javadoc.encoding=${source.encoding} +javadoc.noindex=false +javadoc.nonavbar=false +javadoc.notree=false +javadoc.preview=true +javadoc.private=false +javadoc.splitindex=true +javadoc.use=true +javadoc.version=false +javadoc.windowtitle= +lib.dir=${web.docbase.dir}/WEB-INF/lib +persistence.xml.dir=${conf.dir} +platform.active=default_platform +resource.dir=setup +run.test.classpath=\ + ${javac.test.classpath}:\ + ${build.test.classes.dir} +# Space-separated list of JVM arguments used when running a class with a main method or a unit test +# (you may also define separate properties like run-sys-prop.name=value instead of -Dname=value): +runmain.jvmargs= +source.encoding=UTF-8 +source.root=src +src.dir=${source.root}/java +test.src.dir=test +war.content.additional= +war.ear.name=${war.name} +war.name=Identity_Service.war +web.docbase.dir=web +webinf.dir=web/WEB-INF diff --git a/Identity_Service/nbproject/project.xml b/Identity_Service/nbproject/project.xml new file mode 100644 index 00000000..9265b8ba --- /dev/null +++ b/Identity_Service/nbproject/project.xml @@ -0,0 +1,34 @@ + + + org.netbeans.modules.web.project + + + + + + Identity_Service + 1.6.5 + + + ${file.reference.json-20131018.jar} + WEB-INF/lib + + + ${libs.Java-EE-GlassFish-v3-Prelude.classpath} + WEB-INF/lib + + + ${file.reference.mysql-connector-java-5.1.23-bin.jar} + WEB-INF/lib + + + + + + + + + + + + diff --git a/Identity_Service/src/conf/MANIFEST.MF b/Identity_Service/src/conf/MANIFEST.MF new file mode 100644 index 00000000..59499bce --- /dev/null +++ b/Identity_Service/src/conf/MANIFEST.MF @@ -0,0 +1,2 @@ +Manifest-Version: 1.0 + diff --git a/Identity_Service/src/java/connection/DB.java b/Identity_Service/src/java/connection/DB.java new file mode 100644 index 00000000..7e6cf6ae --- /dev/null +++ b/Identity_Service/src/java/connection/DB.java @@ -0,0 +1,30 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package connection; + +import java.sql.Connection; +import java.sql.DriverManager; +import java.sql.SQLException; + +/** + * + * @author Venny + */ +public class DB { + public static Connection connect() { + String host = "jdbc:mysql://localhost:3306/wbd2"; + String uName = "root"; + String uPass = "12345"; + Connection con=null; + try { + Class.forName("com.mysql.jdbc.Driver"); + con = DriverManager.getConnection(host, uName, uPass); + } catch (Exception err) { + System.out.println(err.getMessage()); + } + return con; + } +} diff --git a/Identity_Service/src/java/mysql/LoadDrive.java b/Identity_Service/src/java/mysql/LoadDrive.java new file mode 100644 index 00000000..04094fb6 --- /dev/null +++ b/Identity_Service/src/java/mysql/LoadDrive.java @@ -0,0 +1,35 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package mysql; + +import java.sql.*; + +/** + * + * @author zainelwati + */ +public class LoadDrive { + static final String JDBC_DRIVER = "com.mysql.jdbc.Driver"; + static final String DB_URL = "jdbc:mysql://localhost:3306/mysql?zeroDateTimeBehavior=convertToNull"; + + static final String USER = "root"; + static final String PASS = ""; + + static Connection conn = null; + public static Connection connect(){ + try{ + System.out.println("Connecting to database..."); + Class.forName("com.mysql.jdbc.Driver"); + conn = (Connection) DriverManager.getConnection(DB_URL, USER, PASS); + } + catch(SQLException | ClassNotFoundException se){ + System.out.println("Failed to connect to databse."); + } + finally{ + return conn; + } + } +} diff --git a/Identity_Service/src/java/service/auth.java b/Identity_Service/src/java/service/auth.java new file mode 100644 index 00000000..d0ec5ad4 --- /dev/null +++ b/Identity_Service/src/java/service/auth.java @@ -0,0 +1,138 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package service; + +import connection.DB; +import java.sql.Connection; +import org.json.*; +import java.io.*; +import java.sql.PreparedStatement; +import java.sql.ResultSet; +import java.sql.SQLException; +import java.sql.Statement; +import java.sql.Timestamp; +import java.text.DateFormat; +import java.text.ParseException; +import java.text.SimpleDateFormat; +import java.util.Calendar; +import java.util.Date; +import java.util.UUID; +import java.util.logging.Level; +import java.util.logging.Logger; +import javax.servlet.*; +import javax.servlet.annotation.WebServlet; +import javax.servlet.http.HttpServlet; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +/** + * + * @author Fitra Rahmamuliani + */ +@WebServlet(name="auth", urlPatterns = "/auth") +public class auth extends HttpServlet { + + /** + * Processes requests for both HTTP GET and POST + * methods. + * + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + protected void processRequest(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + /* KAMUS */ + String token, sql; + JSONObject jo = new JSONObject(); + ResultSet result; + Date date, token_expired; + DateFormat date_format; + /* ALGORITMA */ + /* Connect to database */ + Connection conn = DB.connect(); + + response.setContentType("application/json"); + try (PrintWriter out = response.getWriter()) { + token = request.getParameter("auth"); + sql = "SELECT * FROM token WHERE token_id=?"; + try (PreparedStatement stmt = conn.prepareStatement(sql)) + { + stmt.setString(1, token); + result = stmt.executeQuery(); + if (result.next()) + { + date = new Date(); + date_format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); + try{ + token_expired = date_format.parse(result.getString("token_expired")); + if (date.after(token_expired)) + { + jo.put("status",-1); + sql = "DELETE FROM token where token_id =?"; + try (PreparedStatement delstmt = conn.prepareStatement(sql)) + { + delstmt.setString(1, token); + delstmt.executeUpdate(); + } + } + else + { + jo.put("status", 1); + jo.put("id", result.getInt("user_id")); + } + } catch (ParseException ex) { + Logger.getLogger(auth.class.getName()).log(Level.SEVERE, null, ex); + } + } + out.println(jo); + } catch (SQLException ex) { + Logger.getLogger(auth.class.getName()).log(Level.SEVERE, null, ex); + } + } + } + + // + /** + * Handles the HTTP GET method. + * + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + @Override + protected void doGet(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + processRequest(request, response); + } + + /** + * Handles the HTTP POST method. + * + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + @Override + protected void doPost(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + processRequest(request, response); + } + + /** + * Returns a short description of the servlet. + * + * @return a String containing servlet description + */ + @Override + public String getServletInfo() { + return "Short description"; + }// + +} diff --git a/Identity_Service/src/java/service/login.java b/Identity_Service/src/java/service/login.java new file mode 100644 index 00000000..b10556c2 --- /dev/null +++ b/Identity_Service/src/java/service/login.java @@ -0,0 +1,118 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package service; + +import connection.DB; +import java.sql.Connection; +import org.json.*; +import java.io.*; +import java.sql.PreparedStatement; +import java.sql.ResultSet; +import java.sql.SQLException; +import java.sql.Statement; +import java.sql.Timestamp; +import java.text.SimpleDateFormat; +import java.util.Calendar; +import java.util.Date; +import java.util.UUID; +import java.util.logging.Level; +import java.util.logging.Logger; +import javax.servlet.*; +import javax.servlet.annotation.WebServlet; +import javax.servlet.http.HttpServlet; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +/** + * + * @author Fitra Rahmamuliani + */ + +@WebServlet(name="login", urlPatterns = "/login") +public class login extends HttpServlet { + private static final long serialVersionUID = 1; + + public login(){ + super(); + /* to do autogenerated contructor stub*/ + } + protected void processRequest(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException + { + /*KAMUS*/ + String email, password, sql, token, delquery, insquery; + ResultSet result; + int uid; + Calendar calendar; + Timestamp token_expired; + /* Make JSON object */ + JSONObject jo = new JSONObject(); + /*ALGORITMA*/ + /* Connect to database */ + Connection conn = DB.connect(); + response.setContentType("application/json"); + try(PrintWriter out = response.getWriter()){ + email= request.getParameter("email"); + password = request.getParameter("password"); + if (email != null & password != null){ + sql = "SELECT * FROM user WHERE email = ? AND password = ?"; + conn.setAutoCommit(false); + + try(PreparedStatement stmt = conn.prepareStatement(sql)){ + stmt.setString(1, email); + stmt.setString(2, password); + result= stmt.executeQuery(); + if (result.next()) + { + uid = result.getInt("user_id"); + calendar = Calendar.getInstance(); + calendar.setTime(new Date()); + calendar.add(Calendar.DATE, 1); + token_expired = new Timestamp(calendar.getTime().getTime()); + token = UUID.randomUUID().toString().replaceAll("-",""); + delquery = "DELETE FROM token WHERE user_id=?;"; + insquery = "INSERT INTO token (token_id,user_id,token_expired) VALUES (?,?,?);"; + try + { + PreparedStatement delstmt = conn.prepareStatement(delquery); + PreparedStatement insstmt = conn.prepareStatement(insquery); + delstmt.setInt(1,uid); + insstmt.setString(1, token); + insstmt.setInt(2, uid); + insstmt.setTimestamp(3, token_expired); + delstmt.execute(); + insstmt.execute(); + jo.put("token",token); + jo.put("token_expired",token_expired.getTime()); + conn.commit(); + } + finally{ + conn.setAutoCommit(true); + } + } + else + { + jo.put("ERROR","Wrong username and password"); + } + } + } + out.println(jo.toString()); + } catch (SQLException ex) { + Logger.getLogger(login.class.getName()).log(Level.SEVERE, null, ex); + } + } + + @Override + protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException + { + processRequest(request, response); + } + + @Override + protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException + { + processRequest(request, response); + } +} \ No newline at end of file diff --git a/Identity_Service/src/java/service/service.java b/Identity_Service/src/java/service/service.java new file mode 100644 index 00000000..2532bf3b --- /dev/null +++ b/Identity_Service/src/java/service/service.java @@ -0,0 +1,26 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package service; + +import javax.jws.WebService; +import javax.jws.WebMethod; +import javax.jws.WebParam; + +/** + * + * @author zainelwati + */ +@WebService(serviceName = "service") +public class service { + + /** + * This is a sample web service operation + */ + @WebMethod(operationName = "hello") + public String hello(@WebParam(name = "name") String txt) { + return "Hello " + txt + " !"; + } +} diff --git a/Identity_Service/web/WEB-INF/glassfish-web.xml b/Identity_Service/web/WEB-INF/glassfish-web.xml new file mode 100644 index 00000000..13e0059f --- /dev/null +++ b/Identity_Service/web/WEB-INF/glassfish-web.xml @@ -0,0 +1,10 @@ + + + + + + + Keep a copy of the generated servlet class' java code. + + + diff --git a/Identity_Service/web/WEB-INF/mysql-connector-java-5.1.23-bin.jar b/Identity_Service/web/WEB-INF/mysql-connector-java-5.1.23-bin.jar new file mode 100644 index 00000000..1f904143 Binary files /dev/null and b/Identity_Service/web/WEB-INF/mysql-connector-java-5.1.23-bin.jar differ diff --git a/Identity_Service/web/WEB-INF/sun-jaxws.xml b/Identity_Service/web/WEB-INF/sun-jaxws.xml new file mode 100644 index 00000000..a34f6eeb --- /dev/null +++ b/Identity_Service/web/WEB-INF/sun-jaxws.xml @@ -0,0 +1,4 @@ + + + + diff --git a/Identity_Service/web/WEB-INF/web.xml b/Identity_Service/web/WEB-INF/web.xml new file mode 100644 index 00000000..2d695c2b --- /dev/null +++ b/Identity_Service/web/WEB-INF/web.xml @@ -0,0 +1,28 @@ + + + + + login + service.login + + + login + /login + + + auth + service.auth + + + auth + /auth + + + + 30 + + + diff --git a/Identity_Service/web/index.html b/Identity_Service/web/index.html new file mode 100644 index 00000000..c627c249 --- /dev/null +++ b/Identity_Service/web/index.html @@ -0,0 +1,16 @@ + + + + + TODO supply a title + + + + +
TODO write content
+ + diff --git a/README.md b/README.md index c079a1d2..42b8cf16 100644 --- a/README.md +++ b/README.md @@ -24,7 +24,7 @@ Diharapkan dengan tugas ini anda dapat mengerti: ### Link Laporan -*Masukkan link laporan anda di sini* +Laporan dapat diakses pada tauran berikut http://bit.ly/Tugas2WBD_Istridaman ### Arsitektur Umum Server diff --git a/StackExchange WS/build.xml b/StackExchange WS/build.xml new file mode 100644 index 00000000..54e298fb --- /dev/null +++ b/StackExchange WS/build.xml @@ -0,0 +1,71 @@ + + + + + + + + + + + Builds, tests, and runs the project StackExchange_WS. + + + diff --git a/StackExchange WS/nbproject/ant-deploy.xml b/StackExchange WS/nbproject/ant-deploy.xml new file mode 100644 index 00000000..2d5f8778 --- /dev/null +++ b/StackExchange WS/nbproject/ant-deploy.xml @@ -0,0 +1,111 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/StackExchange WS/nbproject/build-impl.xml b/StackExchange WS/nbproject/build-impl.xml new file mode 100644 index 00000000..1a1f2ed5 --- /dev/null +++ b/StackExchange WS/nbproject/build-impl.xml @@ -0,0 +1,1447 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must set src.dir + Must set test.src.dir + Must set build.dir + Must set build.web.dir + Must set build.generated.dir + Must set dist.dir + Must set build.classes.dir + Must set dist.javadoc.dir + Must set build.test.classes.dir + Must set build.test.results.dir + Must set build.classes.excludes + Must set dist.war + + + + + + + + + +The Java EE server classpath is not correctly set up - server home directory is missing. +Either open the project in the IDE and assign the server or setup the server classpath manually. +For example like this: + ant -Dj2ee.server.home=<app_server_installation_directory> + + +The Java EE server classpath is not correctly set up. Your active server type is ${j2ee.server.type}. +Either open the project in the IDE and assign the server or setup the server classpath manually. +For example like this: + ant -Duser.properties.file=<path_to_property_file> (where you put the property "j2ee.platform.classpath" in a .properties file) +or ant -Dj2ee.platform.classpath=<server_classpath> (where no properties file is used) + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must set javac.includes + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + No tests executed. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +The libs.CopyLibs.classpath property is not set up. +This property must point to +org-netbeans-modules-java-j2seproject-copylibstask.jar file which is part +of NetBeans IDE installation and is usually located at +<netbeans_installation>/java<version>/ant/extra folder. +Either open the project in the IDE and make sure CopyLibs library +exists or setup the property manually. For example like this: + ant -Dlibs.CopyLibs.classpath=a/path/to/org-netbeans-modules-java-j2seproject-copylibstask.jar + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must set JVM to use for profiling in profiler.info.jvm + Must set profiler agent JVM arguments in profiler.info.jvmargs.agent + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must select some files in the IDE or set javac.includes + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must select some files in the IDE or set javac.jsp.includes + + + + + + + + + + + + + + + + + + + + + + + + + + Must select a file in the IDE or set jsp.includes + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Browser not found, cannot launch the deployed application. Try to set the BROWSER environment variable. + + + Launching ${browse.url} + + + + + + Must select one file in the IDE or set run.class + + + + Must select one file in the IDE or set run.class + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must select one file in the IDE or set debug.class + + + + + + + + + + + + Must select one file in the IDE or set debug.class + + + + + Must set fix.includes + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + This target only works when run from inside the NetBeans IDE. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must select some files in the IDE or set javac.includes + + + + + + + + + + + + + + + + + + + Some tests failed; see details above. + + + + + + + + + Must select some files in the IDE or set test.includes + + + + Some tests failed; see details above. + + + + Must select some files in the IDE or set test.class + Must select some method in the IDE or set test.method + + + + Some tests failed; see details above. + + + + + Must select one file in the IDE or set test.class + + + + Must select one file in the IDE or set test.class + Must select some method in the IDE or set test.method + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/StackExchange WS/nbproject/genfiles.properties b/StackExchange WS/nbproject/genfiles.properties new file mode 100644 index 00000000..f13d854e --- /dev/null +++ b/StackExchange WS/nbproject/genfiles.properties @@ -0,0 +1,9 @@ +build.xml.data.CRC32=a2aa7d22 +build.xml.script.CRC32=0087465d +build.xml.stylesheet.CRC32=651128d4@1.68.1.1 +# This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml. +# Do not edit this file. You may delete it but then the IDE will never regenerate such files for you. +nbproject/build-impl.xml.data.CRC32=a2aa7d22 +nbproject/build-impl.xml.script.CRC32=9b60b0be +nbproject/build-impl.xml.stylesheet.CRC32=99ea4b56@1.68.1.1 +nbproject/jaxws-build.xml.stylesheet.CRC32=6608c2cf diff --git a/StackExchange WS/nbproject/jax-ws.xml b/StackExchange WS/nbproject/jax-ws.xml new file mode 100644 index 00000000..4c336166 --- /dev/null +++ b/StackExchange WS/nbproject/jax-ws.xml @@ -0,0 +1,18 @@ + + + + + model.answer.AnswerWS + + + model.user.UserWS + + + model.question.QuestionWS + + + model.vote.VoteWS + + + + diff --git a/StackExchange WS/nbproject/jaxws-build.xml b/StackExchange WS/nbproject/jaxws-build.xml new file mode 100644 index 00000000..2fee538a --- /dev/null +++ b/StackExchange WS/nbproject/jaxws-build.xml @@ -0,0 +1,59 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/StackExchange WS/nbproject/project.properties b/StackExchange WS/nbproject/project.properties new file mode 100644 index 00000000..37d4cd84 --- /dev/null +++ b/StackExchange WS/nbproject/project.properties @@ -0,0 +1,92 @@ +annotation.processing.enabled=true +annotation.processing.enabled.in.editor=true +annotation.processing.processors.list= +annotation.processing.run.all.processors=true +annotation.processing.source.output=${build.generated.sources.dir}/ap-source-output +build.classes.dir=${build.web.dir}/WEB-INF/classes +build.classes.excludes=**/*.java,**/*.form +build.dir=build +build.generated.dir=${build.dir}/generated +build.generated.sources.dir=${build.dir}/generated-sources +build.test.classes.dir=${build.dir}/test/classes +build.test.results.dir=${build.dir}/test/results +build.web.dir=${build.dir}/web +build.web.excludes=${build.classes.excludes} +client.urlPart= +compile.jsps=false +conf.dir=${source.root}/conf +debug.classpath=${build.classes.dir}:${javac.classpath} +debug.test.classpath=\ + ${run.test.classpath} +display.browser=true +# Files to be excluded from distribution war +dist.archive.excludes= +dist.dir=dist +dist.ear.war=${dist.dir}/${war.ear.name} +dist.javadoc.dir=${dist.dir}/javadoc +dist.war=${dist.dir}/${war.name} +endorsed.classpath=\ + ${libs.javaee-endorsed-api-6.0.classpath} +excludes= +file.reference.json-20131018.jar=..\\json-20131018.jar +file.reference.json-simple.jar=..\\json-simple.jar +includes=** +j2ee.compile.on.save=true +j2ee.copy.static.files.on.save=true +j2ee.deploy.on.save=true +j2ee.platform=1.7-web +j2ee.platform.classpath=${j2ee.server.home}/modules/endorsed/javax.annotation-api.jar:${j2ee.server.home}/modules/endorsed/jaxb-api.jar:${j2ee.server.home}/modules/endorsed/webservices-api-osgi.jar:${j2ee.server.home}/modules/bean-validator.jar:${j2ee.server.home}/modules/cdi-api.jar:${j2ee.server.home}/modules/javax.batch-api.jar:${j2ee.server.home}/modules/javax.ejb-api.jar:${j2ee.server.home}/modules/javax.el.jar:${j2ee.server.home}/modules/javax.enterprise.concurrent-api.jar:${j2ee.server.home}/modules/javax.enterprise.concurrent.jar:${j2ee.server.home}/modules/javax.enterprise.deploy-api.jar:${j2ee.server.home}/modules/javax.faces.jar:${j2ee.server.home}/modules/javax.inject.jar:${j2ee.server.home}/modules/javax.interceptor-api.jar:${j2ee.server.home}/modules/javax.jms-api.jar:${j2ee.server.home}/modules/javax.json.jar:${j2ee.server.home}/modules/javax.mail.jar:${j2ee.server.home}/modules/javax.management.j2ee-api.jar:${j2ee.server.home}/modules/javax.persistence.jar:${j2ee.server.home}/modules/javax.resource-api.jar:${j2ee.server.home}/modules/javax.security.auth.message-api.jar:${j2ee.server.home}/modules/javax.security.jacc-api.jar:${j2ee.server.home}/modules/javax.servlet-api.jar:${j2ee.server.home}/modules/javax.servlet.jsp-api.jar:${j2ee.server.home}/modules/javax.servlet.jsp.jar:${j2ee.server.home}/modules/javax.servlet.jsp.jstl-api.jar:${j2ee.server.home}/modules/javax.servlet.jsp.jstl.jar:${j2ee.server.home}/modules/javax.transaction-api.jar:${j2ee.server.home}/modules/javax.websocket-api.jar:${j2ee.server.home}/modules/javax.ws.rs-api.jar:${j2ee.server.home}/modules/javax.xml.registry-api.jar:${j2ee.server.home}/modules/javax.xml.rpc-api.jar:${j2ee.server.home}/modules/jaxb-osgi.jar:${j2ee.server.home}/modules/webservices-osgi.jar:${j2ee.server.home}/modules/weld-osgi-bundle.jar:${j2ee.server.middleware}/mq/lib/jaxm-api.jar +j2ee.platform.embeddableejb.classpath=${j2ee.server.home}/lib/embedded/glassfish-embedded-static-shell.jar +j2ee.platform.wscompile.classpath=${j2ee.server.home}/modules/webservices-osgi.jar +j2ee.platform.wsgen.classpath=${j2ee.server.home}/modules/webservices-osgi.jar:${j2ee.server.home}/modules/endorsed/webservices-api-osgi.jar:${j2ee.server.home}/modules/jaxb-osgi.jar:${j2ee.server.home}/modules/endorsed/jaxb-api.jar +j2ee.platform.wsimport.classpath=${j2ee.server.home}/modules/webservices-osgi.jar:${j2ee.server.home}/modules/endorsed/webservices-api-osgi.jar:${j2ee.server.home}/modules/jaxb-osgi.jar:${j2ee.server.home}/modules/endorsed/jaxb-api.jar +j2ee.platform.wsit.classpath= +j2ee.server.type=gfv3ee6 +jar.compress=false +javac.classpath=\ + ${file.reference.json-20131018.jar}:\ + ${file.reference.json-simple.jar} +# Space-separated list of extra javac options +javac.compilerargs= +javac.debug=true +javac.deprecation=false +javac.processorpath=\ + ${javac.classpath} +javac.source=1.8 +javac.target=1.8 +javac.test.classpath=\ + ${javac.classpath}:\ + ${build.classes.dir} +javac.test.processorpath=\ + ${javac.test.classpath} +javadoc.additionalparam= +javadoc.author=false +javadoc.encoding=${source.encoding} +javadoc.noindex=false +javadoc.nonavbar=false +javadoc.notree=false +javadoc.preview=true +javadoc.private=false +javadoc.splitindex=true +javadoc.use=true +javadoc.version=false +javadoc.windowtitle= +lib.dir=${web.docbase.dir}/WEB-INF/lib +persistence.xml.dir=${conf.dir} +platform.active=default_platform +resource.dir=setup +run.test.classpath=\ + ${javac.test.classpath}:\ + ${build.test.classes.dir} +# Space-separated list of JVM arguments used when running a class with a main method or a unit test +# (you may also define separate properties like run-sys-prop.name=value instead of -Dname=value): +runmain.jvmargs= +source.encoding=UTF-8 +source.root=src +src.dir=${source.root}/java +test.src.dir=test +war.content.additional= +war.ear.name=${war.name} +war.name=StackExchange_WS.war +web.docbase.dir=web +webinf.dir=web/WEB-INF diff --git a/StackExchange WS/nbproject/project.xml b/StackExchange WS/nbproject/project.xml new file mode 100644 index 00000000..9d9fb5ea --- /dev/null +++ b/StackExchange WS/nbproject/project.xml @@ -0,0 +1,30 @@ + + + org.netbeans.modules.web.project + + + + + + StackExchange_WS + 1.6.5 + + + ${file.reference.json-20131018.jar} + WEB-INF/lib + + + ${file.reference.json-simple.jar} + WEB-INF/lib + + + + + + + + + + + + diff --git a/StackExchange WS/src/conf/MANIFEST.MF b/StackExchange WS/src/conf/MANIFEST.MF new file mode 100644 index 00000000..59499bce --- /dev/null +++ b/StackExchange WS/src/conf/MANIFEST.MF @@ -0,0 +1,2 @@ +Manifest-Version: 1.0 + diff --git a/StackExchange WS/src/java/ConnectionIS/ConnectionIS.java b/StackExchange WS/src/java/ConnectionIS/ConnectionIS.java new file mode 100644 index 00000000..1c8f73c8 --- /dev/null +++ b/StackExchange WS/src/java/ConnectionIS/ConnectionIS.java @@ -0,0 +1,69 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package ConnectionIS; + +import java.io.BufferedReader; +import java.io.IOException; +import java.io.InputStreamReader; +import java.io.OutputStream; +import java.io.UnsupportedEncodingException; +import java.net.URL; +import java.net.URLConnection; +import java.net.URLEncoder; +import java.util.logging.Level; +import java.util.logging.Logger; +import org.json.simple.JSONObject; +import org.json.simple.parser.JSONParser; +import org.json.simple.parser.ParseException; + +/** + * + * @author Fitra Rahmamuliani + */ +public class ConnectionIS { + private static final String CONTEXT_PATH = "http://localhost:8082/Identity_Service"; + + private static JSONObject request(String servletPath, byte[] query) { + JSONObject jo = null; + try { + if (servletPath != null && !servletPath.startsWith("/")) + servletPath = "/" + servletPath; + URLConnection connection = new URL(CONTEXT_PATH + servletPath).openConnection(); + connection.setDoOutput(true); + connection.setRequestProperty("Content-Type", "application/x-www-form-urlencoded"); + try (OutputStream output = connection.getOutputStream()) { + output.write(query); + } + StringBuilder builder = new StringBuilder(); + BufferedReader buf = new BufferedReader(new InputStreamReader(connection.getInputStream())); + String read; + while ((read = buf.readLine()) != null) + builder.append(read); + jo = (JSONObject)new JSONParser().parse(builder.toString()); + } + catch (IOException ex) { + System.err.println(ex.getMessage()); + } catch (ParseException ex) { + Logger.getLogger(ConnectionIS.class.getName()).log(Level.SEVERE, null, ex); + } + return jo; + } + + public static JSONObject requestAuth(String token_id) { + JSONObject jo = null; + try { + String charset = java.nio.charset.StandardCharsets.UTF_8.name(); + String query = String.format( + "auth=%s", + URLEncoder.encode(token_id, charset)); + jo = request("/auth", query.getBytes()); + } catch (Exception ex) { + System.err.println(ex.getMessage()); + } + return jo; + } + +} \ No newline at end of file diff --git a/StackExchange WS/src/java/connection/DB.java b/StackExchange WS/src/java/connection/DB.java new file mode 100644 index 00000000..82d7ee26 --- /dev/null +++ b/StackExchange WS/src/java/connection/DB.java @@ -0,0 +1,30 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package connection; + +import java.sql.Connection; +import java.sql.DriverManager; +import java.sql.SQLException; + +/** + * + * @author Venny + */ +public class DB { + public static Connection connect() { + String host = "jdbc:mysql://localhost:3306/wbd2?zeroDateTimeBehavior=convertToNull"; + String uName = "root"; + String uPass = "12345"; + Connection con=null; + try { + Class.forName("com.mysql.jdbc.Driver"); + con = DriverManager.getConnection(host, uName, uPass); + } catch (Exception err) { + System.out.println(err.getMessage()); + } + return con; + } +} diff --git a/StackExchange WS/src/java/model/answer/Answer.java b/StackExchange WS/src/java/model/answer/Answer.java new file mode 100644 index 00000000..53a53db4 --- /dev/null +++ b/StackExchange WS/src/java/model/answer/Answer.java @@ -0,0 +1,91 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package model.answer; + +import javax.xml.bind.annotation.XmlElement; + +/** + * + * @author Venny + */ +public class Answer { + private int answer_id; + private int question_id; + private int user_id; + private String content; + private int vote; + private String create_time; + + public Answer(){ + answer_id=0; + question_id=0; + user_id=0; + vote=0; + } + + public Answer(int aid, int qid, int uid, String content, int vote, String create_time) { + answer_id = aid; + question_id = qid; + user_id = uid; + this.vote = vote; + this.content = content; + this.create_time = create_time; + } + + + @XmlElement(name="answer_id", required=true) + public int getAnswerID() { + return answer_id; + } + + + @XmlElement(name="question_id", required=true) + public int getQuestionID() { + return question_id; + } + + + @XmlElement(name="user_id", required=true) + public int getUserID() { + return user_id; + } + + @XmlElement(name="content", required=true) + public String getContent() { + return content; + } + + + @XmlElement(name="vote", required=false) + public int getVote(){ + return vote; + } + + + @XmlElement(name="create_time", required=true) + public String getCreateTime() { + return create_time; + } + + public void setAnswerID (int aid) { + answer_id = aid; + } + public void setQuestionID(int qid) { + question_id = qid; + } + + public void setUserID(int uid) { + user_id = uid; + } + + public void setContent(String content) { + this.content = content; + } + + public void setVote(int vote) { + this.vote = vote; + } +} diff --git a/StackExchange WS/src/java/model/answer/AnswerWS.java b/StackExchange WS/src/java/model/answer/AnswerWS.java new file mode 100644 index 00000000..d6068de9 --- /dev/null +++ b/StackExchange WS/src/java/model/answer/AnswerWS.java @@ -0,0 +1,159 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package model.answer; + +import connection.DB; +import java.sql.Connection; +import java.sql.PreparedStatement; +import java.sql.ResultSet; +import java.sql.SQLException; +import java.util.ArrayList; +import java.util.logging.Level; +import java.util.logging.Logger; +import javax.jws.Oneway; +import javax.jws.WebService; +import javax.jws.WebMethod; +import javax.jws.WebParam; +import javax.jws.WebResult; +import org.json.simple.*; +import ConnectionIS.ConnectionIS; +/** + * + * @author Venny + */ +@WebService(serviceName = "AnswerWS") +public class AnswerWS { + + Connection conn = DB.connect(); + + /** + * Web service operation + */ + @WebMethod(operationName = "getAnswersByQID") + @WebResult(name="Answer") + public ArrayList getAnswersByQID (@WebParam(name = "question_id") int question_id) { + ArrayList answers = new ArrayList<>(); + try{ + String sql; + sql = "SELECT * FROM answer WHERE question_id = ?"; + PreparedStatement stmt = conn.prepareStatement(sql); + stmt.setInt(1, question_id); + ResultSet rs = stmt.executeQuery(); + + /* Get every data returned by SQL query */ + while(rs.next()){ + answers.add(new Answer( rs.getInt("answer_id"), + rs.getInt("question_id"), + rs.getInt("user_id"), + rs.getString("content"), + rs.getInt("vote"), + rs.getString("create_time") + )); + } + rs.close(); + stmt.close(); + } catch (SQLException ex) { + Logger.getLogger(AnswerWS.class.getName()).log + (Level.SEVERE, null, ex); + } + return answers; + } + + /** + * Web service operation + */ + @WebMethod(operationName = "getAnswerByID") + @WebResult(name="Answer") + public Answer getAnswerByID (@WebParam(name = "answer_id") int answer_id) { + ArrayList answers = new ArrayList(); + try{ + String sql; + sql = "SELECT * FROM answer WHERE answer_id = ?"; + PreparedStatement stmt = conn.prepareStatement(sql); + stmt.setInt(1, answer_id); + ResultSet rs = stmt.executeQuery(); + + /* Get every data returned by SQL query */ + while(rs.next()){ + answers.add(new Answer( rs.getInt("answer_id"), + rs.getInt("question_id"), + rs.getInt("user_id"), + rs.getString("content"), + rs.getInt("vote"), + rs.getString("create_time") + )); + } + rs.close(); + stmt.close(); + } catch (SQLException ex) { + Logger.getLogger(AnswerWS.class.getName()).log + (Level.SEVERE, null, ex); + } + return answers.get(0); + } + + /** + * Web service operation + */ + @WebMethod(operationName = "getAnswerCount") + @WebResult(name="Answer") + public int getAnswerCount (@WebParam(name = "question_id") int question_id) { + int i = 0; + try{ + String sql; + sql = "SELECT COUNT(*) as answercount FROM answer WHERE question_id = ?"; + PreparedStatement stmt = conn.prepareStatement(sql); + stmt.setInt(1,question_id); + ResultSet rs = stmt.executeQuery(); + + while(rs.next()){ + i=rs.getInt("answercount"); + } + rs.close(); + stmt.close(); + } catch (SQLException ex) { + Logger.getLogger(AnswerWS.class.getName()).log + (Level.SEVERE, null, ex); + } + return i; + } + + /** + * Web service operation + */ + @WebMethod(operationName = "addAnswer") + @WebResult (name="Integer") + public int addAnswer (@WebParam(name = "token") String token, @WebParam(name = "question_id") int qid, @WebParam(name = "content") String content) { + int aid = -1; + + // Send token to IS connector + // Get response in json format + JSONObject jo = ConnectionIS.requestAuth(token); + + // Parse json + int uid = (int) (long) jo.get("id"); + int status = (int) (long) jo.get("status"); + // if status ok, insert answer into db, select answer_id + if (status == 1){ + try{ + String sql = "INSERT INTO answer (question_id,user_id,content) VALUES (?,?,?)"; + PreparedStatement stmt = conn.prepareStatement(sql); + stmt.setInt(1,qid); + stmt.setInt(2,uid); + stmt.setString(3, content); + stmt.executeUpdate(); + stmt.close(); + aid = 1; + } catch (SQLException ex) { + Logger.getLogger(AnswerWS.class.getName()).log + (Level.SEVERE, null, ex); + } + } else { + // alert: fail to add answer + } + return aid; + } +} diff --git a/StackExchange WS/src/java/model/question/Question.java b/StackExchange WS/src/java/model/question/Question.java new file mode 100644 index 00000000..0c8a0f99 --- /dev/null +++ b/StackExchange WS/src/java/model/question/Question.java @@ -0,0 +1,86 @@ +package model.question; + +import javax.xml.bind.annotation.*; + +/** + * + * @author Asanilta + */ + +@XmlRootElement(name = "Question") +public class Question { + + + private int question_id; + private String topic; + private String content; + private int user_id; + private String create_time; + private int vote; + + public Question() { + question_id = 0; + user_id = 0; + vote = 0; + } + public Question(int question_id, String topic, String content, int user_id, String create_time, int vote) { + this.question_id = question_id; + this.topic = topic; + this.content = content; + this.user_id = user_id; + this.create_time = create_time; + this.vote = vote; + } + + @XmlElement(name="question_id", required=true) + public int getQuestionID() { + return question_id; + } + + @XmlElement(name="topic", required=true) + public String getTopic() { + return topic; + } + + @XmlElement(name="content", required=true) + public String getContent() { + return content; + } + + + @XmlElement(name="user_id", required=true) + public int getUserID() { + return user_id; + } + + + @XmlElement(name="create_time", required=true) + public String getCreateTime() { + return create_time; + } + + + @XmlElement(name="vote", required=true) + public int getVote() { + return vote; + } + + public void setQuestionID(int question_id) { + this.question_id = question_id; + } + public void setUserID(int uid) { + user_id = uid; + } + + public void setTopic(String topic) { + this.topic = topic; + } + + public void setContent(String content) { + this.content = content; + } + + public void setVote(int vote) { + this.vote = vote; + } +} diff --git a/StackExchange WS/src/java/model/question/QuestionWS.java b/StackExchange WS/src/java/model/question/QuestionWS.java new file mode 100644 index 00000000..27928ce1 --- /dev/null +++ b/StackExchange WS/src/java/model/question/QuestionWS.java @@ -0,0 +1,217 @@ +package model.question; + +import ConnectionIS.ConnectionIS; +import java.sql.ResultSet; +import java.sql.SQLException; +import java.util.ArrayList; +import java.util.logging.Level; +import java.util.logging.Logger; +import javax.jws.WebService; +import javax.jws.WebMethod; +import javax.jws.WebResult; +import connection.DB; +import java.sql.Connection; +import java.sql.PreparedStatement; +import java.sql.Statement; +import javax.jws.Oneway; +import javax.jws.WebParam; +import org.json.*; + +/** + * + * @author Asanilta + */ +@WebService(serviceName = "QuestionWS") +public class QuestionWS { + Connection conn = DB.connect(); + /** + * Web service operation + */ + @WebMethod(operationName = "getAllQuestions") + @WebResult(name="Question") + public ArrayList getAllQuestions() { + ArrayList questions = new ArrayList<>(); + + try { + + try (Statement stmt = conn.createStatement()) { + String sql = "SELECT * FROM question"; + + try (ResultSet rs = stmt.executeQuery(sql)) { + while (rs.next()) { + questions.add(new Question(rs.getInt("question_id"),rs.getString("topic"),rs.getString("content"),rs.getInt("user_id"),rs.getString("create_time"),rs.getInt("vote"))); + } + } + } + } catch (SQLException ex) { + Logger.getLogger(QuestionWS.class.getName()).log(Level.SEVERE, null, ex); + } + + return questions; + } + + /** + * Web service operation + */ + @WebMethod(operationName = "getQuestionByID") + @WebResult(name="Question") + public Question getQuestionByID(@WebParam(name = "question_id") int question_id) { + Question question = null; + try { + String sql = "SELECT * FROM question WHERE question_id= ?"; + PreparedStatement stmt = conn.prepareStatement(sql); + stmt.setInt(1,question_id); + ResultSet rs = stmt.executeQuery(); + while (rs.next()) { + question = new Question(rs.getInt("question_id"),rs.getString("topic"),rs.getString("content"),rs.getInt("user_id"),rs.getString("create_time"),rs.getInt("vote")); + } + + rs.close(); + stmt.close(); + } catch (SQLException ex) { + Logger.getLogger(QuestionWS.class.getName()).log(Level.SEVERE, null, ex); + } + + return question; + } + + /** + * Web service operation + */ + @WebMethod(operationName = "addQuestion") + @WebResult(name="Integer") + public int addQuestion(@WebParam(name = "token") String token, @WebParam(name = "topic") String topic, @WebParam(name = "content") String content) { + int qid = -1; + + // Send token to IS connector + // Get response in json format + org.json.simple.JSONObject jo = ConnectionIS.requestAuth(token); + + // Parse json + int uid = (int) (long)jo.get("id"); + int status = (int) (long) jo.get("status"); + + // if status ok, insert question into db, select question_id + if (status == 1){ + try { + String sql = "INSERT INTO question(topic,content,user_id) VALUES (?,?,?)"; + PreparedStatement stmt = conn.prepareStatement(sql); + stmt.setString(1, topic); + stmt.setString(2, content); + stmt.setInt(3, uid); + stmt.executeUpdate(); + stmt.close(); + + String sql2 = "SELECT question_id FROM question WHERE topic=? AND content=? AND user_id=?"; + PreparedStatement stmt2 = conn.prepareStatement(sql2); + stmt2.setString(1, topic); + stmt2.setString(2, content); + stmt2.setInt(3, uid); + ResultSet rs = stmt2.executeQuery(); + + while (rs.next()) { + qid = rs.getInt("question_id"); + } + + } catch (SQLException ex) { + Logger.getLogger(QuestionWS.class.getName()).log(Level.SEVERE, null, ex); + } + } else { + // alert: fail to add question + } + + return qid; + } + + /** + * Web service operation + */ + @WebMethod(operationName = "editQuestion") + @WebResult(name="Integer") + public int editQuestion(@WebParam(name = "token") String token, @WebParam(name = "question_id") int qid, @WebParam(name = "topic") String topic, @WebParam(name = "content") String content) { + // Send token to IS connector + // Get response in json format + org.json.simple.JSONObject jo = ConnectionIS.requestAuth(token); + + // Parse json + int uid = (int) (long)jo.get("id"); + int status = (int) (long) jo.get("status"); + + // if status ok, update question into db, select qid + if (status == 1){ + try { + String sql = "UPDATE question SET topic = ?, content = ? WHERE question_id = ?"; + PreparedStatement stmt = conn.prepareStatement(sql); + stmt.setString(1, topic); + stmt.setString(2, content); + stmt.setInt(3, qid); + stmt.executeUpdate(); + stmt.close(); + } catch (SQLException ex) { + Logger.getLogger(QuestionWS.class.getName()).log(Level.SEVERE, null, ex); + } + } else { + qid = -1; + } + + return qid; + } + + /** + * Web service operation + */ + @WebMethod(operationName = "deleteQuestion") + @WebResult(name="Integer") + public int deleteQuestion(@WebParam(name = "token") String token, @WebParam(name = "question_id") int question_id) { + // Send token to IS connector + // Get response in json format + org.json.simple.JSONObject jo = ConnectionIS.requestAuth(token); + + // Parse json + int uid = (int) (long)jo.get("id"); + int status = (int) (long) jo.get("status"); + + // if status ok, update question into db, select qid + if (status == 1){ + try { + String sql = "DELETE FROM question WHERE question_id = ?"; + PreparedStatement stmt = conn.prepareStatement(sql); + stmt.setInt(1, question_id); + stmt.executeUpdate(); + stmt.close(); + } catch (SQLException ex) { + Logger.getLogger(QuestionWS.class.getName()).log(Level.SEVERE, null, ex); + } + } else { + question_id = -1; + } + + return question_id; + } + /** + * Web service operation + */ + @WebMethod(operationName = "searchQuestions") + @WebResult(name="Question") + public ArrayList searchQuestions(String query) { + ArrayList results = new ArrayList<>(); + + try { + String sql = "SELECT * FROM question WHERE topic LIKE ? OR content LIKE ?"; + PreparedStatement stmt = conn.prepareStatement(sql); + stmt.setString(1,"%"+query+"%"); + stmt.setString(2,"%"+query+"%"); + ResultSet rs = stmt.executeQuery(); + while (rs.next()) { + results.add(new Question(rs.getInt("question_id"),rs.getString("topic"),rs.getString("content"),rs.getInt("user_id"),rs.getString("create_time"),rs.getInt("vote"))); + } + + rs.close(); + stmt.close(); + } catch (SQLException ex) { + Logger.getLogger(QuestionWS.class.getName()).log(Level.SEVERE, null, ex); + } + + return results; + } +} diff --git a/StackExchange WS/src/java/model/user/User.java b/StackExchange WS/src/java/model/user/User.java new file mode 100644 index 00000000..d1c6998e --- /dev/null +++ b/StackExchange WS/src/java/model/user/User.java @@ -0,0 +1,71 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package model.user; + +/** + * + * @author Venny + */ + +import javax.xml.bind.*; +import javax.xml.bind.annotation.*; + +@XmlRootElement(name = "User") +public class User { + + private String name; + private String email; + private String password; + private int user_id; + + public User(){ + user_id=0; + } + + public User(int user_id, String name, String email, String password){ + this.name = name; + this.email = email; + this.password = password; + this.user_id = user_id; + } + + + @XmlElement(name="user_id", required=true) + public int getUserID(){ + return user_id; + } + + + @XmlElement(name="name", required=true) + public String getName() { + return name; + } + + @XmlElement(name="password", required=true) + public String getPassword(){ + return password; + } + + @XmlElement(name="email", required=true) + public String getEmail() { + return email; + } + + public void setUserID(int uid) { + user_id = uid; + } + public void setName(String name) { + this.name = name; + } + + public void setPassword(String password) { + this.password = password; + } + + public void setEmail(String email) { + this.email = email; + } +} diff --git a/StackExchange WS/src/java/model/user/UserWS.java b/StackExchange WS/src/java/model/user/UserWS.java new file mode 100644 index 00000000..c426dc96 --- /dev/null +++ b/StackExchange WS/src/java/model/user/UserWS.java @@ -0,0 +1,150 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package model.user; + +import connection.DB; +import java.sql.Connection; +import java.sql.PreparedStatement; +import java.sql.ResultSet; +import java.sql.SQLException; +import java.sql.Statement; +import java.util.ArrayList; +import java.util.logging.Level; +import java.util.logging.Logger; +import javax.jws.Oneway; +import javax.jws.WebService; +import javax.jws.WebMethod; +import javax.jws.WebParam; +import javax.jws.WebResult; + +/** + * + * @author Venny + */ +@WebService(serviceName = "UserWS") +public class UserWS { + + /* Connect to database */ + Connection conn = DB.connect(); + + /** + * Web service operation + */ + @WebMethod(operationName = "addUser") + @Oneway + public void addUser(@WebParam(name = "u") User u) { + try{ + String sql = "INSERT INTO user (name,email,password) VALUES (?,?,?)"; + PreparedStatement stmt = conn.prepareStatement(sql); + stmt.setString(1,u.getName()); + stmt.setString(2,u.getEmail()); + stmt.setString(3,u.getPassword()); + stmt.executeUpdate(); + stmt.close(); + } catch (SQLException ex) { + Logger.getLogger(UserWS.class.getName()).log + (Level.SEVERE, null, ex); + } + } + + /** + * Web service operation + */ + @WebMethod(operationName = "getUserByID") + @WebResult(name="User") + public User getUserByID (@WebParam(name = "user_id") int user_id) { + ArrayList user = new ArrayList(); + try{ + String sql; + sql = "SELECT * FROM user WHERE user_id = ?"; + PreparedStatement stmt = conn.prepareStatement(sql); + stmt.setInt(1,user_id); + ResultSet rs = stmt.executeQuery(); + + /* Get every data returned by SQL query */ + while(rs.next()){ + user.add(new User( rs.getInt("user_id"), + rs.getString("name"), + rs.getString("email"), + rs.getString("password") + )); + } + rs.close(); + stmt.close(); + } catch (SQLException ex) { + Logger.getLogger(UserWS.class.getName()).log + (Level.SEVERE, null, ex); + } + return user.get(0); + } + + /** + * Web service operation + */ + @WebMethod(operationName = "getIDbyEmail") + @WebResult(name="Integer") + public Integer getIDbyEmail (@WebParam(name = "email") String email) { + int id = -1; + try{ + Statement stmt = conn.createStatement(); + String sql; + sql = "SELECT user_id FROM user WHERE email = ?"; + PreparedStatement dbStatement = conn.prepareStatement(sql); + dbStatement.setString(1, email); + ResultSet rs = dbStatement.executeQuery(); + + while(rs.next()){ + id = rs.getInt("user_id"); + } + rs.close(); + stmt.close(); + } catch (SQLException ex) { + Logger.getLogger(UserWS.class.getName()).log + (Level.SEVERE, null, ex); + } + return id; + } + + /** + * Web service operation + */ + @WebMethod(operationName = "getUserByToken") + @WebResult(name="User") + public User getUserByToken (@WebParam(name = "token") String token) { + User user = new User(); + try{ + Statement stmt = conn.createStatement(); + String sql; + sql = "SELECT user_id FROM token WHERE token_id = ?"; + PreparedStatement dbStatement = conn.prepareStatement(sql); + dbStatement.setString(1, token); + ResultSet rs = dbStatement.executeQuery(); + + while(rs.next()){ + user.setUserID(rs.getInt("user_id")); + } + rs.close(); + + String sql2 = "SELECT * FROM user WHERE user_id = ?"; + PreparedStatement dbStatement2 = conn.prepareStatement(sql); + dbStatement2.setInt(1, user.getUserID()); + ResultSet rs2 = dbStatement2.executeQuery(); + + while(rs2.next()){ + user.setName(rs.getString("name")); + user.setEmail(rs.getString("email")); + user.setPassword(rs.getString("password")); + } + rs2.close(); + stmt.close(); + } catch (SQLException ex) { + Logger.getLogger(UserWS.class.getName()).log + (Level.SEVERE, null, ex); + } + + return user; + } +} diff --git a/StackExchange WS/src/java/model/vote/VoteWS.java b/StackExchange WS/src/java/model/vote/VoteWS.java new file mode 100644 index 00000000..532f54ec --- /dev/null +++ b/StackExchange WS/src/java/model/vote/VoteWS.java @@ -0,0 +1,202 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package model.vote; + +import ConnectionIS.ConnectionIS; +import java.sql.PreparedStatement; +import javax.jws.Oneway; +import javax.jws.WebService; +import javax.jws.WebMethod; +import javax.jws.WebParam; +import connection.DB; +import java.sql.Connection; +import java.sql.ResultSet; +import java.sql.SQLException; +import java.util.logging.Level; +import java.util.logging.Logger; +import javax.jws.WebResult; +import org.json.simple.JSONObject; + +/** + * + * @author ASUS X202E + */ +@WebService(serviceName = "VoteWS") +public class VoteWS { + Connection conn = DB.connect(); + /** + * Web service operation + */ + @WebMethod(operationName = "hasVotedQuestion") + public boolean hasVotedQuestion(@WebParam(name = "question_id") int question_id, @WebParam(name = "user_id") int user_id) { + boolean voted = false; + try { + String sql = "SELECT count(*) AS vote FROM vote_question WHERE question_id = ? AND user_id = ?"; + PreparedStatement stmt = conn.prepareStatement(sql); + stmt.setInt(1, question_id); + stmt.setInt(2, user_id); + ResultSet rs = stmt.executeQuery(); + rs.next(); + if (rs.getInt("vote")!=0) voted = true; + rs.close(); + stmt.close(); + } catch (SQLException ex) { + Logger.getLogger(VoteWS.class.getName()).log(Level.SEVERE, null, ex); + } + return voted; + } + + /** + * Web service operation + */ + @WebMethod(operationName = "hasVotedAnswer") + public boolean hasVotedAnswer(@WebParam(name = "answer_id") int answer_id, @WebParam(name = "user_id") int user_id) { + boolean voted = false; + try { + String sql = "SELECT count(*) AS vote FROM vote_answer WHERE answer_id = ? AND user_id = ?"; + PreparedStatement stmt = conn.prepareStatement(sql); + stmt.setInt(1, answer_id); + stmt.setInt(2, user_id); + ResultSet rs = stmt.executeQuery(); + rs.next(); + if (rs.getInt("vote")!=0) voted = true; + rs.close(); + stmt.close(); + } catch (SQLException ex) { + Logger.getLogger(VoteWS.class.getName()).log(Level.SEVERE, null, ex); + } + return voted; + } + + /** + * Web service operation + */ + @WebMethod(operationName = "getQuestionVotes") + public int getQuestionVotes(@WebParam(name = "question_id") int question_id) { + int votecount = 0; + try { + String sql = "SELECT vote FROM question WHERE question_id = ?"; + PreparedStatement stmt = conn.prepareStatement(sql); + stmt.setInt(1, question_id); + ResultSet rs = stmt.executeQuery(); + rs.next(); + votecount = rs.getInt("vote"); + rs.close(); + stmt.close(); + } catch (SQLException ex) { + Logger.getLogger(VoteWS.class.getName()).log(Level.SEVERE, null, ex); + } + return votecount; + } + + /** + * Web service operation + */ + @WebMethod(operationName = "getAnswerVotes") + public int getAnswerVotes(@WebParam(name = "answer_id") int answer_id) { + int votecount = 0; + try { + String sql = "SELECT vote FROM answer WHERE answer_id = ?"; + PreparedStatement stmt = conn.prepareStatement(sql); + stmt.setInt(1, answer_id); + ResultSet rs = stmt.executeQuery(); + rs.next(); + votecount = rs.getInt("vote"); + rs.close(); + stmt.close(); + } catch (SQLException ex) { + Logger.getLogger(VoteWS.class.getName()).log(Level.SEVERE, null, ex); + } + return votecount; + } + + /** + * Web service operation + */ + @WebMethod(operationName = "voteQuestion") + @WebResult (name="Integer") + public int voteQuestion(@WebParam(name = "token") String token, @WebParam(name = "question_id") int question_id, @WebParam(name = "vote") int vote) { + int result = -1; + + // Send token to IS connector + // Get response in json format + org.json.simple.JSONObject jo = ConnectionIS.requestAuth(token); + + // Parse json + int uid = (int) (long) jo.get("id"); + int status = (int) (long) jo.get("status"); + + // if status ok, insert answer into db, select answer_id + if (status == 1){ + result = 1; + if (!hasVotedQuestion(question_id,uid)) { + try { + String sql = "UPDATE question SET vote = vote+? WHERE question_id = ?"; + PreparedStatement stmt1 = conn.prepareStatement(sql); + stmt1.setInt(1, vote); + stmt1.setInt(2,question_id); + int i = stmt1.executeUpdate(); + stmt1.close(); + if (i>0) { + sql = "INSERT INTO vote_question (question_id, user_id) VALUES (?,?)"; + PreparedStatement stmt2 = conn.prepareStatement(sql); + stmt2.setInt(1,question_id); + stmt2.setInt(2,uid); + stmt2.executeUpdate(); + stmt2.close(); + } + } catch (SQLException ex) { + Logger.getLogger(VoteWS.class.getName()).log(Level.SEVERE, null, ex); + } + } + } + + return result; + } + + /** + * Web service operation + */ + @WebMethod(operationName = "voteAnswer") + @WebResult(name="Integer") + public int voteAnswer(@WebParam(name = "token") String token, @WebParam(name = "answer_id") int answer_id, @WebParam(name = "vote") int vote) { + int result = -1; + + // Send token to IS connector + // Get response in json format + org.json.simple.JSONObject jo = ConnectionIS.requestAuth(token); + + // Parse json + int uid = (int) (long) jo.get("id"); + int status = (int) (long) jo.get("status"); + + // if status ok, insert answer into db, select answer_id + if (status == 1){ + result = 1; + if (!hasVotedAnswer(answer_id,uid)) { + try { + String sql = "UPDATE answer SET vote = vote+? WHERE answer_id = ?"; + PreparedStatement stmt1 = conn.prepareStatement(sql); + stmt1.setInt(1, vote); + stmt1.setInt(2,answer_id); + int i = stmt1.executeUpdate(); + stmt1.close(); + if (i>0) { + sql = "INSERT INTO vote_answer (answer_id, user_id) VALUES (?,?)"; + PreparedStatement stmt2 = conn.prepareStatement(sql); + stmt2.setInt(1,answer_id); + stmt2.setInt(2,uid); + stmt2.executeUpdate(); + stmt2.close(); + } + } catch (SQLException ex) { + Logger.getLogger(VoteWS.class.getName()).log(Level.SEVERE, null, ex); + } + } + } + return result; + } +} diff --git a/StackExchange WS/web/WEB-INF/glassfish-resources.xml b/StackExchange WS/web/WEB-INF/glassfish-resources.xml new file mode 100644 index 00000000..038dbac7 --- /dev/null +++ b/StackExchange WS/web/WEB-INF/glassfish-resources.xml @@ -0,0 +1,12 @@ + + + + + + + + + + + + diff --git a/StackExchange WS/web/WEB-INF/glassfish-web.xml b/StackExchange WS/web/WEB-INF/glassfish-web.xml new file mode 100644 index 00000000..f1b6fadb --- /dev/null +++ b/StackExchange WS/web/WEB-INF/glassfish-web.xml @@ -0,0 +1,11 @@ + + + + /StackExchange_WS + + + + Keep a copy of the generated servlet class' java code. + + + diff --git a/StackExchange WS/web/WEB-INF/lib/mysql-connector-java-5.1.23-bin.jar b/StackExchange WS/web/WEB-INF/lib/mysql-connector-java-5.1.23-bin.jar new file mode 100644 index 00000000..1f904143 Binary files /dev/null and b/StackExchange WS/web/WEB-INF/lib/mysql-connector-java-5.1.23-bin.jar differ diff --git a/StackExchange WS/web/WEB-INF/mysql-connector-java-5.1.23-bin.jar b/StackExchange WS/web/WEB-INF/mysql-connector-java-5.1.23-bin.jar new file mode 100644 index 00000000..1f904143 Binary files /dev/null and b/StackExchange WS/web/WEB-INF/mysql-connector-java-5.1.23-bin.jar differ diff --git a/StackExchange WS/web/WEB-INF/web.xml b/StackExchange WS/web/WEB-INF/web.xml new file mode 100644 index 00000000..6058a367 --- /dev/null +++ b/StackExchange WS/web/WEB-INF/web.xml @@ -0,0 +1,12 @@ + + + + + + 30 + + + diff --git a/StackExchange WS/web/index.html b/StackExchange WS/web/index.html new file mode 100644 index 00000000..c627c249 --- /dev/null +++ b/StackExchange WS/web/index.html @@ -0,0 +1,16 @@ + + + + + TODO supply a title + + + + +
TODO write content
+ + diff --git a/StackExchange_Client/build.xml b/StackExchange_Client/build.xml new file mode 100644 index 00000000..3e4073ce --- /dev/null +++ b/StackExchange_Client/build.xml @@ -0,0 +1,71 @@ + + + + + + + + + + + Builds, tests, and runs the project StackExchange_Client. + + + diff --git a/StackExchange_Client/build/generated-sources/jax-ws/model/answer/AddAnswer.java b/StackExchange_Client/build/generated-sources/jax-ws/model/answer/AddAnswer.java new file mode 100644 index 00000000..a64c5adb --- /dev/null +++ b/StackExchange_Client/build/generated-sources/jax-ws/model/answer/AddAnswer.java @@ -0,0 +1,108 @@ + +package model.answer; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Java class for addAnswer complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="addAnswer">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="token" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
+ *         <element name="question_id" type="{http://www.w3.org/2001/XMLSchema}int"/>
+ *         <element name="content" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "addAnswer", propOrder = { + "token", + "questionId", + "content" +}) +public class AddAnswer { + + protected String token; + @XmlElement(name = "question_id") + protected int questionId; + protected String content; + + /** + * Gets the value of the token property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getToken() { + return token; + } + + /** + * Sets the value of the token property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setToken(String value) { + this.token = value; + } + + /** + * Gets the value of the questionId property. + * + */ + public int getQuestionId() { + return questionId; + } + + /** + * Sets the value of the questionId property. + * + */ + public void setQuestionId(int value) { + this.questionId = value; + } + + /** + * Gets the value of the content property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getContent() { + return content; + } + + /** + * Sets the value of the content property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setContent(String value) { + this.content = value; + } + +} diff --git a/StackExchange_Client/build/generated-sources/jax-ws/model/answer/AddAnswerResponse.java b/StackExchange_Client/build/generated-sources/jax-ws/model/answer/AddAnswerResponse.java new file mode 100644 index 00000000..796281a7 --- /dev/null +++ b/StackExchange_Client/build/generated-sources/jax-ws/model/answer/AddAnswerResponse.java @@ -0,0 +1,54 @@ + +package model.answer; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Java class for addAnswerResponse complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="addAnswerResponse">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="Integer" type="{http://www.w3.org/2001/XMLSchema}int"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "addAnswerResponse", propOrder = { + "integer" +}) +public class AddAnswerResponse { + + @XmlElement(name = "Integer") + protected int integer; + + /** + * Gets the value of the integer property. + * + */ + public int getInteger() { + return integer; + } + + /** + * Sets the value of the integer property. + * + */ + public void setInteger(int value) { + this.integer = value; + } + +} diff --git a/StackExchange_Client/build/generated-sources/jax-ws/model/answer/Answer.java b/StackExchange_Client/build/generated-sources/jax-ws/model/answer/Answer.java new file mode 100644 index 00000000..a030281d --- /dev/null +++ b/StackExchange_Client/build/generated-sources/jax-ws/model/answer/Answer.java @@ -0,0 +1,169 @@ + +package model.answer; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Java class for answer complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="answer">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="answer_id" type="{http://www.w3.org/2001/XMLSchema}int"/>
+ *         <element name="content" type="{http://www.w3.org/2001/XMLSchema}string"/>
+ *         <element name="create_time" type="{http://www.w3.org/2001/XMLSchema}string"/>
+ *         <element name="question_id" type="{http://www.w3.org/2001/XMLSchema}int"/>
+ *         <element name="user_id" type="{http://www.w3.org/2001/XMLSchema}int"/>
+ *         <element name="vote" type="{http://www.w3.org/2001/XMLSchema}int"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "answer", propOrder = { + "answerId", + "content", + "createTime", + "questionId", + "userId", + "vote" +}) +public class Answer { + + @XmlElement(name = "answer_id") + protected int answerId; + @XmlElement(required = true) + protected String content; + @XmlElement(name = "create_time", required = true) + protected String createTime; + @XmlElement(name = "question_id") + protected int questionId; + @XmlElement(name = "user_id") + protected int userId; + protected int vote; + + /** + * Gets the value of the answerId property. + * + */ + public int getAnswerId() { + return answerId; + } + + /** + * Sets the value of the answerId property. + * + */ + public void setAnswerId(int value) { + this.answerId = value; + } + + /** + * Gets the value of the content property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getContent() { + return content; + } + + /** + * Sets the value of the content property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setContent(String value) { + this.content = value; + } + + /** + * Gets the value of the createTime property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getCreateTime() { + return createTime; + } + + /** + * Sets the value of the createTime property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setCreateTime(String value) { + this.createTime = value; + } + + /** + * Gets the value of the questionId property. + * + */ + public int getQuestionId() { + return questionId; + } + + /** + * Sets the value of the questionId property. + * + */ + public void setQuestionId(int value) { + this.questionId = value; + } + + /** + * Gets the value of the userId property. + * + */ + public int getUserId() { + return userId; + } + + /** + * Sets the value of the userId property. + * + */ + public void setUserId(int value) { + this.userId = value; + } + + /** + * Gets the value of the vote property. + * + */ + public int getVote() { + return vote; + } + + /** + * Sets the value of the vote property. + * + */ + public void setVote(int value) { + this.vote = value; + } + +} diff --git a/StackExchange_Client/build/generated-sources/jax-ws/model/answer/AnswerWS.java b/StackExchange_Client/build/generated-sources/jax-ws/model/answer/AnswerWS.java new file mode 100644 index 00000000..f6c25e90 --- /dev/null +++ b/StackExchange_Client/build/generated-sources/jax-ws/model/answer/AnswerWS.java @@ -0,0 +1,94 @@ + +package model.answer; + +import java.util.List; +import javax.jws.WebMethod; +import javax.jws.WebParam; +import javax.jws.WebResult; +import javax.jws.WebService; +import javax.xml.bind.annotation.XmlSeeAlso; +import javax.xml.ws.Action; +import javax.xml.ws.RequestWrapper; +import javax.xml.ws.ResponseWrapper; + + +/** + * This class was generated by the JAX-WS RI. + * JAX-WS RI 2.2.10-b140803.1500 + * Generated source version: 2.2 + * + */ +@WebService(name = "AnswerWS", targetNamespace = "http://answer.model/") +@XmlSeeAlso({ + ObjectFactory.class +}) +public interface AnswerWS { + + + /** + * + * @param questionId + * @return + * returns java.util.List + */ + @WebMethod + @WebResult(name = "Answer", targetNamespace = "") + @RequestWrapper(localName = "getAnswersByQID", targetNamespace = "http://answer.model/", className = "model.answer.GetAnswersByQID") + @ResponseWrapper(localName = "getAnswersByQIDResponse", targetNamespace = "http://answer.model/", className = "model.answer.GetAnswersByQIDResponse") + @Action(input = "http://answer.model/AnswerWS/getAnswersByQIDRequest", output = "http://answer.model/AnswerWS/getAnswersByQIDResponse") + public List getAnswersByQID( + @WebParam(name = "question_id", targetNamespace = "") + int questionId); + + /** + * + * @param answerId + * @return + * returns model.answer.Answer + */ + @WebMethod + @WebResult(name = "Answer", targetNamespace = "") + @RequestWrapper(localName = "getAnswerByID", targetNamespace = "http://answer.model/", className = "model.answer.GetAnswerByID") + @ResponseWrapper(localName = "getAnswerByIDResponse", targetNamespace = "http://answer.model/", className = "model.answer.GetAnswerByIDResponse") + @Action(input = "http://answer.model/AnswerWS/getAnswerByIDRequest", output = "http://answer.model/AnswerWS/getAnswerByIDResponse") + public Answer getAnswerByID( + @WebParam(name = "answer_id", targetNamespace = "") + int answerId); + + /** + * + * @param questionId + * @return + * returns int + */ + @WebMethod + @WebResult(name = "Answer", targetNamespace = "") + @RequestWrapper(localName = "getAnswerCount", targetNamespace = "http://answer.model/", className = "model.answer.GetAnswerCount") + @ResponseWrapper(localName = "getAnswerCountResponse", targetNamespace = "http://answer.model/", className = "model.answer.GetAnswerCountResponse") + @Action(input = "http://answer.model/AnswerWS/getAnswerCountRequest", output = "http://answer.model/AnswerWS/getAnswerCountResponse") + public int getAnswerCount( + @WebParam(name = "question_id", targetNamespace = "") + int questionId); + + /** + * + * @param questionId + * @param content + * @param token + * @return + * returns int + */ + @WebMethod + @WebResult(name = "Integer", targetNamespace = "") + @RequestWrapper(localName = "addAnswer", targetNamespace = "http://answer.model/", className = "model.answer.AddAnswer") + @ResponseWrapper(localName = "addAnswerResponse", targetNamespace = "http://answer.model/", className = "model.answer.AddAnswerResponse") + @Action(input = "http://answer.model/AnswerWS/addAnswerRequest", output = "http://answer.model/AnswerWS/addAnswerResponse") + public int addAnswer( + @WebParam(name = "token", targetNamespace = "") + String token, + @WebParam(name = "question_id", targetNamespace = "") + int questionId, + @WebParam(name = "content", targetNamespace = "") + String content); + +} diff --git a/StackExchange_Client/build/generated-sources/jax-ws/model/answer/AnswerWS_Service.java b/StackExchange_Client/build/generated-sources/jax-ws/model/answer/AnswerWS_Service.java new file mode 100644 index 00000000..a29a366b --- /dev/null +++ b/StackExchange_Client/build/generated-sources/jax-ws/model/answer/AnswerWS_Service.java @@ -0,0 +1,94 @@ + +package model.answer; + +import java.net.MalformedURLException; +import java.net.URL; +import javax.xml.namespace.QName; +import javax.xml.ws.Service; +import javax.xml.ws.WebEndpoint; +import javax.xml.ws.WebServiceClient; +import javax.xml.ws.WebServiceException; +import javax.xml.ws.WebServiceFeature; + + +/** + * This class was generated by the JAX-WS RI. + * JAX-WS RI 2.2.10-b140803.1500 + * Generated source version: 2.2 + * + */ +@WebServiceClient(name = "AnswerWS", targetNamespace = "http://answer.model/", wsdlLocation = "http://localhost:8081/StackExchange_WS/AnswerWS?wsdl") +public class AnswerWS_Service + extends Service +{ + + private final static URL ANSWERWS_WSDL_LOCATION; + private final static WebServiceException ANSWERWS_EXCEPTION; + private final static QName ANSWERWS_QNAME = new QName("http://answer.model/", "AnswerWS"); + + static { + URL url = null; + WebServiceException e = null; + try { + url = new URL("http://localhost:8081/StackExchange_WS/AnswerWS?wsdl"); + } catch (MalformedURLException ex) { + e = new WebServiceException(ex); + } + ANSWERWS_WSDL_LOCATION = url; + ANSWERWS_EXCEPTION = e; + } + + public AnswerWS_Service() { + super(__getWsdlLocation(), ANSWERWS_QNAME); + } + + public AnswerWS_Service(WebServiceFeature... features) { + super(__getWsdlLocation(), ANSWERWS_QNAME, features); + } + + public AnswerWS_Service(URL wsdlLocation) { + super(wsdlLocation, ANSWERWS_QNAME); + } + + public AnswerWS_Service(URL wsdlLocation, WebServiceFeature... features) { + super(wsdlLocation, ANSWERWS_QNAME, features); + } + + public AnswerWS_Service(URL wsdlLocation, QName serviceName) { + super(wsdlLocation, serviceName); + } + + public AnswerWS_Service(URL wsdlLocation, QName serviceName, WebServiceFeature... features) { + super(wsdlLocation, serviceName, features); + } + + /** + * + * @return + * returns AnswerWS + */ + @WebEndpoint(name = "AnswerWSPort") + public AnswerWS getAnswerWSPort() { + return super.getPort(new QName("http://answer.model/", "AnswerWSPort"), AnswerWS.class); + } + + /** + * + * @param features + * A list of {@link javax.xml.ws.WebServiceFeature} to configure on the proxy. Supported features not in the features parameter will have their default values. + * @return + * returns AnswerWS + */ + @WebEndpoint(name = "AnswerWSPort") + public AnswerWS getAnswerWSPort(WebServiceFeature... features) { + return super.getPort(new QName("http://answer.model/", "AnswerWSPort"), AnswerWS.class, features); + } + + private static URL __getWsdlLocation() { + if (ANSWERWS_EXCEPTION!= null) { + throw ANSWERWS_EXCEPTION; + } + return ANSWERWS_WSDL_LOCATION; + } + +} diff --git a/StackExchange_Client/build/generated-sources/jax-ws/model/answer/GetAnswerByID.java b/StackExchange_Client/build/generated-sources/jax-ws/model/answer/GetAnswerByID.java new file mode 100644 index 00000000..2ebc13c6 --- /dev/null +++ b/StackExchange_Client/build/generated-sources/jax-ws/model/answer/GetAnswerByID.java @@ -0,0 +1,54 @@ + +package model.answer; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Java class for getAnswerByID complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="getAnswerByID">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="answer_id" type="{http://www.w3.org/2001/XMLSchema}int"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "getAnswerByID", propOrder = { + "answerId" +}) +public class GetAnswerByID { + + @XmlElement(name = "answer_id") + protected int answerId; + + /** + * Gets the value of the answerId property. + * + */ + public int getAnswerId() { + return answerId; + } + + /** + * Sets the value of the answerId property. + * + */ + public void setAnswerId(int value) { + this.answerId = value; + } + +} diff --git a/StackExchange_Client/build/generated-sources/jax-ws/model/answer/GetAnswerByIDResponse.java b/StackExchange_Client/build/generated-sources/jax-ws/model/answer/GetAnswerByIDResponse.java new file mode 100644 index 00000000..3f4976b7 --- /dev/null +++ b/StackExchange_Client/build/generated-sources/jax-ws/model/answer/GetAnswerByIDResponse.java @@ -0,0 +1,62 @@ + +package model.answer; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Java class for getAnswerByIDResponse complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="getAnswerByIDResponse">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="Answer" type="{http://answer.model/}answer" minOccurs="0"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "getAnswerByIDResponse", propOrder = { + "answer" +}) +public class GetAnswerByIDResponse { + + @XmlElement(name = "Answer") + protected Answer answer; + + /** + * Gets the value of the answer property. + * + * @return + * possible object is + * {@link Answer } + * + */ + public Answer getAnswer() { + return answer; + } + + /** + * Sets the value of the answer property. + * + * @param value + * allowed object is + * {@link Answer } + * + */ + public void setAnswer(Answer value) { + this.answer = value; + } + +} diff --git a/StackExchange_Client/build/generated-sources/jax-ws/model/answer/GetAnswerCount.java b/StackExchange_Client/build/generated-sources/jax-ws/model/answer/GetAnswerCount.java new file mode 100644 index 00000000..bf130b04 --- /dev/null +++ b/StackExchange_Client/build/generated-sources/jax-ws/model/answer/GetAnswerCount.java @@ -0,0 +1,54 @@ + +package model.answer; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Java class for getAnswerCount complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="getAnswerCount">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="question_id" type="{http://www.w3.org/2001/XMLSchema}int"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "getAnswerCount", propOrder = { + "questionId" +}) +public class GetAnswerCount { + + @XmlElement(name = "question_id") + protected int questionId; + + /** + * Gets the value of the questionId property. + * + */ + public int getQuestionId() { + return questionId; + } + + /** + * Sets the value of the questionId property. + * + */ + public void setQuestionId(int value) { + this.questionId = value; + } + +} diff --git a/StackExchange_Client/build/generated-sources/jax-ws/model/answer/GetAnswerCountResponse.java b/StackExchange_Client/build/generated-sources/jax-ws/model/answer/GetAnswerCountResponse.java new file mode 100644 index 00000000..21eef5c8 --- /dev/null +++ b/StackExchange_Client/build/generated-sources/jax-ws/model/answer/GetAnswerCountResponse.java @@ -0,0 +1,54 @@ + +package model.answer; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Java class for getAnswerCountResponse complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="getAnswerCountResponse">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="Answer" type="{http://www.w3.org/2001/XMLSchema}int"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "getAnswerCountResponse", propOrder = { + "answer" +}) +public class GetAnswerCountResponse { + + @XmlElement(name = "Answer") + protected int answer; + + /** + * Gets the value of the answer property. + * + */ + public int getAnswer() { + return answer; + } + + /** + * Sets the value of the answer property. + * + */ + public void setAnswer(int value) { + this.answer = value; + } + +} diff --git a/StackExchange_Client/build/generated-sources/jax-ws/model/answer/GetAnswersByQID.java b/StackExchange_Client/build/generated-sources/jax-ws/model/answer/GetAnswersByQID.java new file mode 100644 index 00000000..9745f43f --- /dev/null +++ b/StackExchange_Client/build/generated-sources/jax-ws/model/answer/GetAnswersByQID.java @@ -0,0 +1,54 @@ + +package model.answer; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Java class for getAnswersByQID complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="getAnswersByQID">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="question_id" type="{http://www.w3.org/2001/XMLSchema}int"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "getAnswersByQID", propOrder = { + "questionId" +}) +public class GetAnswersByQID { + + @XmlElement(name = "question_id") + protected int questionId; + + /** + * Gets the value of the questionId property. + * + */ + public int getQuestionId() { + return questionId; + } + + /** + * Sets the value of the questionId property. + * + */ + public void setQuestionId(int value) { + this.questionId = value; + } + +} diff --git a/StackExchange_Client/build/generated-sources/jax-ws/model/answer/GetAnswersByQIDResponse.java b/StackExchange_Client/build/generated-sources/jax-ws/model/answer/GetAnswersByQIDResponse.java new file mode 100644 index 00000000..e03b3c01 --- /dev/null +++ b/StackExchange_Client/build/generated-sources/jax-ws/model/answer/GetAnswersByQIDResponse.java @@ -0,0 +1,69 @@ + +package model.answer; + +import java.util.ArrayList; +import java.util.List; +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Java class for getAnswersByQIDResponse complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="getAnswersByQIDResponse">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="Answer" type="{http://answer.model/}answer" maxOccurs="unbounded" minOccurs="0"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "getAnswersByQIDResponse", propOrder = { + "answer" +}) +public class GetAnswersByQIDResponse { + + @XmlElement(name = "Answer") + protected List answer; + + /** + * Gets the value of the answer property. + * + *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the answer property. + * + *

+ * For example, to add a new item, do as follows: + *

+     *    getAnswer().add(newItem);
+     * 
+ * + * + *

+ * Objects of the following type(s) are allowed in the list + * {@link Answer } + * + * + */ + public List getAnswer() { + if (answer == null) { + answer = new ArrayList(); + } + return this.answer; + } + +} diff --git a/StackExchange_Client/build/generated-sources/jax-ws/model/answer/ObjectFactory.java b/StackExchange_Client/build/generated-sources/jax-ws/model/answer/ObjectFactory.java new file mode 100644 index 00000000..ebf79855 --- /dev/null +++ b/StackExchange_Client/build/generated-sources/jax-ws/model/answer/ObjectFactory.java @@ -0,0 +1,187 @@ + +package model.answer; + +import javax.xml.bind.JAXBElement; +import javax.xml.bind.annotation.XmlElementDecl; +import javax.xml.bind.annotation.XmlRegistry; +import javax.xml.namespace.QName; + + +/** + * This object contains factory methods for each + * Java content interface and Java element interface + * generated in the model.answer package. + *

An ObjectFactory allows you to programatically + * construct new instances of the Java representation + * for XML content. The Java representation of XML + * content can consist of schema derived interfaces + * and classes representing the binding of schema + * type definitions, element declarations and model + * groups. Factory methods for each of these are + * provided in this class. + * + */ +@XmlRegistry +public class ObjectFactory { + + private final static QName _GetAnswerByIDResponse_QNAME = new QName("http://answer.model/", "getAnswerByIDResponse"); + private final static QName _GetAnswerCount_QNAME = new QName("http://answer.model/", "getAnswerCount"); + private final static QName _GetAnswersByQIDResponse_QNAME = new QName("http://answer.model/", "getAnswersByQIDResponse"); + private final static QName _GetAnswerCountResponse_QNAME = new QName("http://answer.model/", "getAnswerCountResponse"); + private final static QName _AddAnswerResponse_QNAME = new QName("http://answer.model/", "addAnswerResponse"); + private final static QName _AddAnswer_QNAME = new QName("http://answer.model/", "addAnswer"); + private final static QName _GetAnswerByID_QNAME = new QName("http://answer.model/", "getAnswerByID"); + private final static QName _GetAnswersByQID_QNAME = new QName("http://answer.model/", "getAnswersByQID"); + + /** + * Create a new ObjectFactory that can be used to create new instances of schema derived classes for package: model.answer + * + */ + public ObjectFactory() { + } + + /** + * Create an instance of {@link GetAnswerByIDResponse } + * + */ + public GetAnswerByIDResponse createGetAnswerByIDResponse() { + return new GetAnswerByIDResponse(); + } + + /** + * Create an instance of {@link GetAnswerCount } + * + */ + public GetAnswerCount createGetAnswerCount() { + return new GetAnswerCount(); + } + + /** + * Create an instance of {@link GetAnswerCountResponse } + * + */ + public GetAnswerCountResponse createGetAnswerCountResponse() { + return new GetAnswerCountResponse(); + } + + /** + * Create an instance of {@link GetAnswersByQIDResponse } + * + */ + public GetAnswersByQIDResponse createGetAnswersByQIDResponse() { + return new GetAnswersByQIDResponse(); + } + + /** + * Create an instance of {@link AddAnswerResponse } + * + */ + public AddAnswerResponse createAddAnswerResponse() { + return new AddAnswerResponse(); + } + + /** + * Create an instance of {@link AddAnswer } + * + */ + public AddAnswer createAddAnswer() { + return new AddAnswer(); + } + + /** + * Create an instance of {@link GetAnswerByID } + * + */ + public GetAnswerByID createGetAnswerByID() { + return new GetAnswerByID(); + } + + /** + * Create an instance of {@link GetAnswersByQID } + * + */ + public GetAnswersByQID createGetAnswersByQID() { + return new GetAnswersByQID(); + } + + /** + * Create an instance of {@link Answer } + * + */ + public Answer createAnswer() { + return new Answer(); + } + + /** + * Create an instance of {@link JAXBElement }{@code <}{@link GetAnswerByIDResponse }{@code >}} + * + */ + @XmlElementDecl(namespace = "http://answer.model/", name = "getAnswerByIDResponse") + public JAXBElement createGetAnswerByIDResponse(GetAnswerByIDResponse value) { + return new JAXBElement(_GetAnswerByIDResponse_QNAME, GetAnswerByIDResponse.class, null, value); + } + + /** + * Create an instance of {@link JAXBElement }{@code <}{@link GetAnswerCount }{@code >}} + * + */ + @XmlElementDecl(namespace = "http://answer.model/", name = "getAnswerCount") + public JAXBElement createGetAnswerCount(GetAnswerCount value) { + return new JAXBElement(_GetAnswerCount_QNAME, GetAnswerCount.class, null, value); + } + + /** + * Create an instance of {@link JAXBElement }{@code <}{@link GetAnswersByQIDResponse }{@code >}} + * + */ + @XmlElementDecl(namespace = "http://answer.model/", name = "getAnswersByQIDResponse") + public JAXBElement createGetAnswersByQIDResponse(GetAnswersByQIDResponse value) { + return new JAXBElement(_GetAnswersByQIDResponse_QNAME, GetAnswersByQIDResponse.class, null, value); + } + + /** + * Create an instance of {@link JAXBElement }{@code <}{@link GetAnswerCountResponse }{@code >}} + * + */ + @XmlElementDecl(namespace = "http://answer.model/", name = "getAnswerCountResponse") + public JAXBElement createGetAnswerCountResponse(GetAnswerCountResponse value) { + return new JAXBElement(_GetAnswerCountResponse_QNAME, GetAnswerCountResponse.class, null, value); + } + + /** + * Create an instance of {@link JAXBElement }{@code <}{@link AddAnswerResponse }{@code >}} + * + */ + @XmlElementDecl(namespace = "http://answer.model/", name = "addAnswerResponse") + public JAXBElement createAddAnswerResponse(AddAnswerResponse value) { + return new JAXBElement(_AddAnswerResponse_QNAME, AddAnswerResponse.class, null, value); + } + + /** + * Create an instance of {@link JAXBElement }{@code <}{@link AddAnswer }{@code >}} + * + */ + @XmlElementDecl(namespace = "http://answer.model/", name = "addAnswer") + public JAXBElement createAddAnswer(AddAnswer value) { + return new JAXBElement(_AddAnswer_QNAME, AddAnswer.class, null, value); + } + + /** + * Create an instance of {@link JAXBElement }{@code <}{@link GetAnswerByID }{@code >}} + * + */ + @XmlElementDecl(namespace = "http://answer.model/", name = "getAnswerByID") + public JAXBElement createGetAnswerByID(GetAnswerByID value) { + return new JAXBElement(_GetAnswerByID_QNAME, GetAnswerByID.class, null, value); + } + + /** + * Create an instance of {@link JAXBElement }{@code <}{@link GetAnswersByQID }{@code >}} + * + */ + @XmlElementDecl(namespace = "http://answer.model/", name = "getAnswersByQID") + public JAXBElement createGetAnswersByQID(GetAnswersByQID value) { + return new JAXBElement(_GetAnswersByQID_QNAME, GetAnswersByQID.class, null, value); + } + +} diff --git a/StackExchange_Client/build/generated-sources/jax-ws/model/answer/package-info.java b/StackExchange_Client/build/generated-sources/jax-ws/model/answer/package-info.java new file mode 100644 index 00000000..20abf007 --- /dev/null +++ b/StackExchange_Client/build/generated-sources/jax-ws/model/answer/package-info.java @@ -0,0 +1,2 @@ +@javax.xml.bind.annotation.XmlSchema(namespace = "http://answer.model/") +package model.answer; diff --git a/StackExchange_Client/build/generated-sources/jax-ws/model/question/AddQuestion.java b/StackExchange_Client/build/generated-sources/jax-ws/model/question/AddQuestion.java new file mode 100644 index 00000000..754d3e03 --- /dev/null +++ b/StackExchange_Client/build/generated-sources/jax-ws/model/question/AddQuestion.java @@ -0,0 +1,114 @@ + +package model.question; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Java class for addQuestion complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="addQuestion">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="token" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
+ *         <element name="topic" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
+ *         <element name="content" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "addQuestion", propOrder = { + "token", + "topic", + "content" +}) +public class AddQuestion { + + protected String token; + protected String topic; + protected String content; + + /** + * Gets the value of the token property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getToken() { + return token; + } + + /** + * Sets the value of the token property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setToken(String value) { + this.token = value; + } + + /** + * Gets the value of the topic property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getTopic() { + return topic; + } + + /** + * Sets the value of the topic property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setTopic(String value) { + this.topic = value; + } + + /** + * Gets the value of the content property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getContent() { + return content; + } + + /** + * Sets the value of the content property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setContent(String value) { + this.content = value; + } + +} diff --git a/StackExchange_Client/build/generated-sources/jax-ws/model/question/AddQuestionResponse.java b/StackExchange_Client/build/generated-sources/jax-ws/model/question/AddQuestionResponse.java new file mode 100644 index 00000000..6cb67941 --- /dev/null +++ b/StackExchange_Client/build/generated-sources/jax-ws/model/question/AddQuestionResponse.java @@ -0,0 +1,54 @@ + +package model.question; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Java class for addQuestionResponse complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="addQuestionResponse">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="Integer" type="{http://www.w3.org/2001/XMLSchema}int"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "addQuestionResponse", propOrder = { + "integer" +}) +public class AddQuestionResponse { + + @XmlElement(name = "Integer") + protected int integer; + + /** + * Gets the value of the integer property. + * + */ + public int getInteger() { + return integer; + } + + /** + * Sets the value of the integer property. + * + */ + public void setInteger(int value) { + this.integer = value; + } + +} diff --git a/StackExchange_Client/build/generated-sources/jax-ws/model/question/DeleteQuestion.java b/StackExchange_Client/build/generated-sources/jax-ws/model/question/DeleteQuestion.java new file mode 100644 index 00000000..e7d74bcf --- /dev/null +++ b/StackExchange_Client/build/generated-sources/jax-ws/model/question/DeleteQuestion.java @@ -0,0 +1,81 @@ + +package model.question; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Java class for deleteQuestion complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="deleteQuestion">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="token" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
+ *         <element name="question_id" type="{http://www.w3.org/2001/XMLSchema}int"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "deleteQuestion", propOrder = { + "token", + "questionId" +}) +public class DeleteQuestion { + + protected String token; + @XmlElement(name = "question_id") + protected int questionId; + + /** + * Gets the value of the token property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getToken() { + return token; + } + + /** + * Sets the value of the token property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setToken(String value) { + this.token = value; + } + + /** + * Gets the value of the questionId property. + * + */ + public int getQuestionId() { + return questionId; + } + + /** + * Sets the value of the questionId property. + * + */ + public void setQuestionId(int value) { + this.questionId = value; + } + +} diff --git a/StackExchange_Client/build/generated-sources/jax-ws/model/question/DeleteQuestionResponse.java b/StackExchange_Client/build/generated-sources/jax-ws/model/question/DeleteQuestionResponse.java new file mode 100644 index 00000000..ab19b319 --- /dev/null +++ b/StackExchange_Client/build/generated-sources/jax-ws/model/question/DeleteQuestionResponse.java @@ -0,0 +1,54 @@ + +package model.question; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Java class for deleteQuestionResponse complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="deleteQuestionResponse">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="Integer" type="{http://www.w3.org/2001/XMLSchema}int"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "deleteQuestionResponse", propOrder = { + "integer" +}) +public class DeleteQuestionResponse { + + @XmlElement(name = "Integer") + protected int integer; + + /** + * Gets the value of the integer property. + * + */ + public int getInteger() { + return integer; + } + + /** + * Sets the value of the integer property. + * + */ + public void setInteger(int value) { + this.integer = value; + } + +} diff --git a/StackExchange_Client/build/generated-sources/jax-ws/model/question/EditQuestion.java b/StackExchange_Client/build/generated-sources/jax-ws/model/question/EditQuestion.java new file mode 100644 index 00000000..d30aff72 --- /dev/null +++ b/StackExchange_Client/build/generated-sources/jax-ws/model/question/EditQuestion.java @@ -0,0 +1,135 @@ + +package model.question; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Java class for editQuestion complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="editQuestion">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="token" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
+ *         <element name="question_id" type="{http://www.w3.org/2001/XMLSchema}int"/>
+ *         <element name="topic" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
+ *         <element name="content" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "editQuestion", propOrder = { + "token", + "questionId", + "topic", + "content" +}) +public class EditQuestion { + + protected String token; + @XmlElement(name = "question_id") + protected int questionId; + protected String topic; + protected String content; + + /** + * Gets the value of the token property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getToken() { + return token; + } + + /** + * Sets the value of the token property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setToken(String value) { + this.token = value; + } + + /** + * Gets the value of the questionId property. + * + */ + public int getQuestionId() { + return questionId; + } + + /** + * Sets the value of the questionId property. + * + */ + public void setQuestionId(int value) { + this.questionId = value; + } + + /** + * Gets the value of the topic property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getTopic() { + return topic; + } + + /** + * Sets the value of the topic property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setTopic(String value) { + this.topic = value; + } + + /** + * Gets the value of the content property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getContent() { + return content; + } + + /** + * Sets the value of the content property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setContent(String value) { + this.content = value; + } + +} diff --git a/StackExchange_Client/build/generated-sources/jax-ws/model/question/EditQuestionResponse.java b/StackExchange_Client/build/generated-sources/jax-ws/model/question/EditQuestionResponse.java new file mode 100644 index 00000000..f20985fe --- /dev/null +++ b/StackExchange_Client/build/generated-sources/jax-ws/model/question/EditQuestionResponse.java @@ -0,0 +1,54 @@ + +package model.question; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Java class for editQuestionResponse complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="editQuestionResponse">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="Integer" type="{http://www.w3.org/2001/XMLSchema}int"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "editQuestionResponse", propOrder = { + "integer" +}) +public class EditQuestionResponse { + + @XmlElement(name = "Integer") + protected int integer; + + /** + * Gets the value of the integer property. + * + */ + public int getInteger() { + return integer; + } + + /** + * Sets the value of the integer property. + * + */ + public void setInteger(int value) { + this.integer = value; + } + +} diff --git a/StackExchange_Client/build/generated-sources/jax-ws/model/question/GetAllQuestions.java b/StackExchange_Client/build/generated-sources/jax-ws/model/question/GetAllQuestions.java new file mode 100644 index 00000000..5a360aaf --- /dev/null +++ b/StackExchange_Client/build/generated-sources/jax-ws/model/question/GetAllQuestions.java @@ -0,0 +1,32 @@ + +package model.question; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Java class for getAllQuestions complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="getAllQuestions">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "getAllQuestions") +public class GetAllQuestions { + + +} diff --git a/StackExchange_Client/build/generated-sources/jax-ws/model/question/GetAllQuestionsResponse.java b/StackExchange_Client/build/generated-sources/jax-ws/model/question/GetAllQuestionsResponse.java new file mode 100644 index 00000000..34a6d40d --- /dev/null +++ b/StackExchange_Client/build/generated-sources/jax-ws/model/question/GetAllQuestionsResponse.java @@ -0,0 +1,69 @@ + +package model.question; + +import java.util.ArrayList; +import java.util.List; +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Java class for getAllQuestionsResponse complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="getAllQuestionsResponse">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="Question" type="{http://question.model/}question" maxOccurs="unbounded" minOccurs="0"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "getAllQuestionsResponse", propOrder = { + "question" +}) +public class GetAllQuestionsResponse { + + @XmlElement(name = "Question") + protected List question; + + /** + * Gets the value of the question property. + * + *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the question property. + * + *

+ * For example, to add a new item, do as follows: + *

+     *    getQuestion().add(newItem);
+     * 
+ * + * + *

+ * Objects of the following type(s) are allowed in the list + * {@link Question } + * + * + */ + public List getQuestion() { + if (question == null) { + question = new ArrayList(); + } + return this.question; + } + +} diff --git a/StackExchange_Client/build/generated-sources/jax-ws/model/question/GetQuestionByID.java b/StackExchange_Client/build/generated-sources/jax-ws/model/question/GetQuestionByID.java new file mode 100644 index 00000000..a381fd0e --- /dev/null +++ b/StackExchange_Client/build/generated-sources/jax-ws/model/question/GetQuestionByID.java @@ -0,0 +1,54 @@ + +package model.question; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Java class for getQuestionByID complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="getQuestionByID">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="question_id" type="{http://www.w3.org/2001/XMLSchema}int"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "getQuestionByID", propOrder = { + "questionId" +}) +public class GetQuestionByID { + + @XmlElement(name = "question_id") + protected int questionId; + + /** + * Gets the value of the questionId property. + * + */ + public int getQuestionId() { + return questionId; + } + + /** + * Sets the value of the questionId property. + * + */ + public void setQuestionId(int value) { + this.questionId = value; + } + +} diff --git a/StackExchange_Client/build/generated-sources/jax-ws/model/question/GetQuestionByIDResponse.java b/StackExchange_Client/build/generated-sources/jax-ws/model/question/GetQuestionByIDResponse.java new file mode 100644 index 00000000..21f8da4b --- /dev/null +++ b/StackExchange_Client/build/generated-sources/jax-ws/model/question/GetQuestionByIDResponse.java @@ -0,0 +1,62 @@ + +package model.question; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Java class for getQuestionByIDResponse complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="getQuestionByIDResponse">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="Question" type="{http://question.model/}question" minOccurs="0"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "getQuestionByIDResponse", propOrder = { + "question" +}) +public class GetQuestionByIDResponse { + + @XmlElement(name = "Question") + protected Question question; + + /** + * Gets the value of the question property. + * + * @return + * possible object is + * {@link Question } + * + */ + public Question getQuestion() { + return question; + } + + /** + * Sets the value of the question property. + * + * @param value + * allowed object is + * {@link Question } + * + */ + public void setQuestion(Question value) { + this.question = value; + } + +} diff --git a/StackExchange_Client/build/generated-sources/jax-ws/model/question/ObjectFactory.java b/StackExchange_Client/build/generated-sources/jax-ws/model/question/ObjectFactory.java new file mode 100644 index 00000000..68e0c3ad --- /dev/null +++ b/StackExchange_Client/build/generated-sources/jax-ws/model/question/ObjectFactory.java @@ -0,0 +1,269 @@ + +package model.question; + +import javax.xml.bind.JAXBElement; +import javax.xml.bind.annotation.XmlElementDecl; +import javax.xml.bind.annotation.XmlRegistry; +import javax.xml.namespace.QName; + + +/** + * This object contains factory methods for each + * Java content interface and Java element interface + * generated in the model.question package. + *

An ObjectFactory allows you to programatically + * construct new instances of the Java representation + * for XML content. The Java representation of XML + * content can consist of schema derived interfaces + * and classes representing the binding of schema + * type definitions, element declarations and model + * groups. Factory methods for each of these are + * provided in this class. + * + */ +@XmlRegistry +public class ObjectFactory { + + private final static QName _AddQuestion_QNAME = new QName("http://question.model/", "addQuestion"); + private final static QName _GetAllQuestionsResponse_QNAME = new QName("http://question.model/", "getAllQuestionsResponse"); + private final static QName _EditQuestionResponse_QNAME = new QName("http://question.model/", "editQuestionResponse"); + private final static QName _DeleteQuestionResponse_QNAME = new QName("http://question.model/", "deleteQuestionResponse"); + private final static QName _AddQuestionResponse_QNAME = new QName("http://question.model/", "addQuestionResponse"); + private final static QName _GetQuestionByID_QNAME = new QName("http://question.model/", "getQuestionByID"); + private final static QName _Question_QNAME = new QName("http://question.model/", "Question"); + private final static QName _EditQuestion_QNAME = new QName("http://question.model/", "editQuestion"); + private final static QName _SearchQuestionsResponse_QNAME = new QName("http://question.model/", "searchQuestionsResponse"); + private final static QName _GetAllQuestions_QNAME = new QName("http://question.model/", "getAllQuestions"); + private final static QName _DeleteQuestion_QNAME = new QName("http://question.model/", "deleteQuestion"); + private final static QName _GetQuestionByIDResponse_QNAME = new QName("http://question.model/", "getQuestionByIDResponse"); + private final static QName _SearchQuestions_QNAME = new QName("http://question.model/", "searchQuestions"); + + /** + * Create a new ObjectFactory that can be used to create new instances of schema derived classes for package: model.question + * + */ + public ObjectFactory() { + } + + /** + * Create an instance of {@link AddQuestionResponse } + * + */ + public AddQuestionResponse createAddQuestionResponse() { + return new AddQuestionResponse(); + } + + /** + * Create an instance of {@link GetQuestionByID } + * + */ + public GetQuestionByID createGetQuestionByID() { + return new GetQuestionByID(); + } + + /** + * Create an instance of {@link AddQuestion } + * + */ + public AddQuestion createAddQuestion() { + return new AddQuestion(); + } + + /** + * Create an instance of {@link GetAllQuestionsResponse } + * + */ + public GetAllQuestionsResponse createGetAllQuestionsResponse() { + return new GetAllQuestionsResponse(); + } + + /** + * Create an instance of {@link DeleteQuestionResponse } + * + */ + public DeleteQuestionResponse createDeleteQuestionResponse() { + return new DeleteQuestionResponse(); + } + + /** + * Create an instance of {@link EditQuestionResponse } + * + */ + public EditQuestionResponse createEditQuestionResponse() { + return new EditQuestionResponse(); + } + + /** + * Create an instance of {@link SearchQuestionsResponse } + * + */ + public SearchQuestionsResponse createSearchQuestionsResponse() { + return new SearchQuestionsResponse(); + } + + /** + * Create an instance of {@link GetAllQuestions } + * + */ + public GetAllQuestions createGetAllQuestions() { + return new GetAllQuestions(); + } + + /** + * Create an instance of {@link DeleteQuestion } + * + */ + public DeleteQuestion createDeleteQuestion() { + return new DeleteQuestion(); + } + + /** + * Create an instance of {@link GetQuestionByIDResponse } + * + */ + public GetQuestionByIDResponse createGetQuestionByIDResponse() { + return new GetQuestionByIDResponse(); + } + + /** + * Create an instance of {@link SearchQuestions } + * + */ + public SearchQuestions createSearchQuestions() { + return new SearchQuestions(); + } + + /** + * Create an instance of {@link Question } + * + */ + public Question createQuestion() { + return new Question(); + } + + /** + * Create an instance of {@link EditQuestion } + * + */ + public EditQuestion createEditQuestion() { + return new EditQuestion(); + } + + /** + * Create an instance of {@link JAXBElement }{@code <}{@link AddQuestion }{@code >}} + * + */ + @XmlElementDecl(namespace = "http://question.model/", name = "addQuestion") + public JAXBElement createAddQuestion(AddQuestion value) { + return new JAXBElement(_AddQuestion_QNAME, AddQuestion.class, null, value); + } + + /** + * Create an instance of {@link JAXBElement }{@code <}{@link GetAllQuestionsResponse }{@code >}} + * + */ + @XmlElementDecl(namespace = "http://question.model/", name = "getAllQuestionsResponse") + public JAXBElement createGetAllQuestionsResponse(GetAllQuestionsResponse value) { + return new JAXBElement(_GetAllQuestionsResponse_QNAME, GetAllQuestionsResponse.class, null, value); + } + + /** + * Create an instance of {@link JAXBElement }{@code <}{@link EditQuestionResponse }{@code >}} + * + */ + @XmlElementDecl(namespace = "http://question.model/", name = "editQuestionResponse") + public JAXBElement createEditQuestionResponse(EditQuestionResponse value) { + return new JAXBElement(_EditQuestionResponse_QNAME, EditQuestionResponse.class, null, value); + } + + /** + * Create an instance of {@link JAXBElement }{@code <}{@link DeleteQuestionResponse }{@code >}} + * + */ + @XmlElementDecl(namespace = "http://question.model/", name = "deleteQuestionResponse") + public JAXBElement createDeleteQuestionResponse(DeleteQuestionResponse value) { + return new JAXBElement(_DeleteQuestionResponse_QNAME, DeleteQuestionResponse.class, null, value); + } + + /** + * Create an instance of {@link JAXBElement }{@code <}{@link AddQuestionResponse }{@code >}} + * + */ + @XmlElementDecl(namespace = "http://question.model/", name = "addQuestionResponse") + public JAXBElement createAddQuestionResponse(AddQuestionResponse value) { + return new JAXBElement(_AddQuestionResponse_QNAME, AddQuestionResponse.class, null, value); + } + + /** + * Create an instance of {@link JAXBElement }{@code <}{@link GetQuestionByID }{@code >}} + * + */ + @XmlElementDecl(namespace = "http://question.model/", name = "getQuestionByID") + public JAXBElement createGetQuestionByID(GetQuestionByID value) { + return new JAXBElement(_GetQuestionByID_QNAME, GetQuestionByID.class, null, value); + } + + /** + * Create an instance of {@link JAXBElement }{@code <}{@link Question }{@code >}} + * + */ + @XmlElementDecl(namespace = "http://question.model/", name = "Question") + public JAXBElement createQuestion(Question value) { + return new JAXBElement(_Question_QNAME, Question.class, null, value); + } + + /** + * Create an instance of {@link JAXBElement }{@code <}{@link EditQuestion }{@code >}} + * + */ + @XmlElementDecl(namespace = "http://question.model/", name = "editQuestion") + public JAXBElement createEditQuestion(EditQuestion value) { + return new JAXBElement(_EditQuestion_QNAME, EditQuestion.class, null, value); + } + + /** + * Create an instance of {@link JAXBElement }{@code <}{@link SearchQuestionsResponse }{@code >}} + * + */ + @XmlElementDecl(namespace = "http://question.model/", name = "searchQuestionsResponse") + public JAXBElement createSearchQuestionsResponse(SearchQuestionsResponse value) { + return new JAXBElement(_SearchQuestionsResponse_QNAME, SearchQuestionsResponse.class, null, value); + } + + /** + * Create an instance of {@link JAXBElement }{@code <}{@link GetAllQuestions }{@code >}} + * + */ + @XmlElementDecl(namespace = "http://question.model/", name = "getAllQuestions") + public JAXBElement createGetAllQuestions(GetAllQuestions value) { + return new JAXBElement(_GetAllQuestions_QNAME, GetAllQuestions.class, null, value); + } + + /** + * Create an instance of {@link JAXBElement }{@code <}{@link DeleteQuestion }{@code >}} + * + */ + @XmlElementDecl(namespace = "http://question.model/", name = "deleteQuestion") + public JAXBElement createDeleteQuestion(DeleteQuestion value) { + return new JAXBElement(_DeleteQuestion_QNAME, DeleteQuestion.class, null, value); + } + + /** + * Create an instance of {@link JAXBElement }{@code <}{@link GetQuestionByIDResponse }{@code >}} + * + */ + @XmlElementDecl(namespace = "http://question.model/", name = "getQuestionByIDResponse") + public JAXBElement createGetQuestionByIDResponse(GetQuestionByIDResponse value) { + return new JAXBElement(_GetQuestionByIDResponse_QNAME, GetQuestionByIDResponse.class, null, value); + } + + /** + * Create an instance of {@link JAXBElement }{@code <}{@link SearchQuestions }{@code >}} + * + */ + @XmlElementDecl(namespace = "http://question.model/", name = "searchQuestions") + public JAXBElement createSearchQuestions(SearchQuestions value) { + return new JAXBElement(_SearchQuestions_QNAME, SearchQuestions.class, null, value); + } + +} diff --git a/StackExchange_Client/build/generated-sources/jax-ws/model/question/Question.java b/StackExchange_Client/build/generated-sources/jax-ws/model/question/Question.java new file mode 100644 index 00000000..48b695c7 --- /dev/null +++ b/StackExchange_Client/build/generated-sources/jax-ws/model/question/Question.java @@ -0,0 +1,177 @@ + +package model.question; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Java class for question complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="question">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="content" type="{http://www.w3.org/2001/XMLSchema}string"/>
+ *         <element name="create_time" type="{http://www.w3.org/2001/XMLSchema}string"/>
+ *         <element name="question_id" type="{http://www.w3.org/2001/XMLSchema}int"/>
+ *         <element name="topic" type="{http://www.w3.org/2001/XMLSchema}string"/>
+ *         <element name="user_id" type="{http://www.w3.org/2001/XMLSchema}int"/>
+ *         <element name="vote" type="{http://www.w3.org/2001/XMLSchema}int"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "question", propOrder = { + "content", + "createTime", + "questionId", + "topic", + "userId", + "vote" +}) +public class Question { + + @XmlElement(required = true) + protected String content; + @XmlElement(name = "create_time", required = true) + protected String createTime; + @XmlElement(name = "question_id") + protected int questionId; + @XmlElement(required = true) + protected String topic; + @XmlElement(name = "user_id") + protected int userId; + protected int vote; + + /** + * Gets the value of the content property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getContent() { + return content; + } + + /** + * Sets the value of the content property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setContent(String value) { + this.content = value; + } + + /** + * Gets the value of the createTime property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getCreateTime() { + return createTime; + } + + /** + * Sets the value of the createTime property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setCreateTime(String value) { + this.createTime = value; + } + + /** + * Gets the value of the questionId property. + * + */ + public int getQuestionId() { + return questionId; + } + + /** + * Sets the value of the questionId property. + * + */ + public void setQuestionId(int value) { + this.questionId = value; + } + + /** + * Gets the value of the topic property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getTopic() { + return topic; + } + + /** + * Sets the value of the topic property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setTopic(String value) { + this.topic = value; + } + + /** + * Gets the value of the userId property. + * + */ + public int getUserId() { + return userId; + } + + /** + * Sets the value of the userId property. + * + */ + public void setUserId(int value) { + this.userId = value; + } + + /** + * Gets the value of the vote property. + * + */ + public int getVote() { + return vote; + } + + /** + * Sets the value of the vote property. + * + */ + public void setVote(int value) { + this.vote = value; + } + +} diff --git a/StackExchange_Client/build/generated-sources/jax-ws/model/question/QuestionWS.java b/StackExchange_Client/build/generated-sources/jax-ws/model/question/QuestionWS.java new file mode 100644 index 00000000..6e1e0b02 --- /dev/null +++ b/StackExchange_Client/build/generated-sources/jax-ws/model/question/QuestionWS.java @@ -0,0 +1,133 @@ + +package model.question; + +import java.util.List; +import javax.jws.WebMethod; +import javax.jws.WebParam; +import javax.jws.WebResult; +import javax.jws.WebService; +import javax.xml.bind.annotation.XmlSeeAlso; +import javax.xml.ws.Action; +import javax.xml.ws.RequestWrapper; +import javax.xml.ws.ResponseWrapper; + + +/** + * This class was generated by the JAX-WS RI. + * JAX-WS RI 2.2.10-b140803.1500 + * Generated source version: 2.2 + * + */ +@WebService(name = "QuestionWS", targetNamespace = "http://question.model/") +@XmlSeeAlso({ + ObjectFactory.class +}) +public interface QuestionWS { + + + /** + * + * @param questionId + * @param token + * @return + * returns int + */ + @WebMethod + @WebResult(name = "Integer", targetNamespace = "") + @RequestWrapper(localName = "deleteQuestion", targetNamespace = "http://question.model/", className = "model.question.DeleteQuestion") + @ResponseWrapper(localName = "deleteQuestionResponse", targetNamespace = "http://question.model/", className = "model.question.DeleteQuestionResponse") + @Action(input = "http://question.model/QuestionWS/deleteQuestionRequest", output = "http://question.model/QuestionWS/deleteQuestionResponse") + public int deleteQuestion( + @WebParam(name = "token", targetNamespace = "") + String token, + @WebParam(name = "question_id", targetNamespace = "") + int questionId); + + /** + * + * @return + * returns java.util.List + */ + @WebMethod + @WebResult(name = "Question", targetNamespace = "") + @RequestWrapper(localName = "getAllQuestions", targetNamespace = "http://question.model/", className = "model.question.GetAllQuestions") + @ResponseWrapper(localName = "getAllQuestionsResponse", targetNamespace = "http://question.model/", className = "model.question.GetAllQuestionsResponse") + @Action(input = "http://question.model/QuestionWS/getAllQuestionsRequest", output = "http://question.model/QuestionWS/getAllQuestionsResponse") + public List getAllQuestions(); + + /** + * + * @param topic + * @param content + * @param token + * @return + * returns int + */ + @WebMethod + @WebResult(name = "Integer", targetNamespace = "") + @RequestWrapper(localName = "addQuestion", targetNamespace = "http://question.model/", className = "model.question.AddQuestion") + @ResponseWrapper(localName = "addQuestionResponse", targetNamespace = "http://question.model/", className = "model.question.AddQuestionResponse") + @Action(input = "http://question.model/QuestionWS/addQuestionRequest", output = "http://question.model/QuestionWS/addQuestionResponse") + public int addQuestion( + @WebParam(name = "token", targetNamespace = "") + String token, + @WebParam(name = "topic", targetNamespace = "") + String topic, + @WebParam(name = "content", targetNamespace = "") + String content); + + /** + * + * @param arg0 + * @return + * returns java.util.List + */ + @WebMethod + @WebResult(name = "Question", targetNamespace = "") + @RequestWrapper(localName = "searchQuestions", targetNamespace = "http://question.model/", className = "model.question.SearchQuestions") + @ResponseWrapper(localName = "searchQuestionsResponse", targetNamespace = "http://question.model/", className = "model.question.SearchQuestionsResponse") + @Action(input = "http://question.model/QuestionWS/searchQuestionsRequest", output = "http://question.model/QuestionWS/searchQuestionsResponse") + public List searchQuestions( + @WebParam(name = "arg0", targetNamespace = "") + String arg0); + + /** + * + * @param questionId + * @return + * returns model.question.Question + */ + @WebMethod + @WebResult(name = "Question", targetNamespace = "") + @RequestWrapper(localName = "getQuestionByID", targetNamespace = "http://question.model/", className = "model.question.GetQuestionByID") + @ResponseWrapper(localName = "getQuestionByIDResponse", targetNamespace = "http://question.model/", className = "model.question.GetQuestionByIDResponse") + @Action(input = "http://question.model/QuestionWS/getQuestionByIDRequest", output = "http://question.model/QuestionWS/getQuestionByIDResponse") + public Question getQuestionByID( + @WebParam(name = "question_id", targetNamespace = "") + int questionId); + + /** + * + * @param questionId + * @param topic + * @param content + * @param token + * @return + * returns int + */ + @WebMethod + @WebResult(name = "Integer", targetNamespace = "") + @RequestWrapper(localName = "editQuestion", targetNamespace = "http://question.model/", className = "model.question.EditQuestion") + @ResponseWrapper(localName = "editQuestionResponse", targetNamespace = "http://question.model/", className = "model.question.EditQuestionResponse") + @Action(input = "http://question.model/QuestionWS/editQuestionRequest", output = "http://question.model/QuestionWS/editQuestionResponse") + public int editQuestion( + @WebParam(name = "token", targetNamespace = "") + String token, + @WebParam(name = "question_id", targetNamespace = "") + int questionId, + @WebParam(name = "topic", targetNamespace = "") + String topic, + @WebParam(name = "content", targetNamespace = "") + String content); + +} diff --git a/StackExchange_Client/build/generated-sources/jax-ws/model/question/QuestionWS_Service.java b/StackExchange_Client/build/generated-sources/jax-ws/model/question/QuestionWS_Service.java new file mode 100644 index 00000000..73572acb --- /dev/null +++ b/StackExchange_Client/build/generated-sources/jax-ws/model/question/QuestionWS_Service.java @@ -0,0 +1,94 @@ + +package model.question; + +import java.net.MalformedURLException; +import java.net.URL; +import javax.xml.namespace.QName; +import javax.xml.ws.Service; +import javax.xml.ws.WebEndpoint; +import javax.xml.ws.WebServiceClient; +import javax.xml.ws.WebServiceException; +import javax.xml.ws.WebServiceFeature; + + +/** + * This class was generated by the JAX-WS RI. + * JAX-WS RI 2.2.10-b140803.1500 + * Generated source version: 2.2 + * + */ +@WebServiceClient(name = "QuestionWS", targetNamespace = "http://question.model/", wsdlLocation = "http://localhost:8081/StackExchange_WS/QuestionWS?wsdl") +public class QuestionWS_Service + extends Service +{ + + private final static URL QUESTIONWS_WSDL_LOCATION; + private final static WebServiceException QUESTIONWS_EXCEPTION; + private final static QName QUESTIONWS_QNAME = new QName("http://question.model/", "QuestionWS"); + + static { + URL url = null; + WebServiceException e = null; + try { + url = new URL("http://localhost:8081/StackExchange_WS/QuestionWS?wsdl"); + } catch (MalformedURLException ex) { + e = new WebServiceException(ex); + } + QUESTIONWS_WSDL_LOCATION = url; + QUESTIONWS_EXCEPTION = e; + } + + public QuestionWS_Service() { + super(__getWsdlLocation(), QUESTIONWS_QNAME); + } + + public QuestionWS_Service(WebServiceFeature... features) { + super(__getWsdlLocation(), QUESTIONWS_QNAME, features); + } + + public QuestionWS_Service(URL wsdlLocation) { + super(wsdlLocation, QUESTIONWS_QNAME); + } + + public QuestionWS_Service(URL wsdlLocation, WebServiceFeature... features) { + super(wsdlLocation, QUESTIONWS_QNAME, features); + } + + public QuestionWS_Service(URL wsdlLocation, QName serviceName) { + super(wsdlLocation, serviceName); + } + + public QuestionWS_Service(URL wsdlLocation, QName serviceName, WebServiceFeature... features) { + super(wsdlLocation, serviceName, features); + } + + /** + * + * @return + * returns QuestionWS + */ + @WebEndpoint(name = "QuestionWSPort") + public QuestionWS getQuestionWSPort() { + return super.getPort(new QName("http://question.model/", "QuestionWSPort"), QuestionWS.class); + } + + /** + * + * @param features + * A list of {@link javax.xml.ws.WebServiceFeature} to configure on the proxy. Supported features not in the features parameter will have their default values. + * @return + * returns QuestionWS + */ + @WebEndpoint(name = "QuestionWSPort") + public QuestionWS getQuestionWSPort(WebServiceFeature... features) { + return super.getPort(new QName("http://question.model/", "QuestionWSPort"), QuestionWS.class, features); + } + + private static URL __getWsdlLocation() { + if (QUESTIONWS_EXCEPTION!= null) { + throw QUESTIONWS_EXCEPTION; + } + return QUESTIONWS_WSDL_LOCATION; + } + +} diff --git a/StackExchange_Client/build/generated-sources/jax-ws/model/question/SearchQuestions.java b/StackExchange_Client/build/generated-sources/jax-ws/model/question/SearchQuestions.java new file mode 100644 index 00000000..7669d0d6 --- /dev/null +++ b/StackExchange_Client/build/generated-sources/jax-ws/model/question/SearchQuestions.java @@ -0,0 +1,60 @@ + +package model.question; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Java class for searchQuestions complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="searchQuestions">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="arg0" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "searchQuestions", propOrder = { + "arg0" +}) +public class SearchQuestions { + + protected String arg0; + + /** + * Gets the value of the arg0 property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getArg0() { + return arg0; + } + + /** + * Sets the value of the arg0 property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setArg0(String value) { + this.arg0 = value; + } + +} diff --git a/StackExchange_Client/build/generated-sources/jax-ws/model/question/SearchQuestionsResponse.java b/StackExchange_Client/build/generated-sources/jax-ws/model/question/SearchQuestionsResponse.java new file mode 100644 index 00000000..88026b6b --- /dev/null +++ b/StackExchange_Client/build/generated-sources/jax-ws/model/question/SearchQuestionsResponse.java @@ -0,0 +1,69 @@ + +package model.question; + +import java.util.ArrayList; +import java.util.List; +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Java class for searchQuestionsResponse complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="searchQuestionsResponse">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="Question" type="{http://question.model/}question" maxOccurs="unbounded" minOccurs="0"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "searchQuestionsResponse", propOrder = { + "question" +}) +public class SearchQuestionsResponse { + + @XmlElement(name = "Question") + protected List question; + + /** + * Gets the value of the question property. + * + *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the question property. + * + *

+ * For example, to add a new item, do as follows: + *

+     *    getQuestion().add(newItem);
+     * 
+ * + * + *

+ * Objects of the following type(s) are allowed in the list + * {@link Question } + * + * + */ + public List getQuestion() { + if (question == null) { + question = new ArrayList(); + } + return this.question; + } + +} diff --git a/StackExchange_Client/build/generated-sources/jax-ws/model/question/package-info.java b/StackExchange_Client/build/generated-sources/jax-ws/model/question/package-info.java new file mode 100644 index 00000000..2fdd36d7 --- /dev/null +++ b/StackExchange_Client/build/generated-sources/jax-ws/model/question/package-info.java @@ -0,0 +1,2 @@ +@javax.xml.bind.annotation.XmlSchema(namespace = "http://question.model/") +package model.question; diff --git a/StackExchange_Client/build/generated-sources/jax-ws/model/user/AddUser.java b/StackExchange_Client/build/generated-sources/jax-ws/model/user/AddUser.java new file mode 100644 index 00000000..a8cdfd32 --- /dev/null +++ b/StackExchange_Client/build/generated-sources/jax-ws/model/user/AddUser.java @@ -0,0 +1,60 @@ + +package model.user; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Java class for addUser complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="addUser">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="u" type="{http://user.model/}user" minOccurs="0"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "addUser", propOrder = { + "u" +}) +public class AddUser { + + protected User u; + + /** + * Gets the value of the u property. + * + * @return + * possible object is + * {@link User } + * + */ + public User getU() { + return u; + } + + /** + * Sets the value of the u property. + * + * @param value + * allowed object is + * {@link User } + * + */ + public void setU(User value) { + this.u = value; + } + +} diff --git a/StackExchange_Client/build/generated-sources/jax-ws/model/user/GetIDbyEmail.java b/StackExchange_Client/build/generated-sources/jax-ws/model/user/GetIDbyEmail.java new file mode 100644 index 00000000..4c4a776e --- /dev/null +++ b/StackExchange_Client/build/generated-sources/jax-ws/model/user/GetIDbyEmail.java @@ -0,0 +1,60 @@ + +package model.user; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Java class for getIDbyEmail complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="getIDbyEmail">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="email" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "getIDbyEmail", propOrder = { + "email" +}) +public class GetIDbyEmail { + + protected String email; + + /** + * Gets the value of the email property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getEmail() { + return email; + } + + /** + * Sets the value of the email property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setEmail(String value) { + this.email = value; + } + +} diff --git a/StackExchange_Client/build/generated-sources/jax-ws/model/user/GetIDbyEmailResponse.java b/StackExchange_Client/build/generated-sources/jax-ws/model/user/GetIDbyEmailResponse.java new file mode 100644 index 00000000..fba44dd3 --- /dev/null +++ b/StackExchange_Client/build/generated-sources/jax-ws/model/user/GetIDbyEmailResponse.java @@ -0,0 +1,62 @@ + +package model.user; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Java class for getIDbyEmailResponse complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="getIDbyEmailResponse">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="Integer" type="{http://www.w3.org/2001/XMLSchema}int" minOccurs="0"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "getIDbyEmailResponse", propOrder = { + "integer" +}) +public class GetIDbyEmailResponse { + + @XmlElement(name = "Integer") + protected Integer integer; + + /** + * Gets the value of the integer property. + * + * @return + * possible object is + * {@link Integer } + * + */ + public Integer getInteger() { + return integer; + } + + /** + * Sets the value of the integer property. + * + * @param value + * allowed object is + * {@link Integer } + * + */ + public void setInteger(Integer value) { + this.integer = value; + } + +} diff --git a/StackExchange_Client/build/generated-sources/jax-ws/model/user/GetUserByID.java b/StackExchange_Client/build/generated-sources/jax-ws/model/user/GetUserByID.java new file mode 100644 index 00000000..15620229 --- /dev/null +++ b/StackExchange_Client/build/generated-sources/jax-ws/model/user/GetUserByID.java @@ -0,0 +1,54 @@ + +package model.user; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Java class for getUserByID complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="getUserByID">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="user_id" type="{http://www.w3.org/2001/XMLSchema}int"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "getUserByID", propOrder = { + "userId" +}) +public class GetUserByID { + + @XmlElement(name = "user_id") + protected int userId; + + /** + * Gets the value of the userId property. + * + */ + public int getUserId() { + return userId; + } + + /** + * Sets the value of the userId property. + * + */ + public void setUserId(int value) { + this.userId = value; + } + +} diff --git a/StackExchange_Client/build/generated-sources/jax-ws/model/user/GetUserByIDResponse.java b/StackExchange_Client/build/generated-sources/jax-ws/model/user/GetUserByIDResponse.java new file mode 100644 index 00000000..d2ef87b4 --- /dev/null +++ b/StackExchange_Client/build/generated-sources/jax-ws/model/user/GetUserByIDResponse.java @@ -0,0 +1,62 @@ + +package model.user; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Java class for getUserByIDResponse complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="getUserByIDResponse">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="User" type="{http://user.model/}user" minOccurs="0"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "getUserByIDResponse", propOrder = { + "user" +}) +public class GetUserByIDResponse { + + @XmlElement(name = "User") + protected User user; + + /** + * Gets the value of the user property. + * + * @return + * possible object is + * {@link User } + * + */ + public User getUser() { + return user; + } + + /** + * Sets the value of the user property. + * + * @param value + * allowed object is + * {@link User } + * + */ + public void setUser(User value) { + this.user = value; + } + +} diff --git a/StackExchange_Client/build/generated-sources/jax-ws/model/user/GetUserByToken.java b/StackExchange_Client/build/generated-sources/jax-ws/model/user/GetUserByToken.java new file mode 100644 index 00000000..dbd053a5 --- /dev/null +++ b/StackExchange_Client/build/generated-sources/jax-ws/model/user/GetUserByToken.java @@ -0,0 +1,60 @@ + +package model.user; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Java class for getUserByToken complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="getUserByToken">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="token" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "getUserByToken", propOrder = { + "token" +}) +public class GetUserByToken { + + protected String token; + + /** + * Gets the value of the token property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getToken() { + return token; + } + + /** + * Sets the value of the token property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setToken(String value) { + this.token = value; + } + +} diff --git a/StackExchange_Client/build/generated-sources/jax-ws/model/user/GetUserByTokenResponse.java b/StackExchange_Client/build/generated-sources/jax-ws/model/user/GetUserByTokenResponse.java new file mode 100644 index 00000000..50aea398 --- /dev/null +++ b/StackExchange_Client/build/generated-sources/jax-ws/model/user/GetUserByTokenResponse.java @@ -0,0 +1,62 @@ + +package model.user; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Java class for getUserByTokenResponse complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="getUserByTokenResponse">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="User" type="{http://user.model/}user" minOccurs="0"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "getUserByTokenResponse", propOrder = { + "user" +}) +public class GetUserByTokenResponse { + + @XmlElement(name = "User") + protected User user; + + /** + * Gets the value of the user property. + * + * @return + * possible object is + * {@link User } + * + */ + public User getUser() { + return user; + } + + /** + * Sets the value of the user property. + * + * @param value + * allowed object is + * {@link User } + * + */ + public void setUser(User value) { + this.user = value; + } + +} diff --git a/StackExchange_Client/build/generated-sources/jax-ws/model/user/ObjectFactory.java b/StackExchange_Client/build/generated-sources/jax-ws/model/user/ObjectFactory.java new file mode 100644 index 00000000..56c35ceb --- /dev/null +++ b/StackExchange_Client/build/generated-sources/jax-ws/model/user/ObjectFactory.java @@ -0,0 +1,179 @@ + +package model.user; + +import javax.xml.bind.JAXBElement; +import javax.xml.bind.annotation.XmlElementDecl; +import javax.xml.bind.annotation.XmlRegistry; +import javax.xml.namespace.QName; + + +/** + * This object contains factory methods for each + * Java content interface and Java element interface + * generated in the model.user package. + *

An ObjectFactory allows you to programatically + * construct new instances of the Java representation + * for XML content. The Java representation of XML + * content can consist of schema derived interfaces + * and classes representing the binding of schema + * type definitions, element declarations and model + * groups. Factory methods for each of these are + * provided in this class. + * + */ +@XmlRegistry +public class ObjectFactory { + + private final static QName _AddUser_QNAME = new QName("http://user.model/", "addUser"); + private final static QName _GetUserByIDResponse_QNAME = new QName("http://user.model/", "getUserByIDResponse"); + private final static QName _GetUserByTokenResponse_QNAME = new QName("http://user.model/", "getUserByTokenResponse"); + private final static QName _User_QNAME = new QName("http://user.model/", "User"); + private final static QName _GetUserByID_QNAME = new QName("http://user.model/", "getUserByID"); + private final static QName _GetIDbyEmail_QNAME = new QName("http://user.model/", "getIDbyEmail"); + private final static QName _GetUserByToken_QNAME = new QName("http://user.model/", "getUserByToken"); + private final static QName _GetIDbyEmailResponse_QNAME = new QName("http://user.model/", "getIDbyEmailResponse"); + + /** + * Create a new ObjectFactory that can be used to create new instances of schema derived classes for package: model.user + * + */ + public ObjectFactory() { + } + + /** + * Create an instance of {@link User } + * + */ + public User createUser() { + return new User(); + } + + /** + * Create an instance of {@link GetUserByID } + * + */ + public GetUserByID createGetUserByID() { + return new GetUserByID(); + } + + /** + * Create an instance of {@link AddUser } + * + */ + public AddUser createAddUser() { + return new AddUser(); + } + + /** + * Create an instance of {@link GetUserByIDResponse } + * + */ + public GetUserByIDResponse createGetUserByIDResponse() { + return new GetUserByIDResponse(); + } + + /** + * Create an instance of {@link GetUserByTokenResponse } + * + */ + public GetUserByTokenResponse createGetUserByTokenResponse() { + return new GetUserByTokenResponse(); + } + + /** + * Create an instance of {@link GetUserByToken } + * + */ + public GetUserByToken createGetUserByToken() { + return new GetUserByToken(); + } + + /** + * Create an instance of {@link GetIDbyEmailResponse } + * + */ + public GetIDbyEmailResponse createGetIDbyEmailResponse() { + return new GetIDbyEmailResponse(); + } + + /** + * Create an instance of {@link GetIDbyEmail } + * + */ + public GetIDbyEmail createGetIDbyEmail() { + return new GetIDbyEmail(); + } + + /** + * Create an instance of {@link JAXBElement }{@code <}{@link AddUser }{@code >}} + * + */ + @XmlElementDecl(namespace = "http://user.model/", name = "addUser") + public JAXBElement createAddUser(AddUser value) { + return new JAXBElement(_AddUser_QNAME, AddUser.class, null, value); + } + + /** + * Create an instance of {@link JAXBElement }{@code <}{@link GetUserByIDResponse }{@code >}} + * + */ + @XmlElementDecl(namespace = "http://user.model/", name = "getUserByIDResponse") + public JAXBElement createGetUserByIDResponse(GetUserByIDResponse value) { + return new JAXBElement(_GetUserByIDResponse_QNAME, GetUserByIDResponse.class, null, value); + } + + /** + * Create an instance of {@link JAXBElement }{@code <}{@link GetUserByTokenResponse }{@code >}} + * + */ + @XmlElementDecl(namespace = "http://user.model/", name = "getUserByTokenResponse") + public JAXBElement createGetUserByTokenResponse(GetUserByTokenResponse value) { + return new JAXBElement(_GetUserByTokenResponse_QNAME, GetUserByTokenResponse.class, null, value); + } + + /** + * Create an instance of {@link JAXBElement }{@code <}{@link User }{@code >}} + * + */ + @XmlElementDecl(namespace = "http://user.model/", name = "User") + public JAXBElement createUser(User value) { + return new JAXBElement(_User_QNAME, User.class, null, value); + } + + /** + * Create an instance of {@link JAXBElement }{@code <}{@link GetUserByID }{@code >}} + * + */ + @XmlElementDecl(namespace = "http://user.model/", name = "getUserByID") + public JAXBElement createGetUserByID(GetUserByID value) { + return new JAXBElement(_GetUserByID_QNAME, GetUserByID.class, null, value); + } + + /** + * Create an instance of {@link JAXBElement }{@code <}{@link GetIDbyEmail }{@code >}} + * + */ + @XmlElementDecl(namespace = "http://user.model/", name = "getIDbyEmail") + public JAXBElement createGetIDbyEmail(GetIDbyEmail value) { + return new JAXBElement(_GetIDbyEmail_QNAME, GetIDbyEmail.class, null, value); + } + + /** + * Create an instance of {@link JAXBElement }{@code <}{@link GetUserByToken }{@code >}} + * + */ + @XmlElementDecl(namespace = "http://user.model/", name = "getUserByToken") + public JAXBElement createGetUserByToken(GetUserByToken value) { + return new JAXBElement(_GetUserByToken_QNAME, GetUserByToken.class, null, value); + } + + /** + * Create an instance of {@link JAXBElement }{@code <}{@link GetIDbyEmailResponse }{@code >}} + * + */ + @XmlElementDecl(namespace = "http://user.model/", name = "getIDbyEmailResponse") + public JAXBElement createGetIDbyEmailResponse(GetIDbyEmailResponse value) { + return new JAXBElement(_GetIDbyEmailResponse_QNAME, GetIDbyEmailResponse.class, null, value); + } + +} diff --git a/StackExchange_Client/build/generated-sources/jax-ws/model/user/User.java b/StackExchange_Client/build/generated-sources/jax-ws/model/user/User.java new file mode 100644 index 00000000..6393a704 --- /dev/null +++ b/StackExchange_Client/build/generated-sources/jax-ws/model/user/User.java @@ -0,0 +1,138 @@ + +package model.user; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Java class for user complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="user">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="email" type="{http://www.w3.org/2001/XMLSchema}string"/>
+ *         <element name="name" type="{http://www.w3.org/2001/XMLSchema}string"/>
+ *         <element name="password" type="{http://www.w3.org/2001/XMLSchema}string"/>
+ *         <element name="user_id" type="{http://www.w3.org/2001/XMLSchema}int"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "user", propOrder = { + "email", + "name", + "password", + "userId" +}) +public class User { + + @XmlElement(required = true) + protected String email; + @XmlElement(required = true) + protected String name; + @XmlElement(required = true) + protected String password; + @XmlElement(name = "user_id") + protected int userId; + + /** + * Gets the value of the email property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getEmail() { + return email; + } + + /** + * Sets the value of the email property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setEmail(String value) { + this.email = value; + } + + /** + * Gets the value of the name property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getName() { + return name; + } + + /** + * Sets the value of the name property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setName(String value) { + this.name = value; + } + + /** + * Gets the value of the password property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getPassword() { + return password; + } + + /** + * Sets the value of the password property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setPassword(String value) { + this.password = value; + } + + /** + * Gets the value of the userId property. + * + */ + public int getUserId() { + return userId; + } + + /** + * Sets the value of the userId property. + * + */ + public void setUserId(int value) { + this.userId = value; + } + +} diff --git a/StackExchange_Client/build/generated-sources/jax-ws/model/user/UserWS.java b/StackExchange_Client/build/generated-sources/jax-ws/model/user/UserWS.java new file mode 100644 index 00000000..7b22dd55 --- /dev/null +++ b/StackExchange_Client/build/generated-sources/jax-ws/model/user/UserWS.java @@ -0,0 +1,85 @@ + +package model.user; + +import javax.jws.Oneway; +import javax.jws.WebMethod; +import javax.jws.WebParam; +import javax.jws.WebResult; +import javax.jws.WebService; +import javax.xml.bind.annotation.XmlSeeAlso; +import javax.xml.ws.Action; +import javax.xml.ws.RequestWrapper; +import javax.xml.ws.ResponseWrapper; + + +/** + * This class was generated by the JAX-WS RI. + * JAX-WS RI 2.2.10-b140803.1500 + * Generated source version: 2.2 + * + */ +@WebService(name = "UserWS", targetNamespace = "http://user.model/") +@XmlSeeAlso({ + ObjectFactory.class +}) +public interface UserWS { + + + /** + * + * @param u + */ + @WebMethod + @Oneway + @RequestWrapper(localName = "addUser", targetNamespace = "http://user.model/", className = "model.user.AddUser") + @Action(input = "http://user.model/UserWS/addUser") + public void addUser( + @WebParam(name = "u", targetNamespace = "") + User u); + + /** + * + * @param userId + * @return + * returns model.user.User + */ + @WebMethod + @WebResult(name = "User", targetNamespace = "") + @RequestWrapper(localName = "getUserByID", targetNamespace = "http://user.model/", className = "model.user.GetUserByID") + @ResponseWrapper(localName = "getUserByIDResponse", targetNamespace = "http://user.model/", className = "model.user.GetUserByIDResponse") + @Action(input = "http://user.model/UserWS/getUserByIDRequest", output = "http://user.model/UserWS/getUserByIDResponse") + public User getUserByID( + @WebParam(name = "user_id", targetNamespace = "") + int userId); + + /** + * + * @param email + * @return + * returns java.lang.Integer + */ + @WebMethod + @WebResult(name = "Integer", targetNamespace = "") + @RequestWrapper(localName = "getIDbyEmail", targetNamespace = "http://user.model/", className = "model.user.GetIDbyEmail") + @ResponseWrapper(localName = "getIDbyEmailResponse", targetNamespace = "http://user.model/", className = "model.user.GetIDbyEmailResponse") + @Action(input = "http://user.model/UserWS/getIDbyEmailRequest", output = "http://user.model/UserWS/getIDbyEmailResponse") + public Integer getIDbyEmail( + @WebParam(name = "email", targetNamespace = "") + String email); + + /** + * + * @param token + * @return + * returns model.user.User + */ + @WebMethod + @WebResult(name = "User", targetNamespace = "") + @RequestWrapper(localName = "getUserByToken", targetNamespace = "http://user.model/", className = "model.user.GetUserByToken") + @ResponseWrapper(localName = "getUserByTokenResponse", targetNamespace = "http://user.model/", className = "model.user.GetUserByTokenResponse") + @Action(input = "http://user.model/UserWS/getUserByTokenRequest", output = "http://user.model/UserWS/getUserByTokenResponse") + public User getUserByToken( + @WebParam(name = "token", targetNamespace = "") + String token); + +} diff --git a/StackExchange_Client/build/generated-sources/jax-ws/model/user/UserWS_Service.java b/StackExchange_Client/build/generated-sources/jax-ws/model/user/UserWS_Service.java new file mode 100644 index 00000000..732b7f53 --- /dev/null +++ b/StackExchange_Client/build/generated-sources/jax-ws/model/user/UserWS_Service.java @@ -0,0 +1,94 @@ + +package model.user; + +import java.net.MalformedURLException; +import java.net.URL; +import javax.xml.namespace.QName; +import javax.xml.ws.Service; +import javax.xml.ws.WebEndpoint; +import javax.xml.ws.WebServiceClient; +import javax.xml.ws.WebServiceException; +import javax.xml.ws.WebServiceFeature; + + +/** + * This class was generated by the JAX-WS RI. + * JAX-WS RI 2.2.10-b140803.1500 + * Generated source version: 2.2 + * + */ +@WebServiceClient(name = "UserWS", targetNamespace = "http://user.model/", wsdlLocation = "http://localhost:8081/StackExchange_WS/UserWS?wsdl") +public class UserWS_Service + extends Service +{ + + private final static URL USERWS_WSDL_LOCATION; + private final static WebServiceException USERWS_EXCEPTION; + private final static QName USERWS_QNAME = new QName("http://user.model/", "UserWS"); + + static { + URL url = null; + WebServiceException e = null; + try { + url = new URL("http://localhost:8081/StackExchange_WS/UserWS?wsdl"); + } catch (MalformedURLException ex) { + e = new WebServiceException(ex); + } + USERWS_WSDL_LOCATION = url; + USERWS_EXCEPTION = e; + } + + public UserWS_Service() { + super(__getWsdlLocation(), USERWS_QNAME); + } + + public UserWS_Service(WebServiceFeature... features) { + super(__getWsdlLocation(), USERWS_QNAME, features); + } + + public UserWS_Service(URL wsdlLocation) { + super(wsdlLocation, USERWS_QNAME); + } + + public UserWS_Service(URL wsdlLocation, WebServiceFeature... features) { + super(wsdlLocation, USERWS_QNAME, features); + } + + public UserWS_Service(URL wsdlLocation, QName serviceName) { + super(wsdlLocation, serviceName); + } + + public UserWS_Service(URL wsdlLocation, QName serviceName, WebServiceFeature... features) { + super(wsdlLocation, serviceName, features); + } + + /** + * + * @return + * returns UserWS + */ + @WebEndpoint(name = "UserWSPort") + public UserWS getUserWSPort() { + return super.getPort(new QName("http://user.model/", "UserWSPort"), UserWS.class); + } + + /** + * + * @param features + * A list of {@link javax.xml.ws.WebServiceFeature} to configure on the proxy. Supported features not in the features parameter will have their default values. + * @return + * returns UserWS + */ + @WebEndpoint(name = "UserWSPort") + public UserWS getUserWSPort(WebServiceFeature... features) { + return super.getPort(new QName("http://user.model/", "UserWSPort"), UserWS.class, features); + } + + private static URL __getWsdlLocation() { + if (USERWS_EXCEPTION!= null) { + throw USERWS_EXCEPTION; + } + return USERWS_WSDL_LOCATION; + } + +} diff --git a/StackExchange_Client/build/generated-sources/jax-ws/model/user/package-info.java b/StackExchange_Client/build/generated-sources/jax-ws/model/user/package-info.java new file mode 100644 index 00000000..75e00706 --- /dev/null +++ b/StackExchange_Client/build/generated-sources/jax-ws/model/user/package-info.java @@ -0,0 +1,2 @@ +@javax.xml.bind.annotation.XmlSchema(namespace = "http://user.model/") +package model.user; diff --git a/StackExchange_Client/build/generated-sources/jax-ws/model/vote/GetAnswerVotes.java b/StackExchange_Client/build/generated-sources/jax-ws/model/vote/GetAnswerVotes.java new file mode 100644 index 00000000..790a51c0 --- /dev/null +++ b/StackExchange_Client/build/generated-sources/jax-ws/model/vote/GetAnswerVotes.java @@ -0,0 +1,54 @@ + +package model.vote; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Java class for getAnswerVotes complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="getAnswerVotes">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="answer_id" type="{http://www.w3.org/2001/XMLSchema}int"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "getAnswerVotes", propOrder = { + "answerId" +}) +public class GetAnswerVotes { + + @XmlElement(name = "answer_id") + protected int answerId; + + /** + * Gets the value of the answerId property. + * + */ + public int getAnswerId() { + return answerId; + } + + /** + * Sets the value of the answerId property. + * + */ + public void setAnswerId(int value) { + this.answerId = value; + } + +} diff --git a/StackExchange_Client/build/generated-sources/jax-ws/model/vote/GetAnswerVotesResponse.java b/StackExchange_Client/build/generated-sources/jax-ws/model/vote/GetAnswerVotesResponse.java new file mode 100644 index 00000000..98e183b9 --- /dev/null +++ b/StackExchange_Client/build/generated-sources/jax-ws/model/vote/GetAnswerVotesResponse.java @@ -0,0 +1,54 @@ + +package model.vote; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Java class for getAnswerVotesResponse complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="getAnswerVotesResponse">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="return" type="{http://www.w3.org/2001/XMLSchema}int"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "getAnswerVotesResponse", propOrder = { + "_return" +}) +public class GetAnswerVotesResponse { + + @XmlElement(name = "return") + protected int _return; + + /** + * Gets the value of the return property. + * + */ + public int getReturn() { + return _return; + } + + /** + * Sets the value of the return property. + * + */ + public void setReturn(int value) { + this._return = value; + } + +} diff --git a/StackExchange_Client/build/generated-sources/jax-ws/model/vote/GetQuestionVotes.java b/StackExchange_Client/build/generated-sources/jax-ws/model/vote/GetQuestionVotes.java new file mode 100644 index 00000000..b095ebfc --- /dev/null +++ b/StackExchange_Client/build/generated-sources/jax-ws/model/vote/GetQuestionVotes.java @@ -0,0 +1,54 @@ + +package model.vote; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Java class for getQuestionVotes complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="getQuestionVotes">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="question_id" type="{http://www.w3.org/2001/XMLSchema}int"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "getQuestionVotes", propOrder = { + "questionId" +}) +public class GetQuestionVotes { + + @XmlElement(name = "question_id") + protected int questionId; + + /** + * Gets the value of the questionId property. + * + */ + public int getQuestionId() { + return questionId; + } + + /** + * Sets the value of the questionId property. + * + */ + public void setQuestionId(int value) { + this.questionId = value; + } + +} diff --git a/StackExchange_Client/build/generated-sources/jax-ws/model/vote/GetQuestionVotesResponse.java b/StackExchange_Client/build/generated-sources/jax-ws/model/vote/GetQuestionVotesResponse.java new file mode 100644 index 00000000..de713c4d --- /dev/null +++ b/StackExchange_Client/build/generated-sources/jax-ws/model/vote/GetQuestionVotesResponse.java @@ -0,0 +1,54 @@ + +package model.vote; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Java class for getQuestionVotesResponse complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="getQuestionVotesResponse">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="return" type="{http://www.w3.org/2001/XMLSchema}int"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "getQuestionVotesResponse", propOrder = { + "_return" +}) +public class GetQuestionVotesResponse { + + @XmlElement(name = "return") + protected int _return; + + /** + * Gets the value of the return property. + * + */ + public int getReturn() { + return _return; + } + + /** + * Sets the value of the return property. + * + */ + public void setReturn(int value) { + this._return = value; + } + +} diff --git a/StackExchange_Client/build/generated-sources/jax-ws/model/vote/HasVotedAnswer.java b/StackExchange_Client/build/generated-sources/jax-ws/model/vote/HasVotedAnswer.java new file mode 100644 index 00000000..a934c394 --- /dev/null +++ b/StackExchange_Client/build/generated-sources/jax-ws/model/vote/HasVotedAnswer.java @@ -0,0 +1,74 @@ + +package model.vote; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Java class for hasVotedAnswer complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="hasVotedAnswer">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="answer_id" type="{http://www.w3.org/2001/XMLSchema}int"/>
+ *         <element name="user_id" type="{http://www.w3.org/2001/XMLSchema}int"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "hasVotedAnswer", propOrder = { + "answerId", + "userId" +}) +public class HasVotedAnswer { + + @XmlElement(name = "answer_id") + protected int answerId; + @XmlElement(name = "user_id") + protected int userId; + + /** + * Gets the value of the answerId property. + * + */ + public int getAnswerId() { + return answerId; + } + + /** + * Sets the value of the answerId property. + * + */ + public void setAnswerId(int value) { + this.answerId = value; + } + + /** + * Gets the value of the userId property. + * + */ + public int getUserId() { + return userId; + } + + /** + * Sets the value of the userId property. + * + */ + public void setUserId(int value) { + this.userId = value; + } + +} diff --git a/StackExchange_Client/build/generated-sources/jax-ws/model/vote/HasVotedAnswerResponse.java b/StackExchange_Client/build/generated-sources/jax-ws/model/vote/HasVotedAnswerResponse.java new file mode 100644 index 00000000..11f66f54 --- /dev/null +++ b/StackExchange_Client/build/generated-sources/jax-ws/model/vote/HasVotedAnswerResponse.java @@ -0,0 +1,54 @@ + +package model.vote; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Java class for hasVotedAnswerResponse complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="hasVotedAnswerResponse">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="return" type="{http://www.w3.org/2001/XMLSchema}boolean"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "hasVotedAnswerResponse", propOrder = { + "_return" +}) +public class HasVotedAnswerResponse { + + @XmlElement(name = "return") + protected boolean _return; + + /** + * Gets the value of the return property. + * + */ + public boolean isReturn() { + return _return; + } + + /** + * Sets the value of the return property. + * + */ + public void setReturn(boolean value) { + this._return = value; + } + +} diff --git a/StackExchange_Client/build/generated-sources/jax-ws/model/vote/HasVotedQuestion.java b/StackExchange_Client/build/generated-sources/jax-ws/model/vote/HasVotedQuestion.java new file mode 100644 index 00000000..9bb77ea6 --- /dev/null +++ b/StackExchange_Client/build/generated-sources/jax-ws/model/vote/HasVotedQuestion.java @@ -0,0 +1,74 @@ + +package model.vote; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Java class for hasVotedQuestion complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="hasVotedQuestion">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="question_id" type="{http://www.w3.org/2001/XMLSchema}int"/>
+ *         <element name="user_id" type="{http://www.w3.org/2001/XMLSchema}int"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "hasVotedQuestion", propOrder = { + "questionId", + "userId" +}) +public class HasVotedQuestion { + + @XmlElement(name = "question_id") + protected int questionId; + @XmlElement(name = "user_id") + protected int userId; + + /** + * Gets the value of the questionId property. + * + */ + public int getQuestionId() { + return questionId; + } + + /** + * Sets the value of the questionId property. + * + */ + public void setQuestionId(int value) { + this.questionId = value; + } + + /** + * Gets the value of the userId property. + * + */ + public int getUserId() { + return userId; + } + + /** + * Sets the value of the userId property. + * + */ + public void setUserId(int value) { + this.userId = value; + } + +} diff --git a/StackExchange_Client/build/generated-sources/jax-ws/model/vote/HasVotedQuestionResponse.java b/StackExchange_Client/build/generated-sources/jax-ws/model/vote/HasVotedQuestionResponse.java new file mode 100644 index 00000000..ae09ec5b --- /dev/null +++ b/StackExchange_Client/build/generated-sources/jax-ws/model/vote/HasVotedQuestionResponse.java @@ -0,0 +1,54 @@ + +package model.vote; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Java class for hasVotedQuestionResponse complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="hasVotedQuestionResponse">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="return" type="{http://www.w3.org/2001/XMLSchema}boolean"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "hasVotedQuestionResponse", propOrder = { + "_return" +}) +public class HasVotedQuestionResponse { + + @XmlElement(name = "return") + protected boolean _return; + + /** + * Gets the value of the return property. + * + */ + public boolean isReturn() { + return _return; + } + + /** + * Sets the value of the return property. + * + */ + public void setReturn(boolean value) { + this._return = value; + } + +} diff --git a/StackExchange_Client/build/generated-sources/jax-ws/model/vote/ObjectFactory.java b/StackExchange_Client/build/generated-sources/jax-ws/model/vote/ObjectFactory.java new file mode 100644 index 00000000..ecccc8ee --- /dev/null +++ b/StackExchange_Client/build/generated-sources/jax-ws/model/vote/ObjectFactory.java @@ -0,0 +1,251 @@ + +package model.vote; + +import javax.xml.bind.JAXBElement; +import javax.xml.bind.annotation.XmlElementDecl; +import javax.xml.bind.annotation.XmlRegistry; +import javax.xml.namespace.QName; + + +/** + * This object contains factory methods for each + * Java content interface and Java element interface + * generated in the model.vote package. + *

An ObjectFactory allows you to programatically + * construct new instances of the Java representation + * for XML content. The Java representation of XML + * content can consist of schema derived interfaces + * and classes representing the binding of schema + * type definitions, element declarations and model + * groups. Factory methods for each of these are + * provided in this class. + * + */ +@XmlRegistry +public class ObjectFactory { + + private final static QName _HasVotedAnswerResponse_QNAME = new QName("http://vote.model/", "hasVotedAnswerResponse"); + private final static QName _HasVotedAnswer_QNAME = new QName("http://vote.model/", "hasVotedAnswer"); + private final static QName _VoteQuestion_QNAME = new QName("http://vote.model/", "voteQuestion"); + private final static QName _GetQuestionVotes_QNAME = new QName("http://vote.model/", "getQuestionVotes"); + private final static QName _VoteAnswer_QNAME = new QName("http://vote.model/", "voteAnswer"); + private final static QName _VoteAnswerResponse_QNAME = new QName("http://vote.model/", "voteAnswerResponse"); + private final static QName _GetQuestionVotesResponse_QNAME = new QName("http://vote.model/", "getQuestionVotesResponse"); + private final static QName _GetAnswerVotes_QNAME = new QName("http://vote.model/", "getAnswerVotes"); + private final static QName _VoteQuestionResponse_QNAME = new QName("http://vote.model/", "voteQuestionResponse"); + private final static QName _GetAnswerVotesResponse_QNAME = new QName("http://vote.model/", "getAnswerVotesResponse"); + private final static QName _HasVotedQuestion_QNAME = new QName("http://vote.model/", "hasVotedQuestion"); + private final static QName _HasVotedQuestionResponse_QNAME = new QName("http://vote.model/", "hasVotedQuestionResponse"); + + /** + * Create a new ObjectFactory that can be used to create new instances of schema derived classes for package: model.vote + * + */ + public ObjectFactory() { + } + + /** + * Create an instance of {@link GetAnswerVotes } + * + */ + public GetAnswerVotes createGetAnswerVotes() { + return new GetAnswerVotes(); + } + + /** + * Create an instance of {@link VoteQuestionResponse } + * + */ + public VoteQuestionResponse createVoteQuestionResponse() { + return new VoteQuestionResponse(); + } + + /** + * Create an instance of {@link GetAnswerVotesResponse } + * + */ + public GetAnswerVotesResponse createGetAnswerVotesResponse() { + return new GetAnswerVotesResponse(); + } + + /** + * Create an instance of {@link HasVotedQuestion } + * + */ + public HasVotedQuestion createHasVotedQuestion() { + return new HasVotedQuestion(); + } + + /** + * Create an instance of {@link HasVotedQuestionResponse } + * + */ + public HasVotedQuestionResponse createHasVotedQuestionResponse() { + return new HasVotedQuestionResponse(); + } + + /** + * Create an instance of {@link VoteAnswerResponse } + * + */ + public VoteAnswerResponse createVoteAnswerResponse() { + return new VoteAnswerResponse(); + } + + /** + * Create an instance of {@link GetQuestionVotesResponse } + * + */ + public GetQuestionVotesResponse createGetQuestionVotesResponse() { + return new GetQuestionVotesResponse(); + } + + /** + * Create an instance of {@link GetQuestionVotes } + * + */ + public GetQuestionVotes createGetQuestionVotes() { + return new GetQuestionVotes(); + } + + /** + * Create an instance of {@link VoteAnswer } + * + */ + public VoteAnswer createVoteAnswer() { + return new VoteAnswer(); + } + + /** + * Create an instance of {@link HasVotedAnswerResponse } + * + */ + public HasVotedAnswerResponse createHasVotedAnswerResponse() { + return new HasVotedAnswerResponse(); + } + + /** + * Create an instance of {@link HasVotedAnswer } + * + */ + public HasVotedAnswer createHasVotedAnswer() { + return new HasVotedAnswer(); + } + + /** + * Create an instance of {@link VoteQuestion } + * + */ + public VoteQuestion createVoteQuestion() { + return new VoteQuestion(); + } + + /** + * Create an instance of {@link JAXBElement }{@code <}{@link HasVotedAnswerResponse }{@code >}} + * + */ + @XmlElementDecl(namespace = "http://vote.model/", name = "hasVotedAnswerResponse") + public JAXBElement createHasVotedAnswerResponse(HasVotedAnswerResponse value) { + return new JAXBElement(_HasVotedAnswerResponse_QNAME, HasVotedAnswerResponse.class, null, value); + } + + /** + * Create an instance of {@link JAXBElement }{@code <}{@link HasVotedAnswer }{@code >}} + * + */ + @XmlElementDecl(namespace = "http://vote.model/", name = "hasVotedAnswer") + public JAXBElement createHasVotedAnswer(HasVotedAnswer value) { + return new JAXBElement(_HasVotedAnswer_QNAME, HasVotedAnswer.class, null, value); + } + + /** + * Create an instance of {@link JAXBElement }{@code <}{@link VoteQuestion }{@code >}} + * + */ + @XmlElementDecl(namespace = "http://vote.model/", name = "voteQuestion") + public JAXBElement createVoteQuestion(VoteQuestion value) { + return new JAXBElement(_VoteQuestion_QNAME, VoteQuestion.class, null, value); + } + + /** + * Create an instance of {@link JAXBElement }{@code <}{@link GetQuestionVotes }{@code >}} + * + */ + @XmlElementDecl(namespace = "http://vote.model/", name = "getQuestionVotes") + public JAXBElement createGetQuestionVotes(GetQuestionVotes value) { + return new JAXBElement(_GetQuestionVotes_QNAME, GetQuestionVotes.class, null, value); + } + + /** + * Create an instance of {@link JAXBElement }{@code <}{@link VoteAnswer }{@code >}} + * + */ + @XmlElementDecl(namespace = "http://vote.model/", name = "voteAnswer") + public JAXBElement createVoteAnswer(VoteAnswer value) { + return new JAXBElement(_VoteAnswer_QNAME, VoteAnswer.class, null, value); + } + + /** + * Create an instance of {@link JAXBElement }{@code <}{@link VoteAnswerResponse }{@code >}} + * + */ + @XmlElementDecl(namespace = "http://vote.model/", name = "voteAnswerResponse") + public JAXBElement createVoteAnswerResponse(VoteAnswerResponse value) { + return new JAXBElement(_VoteAnswerResponse_QNAME, VoteAnswerResponse.class, null, value); + } + + /** + * Create an instance of {@link JAXBElement }{@code <}{@link GetQuestionVotesResponse }{@code >}} + * + */ + @XmlElementDecl(namespace = "http://vote.model/", name = "getQuestionVotesResponse") + public JAXBElement createGetQuestionVotesResponse(GetQuestionVotesResponse value) { + return new JAXBElement(_GetQuestionVotesResponse_QNAME, GetQuestionVotesResponse.class, null, value); + } + + /** + * Create an instance of {@link JAXBElement }{@code <}{@link GetAnswerVotes }{@code >}} + * + */ + @XmlElementDecl(namespace = "http://vote.model/", name = "getAnswerVotes") + public JAXBElement createGetAnswerVotes(GetAnswerVotes value) { + return new JAXBElement(_GetAnswerVotes_QNAME, GetAnswerVotes.class, null, value); + } + + /** + * Create an instance of {@link JAXBElement }{@code <}{@link VoteQuestionResponse }{@code >}} + * + */ + @XmlElementDecl(namespace = "http://vote.model/", name = "voteQuestionResponse") + public JAXBElement createVoteQuestionResponse(VoteQuestionResponse value) { + return new JAXBElement(_VoteQuestionResponse_QNAME, VoteQuestionResponse.class, null, value); + } + + /** + * Create an instance of {@link JAXBElement }{@code <}{@link GetAnswerVotesResponse }{@code >}} + * + */ + @XmlElementDecl(namespace = "http://vote.model/", name = "getAnswerVotesResponse") + public JAXBElement createGetAnswerVotesResponse(GetAnswerVotesResponse value) { + return new JAXBElement(_GetAnswerVotesResponse_QNAME, GetAnswerVotesResponse.class, null, value); + } + + /** + * Create an instance of {@link JAXBElement }{@code <}{@link HasVotedQuestion }{@code >}} + * + */ + @XmlElementDecl(namespace = "http://vote.model/", name = "hasVotedQuestion") + public JAXBElement createHasVotedQuestion(HasVotedQuestion value) { + return new JAXBElement(_HasVotedQuestion_QNAME, HasVotedQuestion.class, null, value); + } + + /** + * Create an instance of {@link JAXBElement }{@code <}{@link HasVotedQuestionResponse }{@code >}} + * + */ + @XmlElementDecl(namespace = "http://vote.model/", name = "hasVotedQuestionResponse") + public JAXBElement createHasVotedQuestionResponse(HasVotedQuestionResponse value) { + return new JAXBElement(_HasVotedQuestionResponse_QNAME, HasVotedQuestionResponse.class, null, value); + } + +} diff --git a/StackExchange_Client/build/generated-sources/jax-ws/model/vote/VoteAnswer.java b/StackExchange_Client/build/generated-sources/jax-ws/model/vote/VoteAnswer.java new file mode 100644 index 00000000..f0d46565 --- /dev/null +++ b/StackExchange_Client/build/generated-sources/jax-ws/model/vote/VoteAnswer.java @@ -0,0 +1,100 @@ + +package model.vote; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Java class for voteAnswer complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="voteAnswer">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="token" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
+ *         <element name="answer_id" type="{http://www.w3.org/2001/XMLSchema}int"/>
+ *         <element name="vote" type="{http://www.w3.org/2001/XMLSchema}int"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "voteAnswer", propOrder = { + "token", + "answerId", + "vote" +}) +public class VoteAnswer { + + protected String token; + @XmlElement(name = "answer_id") + protected int answerId; + protected int vote; + + /** + * Gets the value of the token property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getToken() { + return token; + } + + /** + * Sets the value of the token property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setToken(String value) { + this.token = value; + } + + /** + * Gets the value of the answerId property. + * + */ + public int getAnswerId() { + return answerId; + } + + /** + * Sets the value of the answerId property. + * + */ + public void setAnswerId(int value) { + this.answerId = value; + } + + /** + * Gets the value of the vote property. + * + */ + public int getVote() { + return vote; + } + + /** + * Sets the value of the vote property. + * + */ + public void setVote(int value) { + this.vote = value; + } + +} diff --git a/StackExchange_Client/build/generated-sources/jax-ws/model/vote/VoteAnswerResponse.java b/StackExchange_Client/build/generated-sources/jax-ws/model/vote/VoteAnswerResponse.java new file mode 100644 index 00000000..ff5da9c7 --- /dev/null +++ b/StackExchange_Client/build/generated-sources/jax-ws/model/vote/VoteAnswerResponse.java @@ -0,0 +1,54 @@ + +package model.vote; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Java class for voteAnswerResponse complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="voteAnswerResponse">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="Integer" type="{http://www.w3.org/2001/XMLSchema}int"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "voteAnswerResponse", propOrder = { + "integer" +}) +public class VoteAnswerResponse { + + @XmlElement(name = "Integer") + protected int integer; + + /** + * Gets the value of the integer property. + * + */ + public int getInteger() { + return integer; + } + + /** + * Sets the value of the integer property. + * + */ + public void setInteger(int value) { + this.integer = value; + } + +} diff --git a/StackExchange_Client/build/generated-sources/jax-ws/model/vote/VoteQuestion.java b/StackExchange_Client/build/generated-sources/jax-ws/model/vote/VoteQuestion.java new file mode 100644 index 00000000..8f6c5cb7 --- /dev/null +++ b/StackExchange_Client/build/generated-sources/jax-ws/model/vote/VoteQuestion.java @@ -0,0 +1,100 @@ + +package model.vote; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Java class for voteQuestion complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="voteQuestion">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="token" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
+ *         <element name="question_id" type="{http://www.w3.org/2001/XMLSchema}int"/>
+ *         <element name="vote" type="{http://www.w3.org/2001/XMLSchema}int"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "voteQuestion", propOrder = { + "token", + "questionId", + "vote" +}) +public class VoteQuestion { + + protected String token; + @XmlElement(name = "question_id") + protected int questionId; + protected int vote; + + /** + * Gets the value of the token property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getToken() { + return token; + } + + /** + * Sets the value of the token property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setToken(String value) { + this.token = value; + } + + /** + * Gets the value of the questionId property. + * + */ + public int getQuestionId() { + return questionId; + } + + /** + * Sets the value of the questionId property. + * + */ + public void setQuestionId(int value) { + this.questionId = value; + } + + /** + * Gets the value of the vote property. + * + */ + public int getVote() { + return vote; + } + + /** + * Sets the value of the vote property. + * + */ + public void setVote(int value) { + this.vote = value; + } + +} diff --git a/StackExchange_Client/build/generated-sources/jax-ws/model/vote/VoteQuestionResponse.java b/StackExchange_Client/build/generated-sources/jax-ws/model/vote/VoteQuestionResponse.java new file mode 100644 index 00000000..24ecc5b2 --- /dev/null +++ b/StackExchange_Client/build/generated-sources/jax-ws/model/vote/VoteQuestionResponse.java @@ -0,0 +1,54 @@ + +package model.vote; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Java class for voteQuestionResponse complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="voteQuestionResponse">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="Integer" type="{http://www.w3.org/2001/XMLSchema}int"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "voteQuestionResponse", propOrder = { + "integer" +}) +public class VoteQuestionResponse { + + @XmlElement(name = "Integer") + protected int integer; + + /** + * Gets the value of the integer property. + * + */ + public int getInteger() { + return integer; + } + + /** + * Sets the value of the integer property. + * + */ + public void setInteger(int value) { + this.integer = value; + } + +} diff --git a/StackExchange_Client/build/generated-sources/jax-ws/model/vote/VoteWS.java b/StackExchange_Client/build/generated-sources/jax-ws/model/vote/VoteWS.java new file mode 100644 index 00000000..e238bcfd --- /dev/null +++ b/StackExchange_Client/build/generated-sources/jax-ws/model/vote/VoteWS.java @@ -0,0 +1,135 @@ + +package model.vote; + +import javax.jws.WebMethod; +import javax.jws.WebParam; +import javax.jws.WebResult; +import javax.jws.WebService; +import javax.xml.bind.annotation.XmlSeeAlso; +import javax.xml.ws.Action; +import javax.xml.ws.RequestWrapper; +import javax.xml.ws.ResponseWrapper; + + +/** + * This class was generated by the JAX-WS RI. + * JAX-WS RI 2.2.10-b140803.1500 + * Generated source version: 2.2 + * + */ +@WebService(name = "VoteWS", targetNamespace = "http://vote.model/") +@XmlSeeAlso({ + ObjectFactory.class +}) +public interface VoteWS { + + + /** + * + * @param answerId + * @param userId + * @return + * returns boolean + */ + @WebMethod + @WebResult(targetNamespace = "") + @RequestWrapper(localName = "hasVotedAnswer", targetNamespace = "http://vote.model/", className = "model.vote.HasVotedAnswer") + @ResponseWrapper(localName = "hasVotedAnswerResponse", targetNamespace = "http://vote.model/", className = "model.vote.HasVotedAnswerResponse") + @Action(input = "http://vote.model/VoteWS/hasVotedAnswerRequest", output = "http://vote.model/VoteWS/hasVotedAnswerResponse") + public boolean hasVotedAnswer( + @WebParam(name = "answer_id", targetNamespace = "") + int answerId, + @WebParam(name = "user_id", targetNamespace = "") + int userId); + + /** + * + * @param questionId + * @return + * returns int + */ + @WebMethod + @WebResult(targetNamespace = "") + @RequestWrapper(localName = "getQuestionVotes", targetNamespace = "http://vote.model/", className = "model.vote.GetQuestionVotes") + @ResponseWrapper(localName = "getQuestionVotesResponse", targetNamespace = "http://vote.model/", className = "model.vote.GetQuestionVotesResponse") + @Action(input = "http://vote.model/VoteWS/getQuestionVotesRequest", output = "http://vote.model/VoteWS/getQuestionVotesResponse") + public int getQuestionVotes( + @WebParam(name = "question_id", targetNamespace = "") + int questionId); + + /** + * + * @param answerId + * @return + * returns int + */ + @WebMethod + @WebResult(targetNamespace = "") + @RequestWrapper(localName = "getAnswerVotes", targetNamespace = "http://vote.model/", className = "model.vote.GetAnswerVotes") + @ResponseWrapper(localName = "getAnswerVotesResponse", targetNamespace = "http://vote.model/", className = "model.vote.GetAnswerVotesResponse") + @Action(input = "http://vote.model/VoteWS/getAnswerVotesRequest", output = "http://vote.model/VoteWS/getAnswerVotesResponse") + public int getAnswerVotes( + @WebParam(name = "answer_id", targetNamespace = "") + int answerId); + + /** + * + * @param answerId + * @param vote + * @param token + * @return + * returns int + */ + @WebMethod + @WebResult(name = "Integer", targetNamespace = "") + @RequestWrapper(localName = "voteAnswer", targetNamespace = "http://vote.model/", className = "model.vote.VoteAnswer") + @ResponseWrapper(localName = "voteAnswerResponse", targetNamespace = "http://vote.model/", className = "model.vote.VoteAnswerResponse") + @Action(input = "http://vote.model/VoteWS/voteAnswerRequest", output = "http://vote.model/VoteWS/voteAnswerResponse") + public int voteAnswer( + @WebParam(name = "token", targetNamespace = "") + String token, + @WebParam(name = "answer_id", targetNamespace = "") + int answerId, + @WebParam(name = "vote", targetNamespace = "") + int vote); + + /** + * + * @param questionId + * @param userId + * @return + * returns boolean + */ + @WebMethod + @WebResult(targetNamespace = "") + @RequestWrapper(localName = "hasVotedQuestion", targetNamespace = "http://vote.model/", className = "model.vote.HasVotedQuestion") + @ResponseWrapper(localName = "hasVotedQuestionResponse", targetNamespace = "http://vote.model/", className = "model.vote.HasVotedQuestionResponse") + @Action(input = "http://vote.model/VoteWS/hasVotedQuestionRequest", output = "http://vote.model/VoteWS/hasVotedQuestionResponse") + public boolean hasVotedQuestion( + @WebParam(name = "question_id", targetNamespace = "") + int questionId, + @WebParam(name = "user_id", targetNamespace = "") + int userId); + + /** + * + * @param questionId + * @param vote + * @param token + * @return + * returns int + */ + @WebMethod + @WebResult(name = "Integer", targetNamespace = "") + @RequestWrapper(localName = "voteQuestion", targetNamespace = "http://vote.model/", className = "model.vote.VoteQuestion") + @ResponseWrapper(localName = "voteQuestionResponse", targetNamespace = "http://vote.model/", className = "model.vote.VoteQuestionResponse") + @Action(input = "http://vote.model/VoteWS/voteQuestionRequest", output = "http://vote.model/VoteWS/voteQuestionResponse") + public int voteQuestion( + @WebParam(name = "token", targetNamespace = "") + String token, + @WebParam(name = "question_id", targetNamespace = "") + int questionId, + @WebParam(name = "vote", targetNamespace = "") + int vote); + +} diff --git a/StackExchange_Client/build/generated-sources/jax-ws/model/vote/VoteWS_Service.java b/StackExchange_Client/build/generated-sources/jax-ws/model/vote/VoteWS_Service.java new file mode 100644 index 00000000..8c2c7183 --- /dev/null +++ b/StackExchange_Client/build/generated-sources/jax-ws/model/vote/VoteWS_Service.java @@ -0,0 +1,94 @@ + +package model.vote; + +import java.net.MalformedURLException; +import java.net.URL; +import javax.xml.namespace.QName; +import javax.xml.ws.Service; +import javax.xml.ws.WebEndpoint; +import javax.xml.ws.WebServiceClient; +import javax.xml.ws.WebServiceException; +import javax.xml.ws.WebServiceFeature; + + +/** + * This class was generated by the JAX-WS RI. + * JAX-WS RI 2.2.10-b140803.1500 + * Generated source version: 2.2 + * + */ +@WebServiceClient(name = "VoteWS", targetNamespace = "http://vote.model/", wsdlLocation = "http://localhost:8081/StackExchange_WS/VoteWS?wsdl") +public class VoteWS_Service + extends Service +{ + + private final static URL VOTEWS_WSDL_LOCATION; + private final static WebServiceException VOTEWS_EXCEPTION; + private final static QName VOTEWS_QNAME = new QName("http://vote.model/", "VoteWS"); + + static { + URL url = null; + WebServiceException e = null; + try { + url = new URL("http://localhost:8081/StackExchange_WS/VoteWS?wsdl"); + } catch (MalformedURLException ex) { + e = new WebServiceException(ex); + } + VOTEWS_WSDL_LOCATION = url; + VOTEWS_EXCEPTION = e; + } + + public VoteWS_Service() { + super(__getWsdlLocation(), VOTEWS_QNAME); + } + + public VoteWS_Service(WebServiceFeature... features) { + super(__getWsdlLocation(), VOTEWS_QNAME, features); + } + + public VoteWS_Service(URL wsdlLocation) { + super(wsdlLocation, VOTEWS_QNAME); + } + + public VoteWS_Service(URL wsdlLocation, WebServiceFeature... features) { + super(wsdlLocation, VOTEWS_QNAME, features); + } + + public VoteWS_Service(URL wsdlLocation, QName serviceName) { + super(wsdlLocation, serviceName); + } + + public VoteWS_Service(URL wsdlLocation, QName serviceName, WebServiceFeature... features) { + super(wsdlLocation, serviceName, features); + } + + /** + * + * @return + * returns VoteWS + */ + @WebEndpoint(name = "VoteWSPort") + public VoteWS getVoteWSPort() { + return super.getPort(new QName("http://vote.model/", "VoteWSPort"), VoteWS.class); + } + + /** + * + * @param features + * A list of {@link javax.xml.ws.WebServiceFeature} to configure on the proxy. Supported features not in the features parameter will have their default values. + * @return + * returns VoteWS + */ + @WebEndpoint(name = "VoteWSPort") + public VoteWS getVoteWSPort(WebServiceFeature... features) { + return super.getPort(new QName("http://vote.model/", "VoteWSPort"), VoteWS.class, features); + } + + private static URL __getWsdlLocation() { + if (VOTEWS_EXCEPTION!= null) { + throw VOTEWS_EXCEPTION; + } + return VOTEWS_WSDL_LOCATION; + } + +} diff --git a/StackExchange_Client/build/generated-sources/jax-ws/model/vote/package-info.java b/StackExchange_Client/build/generated-sources/jax-ws/model/vote/package-info.java new file mode 100644 index 00000000..10f4fe52 --- /dev/null +++ b/StackExchange_Client/build/generated-sources/jax-ws/model/vote/package-info.java @@ -0,0 +1,2 @@ +@javax.xml.bind.annotation.XmlSchema(namespace = "http://vote.model/") +package model.vote; diff --git a/StackExchange_Client/build/generated/jax-wsCache/AnswerWS/model/answer/AddAnswer.java b/StackExchange_Client/build/generated/jax-wsCache/AnswerWS/model/answer/AddAnswer.java new file mode 100644 index 00000000..a64c5adb --- /dev/null +++ b/StackExchange_Client/build/generated/jax-wsCache/AnswerWS/model/answer/AddAnswer.java @@ -0,0 +1,108 @@ + +package model.answer; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Java class for addAnswer complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="addAnswer">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="token" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
+ *         <element name="question_id" type="{http://www.w3.org/2001/XMLSchema}int"/>
+ *         <element name="content" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "addAnswer", propOrder = { + "token", + "questionId", + "content" +}) +public class AddAnswer { + + protected String token; + @XmlElement(name = "question_id") + protected int questionId; + protected String content; + + /** + * Gets the value of the token property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getToken() { + return token; + } + + /** + * Sets the value of the token property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setToken(String value) { + this.token = value; + } + + /** + * Gets the value of the questionId property. + * + */ + public int getQuestionId() { + return questionId; + } + + /** + * Sets the value of the questionId property. + * + */ + public void setQuestionId(int value) { + this.questionId = value; + } + + /** + * Gets the value of the content property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getContent() { + return content; + } + + /** + * Sets the value of the content property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setContent(String value) { + this.content = value; + } + +} diff --git a/StackExchange_Client/build/generated/jax-wsCache/AnswerWS/model/answer/AddAnswerResponse.java b/StackExchange_Client/build/generated/jax-wsCache/AnswerWS/model/answer/AddAnswerResponse.java new file mode 100644 index 00000000..796281a7 --- /dev/null +++ b/StackExchange_Client/build/generated/jax-wsCache/AnswerWS/model/answer/AddAnswerResponse.java @@ -0,0 +1,54 @@ + +package model.answer; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Java class for addAnswerResponse complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="addAnswerResponse">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="Integer" type="{http://www.w3.org/2001/XMLSchema}int"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "addAnswerResponse", propOrder = { + "integer" +}) +public class AddAnswerResponse { + + @XmlElement(name = "Integer") + protected int integer; + + /** + * Gets the value of the integer property. + * + */ + public int getInteger() { + return integer; + } + + /** + * Sets the value of the integer property. + * + */ + public void setInteger(int value) { + this.integer = value; + } + +} diff --git a/StackExchange_Client/build/generated/jax-wsCache/AnswerWS/model/answer/Answer.java b/StackExchange_Client/build/generated/jax-wsCache/AnswerWS/model/answer/Answer.java new file mode 100644 index 00000000..a030281d --- /dev/null +++ b/StackExchange_Client/build/generated/jax-wsCache/AnswerWS/model/answer/Answer.java @@ -0,0 +1,169 @@ + +package model.answer; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Java class for answer complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="answer">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="answer_id" type="{http://www.w3.org/2001/XMLSchema}int"/>
+ *         <element name="content" type="{http://www.w3.org/2001/XMLSchema}string"/>
+ *         <element name="create_time" type="{http://www.w3.org/2001/XMLSchema}string"/>
+ *         <element name="question_id" type="{http://www.w3.org/2001/XMLSchema}int"/>
+ *         <element name="user_id" type="{http://www.w3.org/2001/XMLSchema}int"/>
+ *         <element name="vote" type="{http://www.w3.org/2001/XMLSchema}int"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "answer", propOrder = { + "answerId", + "content", + "createTime", + "questionId", + "userId", + "vote" +}) +public class Answer { + + @XmlElement(name = "answer_id") + protected int answerId; + @XmlElement(required = true) + protected String content; + @XmlElement(name = "create_time", required = true) + protected String createTime; + @XmlElement(name = "question_id") + protected int questionId; + @XmlElement(name = "user_id") + protected int userId; + protected int vote; + + /** + * Gets the value of the answerId property. + * + */ + public int getAnswerId() { + return answerId; + } + + /** + * Sets the value of the answerId property. + * + */ + public void setAnswerId(int value) { + this.answerId = value; + } + + /** + * Gets the value of the content property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getContent() { + return content; + } + + /** + * Sets the value of the content property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setContent(String value) { + this.content = value; + } + + /** + * Gets the value of the createTime property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getCreateTime() { + return createTime; + } + + /** + * Sets the value of the createTime property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setCreateTime(String value) { + this.createTime = value; + } + + /** + * Gets the value of the questionId property. + * + */ + public int getQuestionId() { + return questionId; + } + + /** + * Sets the value of the questionId property. + * + */ + public void setQuestionId(int value) { + this.questionId = value; + } + + /** + * Gets the value of the userId property. + * + */ + public int getUserId() { + return userId; + } + + /** + * Sets the value of the userId property. + * + */ + public void setUserId(int value) { + this.userId = value; + } + + /** + * Gets the value of the vote property. + * + */ + public int getVote() { + return vote; + } + + /** + * Sets the value of the vote property. + * + */ + public void setVote(int value) { + this.vote = value; + } + +} diff --git a/StackExchange_Client/build/generated/jax-wsCache/AnswerWS/model/answer/AnswerWS.java b/StackExchange_Client/build/generated/jax-wsCache/AnswerWS/model/answer/AnswerWS.java new file mode 100644 index 00000000..f6c25e90 --- /dev/null +++ b/StackExchange_Client/build/generated/jax-wsCache/AnswerWS/model/answer/AnswerWS.java @@ -0,0 +1,94 @@ + +package model.answer; + +import java.util.List; +import javax.jws.WebMethod; +import javax.jws.WebParam; +import javax.jws.WebResult; +import javax.jws.WebService; +import javax.xml.bind.annotation.XmlSeeAlso; +import javax.xml.ws.Action; +import javax.xml.ws.RequestWrapper; +import javax.xml.ws.ResponseWrapper; + + +/** + * This class was generated by the JAX-WS RI. + * JAX-WS RI 2.2.10-b140803.1500 + * Generated source version: 2.2 + * + */ +@WebService(name = "AnswerWS", targetNamespace = "http://answer.model/") +@XmlSeeAlso({ + ObjectFactory.class +}) +public interface AnswerWS { + + + /** + * + * @param questionId + * @return + * returns java.util.List + */ + @WebMethod + @WebResult(name = "Answer", targetNamespace = "") + @RequestWrapper(localName = "getAnswersByQID", targetNamespace = "http://answer.model/", className = "model.answer.GetAnswersByQID") + @ResponseWrapper(localName = "getAnswersByQIDResponse", targetNamespace = "http://answer.model/", className = "model.answer.GetAnswersByQIDResponse") + @Action(input = "http://answer.model/AnswerWS/getAnswersByQIDRequest", output = "http://answer.model/AnswerWS/getAnswersByQIDResponse") + public List getAnswersByQID( + @WebParam(name = "question_id", targetNamespace = "") + int questionId); + + /** + * + * @param answerId + * @return + * returns model.answer.Answer + */ + @WebMethod + @WebResult(name = "Answer", targetNamespace = "") + @RequestWrapper(localName = "getAnswerByID", targetNamespace = "http://answer.model/", className = "model.answer.GetAnswerByID") + @ResponseWrapper(localName = "getAnswerByIDResponse", targetNamespace = "http://answer.model/", className = "model.answer.GetAnswerByIDResponse") + @Action(input = "http://answer.model/AnswerWS/getAnswerByIDRequest", output = "http://answer.model/AnswerWS/getAnswerByIDResponse") + public Answer getAnswerByID( + @WebParam(name = "answer_id", targetNamespace = "") + int answerId); + + /** + * + * @param questionId + * @return + * returns int + */ + @WebMethod + @WebResult(name = "Answer", targetNamespace = "") + @RequestWrapper(localName = "getAnswerCount", targetNamespace = "http://answer.model/", className = "model.answer.GetAnswerCount") + @ResponseWrapper(localName = "getAnswerCountResponse", targetNamespace = "http://answer.model/", className = "model.answer.GetAnswerCountResponse") + @Action(input = "http://answer.model/AnswerWS/getAnswerCountRequest", output = "http://answer.model/AnswerWS/getAnswerCountResponse") + public int getAnswerCount( + @WebParam(name = "question_id", targetNamespace = "") + int questionId); + + /** + * + * @param questionId + * @param content + * @param token + * @return + * returns int + */ + @WebMethod + @WebResult(name = "Integer", targetNamespace = "") + @RequestWrapper(localName = "addAnswer", targetNamespace = "http://answer.model/", className = "model.answer.AddAnswer") + @ResponseWrapper(localName = "addAnswerResponse", targetNamespace = "http://answer.model/", className = "model.answer.AddAnswerResponse") + @Action(input = "http://answer.model/AnswerWS/addAnswerRequest", output = "http://answer.model/AnswerWS/addAnswerResponse") + public int addAnswer( + @WebParam(name = "token", targetNamespace = "") + String token, + @WebParam(name = "question_id", targetNamespace = "") + int questionId, + @WebParam(name = "content", targetNamespace = "") + String content); + +} diff --git a/StackExchange_Client/build/generated/jax-wsCache/AnswerWS/model/answer/AnswerWS_Service.java b/StackExchange_Client/build/generated/jax-wsCache/AnswerWS/model/answer/AnswerWS_Service.java new file mode 100644 index 00000000..a29a366b --- /dev/null +++ b/StackExchange_Client/build/generated/jax-wsCache/AnswerWS/model/answer/AnswerWS_Service.java @@ -0,0 +1,94 @@ + +package model.answer; + +import java.net.MalformedURLException; +import java.net.URL; +import javax.xml.namespace.QName; +import javax.xml.ws.Service; +import javax.xml.ws.WebEndpoint; +import javax.xml.ws.WebServiceClient; +import javax.xml.ws.WebServiceException; +import javax.xml.ws.WebServiceFeature; + + +/** + * This class was generated by the JAX-WS RI. + * JAX-WS RI 2.2.10-b140803.1500 + * Generated source version: 2.2 + * + */ +@WebServiceClient(name = "AnswerWS", targetNamespace = "http://answer.model/", wsdlLocation = "http://localhost:8081/StackExchange_WS/AnswerWS?wsdl") +public class AnswerWS_Service + extends Service +{ + + private final static URL ANSWERWS_WSDL_LOCATION; + private final static WebServiceException ANSWERWS_EXCEPTION; + private final static QName ANSWERWS_QNAME = new QName("http://answer.model/", "AnswerWS"); + + static { + URL url = null; + WebServiceException e = null; + try { + url = new URL("http://localhost:8081/StackExchange_WS/AnswerWS?wsdl"); + } catch (MalformedURLException ex) { + e = new WebServiceException(ex); + } + ANSWERWS_WSDL_LOCATION = url; + ANSWERWS_EXCEPTION = e; + } + + public AnswerWS_Service() { + super(__getWsdlLocation(), ANSWERWS_QNAME); + } + + public AnswerWS_Service(WebServiceFeature... features) { + super(__getWsdlLocation(), ANSWERWS_QNAME, features); + } + + public AnswerWS_Service(URL wsdlLocation) { + super(wsdlLocation, ANSWERWS_QNAME); + } + + public AnswerWS_Service(URL wsdlLocation, WebServiceFeature... features) { + super(wsdlLocation, ANSWERWS_QNAME, features); + } + + public AnswerWS_Service(URL wsdlLocation, QName serviceName) { + super(wsdlLocation, serviceName); + } + + public AnswerWS_Service(URL wsdlLocation, QName serviceName, WebServiceFeature... features) { + super(wsdlLocation, serviceName, features); + } + + /** + * + * @return + * returns AnswerWS + */ + @WebEndpoint(name = "AnswerWSPort") + public AnswerWS getAnswerWSPort() { + return super.getPort(new QName("http://answer.model/", "AnswerWSPort"), AnswerWS.class); + } + + /** + * + * @param features + * A list of {@link javax.xml.ws.WebServiceFeature} to configure on the proxy. Supported features not in the features parameter will have their default values. + * @return + * returns AnswerWS + */ + @WebEndpoint(name = "AnswerWSPort") + public AnswerWS getAnswerWSPort(WebServiceFeature... features) { + return super.getPort(new QName("http://answer.model/", "AnswerWSPort"), AnswerWS.class, features); + } + + private static URL __getWsdlLocation() { + if (ANSWERWS_EXCEPTION!= null) { + throw ANSWERWS_EXCEPTION; + } + return ANSWERWS_WSDL_LOCATION; + } + +} diff --git a/StackExchange_Client/build/generated/jax-wsCache/AnswerWS/model/answer/GetAnswerByID.java b/StackExchange_Client/build/generated/jax-wsCache/AnswerWS/model/answer/GetAnswerByID.java new file mode 100644 index 00000000..2ebc13c6 --- /dev/null +++ b/StackExchange_Client/build/generated/jax-wsCache/AnswerWS/model/answer/GetAnswerByID.java @@ -0,0 +1,54 @@ + +package model.answer; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Java class for getAnswerByID complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="getAnswerByID">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="answer_id" type="{http://www.w3.org/2001/XMLSchema}int"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "getAnswerByID", propOrder = { + "answerId" +}) +public class GetAnswerByID { + + @XmlElement(name = "answer_id") + protected int answerId; + + /** + * Gets the value of the answerId property. + * + */ + public int getAnswerId() { + return answerId; + } + + /** + * Sets the value of the answerId property. + * + */ + public void setAnswerId(int value) { + this.answerId = value; + } + +} diff --git a/StackExchange_Client/build/generated/jax-wsCache/AnswerWS/model/answer/GetAnswerByIDResponse.java b/StackExchange_Client/build/generated/jax-wsCache/AnswerWS/model/answer/GetAnswerByIDResponse.java new file mode 100644 index 00000000..3f4976b7 --- /dev/null +++ b/StackExchange_Client/build/generated/jax-wsCache/AnswerWS/model/answer/GetAnswerByIDResponse.java @@ -0,0 +1,62 @@ + +package model.answer; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Java class for getAnswerByIDResponse complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="getAnswerByIDResponse">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="Answer" type="{http://answer.model/}answer" minOccurs="0"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "getAnswerByIDResponse", propOrder = { + "answer" +}) +public class GetAnswerByIDResponse { + + @XmlElement(name = "Answer") + protected Answer answer; + + /** + * Gets the value of the answer property. + * + * @return + * possible object is + * {@link Answer } + * + */ + public Answer getAnswer() { + return answer; + } + + /** + * Sets the value of the answer property. + * + * @param value + * allowed object is + * {@link Answer } + * + */ + public void setAnswer(Answer value) { + this.answer = value; + } + +} diff --git a/StackExchange_Client/build/generated/jax-wsCache/AnswerWS/model/answer/GetAnswerCount.java b/StackExchange_Client/build/generated/jax-wsCache/AnswerWS/model/answer/GetAnswerCount.java new file mode 100644 index 00000000..bf130b04 --- /dev/null +++ b/StackExchange_Client/build/generated/jax-wsCache/AnswerWS/model/answer/GetAnswerCount.java @@ -0,0 +1,54 @@ + +package model.answer; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Java class for getAnswerCount complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="getAnswerCount">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="question_id" type="{http://www.w3.org/2001/XMLSchema}int"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "getAnswerCount", propOrder = { + "questionId" +}) +public class GetAnswerCount { + + @XmlElement(name = "question_id") + protected int questionId; + + /** + * Gets the value of the questionId property. + * + */ + public int getQuestionId() { + return questionId; + } + + /** + * Sets the value of the questionId property. + * + */ + public void setQuestionId(int value) { + this.questionId = value; + } + +} diff --git a/StackExchange_Client/build/generated/jax-wsCache/AnswerWS/model/answer/GetAnswerCountResponse.java b/StackExchange_Client/build/generated/jax-wsCache/AnswerWS/model/answer/GetAnswerCountResponse.java new file mode 100644 index 00000000..21eef5c8 --- /dev/null +++ b/StackExchange_Client/build/generated/jax-wsCache/AnswerWS/model/answer/GetAnswerCountResponse.java @@ -0,0 +1,54 @@ + +package model.answer; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Java class for getAnswerCountResponse complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="getAnswerCountResponse">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="Answer" type="{http://www.w3.org/2001/XMLSchema}int"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "getAnswerCountResponse", propOrder = { + "answer" +}) +public class GetAnswerCountResponse { + + @XmlElement(name = "Answer") + protected int answer; + + /** + * Gets the value of the answer property. + * + */ + public int getAnswer() { + return answer; + } + + /** + * Sets the value of the answer property. + * + */ + public void setAnswer(int value) { + this.answer = value; + } + +} diff --git a/StackExchange_Client/build/generated/jax-wsCache/AnswerWS/model/answer/GetAnswersByQID.java b/StackExchange_Client/build/generated/jax-wsCache/AnswerWS/model/answer/GetAnswersByQID.java new file mode 100644 index 00000000..9745f43f --- /dev/null +++ b/StackExchange_Client/build/generated/jax-wsCache/AnswerWS/model/answer/GetAnswersByQID.java @@ -0,0 +1,54 @@ + +package model.answer; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Java class for getAnswersByQID complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="getAnswersByQID">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="question_id" type="{http://www.w3.org/2001/XMLSchema}int"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "getAnswersByQID", propOrder = { + "questionId" +}) +public class GetAnswersByQID { + + @XmlElement(name = "question_id") + protected int questionId; + + /** + * Gets the value of the questionId property. + * + */ + public int getQuestionId() { + return questionId; + } + + /** + * Sets the value of the questionId property. + * + */ + public void setQuestionId(int value) { + this.questionId = value; + } + +} diff --git a/StackExchange_Client/build/generated/jax-wsCache/AnswerWS/model/answer/GetAnswersByQIDResponse.java b/StackExchange_Client/build/generated/jax-wsCache/AnswerWS/model/answer/GetAnswersByQIDResponse.java new file mode 100644 index 00000000..e03b3c01 --- /dev/null +++ b/StackExchange_Client/build/generated/jax-wsCache/AnswerWS/model/answer/GetAnswersByQIDResponse.java @@ -0,0 +1,69 @@ + +package model.answer; + +import java.util.ArrayList; +import java.util.List; +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Java class for getAnswersByQIDResponse complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="getAnswersByQIDResponse">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="Answer" type="{http://answer.model/}answer" maxOccurs="unbounded" minOccurs="0"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "getAnswersByQIDResponse", propOrder = { + "answer" +}) +public class GetAnswersByQIDResponse { + + @XmlElement(name = "Answer") + protected List answer; + + /** + * Gets the value of the answer property. + * + *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the answer property. + * + *

+ * For example, to add a new item, do as follows: + *

+     *    getAnswer().add(newItem);
+     * 
+ * + * + *

+ * Objects of the following type(s) are allowed in the list + * {@link Answer } + * + * + */ + public List getAnswer() { + if (answer == null) { + answer = new ArrayList(); + } + return this.answer; + } + +} diff --git a/StackExchange_Client/build/generated/jax-wsCache/AnswerWS/model/answer/ObjectFactory.java b/StackExchange_Client/build/generated/jax-wsCache/AnswerWS/model/answer/ObjectFactory.java new file mode 100644 index 00000000..ebf79855 --- /dev/null +++ b/StackExchange_Client/build/generated/jax-wsCache/AnswerWS/model/answer/ObjectFactory.java @@ -0,0 +1,187 @@ + +package model.answer; + +import javax.xml.bind.JAXBElement; +import javax.xml.bind.annotation.XmlElementDecl; +import javax.xml.bind.annotation.XmlRegistry; +import javax.xml.namespace.QName; + + +/** + * This object contains factory methods for each + * Java content interface and Java element interface + * generated in the model.answer package. + *

An ObjectFactory allows you to programatically + * construct new instances of the Java representation + * for XML content. The Java representation of XML + * content can consist of schema derived interfaces + * and classes representing the binding of schema + * type definitions, element declarations and model + * groups. Factory methods for each of these are + * provided in this class. + * + */ +@XmlRegistry +public class ObjectFactory { + + private final static QName _GetAnswerByIDResponse_QNAME = new QName("http://answer.model/", "getAnswerByIDResponse"); + private final static QName _GetAnswerCount_QNAME = new QName("http://answer.model/", "getAnswerCount"); + private final static QName _GetAnswersByQIDResponse_QNAME = new QName("http://answer.model/", "getAnswersByQIDResponse"); + private final static QName _GetAnswerCountResponse_QNAME = new QName("http://answer.model/", "getAnswerCountResponse"); + private final static QName _AddAnswerResponse_QNAME = new QName("http://answer.model/", "addAnswerResponse"); + private final static QName _AddAnswer_QNAME = new QName("http://answer.model/", "addAnswer"); + private final static QName _GetAnswerByID_QNAME = new QName("http://answer.model/", "getAnswerByID"); + private final static QName _GetAnswersByQID_QNAME = new QName("http://answer.model/", "getAnswersByQID"); + + /** + * Create a new ObjectFactory that can be used to create new instances of schema derived classes for package: model.answer + * + */ + public ObjectFactory() { + } + + /** + * Create an instance of {@link GetAnswerByIDResponse } + * + */ + public GetAnswerByIDResponse createGetAnswerByIDResponse() { + return new GetAnswerByIDResponse(); + } + + /** + * Create an instance of {@link GetAnswerCount } + * + */ + public GetAnswerCount createGetAnswerCount() { + return new GetAnswerCount(); + } + + /** + * Create an instance of {@link GetAnswerCountResponse } + * + */ + public GetAnswerCountResponse createGetAnswerCountResponse() { + return new GetAnswerCountResponse(); + } + + /** + * Create an instance of {@link GetAnswersByQIDResponse } + * + */ + public GetAnswersByQIDResponse createGetAnswersByQIDResponse() { + return new GetAnswersByQIDResponse(); + } + + /** + * Create an instance of {@link AddAnswerResponse } + * + */ + public AddAnswerResponse createAddAnswerResponse() { + return new AddAnswerResponse(); + } + + /** + * Create an instance of {@link AddAnswer } + * + */ + public AddAnswer createAddAnswer() { + return new AddAnswer(); + } + + /** + * Create an instance of {@link GetAnswerByID } + * + */ + public GetAnswerByID createGetAnswerByID() { + return new GetAnswerByID(); + } + + /** + * Create an instance of {@link GetAnswersByQID } + * + */ + public GetAnswersByQID createGetAnswersByQID() { + return new GetAnswersByQID(); + } + + /** + * Create an instance of {@link Answer } + * + */ + public Answer createAnswer() { + return new Answer(); + } + + /** + * Create an instance of {@link JAXBElement }{@code <}{@link GetAnswerByIDResponse }{@code >}} + * + */ + @XmlElementDecl(namespace = "http://answer.model/", name = "getAnswerByIDResponse") + public JAXBElement createGetAnswerByIDResponse(GetAnswerByIDResponse value) { + return new JAXBElement(_GetAnswerByIDResponse_QNAME, GetAnswerByIDResponse.class, null, value); + } + + /** + * Create an instance of {@link JAXBElement }{@code <}{@link GetAnswerCount }{@code >}} + * + */ + @XmlElementDecl(namespace = "http://answer.model/", name = "getAnswerCount") + public JAXBElement createGetAnswerCount(GetAnswerCount value) { + return new JAXBElement(_GetAnswerCount_QNAME, GetAnswerCount.class, null, value); + } + + /** + * Create an instance of {@link JAXBElement }{@code <}{@link GetAnswersByQIDResponse }{@code >}} + * + */ + @XmlElementDecl(namespace = "http://answer.model/", name = "getAnswersByQIDResponse") + public JAXBElement createGetAnswersByQIDResponse(GetAnswersByQIDResponse value) { + return new JAXBElement(_GetAnswersByQIDResponse_QNAME, GetAnswersByQIDResponse.class, null, value); + } + + /** + * Create an instance of {@link JAXBElement }{@code <}{@link GetAnswerCountResponse }{@code >}} + * + */ + @XmlElementDecl(namespace = "http://answer.model/", name = "getAnswerCountResponse") + public JAXBElement createGetAnswerCountResponse(GetAnswerCountResponse value) { + return new JAXBElement(_GetAnswerCountResponse_QNAME, GetAnswerCountResponse.class, null, value); + } + + /** + * Create an instance of {@link JAXBElement }{@code <}{@link AddAnswerResponse }{@code >}} + * + */ + @XmlElementDecl(namespace = "http://answer.model/", name = "addAnswerResponse") + public JAXBElement createAddAnswerResponse(AddAnswerResponse value) { + return new JAXBElement(_AddAnswerResponse_QNAME, AddAnswerResponse.class, null, value); + } + + /** + * Create an instance of {@link JAXBElement }{@code <}{@link AddAnswer }{@code >}} + * + */ + @XmlElementDecl(namespace = "http://answer.model/", name = "addAnswer") + public JAXBElement createAddAnswer(AddAnswer value) { + return new JAXBElement(_AddAnswer_QNAME, AddAnswer.class, null, value); + } + + /** + * Create an instance of {@link JAXBElement }{@code <}{@link GetAnswerByID }{@code >}} + * + */ + @XmlElementDecl(namespace = "http://answer.model/", name = "getAnswerByID") + public JAXBElement createGetAnswerByID(GetAnswerByID value) { + return new JAXBElement(_GetAnswerByID_QNAME, GetAnswerByID.class, null, value); + } + + /** + * Create an instance of {@link JAXBElement }{@code <}{@link GetAnswersByQID }{@code >}} + * + */ + @XmlElementDecl(namespace = "http://answer.model/", name = "getAnswersByQID") + public JAXBElement createGetAnswersByQID(GetAnswersByQID value) { + return new JAXBElement(_GetAnswersByQID_QNAME, GetAnswersByQID.class, null, value); + } + +} diff --git a/StackExchange_Client/build/generated/jax-wsCache/AnswerWS/model/answer/package-info.java b/StackExchange_Client/build/generated/jax-wsCache/AnswerWS/model/answer/package-info.java new file mode 100644 index 00000000..20abf007 --- /dev/null +++ b/StackExchange_Client/build/generated/jax-wsCache/AnswerWS/model/answer/package-info.java @@ -0,0 +1,2 @@ +@javax.xml.bind.annotation.XmlSchema(namespace = "http://answer.model/") +package model.answer; diff --git a/StackExchange_Client/build/generated/jax-wsCache/QuestionWS/model/question/AddQuestion.java b/StackExchange_Client/build/generated/jax-wsCache/QuestionWS/model/question/AddQuestion.java new file mode 100644 index 00000000..754d3e03 --- /dev/null +++ b/StackExchange_Client/build/generated/jax-wsCache/QuestionWS/model/question/AddQuestion.java @@ -0,0 +1,114 @@ + +package model.question; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Java class for addQuestion complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="addQuestion">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="token" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
+ *         <element name="topic" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
+ *         <element name="content" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "addQuestion", propOrder = { + "token", + "topic", + "content" +}) +public class AddQuestion { + + protected String token; + protected String topic; + protected String content; + + /** + * Gets the value of the token property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getToken() { + return token; + } + + /** + * Sets the value of the token property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setToken(String value) { + this.token = value; + } + + /** + * Gets the value of the topic property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getTopic() { + return topic; + } + + /** + * Sets the value of the topic property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setTopic(String value) { + this.topic = value; + } + + /** + * Gets the value of the content property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getContent() { + return content; + } + + /** + * Sets the value of the content property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setContent(String value) { + this.content = value; + } + +} diff --git a/StackExchange_Client/build/generated/jax-wsCache/QuestionWS/model/question/AddQuestionResponse.java b/StackExchange_Client/build/generated/jax-wsCache/QuestionWS/model/question/AddQuestionResponse.java new file mode 100644 index 00000000..6cb67941 --- /dev/null +++ b/StackExchange_Client/build/generated/jax-wsCache/QuestionWS/model/question/AddQuestionResponse.java @@ -0,0 +1,54 @@ + +package model.question; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Java class for addQuestionResponse complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="addQuestionResponse">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="Integer" type="{http://www.w3.org/2001/XMLSchema}int"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "addQuestionResponse", propOrder = { + "integer" +}) +public class AddQuestionResponse { + + @XmlElement(name = "Integer") + protected int integer; + + /** + * Gets the value of the integer property. + * + */ + public int getInteger() { + return integer; + } + + /** + * Sets the value of the integer property. + * + */ + public void setInteger(int value) { + this.integer = value; + } + +} diff --git a/StackExchange_Client/build/generated/jax-wsCache/QuestionWS/model/question/DeleteQuestion.java b/StackExchange_Client/build/generated/jax-wsCache/QuestionWS/model/question/DeleteQuestion.java new file mode 100644 index 00000000..e7d74bcf --- /dev/null +++ b/StackExchange_Client/build/generated/jax-wsCache/QuestionWS/model/question/DeleteQuestion.java @@ -0,0 +1,81 @@ + +package model.question; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Java class for deleteQuestion complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="deleteQuestion">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="token" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
+ *         <element name="question_id" type="{http://www.w3.org/2001/XMLSchema}int"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "deleteQuestion", propOrder = { + "token", + "questionId" +}) +public class DeleteQuestion { + + protected String token; + @XmlElement(name = "question_id") + protected int questionId; + + /** + * Gets the value of the token property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getToken() { + return token; + } + + /** + * Sets the value of the token property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setToken(String value) { + this.token = value; + } + + /** + * Gets the value of the questionId property. + * + */ + public int getQuestionId() { + return questionId; + } + + /** + * Sets the value of the questionId property. + * + */ + public void setQuestionId(int value) { + this.questionId = value; + } + +} diff --git a/StackExchange_Client/build/generated/jax-wsCache/QuestionWS/model/question/DeleteQuestionResponse.java b/StackExchange_Client/build/generated/jax-wsCache/QuestionWS/model/question/DeleteQuestionResponse.java new file mode 100644 index 00000000..ab19b319 --- /dev/null +++ b/StackExchange_Client/build/generated/jax-wsCache/QuestionWS/model/question/DeleteQuestionResponse.java @@ -0,0 +1,54 @@ + +package model.question; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Java class for deleteQuestionResponse complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="deleteQuestionResponse">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="Integer" type="{http://www.w3.org/2001/XMLSchema}int"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "deleteQuestionResponse", propOrder = { + "integer" +}) +public class DeleteQuestionResponse { + + @XmlElement(name = "Integer") + protected int integer; + + /** + * Gets the value of the integer property. + * + */ + public int getInteger() { + return integer; + } + + /** + * Sets the value of the integer property. + * + */ + public void setInteger(int value) { + this.integer = value; + } + +} diff --git a/StackExchange_Client/build/generated/jax-wsCache/QuestionWS/model/question/EditQuestion.java b/StackExchange_Client/build/generated/jax-wsCache/QuestionWS/model/question/EditQuestion.java new file mode 100644 index 00000000..d30aff72 --- /dev/null +++ b/StackExchange_Client/build/generated/jax-wsCache/QuestionWS/model/question/EditQuestion.java @@ -0,0 +1,135 @@ + +package model.question; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Java class for editQuestion complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="editQuestion">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="token" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
+ *         <element name="question_id" type="{http://www.w3.org/2001/XMLSchema}int"/>
+ *         <element name="topic" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
+ *         <element name="content" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "editQuestion", propOrder = { + "token", + "questionId", + "topic", + "content" +}) +public class EditQuestion { + + protected String token; + @XmlElement(name = "question_id") + protected int questionId; + protected String topic; + protected String content; + + /** + * Gets the value of the token property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getToken() { + return token; + } + + /** + * Sets the value of the token property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setToken(String value) { + this.token = value; + } + + /** + * Gets the value of the questionId property. + * + */ + public int getQuestionId() { + return questionId; + } + + /** + * Sets the value of the questionId property. + * + */ + public void setQuestionId(int value) { + this.questionId = value; + } + + /** + * Gets the value of the topic property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getTopic() { + return topic; + } + + /** + * Sets the value of the topic property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setTopic(String value) { + this.topic = value; + } + + /** + * Gets the value of the content property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getContent() { + return content; + } + + /** + * Sets the value of the content property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setContent(String value) { + this.content = value; + } + +} diff --git a/StackExchange_Client/build/generated/jax-wsCache/QuestionWS/model/question/EditQuestionResponse.java b/StackExchange_Client/build/generated/jax-wsCache/QuestionWS/model/question/EditQuestionResponse.java new file mode 100644 index 00000000..f20985fe --- /dev/null +++ b/StackExchange_Client/build/generated/jax-wsCache/QuestionWS/model/question/EditQuestionResponse.java @@ -0,0 +1,54 @@ + +package model.question; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Java class for editQuestionResponse complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="editQuestionResponse">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="Integer" type="{http://www.w3.org/2001/XMLSchema}int"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "editQuestionResponse", propOrder = { + "integer" +}) +public class EditQuestionResponse { + + @XmlElement(name = "Integer") + protected int integer; + + /** + * Gets the value of the integer property. + * + */ + public int getInteger() { + return integer; + } + + /** + * Sets the value of the integer property. + * + */ + public void setInteger(int value) { + this.integer = value; + } + +} diff --git a/StackExchange_Client/build/generated/jax-wsCache/QuestionWS/model/question/GetAllQuestions.java b/StackExchange_Client/build/generated/jax-wsCache/QuestionWS/model/question/GetAllQuestions.java new file mode 100644 index 00000000..5a360aaf --- /dev/null +++ b/StackExchange_Client/build/generated/jax-wsCache/QuestionWS/model/question/GetAllQuestions.java @@ -0,0 +1,32 @@ + +package model.question; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Java class for getAllQuestions complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="getAllQuestions">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "getAllQuestions") +public class GetAllQuestions { + + +} diff --git a/StackExchange_Client/build/generated/jax-wsCache/QuestionWS/model/question/GetAllQuestionsResponse.java b/StackExchange_Client/build/generated/jax-wsCache/QuestionWS/model/question/GetAllQuestionsResponse.java new file mode 100644 index 00000000..34a6d40d --- /dev/null +++ b/StackExchange_Client/build/generated/jax-wsCache/QuestionWS/model/question/GetAllQuestionsResponse.java @@ -0,0 +1,69 @@ + +package model.question; + +import java.util.ArrayList; +import java.util.List; +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Java class for getAllQuestionsResponse complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="getAllQuestionsResponse">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="Question" type="{http://question.model/}question" maxOccurs="unbounded" minOccurs="0"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "getAllQuestionsResponse", propOrder = { + "question" +}) +public class GetAllQuestionsResponse { + + @XmlElement(name = "Question") + protected List question; + + /** + * Gets the value of the question property. + * + *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the question property. + * + *

+ * For example, to add a new item, do as follows: + *

+     *    getQuestion().add(newItem);
+     * 
+ * + * + *

+ * Objects of the following type(s) are allowed in the list + * {@link Question } + * + * + */ + public List getQuestion() { + if (question == null) { + question = new ArrayList(); + } + return this.question; + } + +} diff --git a/StackExchange_Client/build/generated/jax-wsCache/QuestionWS/model/question/GetQuestionByID.java b/StackExchange_Client/build/generated/jax-wsCache/QuestionWS/model/question/GetQuestionByID.java new file mode 100644 index 00000000..a381fd0e --- /dev/null +++ b/StackExchange_Client/build/generated/jax-wsCache/QuestionWS/model/question/GetQuestionByID.java @@ -0,0 +1,54 @@ + +package model.question; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Java class for getQuestionByID complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="getQuestionByID">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="question_id" type="{http://www.w3.org/2001/XMLSchema}int"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "getQuestionByID", propOrder = { + "questionId" +}) +public class GetQuestionByID { + + @XmlElement(name = "question_id") + protected int questionId; + + /** + * Gets the value of the questionId property. + * + */ + public int getQuestionId() { + return questionId; + } + + /** + * Sets the value of the questionId property. + * + */ + public void setQuestionId(int value) { + this.questionId = value; + } + +} diff --git a/StackExchange_Client/build/generated/jax-wsCache/QuestionWS/model/question/GetQuestionByIDResponse.java b/StackExchange_Client/build/generated/jax-wsCache/QuestionWS/model/question/GetQuestionByIDResponse.java new file mode 100644 index 00000000..21f8da4b --- /dev/null +++ b/StackExchange_Client/build/generated/jax-wsCache/QuestionWS/model/question/GetQuestionByIDResponse.java @@ -0,0 +1,62 @@ + +package model.question; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Java class for getQuestionByIDResponse complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="getQuestionByIDResponse">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="Question" type="{http://question.model/}question" minOccurs="0"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "getQuestionByIDResponse", propOrder = { + "question" +}) +public class GetQuestionByIDResponse { + + @XmlElement(name = "Question") + protected Question question; + + /** + * Gets the value of the question property. + * + * @return + * possible object is + * {@link Question } + * + */ + public Question getQuestion() { + return question; + } + + /** + * Sets the value of the question property. + * + * @param value + * allowed object is + * {@link Question } + * + */ + public void setQuestion(Question value) { + this.question = value; + } + +} diff --git a/StackExchange_Client/build/generated/jax-wsCache/QuestionWS/model/question/ObjectFactory.java b/StackExchange_Client/build/generated/jax-wsCache/QuestionWS/model/question/ObjectFactory.java new file mode 100644 index 00000000..68e0c3ad --- /dev/null +++ b/StackExchange_Client/build/generated/jax-wsCache/QuestionWS/model/question/ObjectFactory.java @@ -0,0 +1,269 @@ + +package model.question; + +import javax.xml.bind.JAXBElement; +import javax.xml.bind.annotation.XmlElementDecl; +import javax.xml.bind.annotation.XmlRegistry; +import javax.xml.namespace.QName; + + +/** + * This object contains factory methods for each + * Java content interface and Java element interface + * generated in the model.question package. + *

An ObjectFactory allows you to programatically + * construct new instances of the Java representation + * for XML content. The Java representation of XML + * content can consist of schema derived interfaces + * and classes representing the binding of schema + * type definitions, element declarations and model + * groups. Factory methods for each of these are + * provided in this class. + * + */ +@XmlRegistry +public class ObjectFactory { + + private final static QName _AddQuestion_QNAME = new QName("http://question.model/", "addQuestion"); + private final static QName _GetAllQuestionsResponse_QNAME = new QName("http://question.model/", "getAllQuestionsResponse"); + private final static QName _EditQuestionResponse_QNAME = new QName("http://question.model/", "editQuestionResponse"); + private final static QName _DeleteQuestionResponse_QNAME = new QName("http://question.model/", "deleteQuestionResponse"); + private final static QName _AddQuestionResponse_QNAME = new QName("http://question.model/", "addQuestionResponse"); + private final static QName _GetQuestionByID_QNAME = new QName("http://question.model/", "getQuestionByID"); + private final static QName _Question_QNAME = new QName("http://question.model/", "Question"); + private final static QName _EditQuestion_QNAME = new QName("http://question.model/", "editQuestion"); + private final static QName _SearchQuestionsResponse_QNAME = new QName("http://question.model/", "searchQuestionsResponse"); + private final static QName _GetAllQuestions_QNAME = new QName("http://question.model/", "getAllQuestions"); + private final static QName _DeleteQuestion_QNAME = new QName("http://question.model/", "deleteQuestion"); + private final static QName _GetQuestionByIDResponse_QNAME = new QName("http://question.model/", "getQuestionByIDResponse"); + private final static QName _SearchQuestions_QNAME = new QName("http://question.model/", "searchQuestions"); + + /** + * Create a new ObjectFactory that can be used to create new instances of schema derived classes for package: model.question + * + */ + public ObjectFactory() { + } + + /** + * Create an instance of {@link AddQuestionResponse } + * + */ + public AddQuestionResponse createAddQuestionResponse() { + return new AddQuestionResponse(); + } + + /** + * Create an instance of {@link GetQuestionByID } + * + */ + public GetQuestionByID createGetQuestionByID() { + return new GetQuestionByID(); + } + + /** + * Create an instance of {@link AddQuestion } + * + */ + public AddQuestion createAddQuestion() { + return new AddQuestion(); + } + + /** + * Create an instance of {@link GetAllQuestionsResponse } + * + */ + public GetAllQuestionsResponse createGetAllQuestionsResponse() { + return new GetAllQuestionsResponse(); + } + + /** + * Create an instance of {@link DeleteQuestionResponse } + * + */ + public DeleteQuestionResponse createDeleteQuestionResponse() { + return new DeleteQuestionResponse(); + } + + /** + * Create an instance of {@link EditQuestionResponse } + * + */ + public EditQuestionResponse createEditQuestionResponse() { + return new EditQuestionResponse(); + } + + /** + * Create an instance of {@link SearchQuestionsResponse } + * + */ + public SearchQuestionsResponse createSearchQuestionsResponse() { + return new SearchQuestionsResponse(); + } + + /** + * Create an instance of {@link GetAllQuestions } + * + */ + public GetAllQuestions createGetAllQuestions() { + return new GetAllQuestions(); + } + + /** + * Create an instance of {@link DeleteQuestion } + * + */ + public DeleteQuestion createDeleteQuestion() { + return new DeleteQuestion(); + } + + /** + * Create an instance of {@link GetQuestionByIDResponse } + * + */ + public GetQuestionByIDResponse createGetQuestionByIDResponse() { + return new GetQuestionByIDResponse(); + } + + /** + * Create an instance of {@link SearchQuestions } + * + */ + public SearchQuestions createSearchQuestions() { + return new SearchQuestions(); + } + + /** + * Create an instance of {@link Question } + * + */ + public Question createQuestion() { + return new Question(); + } + + /** + * Create an instance of {@link EditQuestion } + * + */ + public EditQuestion createEditQuestion() { + return new EditQuestion(); + } + + /** + * Create an instance of {@link JAXBElement }{@code <}{@link AddQuestion }{@code >}} + * + */ + @XmlElementDecl(namespace = "http://question.model/", name = "addQuestion") + public JAXBElement createAddQuestion(AddQuestion value) { + return new JAXBElement(_AddQuestion_QNAME, AddQuestion.class, null, value); + } + + /** + * Create an instance of {@link JAXBElement }{@code <}{@link GetAllQuestionsResponse }{@code >}} + * + */ + @XmlElementDecl(namespace = "http://question.model/", name = "getAllQuestionsResponse") + public JAXBElement createGetAllQuestionsResponse(GetAllQuestionsResponse value) { + return new JAXBElement(_GetAllQuestionsResponse_QNAME, GetAllQuestionsResponse.class, null, value); + } + + /** + * Create an instance of {@link JAXBElement }{@code <}{@link EditQuestionResponse }{@code >}} + * + */ + @XmlElementDecl(namespace = "http://question.model/", name = "editQuestionResponse") + public JAXBElement createEditQuestionResponse(EditQuestionResponse value) { + return new JAXBElement(_EditQuestionResponse_QNAME, EditQuestionResponse.class, null, value); + } + + /** + * Create an instance of {@link JAXBElement }{@code <}{@link DeleteQuestionResponse }{@code >}} + * + */ + @XmlElementDecl(namespace = "http://question.model/", name = "deleteQuestionResponse") + public JAXBElement createDeleteQuestionResponse(DeleteQuestionResponse value) { + return new JAXBElement(_DeleteQuestionResponse_QNAME, DeleteQuestionResponse.class, null, value); + } + + /** + * Create an instance of {@link JAXBElement }{@code <}{@link AddQuestionResponse }{@code >}} + * + */ + @XmlElementDecl(namespace = "http://question.model/", name = "addQuestionResponse") + public JAXBElement createAddQuestionResponse(AddQuestionResponse value) { + return new JAXBElement(_AddQuestionResponse_QNAME, AddQuestionResponse.class, null, value); + } + + /** + * Create an instance of {@link JAXBElement }{@code <}{@link GetQuestionByID }{@code >}} + * + */ + @XmlElementDecl(namespace = "http://question.model/", name = "getQuestionByID") + public JAXBElement createGetQuestionByID(GetQuestionByID value) { + return new JAXBElement(_GetQuestionByID_QNAME, GetQuestionByID.class, null, value); + } + + /** + * Create an instance of {@link JAXBElement }{@code <}{@link Question }{@code >}} + * + */ + @XmlElementDecl(namespace = "http://question.model/", name = "Question") + public JAXBElement createQuestion(Question value) { + return new JAXBElement(_Question_QNAME, Question.class, null, value); + } + + /** + * Create an instance of {@link JAXBElement }{@code <}{@link EditQuestion }{@code >}} + * + */ + @XmlElementDecl(namespace = "http://question.model/", name = "editQuestion") + public JAXBElement createEditQuestion(EditQuestion value) { + return new JAXBElement(_EditQuestion_QNAME, EditQuestion.class, null, value); + } + + /** + * Create an instance of {@link JAXBElement }{@code <}{@link SearchQuestionsResponse }{@code >}} + * + */ + @XmlElementDecl(namespace = "http://question.model/", name = "searchQuestionsResponse") + public JAXBElement createSearchQuestionsResponse(SearchQuestionsResponse value) { + return new JAXBElement(_SearchQuestionsResponse_QNAME, SearchQuestionsResponse.class, null, value); + } + + /** + * Create an instance of {@link JAXBElement }{@code <}{@link GetAllQuestions }{@code >}} + * + */ + @XmlElementDecl(namespace = "http://question.model/", name = "getAllQuestions") + public JAXBElement createGetAllQuestions(GetAllQuestions value) { + return new JAXBElement(_GetAllQuestions_QNAME, GetAllQuestions.class, null, value); + } + + /** + * Create an instance of {@link JAXBElement }{@code <}{@link DeleteQuestion }{@code >}} + * + */ + @XmlElementDecl(namespace = "http://question.model/", name = "deleteQuestion") + public JAXBElement createDeleteQuestion(DeleteQuestion value) { + return new JAXBElement(_DeleteQuestion_QNAME, DeleteQuestion.class, null, value); + } + + /** + * Create an instance of {@link JAXBElement }{@code <}{@link GetQuestionByIDResponse }{@code >}} + * + */ + @XmlElementDecl(namespace = "http://question.model/", name = "getQuestionByIDResponse") + public JAXBElement createGetQuestionByIDResponse(GetQuestionByIDResponse value) { + return new JAXBElement(_GetQuestionByIDResponse_QNAME, GetQuestionByIDResponse.class, null, value); + } + + /** + * Create an instance of {@link JAXBElement }{@code <}{@link SearchQuestions }{@code >}} + * + */ + @XmlElementDecl(namespace = "http://question.model/", name = "searchQuestions") + public JAXBElement createSearchQuestions(SearchQuestions value) { + return new JAXBElement(_SearchQuestions_QNAME, SearchQuestions.class, null, value); + } + +} diff --git a/StackExchange_Client/build/generated/jax-wsCache/QuestionWS/model/question/Question.java b/StackExchange_Client/build/generated/jax-wsCache/QuestionWS/model/question/Question.java new file mode 100644 index 00000000..48b695c7 --- /dev/null +++ b/StackExchange_Client/build/generated/jax-wsCache/QuestionWS/model/question/Question.java @@ -0,0 +1,177 @@ + +package model.question; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Java class for question complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="question">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="content" type="{http://www.w3.org/2001/XMLSchema}string"/>
+ *         <element name="create_time" type="{http://www.w3.org/2001/XMLSchema}string"/>
+ *         <element name="question_id" type="{http://www.w3.org/2001/XMLSchema}int"/>
+ *         <element name="topic" type="{http://www.w3.org/2001/XMLSchema}string"/>
+ *         <element name="user_id" type="{http://www.w3.org/2001/XMLSchema}int"/>
+ *         <element name="vote" type="{http://www.w3.org/2001/XMLSchema}int"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "question", propOrder = { + "content", + "createTime", + "questionId", + "topic", + "userId", + "vote" +}) +public class Question { + + @XmlElement(required = true) + protected String content; + @XmlElement(name = "create_time", required = true) + protected String createTime; + @XmlElement(name = "question_id") + protected int questionId; + @XmlElement(required = true) + protected String topic; + @XmlElement(name = "user_id") + protected int userId; + protected int vote; + + /** + * Gets the value of the content property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getContent() { + return content; + } + + /** + * Sets the value of the content property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setContent(String value) { + this.content = value; + } + + /** + * Gets the value of the createTime property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getCreateTime() { + return createTime; + } + + /** + * Sets the value of the createTime property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setCreateTime(String value) { + this.createTime = value; + } + + /** + * Gets the value of the questionId property. + * + */ + public int getQuestionId() { + return questionId; + } + + /** + * Sets the value of the questionId property. + * + */ + public void setQuestionId(int value) { + this.questionId = value; + } + + /** + * Gets the value of the topic property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getTopic() { + return topic; + } + + /** + * Sets the value of the topic property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setTopic(String value) { + this.topic = value; + } + + /** + * Gets the value of the userId property. + * + */ + public int getUserId() { + return userId; + } + + /** + * Sets the value of the userId property. + * + */ + public void setUserId(int value) { + this.userId = value; + } + + /** + * Gets the value of the vote property. + * + */ + public int getVote() { + return vote; + } + + /** + * Sets the value of the vote property. + * + */ + public void setVote(int value) { + this.vote = value; + } + +} diff --git a/StackExchange_Client/build/generated/jax-wsCache/QuestionWS/model/question/QuestionWS.java b/StackExchange_Client/build/generated/jax-wsCache/QuestionWS/model/question/QuestionWS.java new file mode 100644 index 00000000..6e1e0b02 --- /dev/null +++ b/StackExchange_Client/build/generated/jax-wsCache/QuestionWS/model/question/QuestionWS.java @@ -0,0 +1,133 @@ + +package model.question; + +import java.util.List; +import javax.jws.WebMethod; +import javax.jws.WebParam; +import javax.jws.WebResult; +import javax.jws.WebService; +import javax.xml.bind.annotation.XmlSeeAlso; +import javax.xml.ws.Action; +import javax.xml.ws.RequestWrapper; +import javax.xml.ws.ResponseWrapper; + + +/** + * This class was generated by the JAX-WS RI. + * JAX-WS RI 2.2.10-b140803.1500 + * Generated source version: 2.2 + * + */ +@WebService(name = "QuestionWS", targetNamespace = "http://question.model/") +@XmlSeeAlso({ + ObjectFactory.class +}) +public interface QuestionWS { + + + /** + * + * @param questionId + * @param token + * @return + * returns int + */ + @WebMethod + @WebResult(name = "Integer", targetNamespace = "") + @RequestWrapper(localName = "deleteQuestion", targetNamespace = "http://question.model/", className = "model.question.DeleteQuestion") + @ResponseWrapper(localName = "deleteQuestionResponse", targetNamespace = "http://question.model/", className = "model.question.DeleteQuestionResponse") + @Action(input = "http://question.model/QuestionWS/deleteQuestionRequest", output = "http://question.model/QuestionWS/deleteQuestionResponse") + public int deleteQuestion( + @WebParam(name = "token", targetNamespace = "") + String token, + @WebParam(name = "question_id", targetNamespace = "") + int questionId); + + /** + * + * @return + * returns java.util.List + */ + @WebMethod + @WebResult(name = "Question", targetNamespace = "") + @RequestWrapper(localName = "getAllQuestions", targetNamespace = "http://question.model/", className = "model.question.GetAllQuestions") + @ResponseWrapper(localName = "getAllQuestionsResponse", targetNamespace = "http://question.model/", className = "model.question.GetAllQuestionsResponse") + @Action(input = "http://question.model/QuestionWS/getAllQuestionsRequest", output = "http://question.model/QuestionWS/getAllQuestionsResponse") + public List getAllQuestions(); + + /** + * + * @param topic + * @param content + * @param token + * @return + * returns int + */ + @WebMethod + @WebResult(name = "Integer", targetNamespace = "") + @RequestWrapper(localName = "addQuestion", targetNamespace = "http://question.model/", className = "model.question.AddQuestion") + @ResponseWrapper(localName = "addQuestionResponse", targetNamespace = "http://question.model/", className = "model.question.AddQuestionResponse") + @Action(input = "http://question.model/QuestionWS/addQuestionRequest", output = "http://question.model/QuestionWS/addQuestionResponse") + public int addQuestion( + @WebParam(name = "token", targetNamespace = "") + String token, + @WebParam(name = "topic", targetNamespace = "") + String topic, + @WebParam(name = "content", targetNamespace = "") + String content); + + /** + * + * @param arg0 + * @return + * returns java.util.List + */ + @WebMethod + @WebResult(name = "Question", targetNamespace = "") + @RequestWrapper(localName = "searchQuestions", targetNamespace = "http://question.model/", className = "model.question.SearchQuestions") + @ResponseWrapper(localName = "searchQuestionsResponse", targetNamespace = "http://question.model/", className = "model.question.SearchQuestionsResponse") + @Action(input = "http://question.model/QuestionWS/searchQuestionsRequest", output = "http://question.model/QuestionWS/searchQuestionsResponse") + public List searchQuestions( + @WebParam(name = "arg0", targetNamespace = "") + String arg0); + + /** + * + * @param questionId + * @return + * returns model.question.Question + */ + @WebMethod + @WebResult(name = "Question", targetNamespace = "") + @RequestWrapper(localName = "getQuestionByID", targetNamespace = "http://question.model/", className = "model.question.GetQuestionByID") + @ResponseWrapper(localName = "getQuestionByIDResponse", targetNamespace = "http://question.model/", className = "model.question.GetQuestionByIDResponse") + @Action(input = "http://question.model/QuestionWS/getQuestionByIDRequest", output = "http://question.model/QuestionWS/getQuestionByIDResponse") + public Question getQuestionByID( + @WebParam(name = "question_id", targetNamespace = "") + int questionId); + + /** + * + * @param questionId + * @param topic + * @param content + * @param token + * @return + * returns int + */ + @WebMethod + @WebResult(name = "Integer", targetNamespace = "") + @RequestWrapper(localName = "editQuestion", targetNamespace = "http://question.model/", className = "model.question.EditQuestion") + @ResponseWrapper(localName = "editQuestionResponse", targetNamespace = "http://question.model/", className = "model.question.EditQuestionResponse") + @Action(input = "http://question.model/QuestionWS/editQuestionRequest", output = "http://question.model/QuestionWS/editQuestionResponse") + public int editQuestion( + @WebParam(name = "token", targetNamespace = "") + String token, + @WebParam(name = "question_id", targetNamespace = "") + int questionId, + @WebParam(name = "topic", targetNamespace = "") + String topic, + @WebParam(name = "content", targetNamespace = "") + String content); + +} diff --git a/StackExchange_Client/build/generated/jax-wsCache/QuestionWS/model/question/QuestionWS_Service.java b/StackExchange_Client/build/generated/jax-wsCache/QuestionWS/model/question/QuestionWS_Service.java new file mode 100644 index 00000000..73572acb --- /dev/null +++ b/StackExchange_Client/build/generated/jax-wsCache/QuestionWS/model/question/QuestionWS_Service.java @@ -0,0 +1,94 @@ + +package model.question; + +import java.net.MalformedURLException; +import java.net.URL; +import javax.xml.namespace.QName; +import javax.xml.ws.Service; +import javax.xml.ws.WebEndpoint; +import javax.xml.ws.WebServiceClient; +import javax.xml.ws.WebServiceException; +import javax.xml.ws.WebServiceFeature; + + +/** + * This class was generated by the JAX-WS RI. + * JAX-WS RI 2.2.10-b140803.1500 + * Generated source version: 2.2 + * + */ +@WebServiceClient(name = "QuestionWS", targetNamespace = "http://question.model/", wsdlLocation = "http://localhost:8081/StackExchange_WS/QuestionWS?wsdl") +public class QuestionWS_Service + extends Service +{ + + private final static URL QUESTIONWS_WSDL_LOCATION; + private final static WebServiceException QUESTIONWS_EXCEPTION; + private final static QName QUESTIONWS_QNAME = new QName("http://question.model/", "QuestionWS"); + + static { + URL url = null; + WebServiceException e = null; + try { + url = new URL("http://localhost:8081/StackExchange_WS/QuestionWS?wsdl"); + } catch (MalformedURLException ex) { + e = new WebServiceException(ex); + } + QUESTIONWS_WSDL_LOCATION = url; + QUESTIONWS_EXCEPTION = e; + } + + public QuestionWS_Service() { + super(__getWsdlLocation(), QUESTIONWS_QNAME); + } + + public QuestionWS_Service(WebServiceFeature... features) { + super(__getWsdlLocation(), QUESTIONWS_QNAME, features); + } + + public QuestionWS_Service(URL wsdlLocation) { + super(wsdlLocation, QUESTIONWS_QNAME); + } + + public QuestionWS_Service(URL wsdlLocation, WebServiceFeature... features) { + super(wsdlLocation, QUESTIONWS_QNAME, features); + } + + public QuestionWS_Service(URL wsdlLocation, QName serviceName) { + super(wsdlLocation, serviceName); + } + + public QuestionWS_Service(URL wsdlLocation, QName serviceName, WebServiceFeature... features) { + super(wsdlLocation, serviceName, features); + } + + /** + * + * @return + * returns QuestionWS + */ + @WebEndpoint(name = "QuestionWSPort") + public QuestionWS getQuestionWSPort() { + return super.getPort(new QName("http://question.model/", "QuestionWSPort"), QuestionWS.class); + } + + /** + * + * @param features + * A list of {@link javax.xml.ws.WebServiceFeature} to configure on the proxy. Supported features not in the features parameter will have their default values. + * @return + * returns QuestionWS + */ + @WebEndpoint(name = "QuestionWSPort") + public QuestionWS getQuestionWSPort(WebServiceFeature... features) { + return super.getPort(new QName("http://question.model/", "QuestionWSPort"), QuestionWS.class, features); + } + + private static URL __getWsdlLocation() { + if (QUESTIONWS_EXCEPTION!= null) { + throw QUESTIONWS_EXCEPTION; + } + return QUESTIONWS_WSDL_LOCATION; + } + +} diff --git a/StackExchange_Client/build/generated/jax-wsCache/QuestionWS/model/question/SearchQuestions.java b/StackExchange_Client/build/generated/jax-wsCache/QuestionWS/model/question/SearchQuestions.java new file mode 100644 index 00000000..7669d0d6 --- /dev/null +++ b/StackExchange_Client/build/generated/jax-wsCache/QuestionWS/model/question/SearchQuestions.java @@ -0,0 +1,60 @@ + +package model.question; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Java class for searchQuestions complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="searchQuestions">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="arg0" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "searchQuestions", propOrder = { + "arg0" +}) +public class SearchQuestions { + + protected String arg0; + + /** + * Gets the value of the arg0 property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getArg0() { + return arg0; + } + + /** + * Sets the value of the arg0 property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setArg0(String value) { + this.arg0 = value; + } + +} diff --git a/StackExchange_Client/build/generated/jax-wsCache/QuestionWS/model/question/SearchQuestionsResponse.java b/StackExchange_Client/build/generated/jax-wsCache/QuestionWS/model/question/SearchQuestionsResponse.java new file mode 100644 index 00000000..88026b6b --- /dev/null +++ b/StackExchange_Client/build/generated/jax-wsCache/QuestionWS/model/question/SearchQuestionsResponse.java @@ -0,0 +1,69 @@ + +package model.question; + +import java.util.ArrayList; +import java.util.List; +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Java class for searchQuestionsResponse complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="searchQuestionsResponse">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="Question" type="{http://question.model/}question" maxOccurs="unbounded" minOccurs="0"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "searchQuestionsResponse", propOrder = { + "question" +}) +public class SearchQuestionsResponse { + + @XmlElement(name = "Question") + protected List question; + + /** + * Gets the value of the question property. + * + *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the question property. + * + *

+ * For example, to add a new item, do as follows: + *

+     *    getQuestion().add(newItem);
+     * 
+ * + * + *

+ * Objects of the following type(s) are allowed in the list + * {@link Question } + * + * + */ + public List getQuestion() { + if (question == null) { + question = new ArrayList(); + } + return this.question; + } + +} diff --git a/StackExchange_Client/build/generated/jax-wsCache/QuestionWS/model/question/package-info.java b/StackExchange_Client/build/generated/jax-wsCache/QuestionWS/model/question/package-info.java new file mode 100644 index 00000000..2fdd36d7 --- /dev/null +++ b/StackExchange_Client/build/generated/jax-wsCache/QuestionWS/model/question/package-info.java @@ -0,0 +1,2 @@ +@javax.xml.bind.annotation.XmlSchema(namespace = "http://question.model/") +package model.question; diff --git a/StackExchange_Client/build/generated/jax-wsCache/UserWS/model/user/AddUser.java b/StackExchange_Client/build/generated/jax-wsCache/UserWS/model/user/AddUser.java new file mode 100644 index 00000000..a8cdfd32 --- /dev/null +++ b/StackExchange_Client/build/generated/jax-wsCache/UserWS/model/user/AddUser.java @@ -0,0 +1,60 @@ + +package model.user; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Java class for addUser complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="addUser">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="u" type="{http://user.model/}user" minOccurs="0"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "addUser", propOrder = { + "u" +}) +public class AddUser { + + protected User u; + + /** + * Gets the value of the u property. + * + * @return + * possible object is + * {@link User } + * + */ + public User getU() { + return u; + } + + /** + * Sets the value of the u property. + * + * @param value + * allowed object is + * {@link User } + * + */ + public void setU(User value) { + this.u = value; + } + +} diff --git a/StackExchange_Client/build/generated/jax-wsCache/UserWS/model/user/GetIDbyEmail.java b/StackExchange_Client/build/generated/jax-wsCache/UserWS/model/user/GetIDbyEmail.java new file mode 100644 index 00000000..4c4a776e --- /dev/null +++ b/StackExchange_Client/build/generated/jax-wsCache/UserWS/model/user/GetIDbyEmail.java @@ -0,0 +1,60 @@ + +package model.user; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Java class for getIDbyEmail complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="getIDbyEmail">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="email" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "getIDbyEmail", propOrder = { + "email" +}) +public class GetIDbyEmail { + + protected String email; + + /** + * Gets the value of the email property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getEmail() { + return email; + } + + /** + * Sets the value of the email property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setEmail(String value) { + this.email = value; + } + +} diff --git a/StackExchange_Client/build/generated/jax-wsCache/UserWS/model/user/GetIDbyEmailResponse.java b/StackExchange_Client/build/generated/jax-wsCache/UserWS/model/user/GetIDbyEmailResponse.java new file mode 100644 index 00000000..fba44dd3 --- /dev/null +++ b/StackExchange_Client/build/generated/jax-wsCache/UserWS/model/user/GetIDbyEmailResponse.java @@ -0,0 +1,62 @@ + +package model.user; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Java class for getIDbyEmailResponse complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="getIDbyEmailResponse">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="Integer" type="{http://www.w3.org/2001/XMLSchema}int" minOccurs="0"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "getIDbyEmailResponse", propOrder = { + "integer" +}) +public class GetIDbyEmailResponse { + + @XmlElement(name = "Integer") + protected Integer integer; + + /** + * Gets the value of the integer property. + * + * @return + * possible object is + * {@link Integer } + * + */ + public Integer getInteger() { + return integer; + } + + /** + * Sets the value of the integer property. + * + * @param value + * allowed object is + * {@link Integer } + * + */ + public void setInteger(Integer value) { + this.integer = value; + } + +} diff --git a/StackExchange_Client/build/generated/jax-wsCache/UserWS/model/user/GetUserByID.java b/StackExchange_Client/build/generated/jax-wsCache/UserWS/model/user/GetUserByID.java new file mode 100644 index 00000000..15620229 --- /dev/null +++ b/StackExchange_Client/build/generated/jax-wsCache/UserWS/model/user/GetUserByID.java @@ -0,0 +1,54 @@ + +package model.user; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Java class for getUserByID complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="getUserByID">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="user_id" type="{http://www.w3.org/2001/XMLSchema}int"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "getUserByID", propOrder = { + "userId" +}) +public class GetUserByID { + + @XmlElement(name = "user_id") + protected int userId; + + /** + * Gets the value of the userId property. + * + */ + public int getUserId() { + return userId; + } + + /** + * Sets the value of the userId property. + * + */ + public void setUserId(int value) { + this.userId = value; + } + +} diff --git a/StackExchange_Client/build/generated/jax-wsCache/UserWS/model/user/GetUserByIDResponse.java b/StackExchange_Client/build/generated/jax-wsCache/UserWS/model/user/GetUserByIDResponse.java new file mode 100644 index 00000000..d2ef87b4 --- /dev/null +++ b/StackExchange_Client/build/generated/jax-wsCache/UserWS/model/user/GetUserByIDResponse.java @@ -0,0 +1,62 @@ + +package model.user; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Java class for getUserByIDResponse complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="getUserByIDResponse">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="User" type="{http://user.model/}user" minOccurs="0"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "getUserByIDResponse", propOrder = { + "user" +}) +public class GetUserByIDResponse { + + @XmlElement(name = "User") + protected User user; + + /** + * Gets the value of the user property. + * + * @return + * possible object is + * {@link User } + * + */ + public User getUser() { + return user; + } + + /** + * Sets the value of the user property. + * + * @param value + * allowed object is + * {@link User } + * + */ + public void setUser(User value) { + this.user = value; + } + +} diff --git a/StackExchange_Client/build/generated/jax-wsCache/UserWS/model/user/GetUserByToken.java b/StackExchange_Client/build/generated/jax-wsCache/UserWS/model/user/GetUserByToken.java new file mode 100644 index 00000000..dbd053a5 --- /dev/null +++ b/StackExchange_Client/build/generated/jax-wsCache/UserWS/model/user/GetUserByToken.java @@ -0,0 +1,60 @@ + +package model.user; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Java class for getUserByToken complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="getUserByToken">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="token" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "getUserByToken", propOrder = { + "token" +}) +public class GetUserByToken { + + protected String token; + + /** + * Gets the value of the token property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getToken() { + return token; + } + + /** + * Sets the value of the token property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setToken(String value) { + this.token = value; + } + +} diff --git a/StackExchange_Client/build/generated/jax-wsCache/UserWS/model/user/GetUserByTokenResponse.java b/StackExchange_Client/build/generated/jax-wsCache/UserWS/model/user/GetUserByTokenResponse.java new file mode 100644 index 00000000..50aea398 --- /dev/null +++ b/StackExchange_Client/build/generated/jax-wsCache/UserWS/model/user/GetUserByTokenResponse.java @@ -0,0 +1,62 @@ + +package model.user; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Java class for getUserByTokenResponse complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="getUserByTokenResponse">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="User" type="{http://user.model/}user" minOccurs="0"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "getUserByTokenResponse", propOrder = { + "user" +}) +public class GetUserByTokenResponse { + + @XmlElement(name = "User") + protected User user; + + /** + * Gets the value of the user property. + * + * @return + * possible object is + * {@link User } + * + */ + public User getUser() { + return user; + } + + /** + * Sets the value of the user property. + * + * @param value + * allowed object is + * {@link User } + * + */ + public void setUser(User value) { + this.user = value; + } + +} diff --git a/StackExchange_Client/build/generated/jax-wsCache/UserWS/model/user/ObjectFactory.java b/StackExchange_Client/build/generated/jax-wsCache/UserWS/model/user/ObjectFactory.java new file mode 100644 index 00000000..56c35ceb --- /dev/null +++ b/StackExchange_Client/build/generated/jax-wsCache/UserWS/model/user/ObjectFactory.java @@ -0,0 +1,179 @@ + +package model.user; + +import javax.xml.bind.JAXBElement; +import javax.xml.bind.annotation.XmlElementDecl; +import javax.xml.bind.annotation.XmlRegistry; +import javax.xml.namespace.QName; + + +/** + * This object contains factory methods for each + * Java content interface and Java element interface + * generated in the model.user package. + *

An ObjectFactory allows you to programatically + * construct new instances of the Java representation + * for XML content. The Java representation of XML + * content can consist of schema derived interfaces + * and classes representing the binding of schema + * type definitions, element declarations and model + * groups. Factory methods for each of these are + * provided in this class. + * + */ +@XmlRegistry +public class ObjectFactory { + + private final static QName _AddUser_QNAME = new QName("http://user.model/", "addUser"); + private final static QName _GetUserByIDResponse_QNAME = new QName("http://user.model/", "getUserByIDResponse"); + private final static QName _GetUserByTokenResponse_QNAME = new QName("http://user.model/", "getUserByTokenResponse"); + private final static QName _User_QNAME = new QName("http://user.model/", "User"); + private final static QName _GetUserByID_QNAME = new QName("http://user.model/", "getUserByID"); + private final static QName _GetIDbyEmail_QNAME = new QName("http://user.model/", "getIDbyEmail"); + private final static QName _GetUserByToken_QNAME = new QName("http://user.model/", "getUserByToken"); + private final static QName _GetIDbyEmailResponse_QNAME = new QName("http://user.model/", "getIDbyEmailResponse"); + + /** + * Create a new ObjectFactory that can be used to create new instances of schema derived classes for package: model.user + * + */ + public ObjectFactory() { + } + + /** + * Create an instance of {@link User } + * + */ + public User createUser() { + return new User(); + } + + /** + * Create an instance of {@link GetUserByID } + * + */ + public GetUserByID createGetUserByID() { + return new GetUserByID(); + } + + /** + * Create an instance of {@link AddUser } + * + */ + public AddUser createAddUser() { + return new AddUser(); + } + + /** + * Create an instance of {@link GetUserByIDResponse } + * + */ + public GetUserByIDResponse createGetUserByIDResponse() { + return new GetUserByIDResponse(); + } + + /** + * Create an instance of {@link GetUserByTokenResponse } + * + */ + public GetUserByTokenResponse createGetUserByTokenResponse() { + return new GetUserByTokenResponse(); + } + + /** + * Create an instance of {@link GetUserByToken } + * + */ + public GetUserByToken createGetUserByToken() { + return new GetUserByToken(); + } + + /** + * Create an instance of {@link GetIDbyEmailResponse } + * + */ + public GetIDbyEmailResponse createGetIDbyEmailResponse() { + return new GetIDbyEmailResponse(); + } + + /** + * Create an instance of {@link GetIDbyEmail } + * + */ + public GetIDbyEmail createGetIDbyEmail() { + return new GetIDbyEmail(); + } + + /** + * Create an instance of {@link JAXBElement }{@code <}{@link AddUser }{@code >}} + * + */ + @XmlElementDecl(namespace = "http://user.model/", name = "addUser") + public JAXBElement createAddUser(AddUser value) { + return new JAXBElement(_AddUser_QNAME, AddUser.class, null, value); + } + + /** + * Create an instance of {@link JAXBElement }{@code <}{@link GetUserByIDResponse }{@code >}} + * + */ + @XmlElementDecl(namespace = "http://user.model/", name = "getUserByIDResponse") + public JAXBElement createGetUserByIDResponse(GetUserByIDResponse value) { + return new JAXBElement(_GetUserByIDResponse_QNAME, GetUserByIDResponse.class, null, value); + } + + /** + * Create an instance of {@link JAXBElement }{@code <}{@link GetUserByTokenResponse }{@code >}} + * + */ + @XmlElementDecl(namespace = "http://user.model/", name = "getUserByTokenResponse") + public JAXBElement createGetUserByTokenResponse(GetUserByTokenResponse value) { + return new JAXBElement(_GetUserByTokenResponse_QNAME, GetUserByTokenResponse.class, null, value); + } + + /** + * Create an instance of {@link JAXBElement }{@code <}{@link User }{@code >}} + * + */ + @XmlElementDecl(namespace = "http://user.model/", name = "User") + public JAXBElement createUser(User value) { + return new JAXBElement(_User_QNAME, User.class, null, value); + } + + /** + * Create an instance of {@link JAXBElement }{@code <}{@link GetUserByID }{@code >}} + * + */ + @XmlElementDecl(namespace = "http://user.model/", name = "getUserByID") + public JAXBElement createGetUserByID(GetUserByID value) { + return new JAXBElement(_GetUserByID_QNAME, GetUserByID.class, null, value); + } + + /** + * Create an instance of {@link JAXBElement }{@code <}{@link GetIDbyEmail }{@code >}} + * + */ + @XmlElementDecl(namespace = "http://user.model/", name = "getIDbyEmail") + public JAXBElement createGetIDbyEmail(GetIDbyEmail value) { + return new JAXBElement(_GetIDbyEmail_QNAME, GetIDbyEmail.class, null, value); + } + + /** + * Create an instance of {@link JAXBElement }{@code <}{@link GetUserByToken }{@code >}} + * + */ + @XmlElementDecl(namespace = "http://user.model/", name = "getUserByToken") + public JAXBElement createGetUserByToken(GetUserByToken value) { + return new JAXBElement(_GetUserByToken_QNAME, GetUserByToken.class, null, value); + } + + /** + * Create an instance of {@link JAXBElement }{@code <}{@link GetIDbyEmailResponse }{@code >}} + * + */ + @XmlElementDecl(namespace = "http://user.model/", name = "getIDbyEmailResponse") + public JAXBElement createGetIDbyEmailResponse(GetIDbyEmailResponse value) { + return new JAXBElement(_GetIDbyEmailResponse_QNAME, GetIDbyEmailResponse.class, null, value); + } + +} diff --git a/StackExchange_Client/build/generated/jax-wsCache/UserWS/model/user/User.java b/StackExchange_Client/build/generated/jax-wsCache/UserWS/model/user/User.java new file mode 100644 index 00000000..6393a704 --- /dev/null +++ b/StackExchange_Client/build/generated/jax-wsCache/UserWS/model/user/User.java @@ -0,0 +1,138 @@ + +package model.user; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Java class for user complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="user">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="email" type="{http://www.w3.org/2001/XMLSchema}string"/>
+ *         <element name="name" type="{http://www.w3.org/2001/XMLSchema}string"/>
+ *         <element name="password" type="{http://www.w3.org/2001/XMLSchema}string"/>
+ *         <element name="user_id" type="{http://www.w3.org/2001/XMLSchema}int"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "user", propOrder = { + "email", + "name", + "password", + "userId" +}) +public class User { + + @XmlElement(required = true) + protected String email; + @XmlElement(required = true) + protected String name; + @XmlElement(required = true) + protected String password; + @XmlElement(name = "user_id") + protected int userId; + + /** + * Gets the value of the email property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getEmail() { + return email; + } + + /** + * Sets the value of the email property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setEmail(String value) { + this.email = value; + } + + /** + * Gets the value of the name property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getName() { + return name; + } + + /** + * Sets the value of the name property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setName(String value) { + this.name = value; + } + + /** + * Gets the value of the password property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getPassword() { + return password; + } + + /** + * Sets the value of the password property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setPassword(String value) { + this.password = value; + } + + /** + * Gets the value of the userId property. + * + */ + public int getUserId() { + return userId; + } + + /** + * Sets the value of the userId property. + * + */ + public void setUserId(int value) { + this.userId = value; + } + +} diff --git a/StackExchange_Client/build/generated/jax-wsCache/UserWS/model/user/UserWS.java b/StackExchange_Client/build/generated/jax-wsCache/UserWS/model/user/UserWS.java new file mode 100644 index 00000000..7b22dd55 --- /dev/null +++ b/StackExchange_Client/build/generated/jax-wsCache/UserWS/model/user/UserWS.java @@ -0,0 +1,85 @@ + +package model.user; + +import javax.jws.Oneway; +import javax.jws.WebMethod; +import javax.jws.WebParam; +import javax.jws.WebResult; +import javax.jws.WebService; +import javax.xml.bind.annotation.XmlSeeAlso; +import javax.xml.ws.Action; +import javax.xml.ws.RequestWrapper; +import javax.xml.ws.ResponseWrapper; + + +/** + * This class was generated by the JAX-WS RI. + * JAX-WS RI 2.2.10-b140803.1500 + * Generated source version: 2.2 + * + */ +@WebService(name = "UserWS", targetNamespace = "http://user.model/") +@XmlSeeAlso({ + ObjectFactory.class +}) +public interface UserWS { + + + /** + * + * @param u + */ + @WebMethod + @Oneway + @RequestWrapper(localName = "addUser", targetNamespace = "http://user.model/", className = "model.user.AddUser") + @Action(input = "http://user.model/UserWS/addUser") + public void addUser( + @WebParam(name = "u", targetNamespace = "") + User u); + + /** + * + * @param userId + * @return + * returns model.user.User + */ + @WebMethod + @WebResult(name = "User", targetNamespace = "") + @RequestWrapper(localName = "getUserByID", targetNamespace = "http://user.model/", className = "model.user.GetUserByID") + @ResponseWrapper(localName = "getUserByIDResponse", targetNamespace = "http://user.model/", className = "model.user.GetUserByIDResponse") + @Action(input = "http://user.model/UserWS/getUserByIDRequest", output = "http://user.model/UserWS/getUserByIDResponse") + public User getUserByID( + @WebParam(name = "user_id", targetNamespace = "") + int userId); + + /** + * + * @param email + * @return + * returns java.lang.Integer + */ + @WebMethod + @WebResult(name = "Integer", targetNamespace = "") + @RequestWrapper(localName = "getIDbyEmail", targetNamespace = "http://user.model/", className = "model.user.GetIDbyEmail") + @ResponseWrapper(localName = "getIDbyEmailResponse", targetNamespace = "http://user.model/", className = "model.user.GetIDbyEmailResponse") + @Action(input = "http://user.model/UserWS/getIDbyEmailRequest", output = "http://user.model/UserWS/getIDbyEmailResponse") + public Integer getIDbyEmail( + @WebParam(name = "email", targetNamespace = "") + String email); + + /** + * + * @param token + * @return + * returns model.user.User + */ + @WebMethod + @WebResult(name = "User", targetNamespace = "") + @RequestWrapper(localName = "getUserByToken", targetNamespace = "http://user.model/", className = "model.user.GetUserByToken") + @ResponseWrapper(localName = "getUserByTokenResponse", targetNamespace = "http://user.model/", className = "model.user.GetUserByTokenResponse") + @Action(input = "http://user.model/UserWS/getUserByTokenRequest", output = "http://user.model/UserWS/getUserByTokenResponse") + public User getUserByToken( + @WebParam(name = "token", targetNamespace = "") + String token); + +} diff --git a/StackExchange_Client/build/generated/jax-wsCache/UserWS/model/user/UserWS_Service.java b/StackExchange_Client/build/generated/jax-wsCache/UserWS/model/user/UserWS_Service.java new file mode 100644 index 00000000..732b7f53 --- /dev/null +++ b/StackExchange_Client/build/generated/jax-wsCache/UserWS/model/user/UserWS_Service.java @@ -0,0 +1,94 @@ + +package model.user; + +import java.net.MalformedURLException; +import java.net.URL; +import javax.xml.namespace.QName; +import javax.xml.ws.Service; +import javax.xml.ws.WebEndpoint; +import javax.xml.ws.WebServiceClient; +import javax.xml.ws.WebServiceException; +import javax.xml.ws.WebServiceFeature; + + +/** + * This class was generated by the JAX-WS RI. + * JAX-WS RI 2.2.10-b140803.1500 + * Generated source version: 2.2 + * + */ +@WebServiceClient(name = "UserWS", targetNamespace = "http://user.model/", wsdlLocation = "http://localhost:8081/StackExchange_WS/UserWS?wsdl") +public class UserWS_Service + extends Service +{ + + private final static URL USERWS_WSDL_LOCATION; + private final static WebServiceException USERWS_EXCEPTION; + private final static QName USERWS_QNAME = new QName("http://user.model/", "UserWS"); + + static { + URL url = null; + WebServiceException e = null; + try { + url = new URL("http://localhost:8081/StackExchange_WS/UserWS?wsdl"); + } catch (MalformedURLException ex) { + e = new WebServiceException(ex); + } + USERWS_WSDL_LOCATION = url; + USERWS_EXCEPTION = e; + } + + public UserWS_Service() { + super(__getWsdlLocation(), USERWS_QNAME); + } + + public UserWS_Service(WebServiceFeature... features) { + super(__getWsdlLocation(), USERWS_QNAME, features); + } + + public UserWS_Service(URL wsdlLocation) { + super(wsdlLocation, USERWS_QNAME); + } + + public UserWS_Service(URL wsdlLocation, WebServiceFeature... features) { + super(wsdlLocation, USERWS_QNAME, features); + } + + public UserWS_Service(URL wsdlLocation, QName serviceName) { + super(wsdlLocation, serviceName); + } + + public UserWS_Service(URL wsdlLocation, QName serviceName, WebServiceFeature... features) { + super(wsdlLocation, serviceName, features); + } + + /** + * + * @return + * returns UserWS + */ + @WebEndpoint(name = "UserWSPort") + public UserWS getUserWSPort() { + return super.getPort(new QName("http://user.model/", "UserWSPort"), UserWS.class); + } + + /** + * + * @param features + * A list of {@link javax.xml.ws.WebServiceFeature} to configure on the proxy. Supported features not in the features parameter will have their default values. + * @return + * returns UserWS + */ + @WebEndpoint(name = "UserWSPort") + public UserWS getUserWSPort(WebServiceFeature... features) { + return super.getPort(new QName("http://user.model/", "UserWSPort"), UserWS.class, features); + } + + private static URL __getWsdlLocation() { + if (USERWS_EXCEPTION!= null) { + throw USERWS_EXCEPTION; + } + return USERWS_WSDL_LOCATION; + } + +} diff --git a/StackExchange_Client/build/generated/jax-wsCache/UserWS/model/user/package-info.java b/StackExchange_Client/build/generated/jax-wsCache/UserWS/model/user/package-info.java new file mode 100644 index 00000000..75e00706 --- /dev/null +++ b/StackExchange_Client/build/generated/jax-wsCache/UserWS/model/user/package-info.java @@ -0,0 +1,2 @@ +@javax.xml.bind.annotation.XmlSchema(namespace = "http://user.model/") +package model.user; diff --git a/StackExchange_Client/build/generated/jax-wsCache/VoteWS/model/vote/GetAnswerVotes.java b/StackExchange_Client/build/generated/jax-wsCache/VoteWS/model/vote/GetAnswerVotes.java new file mode 100644 index 00000000..790a51c0 --- /dev/null +++ b/StackExchange_Client/build/generated/jax-wsCache/VoteWS/model/vote/GetAnswerVotes.java @@ -0,0 +1,54 @@ + +package model.vote; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Java class for getAnswerVotes complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="getAnswerVotes">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="answer_id" type="{http://www.w3.org/2001/XMLSchema}int"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "getAnswerVotes", propOrder = { + "answerId" +}) +public class GetAnswerVotes { + + @XmlElement(name = "answer_id") + protected int answerId; + + /** + * Gets the value of the answerId property. + * + */ + public int getAnswerId() { + return answerId; + } + + /** + * Sets the value of the answerId property. + * + */ + public void setAnswerId(int value) { + this.answerId = value; + } + +} diff --git a/StackExchange_Client/build/generated/jax-wsCache/VoteWS/model/vote/GetAnswerVotesResponse.java b/StackExchange_Client/build/generated/jax-wsCache/VoteWS/model/vote/GetAnswerVotesResponse.java new file mode 100644 index 00000000..98e183b9 --- /dev/null +++ b/StackExchange_Client/build/generated/jax-wsCache/VoteWS/model/vote/GetAnswerVotesResponse.java @@ -0,0 +1,54 @@ + +package model.vote; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Java class for getAnswerVotesResponse complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="getAnswerVotesResponse">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="return" type="{http://www.w3.org/2001/XMLSchema}int"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "getAnswerVotesResponse", propOrder = { + "_return" +}) +public class GetAnswerVotesResponse { + + @XmlElement(name = "return") + protected int _return; + + /** + * Gets the value of the return property. + * + */ + public int getReturn() { + return _return; + } + + /** + * Sets the value of the return property. + * + */ + public void setReturn(int value) { + this._return = value; + } + +} diff --git a/StackExchange_Client/build/generated/jax-wsCache/VoteWS/model/vote/GetQuestionVotes.java b/StackExchange_Client/build/generated/jax-wsCache/VoteWS/model/vote/GetQuestionVotes.java new file mode 100644 index 00000000..b095ebfc --- /dev/null +++ b/StackExchange_Client/build/generated/jax-wsCache/VoteWS/model/vote/GetQuestionVotes.java @@ -0,0 +1,54 @@ + +package model.vote; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Java class for getQuestionVotes complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="getQuestionVotes">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="question_id" type="{http://www.w3.org/2001/XMLSchema}int"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "getQuestionVotes", propOrder = { + "questionId" +}) +public class GetQuestionVotes { + + @XmlElement(name = "question_id") + protected int questionId; + + /** + * Gets the value of the questionId property. + * + */ + public int getQuestionId() { + return questionId; + } + + /** + * Sets the value of the questionId property. + * + */ + public void setQuestionId(int value) { + this.questionId = value; + } + +} diff --git a/StackExchange_Client/build/generated/jax-wsCache/VoteWS/model/vote/GetQuestionVotesResponse.java b/StackExchange_Client/build/generated/jax-wsCache/VoteWS/model/vote/GetQuestionVotesResponse.java new file mode 100644 index 00000000..de713c4d --- /dev/null +++ b/StackExchange_Client/build/generated/jax-wsCache/VoteWS/model/vote/GetQuestionVotesResponse.java @@ -0,0 +1,54 @@ + +package model.vote; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Java class for getQuestionVotesResponse complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="getQuestionVotesResponse">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="return" type="{http://www.w3.org/2001/XMLSchema}int"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "getQuestionVotesResponse", propOrder = { + "_return" +}) +public class GetQuestionVotesResponse { + + @XmlElement(name = "return") + protected int _return; + + /** + * Gets the value of the return property. + * + */ + public int getReturn() { + return _return; + } + + /** + * Sets the value of the return property. + * + */ + public void setReturn(int value) { + this._return = value; + } + +} diff --git a/StackExchange_Client/build/generated/jax-wsCache/VoteWS/model/vote/HasVotedAnswer.java b/StackExchange_Client/build/generated/jax-wsCache/VoteWS/model/vote/HasVotedAnswer.java new file mode 100644 index 00000000..a934c394 --- /dev/null +++ b/StackExchange_Client/build/generated/jax-wsCache/VoteWS/model/vote/HasVotedAnswer.java @@ -0,0 +1,74 @@ + +package model.vote; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Java class for hasVotedAnswer complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="hasVotedAnswer">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="answer_id" type="{http://www.w3.org/2001/XMLSchema}int"/>
+ *         <element name="user_id" type="{http://www.w3.org/2001/XMLSchema}int"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "hasVotedAnswer", propOrder = { + "answerId", + "userId" +}) +public class HasVotedAnswer { + + @XmlElement(name = "answer_id") + protected int answerId; + @XmlElement(name = "user_id") + protected int userId; + + /** + * Gets the value of the answerId property. + * + */ + public int getAnswerId() { + return answerId; + } + + /** + * Sets the value of the answerId property. + * + */ + public void setAnswerId(int value) { + this.answerId = value; + } + + /** + * Gets the value of the userId property. + * + */ + public int getUserId() { + return userId; + } + + /** + * Sets the value of the userId property. + * + */ + public void setUserId(int value) { + this.userId = value; + } + +} diff --git a/StackExchange_Client/build/generated/jax-wsCache/VoteWS/model/vote/HasVotedAnswerResponse.java b/StackExchange_Client/build/generated/jax-wsCache/VoteWS/model/vote/HasVotedAnswerResponse.java new file mode 100644 index 00000000..11f66f54 --- /dev/null +++ b/StackExchange_Client/build/generated/jax-wsCache/VoteWS/model/vote/HasVotedAnswerResponse.java @@ -0,0 +1,54 @@ + +package model.vote; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Java class for hasVotedAnswerResponse complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="hasVotedAnswerResponse">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="return" type="{http://www.w3.org/2001/XMLSchema}boolean"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "hasVotedAnswerResponse", propOrder = { + "_return" +}) +public class HasVotedAnswerResponse { + + @XmlElement(name = "return") + protected boolean _return; + + /** + * Gets the value of the return property. + * + */ + public boolean isReturn() { + return _return; + } + + /** + * Sets the value of the return property. + * + */ + public void setReturn(boolean value) { + this._return = value; + } + +} diff --git a/StackExchange_Client/build/generated/jax-wsCache/VoteWS/model/vote/HasVotedQuestion.java b/StackExchange_Client/build/generated/jax-wsCache/VoteWS/model/vote/HasVotedQuestion.java new file mode 100644 index 00000000..9bb77ea6 --- /dev/null +++ b/StackExchange_Client/build/generated/jax-wsCache/VoteWS/model/vote/HasVotedQuestion.java @@ -0,0 +1,74 @@ + +package model.vote; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Java class for hasVotedQuestion complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="hasVotedQuestion">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="question_id" type="{http://www.w3.org/2001/XMLSchema}int"/>
+ *         <element name="user_id" type="{http://www.w3.org/2001/XMLSchema}int"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "hasVotedQuestion", propOrder = { + "questionId", + "userId" +}) +public class HasVotedQuestion { + + @XmlElement(name = "question_id") + protected int questionId; + @XmlElement(name = "user_id") + protected int userId; + + /** + * Gets the value of the questionId property. + * + */ + public int getQuestionId() { + return questionId; + } + + /** + * Sets the value of the questionId property. + * + */ + public void setQuestionId(int value) { + this.questionId = value; + } + + /** + * Gets the value of the userId property. + * + */ + public int getUserId() { + return userId; + } + + /** + * Sets the value of the userId property. + * + */ + public void setUserId(int value) { + this.userId = value; + } + +} diff --git a/StackExchange_Client/build/generated/jax-wsCache/VoteWS/model/vote/HasVotedQuestionResponse.java b/StackExchange_Client/build/generated/jax-wsCache/VoteWS/model/vote/HasVotedQuestionResponse.java new file mode 100644 index 00000000..ae09ec5b --- /dev/null +++ b/StackExchange_Client/build/generated/jax-wsCache/VoteWS/model/vote/HasVotedQuestionResponse.java @@ -0,0 +1,54 @@ + +package model.vote; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Java class for hasVotedQuestionResponse complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="hasVotedQuestionResponse">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="return" type="{http://www.w3.org/2001/XMLSchema}boolean"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "hasVotedQuestionResponse", propOrder = { + "_return" +}) +public class HasVotedQuestionResponse { + + @XmlElement(name = "return") + protected boolean _return; + + /** + * Gets the value of the return property. + * + */ + public boolean isReturn() { + return _return; + } + + /** + * Sets the value of the return property. + * + */ + public void setReturn(boolean value) { + this._return = value; + } + +} diff --git a/StackExchange_Client/build/generated/jax-wsCache/VoteWS/model/vote/ObjectFactory.java b/StackExchange_Client/build/generated/jax-wsCache/VoteWS/model/vote/ObjectFactory.java new file mode 100644 index 00000000..ecccc8ee --- /dev/null +++ b/StackExchange_Client/build/generated/jax-wsCache/VoteWS/model/vote/ObjectFactory.java @@ -0,0 +1,251 @@ + +package model.vote; + +import javax.xml.bind.JAXBElement; +import javax.xml.bind.annotation.XmlElementDecl; +import javax.xml.bind.annotation.XmlRegistry; +import javax.xml.namespace.QName; + + +/** + * This object contains factory methods for each + * Java content interface and Java element interface + * generated in the model.vote package. + *

An ObjectFactory allows you to programatically + * construct new instances of the Java representation + * for XML content. The Java representation of XML + * content can consist of schema derived interfaces + * and classes representing the binding of schema + * type definitions, element declarations and model + * groups. Factory methods for each of these are + * provided in this class. + * + */ +@XmlRegistry +public class ObjectFactory { + + private final static QName _HasVotedAnswerResponse_QNAME = new QName("http://vote.model/", "hasVotedAnswerResponse"); + private final static QName _HasVotedAnswer_QNAME = new QName("http://vote.model/", "hasVotedAnswer"); + private final static QName _VoteQuestion_QNAME = new QName("http://vote.model/", "voteQuestion"); + private final static QName _GetQuestionVotes_QNAME = new QName("http://vote.model/", "getQuestionVotes"); + private final static QName _VoteAnswer_QNAME = new QName("http://vote.model/", "voteAnswer"); + private final static QName _VoteAnswerResponse_QNAME = new QName("http://vote.model/", "voteAnswerResponse"); + private final static QName _GetQuestionVotesResponse_QNAME = new QName("http://vote.model/", "getQuestionVotesResponse"); + private final static QName _GetAnswerVotes_QNAME = new QName("http://vote.model/", "getAnswerVotes"); + private final static QName _VoteQuestionResponse_QNAME = new QName("http://vote.model/", "voteQuestionResponse"); + private final static QName _GetAnswerVotesResponse_QNAME = new QName("http://vote.model/", "getAnswerVotesResponse"); + private final static QName _HasVotedQuestion_QNAME = new QName("http://vote.model/", "hasVotedQuestion"); + private final static QName _HasVotedQuestionResponse_QNAME = new QName("http://vote.model/", "hasVotedQuestionResponse"); + + /** + * Create a new ObjectFactory that can be used to create new instances of schema derived classes for package: model.vote + * + */ + public ObjectFactory() { + } + + /** + * Create an instance of {@link GetAnswerVotes } + * + */ + public GetAnswerVotes createGetAnswerVotes() { + return new GetAnswerVotes(); + } + + /** + * Create an instance of {@link VoteQuestionResponse } + * + */ + public VoteQuestionResponse createVoteQuestionResponse() { + return new VoteQuestionResponse(); + } + + /** + * Create an instance of {@link GetAnswerVotesResponse } + * + */ + public GetAnswerVotesResponse createGetAnswerVotesResponse() { + return new GetAnswerVotesResponse(); + } + + /** + * Create an instance of {@link HasVotedQuestion } + * + */ + public HasVotedQuestion createHasVotedQuestion() { + return new HasVotedQuestion(); + } + + /** + * Create an instance of {@link HasVotedQuestionResponse } + * + */ + public HasVotedQuestionResponse createHasVotedQuestionResponse() { + return new HasVotedQuestionResponse(); + } + + /** + * Create an instance of {@link VoteAnswerResponse } + * + */ + public VoteAnswerResponse createVoteAnswerResponse() { + return new VoteAnswerResponse(); + } + + /** + * Create an instance of {@link GetQuestionVotesResponse } + * + */ + public GetQuestionVotesResponse createGetQuestionVotesResponse() { + return new GetQuestionVotesResponse(); + } + + /** + * Create an instance of {@link GetQuestionVotes } + * + */ + public GetQuestionVotes createGetQuestionVotes() { + return new GetQuestionVotes(); + } + + /** + * Create an instance of {@link VoteAnswer } + * + */ + public VoteAnswer createVoteAnswer() { + return new VoteAnswer(); + } + + /** + * Create an instance of {@link HasVotedAnswerResponse } + * + */ + public HasVotedAnswerResponse createHasVotedAnswerResponse() { + return new HasVotedAnswerResponse(); + } + + /** + * Create an instance of {@link HasVotedAnswer } + * + */ + public HasVotedAnswer createHasVotedAnswer() { + return new HasVotedAnswer(); + } + + /** + * Create an instance of {@link VoteQuestion } + * + */ + public VoteQuestion createVoteQuestion() { + return new VoteQuestion(); + } + + /** + * Create an instance of {@link JAXBElement }{@code <}{@link HasVotedAnswerResponse }{@code >}} + * + */ + @XmlElementDecl(namespace = "http://vote.model/", name = "hasVotedAnswerResponse") + public JAXBElement createHasVotedAnswerResponse(HasVotedAnswerResponse value) { + return new JAXBElement(_HasVotedAnswerResponse_QNAME, HasVotedAnswerResponse.class, null, value); + } + + /** + * Create an instance of {@link JAXBElement }{@code <}{@link HasVotedAnswer }{@code >}} + * + */ + @XmlElementDecl(namespace = "http://vote.model/", name = "hasVotedAnswer") + public JAXBElement createHasVotedAnswer(HasVotedAnswer value) { + return new JAXBElement(_HasVotedAnswer_QNAME, HasVotedAnswer.class, null, value); + } + + /** + * Create an instance of {@link JAXBElement }{@code <}{@link VoteQuestion }{@code >}} + * + */ + @XmlElementDecl(namespace = "http://vote.model/", name = "voteQuestion") + public JAXBElement createVoteQuestion(VoteQuestion value) { + return new JAXBElement(_VoteQuestion_QNAME, VoteQuestion.class, null, value); + } + + /** + * Create an instance of {@link JAXBElement }{@code <}{@link GetQuestionVotes }{@code >}} + * + */ + @XmlElementDecl(namespace = "http://vote.model/", name = "getQuestionVotes") + public JAXBElement createGetQuestionVotes(GetQuestionVotes value) { + return new JAXBElement(_GetQuestionVotes_QNAME, GetQuestionVotes.class, null, value); + } + + /** + * Create an instance of {@link JAXBElement }{@code <}{@link VoteAnswer }{@code >}} + * + */ + @XmlElementDecl(namespace = "http://vote.model/", name = "voteAnswer") + public JAXBElement createVoteAnswer(VoteAnswer value) { + return new JAXBElement(_VoteAnswer_QNAME, VoteAnswer.class, null, value); + } + + /** + * Create an instance of {@link JAXBElement }{@code <}{@link VoteAnswerResponse }{@code >}} + * + */ + @XmlElementDecl(namespace = "http://vote.model/", name = "voteAnswerResponse") + public JAXBElement createVoteAnswerResponse(VoteAnswerResponse value) { + return new JAXBElement(_VoteAnswerResponse_QNAME, VoteAnswerResponse.class, null, value); + } + + /** + * Create an instance of {@link JAXBElement }{@code <}{@link GetQuestionVotesResponse }{@code >}} + * + */ + @XmlElementDecl(namespace = "http://vote.model/", name = "getQuestionVotesResponse") + public JAXBElement createGetQuestionVotesResponse(GetQuestionVotesResponse value) { + return new JAXBElement(_GetQuestionVotesResponse_QNAME, GetQuestionVotesResponse.class, null, value); + } + + /** + * Create an instance of {@link JAXBElement }{@code <}{@link GetAnswerVotes }{@code >}} + * + */ + @XmlElementDecl(namespace = "http://vote.model/", name = "getAnswerVotes") + public JAXBElement createGetAnswerVotes(GetAnswerVotes value) { + return new JAXBElement(_GetAnswerVotes_QNAME, GetAnswerVotes.class, null, value); + } + + /** + * Create an instance of {@link JAXBElement }{@code <}{@link VoteQuestionResponse }{@code >}} + * + */ + @XmlElementDecl(namespace = "http://vote.model/", name = "voteQuestionResponse") + public JAXBElement createVoteQuestionResponse(VoteQuestionResponse value) { + return new JAXBElement(_VoteQuestionResponse_QNAME, VoteQuestionResponse.class, null, value); + } + + /** + * Create an instance of {@link JAXBElement }{@code <}{@link GetAnswerVotesResponse }{@code >}} + * + */ + @XmlElementDecl(namespace = "http://vote.model/", name = "getAnswerVotesResponse") + public JAXBElement createGetAnswerVotesResponse(GetAnswerVotesResponse value) { + return new JAXBElement(_GetAnswerVotesResponse_QNAME, GetAnswerVotesResponse.class, null, value); + } + + /** + * Create an instance of {@link JAXBElement }{@code <}{@link HasVotedQuestion }{@code >}} + * + */ + @XmlElementDecl(namespace = "http://vote.model/", name = "hasVotedQuestion") + public JAXBElement createHasVotedQuestion(HasVotedQuestion value) { + return new JAXBElement(_HasVotedQuestion_QNAME, HasVotedQuestion.class, null, value); + } + + /** + * Create an instance of {@link JAXBElement }{@code <}{@link HasVotedQuestionResponse }{@code >}} + * + */ + @XmlElementDecl(namespace = "http://vote.model/", name = "hasVotedQuestionResponse") + public JAXBElement createHasVotedQuestionResponse(HasVotedQuestionResponse value) { + return new JAXBElement(_HasVotedQuestionResponse_QNAME, HasVotedQuestionResponse.class, null, value); + } + +} diff --git a/StackExchange_Client/build/generated/jax-wsCache/VoteWS/model/vote/VoteAnswer.java b/StackExchange_Client/build/generated/jax-wsCache/VoteWS/model/vote/VoteAnswer.java new file mode 100644 index 00000000..f0d46565 --- /dev/null +++ b/StackExchange_Client/build/generated/jax-wsCache/VoteWS/model/vote/VoteAnswer.java @@ -0,0 +1,100 @@ + +package model.vote; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Java class for voteAnswer complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="voteAnswer">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="token" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
+ *         <element name="answer_id" type="{http://www.w3.org/2001/XMLSchema}int"/>
+ *         <element name="vote" type="{http://www.w3.org/2001/XMLSchema}int"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "voteAnswer", propOrder = { + "token", + "answerId", + "vote" +}) +public class VoteAnswer { + + protected String token; + @XmlElement(name = "answer_id") + protected int answerId; + protected int vote; + + /** + * Gets the value of the token property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getToken() { + return token; + } + + /** + * Sets the value of the token property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setToken(String value) { + this.token = value; + } + + /** + * Gets the value of the answerId property. + * + */ + public int getAnswerId() { + return answerId; + } + + /** + * Sets the value of the answerId property. + * + */ + public void setAnswerId(int value) { + this.answerId = value; + } + + /** + * Gets the value of the vote property. + * + */ + public int getVote() { + return vote; + } + + /** + * Sets the value of the vote property. + * + */ + public void setVote(int value) { + this.vote = value; + } + +} diff --git a/StackExchange_Client/build/generated/jax-wsCache/VoteWS/model/vote/VoteAnswerResponse.java b/StackExchange_Client/build/generated/jax-wsCache/VoteWS/model/vote/VoteAnswerResponse.java new file mode 100644 index 00000000..ff5da9c7 --- /dev/null +++ b/StackExchange_Client/build/generated/jax-wsCache/VoteWS/model/vote/VoteAnswerResponse.java @@ -0,0 +1,54 @@ + +package model.vote; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Java class for voteAnswerResponse complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="voteAnswerResponse">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="Integer" type="{http://www.w3.org/2001/XMLSchema}int"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "voteAnswerResponse", propOrder = { + "integer" +}) +public class VoteAnswerResponse { + + @XmlElement(name = "Integer") + protected int integer; + + /** + * Gets the value of the integer property. + * + */ + public int getInteger() { + return integer; + } + + /** + * Sets the value of the integer property. + * + */ + public void setInteger(int value) { + this.integer = value; + } + +} diff --git a/StackExchange_Client/build/generated/jax-wsCache/VoteWS/model/vote/VoteQuestion.java b/StackExchange_Client/build/generated/jax-wsCache/VoteWS/model/vote/VoteQuestion.java new file mode 100644 index 00000000..8f6c5cb7 --- /dev/null +++ b/StackExchange_Client/build/generated/jax-wsCache/VoteWS/model/vote/VoteQuestion.java @@ -0,0 +1,100 @@ + +package model.vote; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Java class for voteQuestion complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="voteQuestion">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="token" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
+ *         <element name="question_id" type="{http://www.w3.org/2001/XMLSchema}int"/>
+ *         <element name="vote" type="{http://www.w3.org/2001/XMLSchema}int"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "voteQuestion", propOrder = { + "token", + "questionId", + "vote" +}) +public class VoteQuestion { + + protected String token; + @XmlElement(name = "question_id") + protected int questionId; + protected int vote; + + /** + * Gets the value of the token property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getToken() { + return token; + } + + /** + * Sets the value of the token property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setToken(String value) { + this.token = value; + } + + /** + * Gets the value of the questionId property. + * + */ + public int getQuestionId() { + return questionId; + } + + /** + * Sets the value of the questionId property. + * + */ + public void setQuestionId(int value) { + this.questionId = value; + } + + /** + * Gets the value of the vote property. + * + */ + public int getVote() { + return vote; + } + + /** + * Sets the value of the vote property. + * + */ + public void setVote(int value) { + this.vote = value; + } + +} diff --git a/StackExchange_Client/build/generated/jax-wsCache/VoteWS/model/vote/VoteQuestionResponse.java b/StackExchange_Client/build/generated/jax-wsCache/VoteWS/model/vote/VoteQuestionResponse.java new file mode 100644 index 00000000..24ecc5b2 --- /dev/null +++ b/StackExchange_Client/build/generated/jax-wsCache/VoteWS/model/vote/VoteQuestionResponse.java @@ -0,0 +1,54 @@ + +package model.vote; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Java class for voteQuestionResponse complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="voteQuestionResponse">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="Integer" type="{http://www.w3.org/2001/XMLSchema}int"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "voteQuestionResponse", propOrder = { + "integer" +}) +public class VoteQuestionResponse { + + @XmlElement(name = "Integer") + protected int integer; + + /** + * Gets the value of the integer property. + * + */ + public int getInteger() { + return integer; + } + + /** + * Sets the value of the integer property. + * + */ + public void setInteger(int value) { + this.integer = value; + } + +} diff --git a/StackExchange_Client/build/generated/jax-wsCache/VoteWS/model/vote/VoteWS.java b/StackExchange_Client/build/generated/jax-wsCache/VoteWS/model/vote/VoteWS.java new file mode 100644 index 00000000..e238bcfd --- /dev/null +++ b/StackExchange_Client/build/generated/jax-wsCache/VoteWS/model/vote/VoteWS.java @@ -0,0 +1,135 @@ + +package model.vote; + +import javax.jws.WebMethod; +import javax.jws.WebParam; +import javax.jws.WebResult; +import javax.jws.WebService; +import javax.xml.bind.annotation.XmlSeeAlso; +import javax.xml.ws.Action; +import javax.xml.ws.RequestWrapper; +import javax.xml.ws.ResponseWrapper; + + +/** + * This class was generated by the JAX-WS RI. + * JAX-WS RI 2.2.10-b140803.1500 + * Generated source version: 2.2 + * + */ +@WebService(name = "VoteWS", targetNamespace = "http://vote.model/") +@XmlSeeAlso({ + ObjectFactory.class +}) +public interface VoteWS { + + + /** + * + * @param answerId + * @param userId + * @return + * returns boolean + */ + @WebMethod + @WebResult(targetNamespace = "") + @RequestWrapper(localName = "hasVotedAnswer", targetNamespace = "http://vote.model/", className = "model.vote.HasVotedAnswer") + @ResponseWrapper(localName = "hasVotedAnswerResponse", targetNamespace = "http://vote.model/", className = "model.vote.HasVotedAnswerResponse") + @Action(input = "http://vote.model/VoteWS/hasVotedAnswerRequest", output = "http://vote.model/VoteWS/hasVotedAnswerResponse") + public boolean hasVotedAnswer( + @WebParam(name = "answer_id", targetNamespace = "") + int answerId, + @WebParam(name = "user_id", targetNamespace = "") + int userId); + + /** + * + * @param questionId + * @return + * returns int + */ + @WebMethod + @WebResult(targetNamespace = "") + @RequestWrapper(localName = "getQuestionVotes", targetNamespace = "http://vote.model/", className = "model.vote.GetQuestionVotes") + @ResponseWrapper(localName = "getQuestionVotesResponse", targetNamespace = "http://vote.model/", className = "model.vote.GetQuestionVotesResponse") + @Action(input = "http://vote.model/VoteWS/getQuestionVotesRequest", output = "http://vote.model/VoteWS/getQuestionVotesResponse") + public int getQuestionVotes( + @WebParam(name = "question_id", targetNamespace = "") + int questionId); + + /** + * + * @param answerId + * @return + * returns int + */ + @WebMethod + @WebResult(targetNamespace = "") + @RequestWrapper(localName = "getAnswerVotes", targetNamespace = "http://vote.model/", className = "model.vote.GetAnswerVotes") + @ResponseWrapper(localName = "getAnswerVotesResponse", targetNamespace = "http://vote.model/", className = "model.vote.GetAnswerVotesResponse") + @Action(input = "http://vote.model/VoteWS/getAnswerVotesRequest", output = "http://vote.model/VoteWS/getAnswerVotesResponse") + public int getAnswerVotes( + @WebParam(name = "answer_id", targetNamespace = "") + int answerId); + + /** + * + * @param answerId + * @param vote + * @param token + * @return + * returns int + */ + @WebMethod + @WebResult(name = "Integer", targetNamespace = "") + @RequestWrapper(localName = "voteAnswer", targetNamespace = "http://vote.model/", className = "model.vote.VoteAnswer") + @ResponseWrapper(localName = "voteAnswerResponse", targetNamespace = "http://vote.model/", className = "model.vote.VoteAnswerResponse") + @Action(input = "http://vote.model/VoteWS/voteAnswerRequest", output = "http://vote.model/VoteWS/voteAnswerResponse") + public int voteAnswer( + @WebParam(name = "token", targetNamespace = "") + String token, + @WebParam(name = "answer_id", targetNamespace = "") + int answerId, + @WebParam(name = "vote", targetNamespace = "") + int vote); + + /** + * + * @param questionId + * @param userId + * @return + * returns boolean + */ + @WebMethod + @WebResult(targetNamespace = "") + @RequestWrapper(localName = "hasVotedQuestion", targetNamespace = "http://vote.model/", className = "model.vote.HasVotedQuestion") + @ResponseWrapper(localName = "hasVotedQuestionResponse", targetNamespace = "http://vote.model/", className = "model.vote.HasVotedQuestionResponse") + @Action(input = "http://vote.model/VoteWS/hasVotedQuestionRequest", output = "http://vote.model/VoteWS/hasVotedQuestionResponse") + public boolean hasVotedQuestion( + @WebParam(name = "question_id", targetNamespace = "") + int questionId, + @WebParam(name = "user_id", targetNamespace = "") + int userId); + + /** + * + * @param questionId + * @param vote + * @param token + * @return + * returns int + */ + @WebMethod + @WebResult(name = "Integer", targetNamespace = "") + @RequestWrapper(localName = "voteQuestion", targetNamespace = "http://vote.model/", className = "model.vote.VoteQuestion") + @ResponseWrapper(localName = "voteQuestionResponse", targetNamespace = "http://vote.model/", className = "model.vote.VoteQuestionResponse") + @Action(input = "http://vote.model/VoteWS/voteQuestionRequest", output = "http://vote.model/VoteWS/voteQuestionResponse") + public int voteQuestion( + @WebParam(name = "token", targetNamespace = "") + String token, + @WebParam(name = "question_id", targetNamespace = "") + int questionId, + @WebParam(name = "vote", targetNamespace = "") + int vote); + +} diff --git a/StackExchange_Client/build/generated/jax-wsCache/VoteWS/model/vote/VoteWS_Service.java b/StackExchange_Client/build/generated/jax-wsCache/VoteWS/model/vote/VoteWS_Service.java new file mode 100644 index 00000000..8c2c7183 --- /dev/null +++ b/StackExchange_Client/build/generated/jax-wsCache/VoteWS/model/vote/VoteWS_Service.java @@ -0,0 +1,94 @@ + +package model.vote; + +import java.net.MalformedURLException; +import java.net.URL; +import javax.xml.namespace.QName; +import javax.xml.ws.Service; +import javax.xml.ws.WebEndpoint; +import javax.xml.ws.WebServiceClient; +import javax.xml.ws.WebServiceException; +import javax.xml.ws.WebServiceFeature; + + +/** + * This class was generated by the JAX-WS RI. + * JAX-WS RI 2.2.10-b140803.1500 + * Generated source version: 2.2 + * + */ +@WebServiceClient(name = "VoteWS", targetNamespace = "http://vote.model/", wsdlLocation = "http://localhost:8081/StackExchange_WS/VoteWS?wsdl") +public class VoteWS_Service + extends Service +{ + + private final static URL VOTEWS_WSDL_LOCATION; + private final static WebServiceException VOTEWS_EXCEPTION; + private final static QName VOTEWS_QNAME = new QName("http://vote.model/", "VoteWS"); + + static { + URL url = null; + WebServiceException e = null; + try { + url = new URL("http://localhost:8081/StackExchange_WS/VoteWS?wsdl"); + } catch (MalformedURLException ex) { + e = new WebServiceException(ex); + } + VOTEWS_WSDL_LOCATION = url; + VOTEWS_EXCEPTION = e; + } + + public VoteWS_Service() { + super(__getWsdlLocation(), VOTEWS_QNAME); + } + + public VoteWS_Service(WebServiceFeature... features) { + super(__getWsdlLocation(), VOTEWS_QNAME, features); + } + + public VoteWS_Service(URL wsdlLocation) { + super(wsdlLocation, VOTEWS_QNAME); + } + + public VoteWS_Service(URL wsdlLocation, WebServiceFeature... features) { + super(wsdlLocation, VOTEWS_QNAME, features); + } + + public VoteWS_Service(URL wsdlLocation, QName serviceName) { + super(wsdlLocation, serviceName); + } + + public VoteWS_Service(URL wsdlLocation, QName serviceName, WebServiceFeature... features) { + super(wsdlLocation, serviceName, features); + } + + /** + * + * @return + * returns VoteWS + */ + @WebEndpoint(name = "VoteWSPort") + public VoteWS getVoteWSPort() { + return super.getPort(new QName("http://vote.model/", "VoteWSPort"), VoteWS.class); + } + + /** + * + * @param features + * A list of {@link javax.xml.ws.WebServiceFeature} to configure on the proxy. Supported features not in the features parameter will have their default values. + * @return + * returns VoteWS + */ + @WebEndpoint(name = "VoteWSPort") + public VoteWS getVoteWSPort(WebServiceFeature... features) { + return super.getPort(new QName("http://vote.model/", "VoteWSPort"), VoteWS.class, features); + } + + private static URL __getWsdlLocation() { + if (VOTEWS_EXCEPTION!= null) { + throw VOTEWS_EXCEPTION; + } + return VOTEWS_WSDL_LOCATION; + } + +} diff --git a/StackExchange_Client/build/generated/jax-wsCache/VoteWS/model/vote/package-info.java b/StackExchange_Client/build/generated/jax-wsCache/VoteWS/model/vote/package-info.java new file mode 100644 index 00000000..10f4fe52 --- /dev/null +++ b/StackExchange_Client/build/generated/jax-wsCache/VoteWS/model/vote/package-info.java @@ -0,0 +1,2 @@ +@javax.xml.bind.annotation.XmlSchema(namespace = "http://vote.model/") +package model.vote; diff --git a/StackExchange_Client/build/web/META-INF/MANIFEST.MF b/StackExchange_Client/build/web/META-INF/MANIFEST.MF new file mode 100644 index 00000000..59499bce --- /dev/null +++ b/StackExchange_Client/build/web/META-INF/MANIFEST.MF @@ -0,0 +1,2 @@ +Manifest-Version: 1.0 + diff --git a/StackExchange_Client/build/web/WEB-INF/classes/.netbeans_automatic_build b/StackExchange_Client/build/web/WEB-INF/classes/.netbeans_automatic_build new file mode 100644 index 00000000..e69de29b diff --git a/StackExchange_Client/build/web/WEB-INF/classes/.netbeans_update_resources b/StackExchange_Client/build/web/WEB-INF/classes/.netbeans_update_resources new file mode 100644 index 00000000..e69de29b diff --git a/StackExchange_Client/build/web/WEB-INF/classes/Answer/AddAnswerServlet.class b/StackExchange_Client/build/web/WEB-INF/classes/Answer/AddAnswerServlet.class new file mode 100644 index 00000000..e1ed15de Binary files /dev/null and b/StackExchange_Client/build/web/WEB-INF/classes/Answer/AddAnswerServlet.class differ diff --git a/StackExchange_Client/build/web/WEB-INF/classes/AnswerWS/package-info.class b/StackExchange_Client/build/web/WEB-INF/classes/AnswerWS/package-info.class new file mode 100644 index 00000000..1d103744 Binary files /dev/null and b/StackExchange_Client/build/web/WEB-INF/classes/AnswerWS/package-info.class differ diff --git a/StackExchange_Client/build/web/WEB-INF/classes/ConnectionIS/ConnectionIS.class b/StackExchange_Client/build/web/WEB-INF/classes/ConnectionIS/ConnectionIS.class new file mode 100644 index 00000000..34c3ac0b Binary files /dev/null and b/StackExchange_Client/build/web/WEB-INF/classes/ConnectionIS/ConnectionIS.class differ diff --git a/StackExchange_Client/build/web/WEB-INF/classes/LoginIS/LoginIS.class b/StackExchange_Client/build/web/WEB-INF/classes/LoginIS/LoginIS.class new file mode 100644 index 00000000..e1e9b10d Binary files /dev/null and b/StackExchange_Client/build/web/WEB-INF/classes/LoginIS/LoginIS.class differ diff --git a/StackExchange_Client/build/web/WEB-INF/classes/LogoutIS/LogoutServlet.class b/StackExchange_Client/build/web/WEB-INF/classes/LogoutIS/LogoutServlet.class new file mode 100644 index 00000000..e3d26678 Binary files /dev/null and b/StackExchange_Client/build/web/WEB-INF/classes/LogoutIS/LogoutServlet.class differ diff --git a/StackExchange_Client/build/web/WEB-INF/classes/Question/AddQuestionServlet.class b/StackExchange_Client/build/web/WEB-INF/classes/Question/AddQuestionServlet.class new file mode 100644 index 00000000..4e87f2be Binary files /dev/null and b/StackExchange_Client/build/web/WEB-INF/classes/Question/AddQuestionServlet.class differ diff --git a/StackExchange_Client/build/web/WEB-INF/classes/Question/DeleteQuestionServlet.class b/StackExchange_Client/build/web/WEB-INF/classes/Question/DeleteQuestionServlet.class new file mode 100644 index 00000000..3a1f1d16 Binary files /dev/null and b/StackExchange_Client/build/web/WEB-INF/classes/Question/DeleteQuestionServlet.class differ diff --git a/StackExchange_Client/build/web/WEB-INF/classes/Question/EditQuestionServlet.class b/StackExchange_Client/build/web/WEB-INF/classes/Question/EditQuestionServlet.class new file mode 100644 index 00000000..a2bfaabb Binary files /dev/null and b/StackExchange_Client/build/web/WEB-INF/classes/Question/EditQuestionServlet.class differ diff --git a/StackExchange_Client/build/web/WEB-INF/classes/Question/QuestionListServlet.class b/StackExchange_Client/build/web/WEB-INF/classes/Question/QuestionListServlet.class new file mode 100644 index 00000000..500c4121 Binary files /dev/null and b/StackExchange_Client/build/web/WEB-INF/classes/Question/QuestionListServlet.class differ diff --git a/StackExchange_Client/build/web/WEB-INF/classes/Question/SearchQuestionServlet.class b/StackExchange_Client/build/web/WEB-INF/classes/Question/SearchQuestionServlet.class new file mode 100644 index 00000000..ba4deb3a Binary files /dev/null and b/StackExchange_Client/build/web/WEB-INF/classes/Question/SearchQuestionServlet.class differ diff --git a/StackExchange_Client/build/web/WEB-INF/classes/Question/UpdateQuestionServlet.class b/StackExchange_Client/build/web/WEB-INF/classes/Question/UpdateQuestionServlet.class new file mode 100644 index 00000000..21384fc3 Binary files /dev/null and b/StackExchange_Client/build/web/WEB-INF/classes/Question/UpdateQuestionServlet.class differ diff --git a/StackExchange_Client/build/web/WEB-INF/classes/Question/ViewQuestionServlet.class b/StackExchange_Client/build/web/WEB-INF/classes/Question/ViewQuestionServlet.class new file mode 100644 index 00000000..3aad4f02 Binary files /dev/null and b/StackExchange_Client/build/web/WEB-INF/classes/Question/ViewQuestionServlet.class differ diff --git a/StackExchange_Client/build/web/WEB-INF/classes/QuestionWS/package-info.class b/StackExchange_Client/build/web/WEB-INF/classes/QuestionWS/package-info.class new file mode 100644 index 00000000..15a8dc1a Binary files /dev/null and b/StackExchange_Client/build/web/WEB-INF/classes/QuestionWS/package-info.class differ diff --git a/StackExchange_Client/build/web/WEB-INF/classes/User/AddUserServlet.class b/StackExchange_Client/build/web/WEB-INF/classes/User/AddUserServlet.class new file mode 100644 index 00000000..62ae45c4 Binary files /dev/null and b/StackExchange_Client/build/web/WEB-INF/classes/User/AddUserServlet.class differ diff --git a/StackExchange_Client/build/web/WEB-INF/classes/UserWS/package-info.class b/StackExchange_Client/build/web/WEB-INF/classes/UserWS/package-info.class new file mode 100644 index 00000000..59838442 Binary files /dev/null and b/StackExchange_Client/build/web/WEB-INF/classes/UserWS/package-info.class differ diff --git a/StackExchange_Client/build/web/WEB-INF/classes/Vote/VoteServlet.class b/StackExchange_Client/build/web/WEB-INF/classes/Vote/VoteServlet.class new file mode 100644 index 00000000..21bc94cb Binary files /dev/null and b/StackExchange_Client/build/web/WEB-INF/classes/Vote/VoteServlet.class differ diff --git a/StackExchange_Client/build/web/WEB-INF/classes/model/answer/AddAnswer.class b/StackExchange_Client/build/web/WEB-INF/classes/model/answer/AddAnswer.class new file mode 100644 index 00000000..cd74ae49 Binary files /dev/null and b/StackExchange_Client/build/web/WEB-INF/classes/model/answer/AddAnswer.class differ diff --git a/StackExchange_Client/build/web/WEB-INF/classes/model/answer/AddAnswerResponse.class b/StackExchange_Client/build/web/WEB-INF/classes/model/answer/AddAnswerResponse.class new file mode 100644 index 00000000..9beef6bc Binary files /dev/null and b/StackExchange_Client/build/web/WEB-INF/classes/model/answer/AddAnswerResponse.class differ diff --git a/StackExchange_Client/build/web/WEB-INF/classes/model/answer/Answer.class b/StackExchange_Client/build/web/WEB-INF/classes/model/answer/Answer.class new file mode 100644 index 00000000..549b580b Binary files /dev/null and b/StackExchange_Client/build/web/WEB-INF/classes/model/answer/Answer.class differ diff --git a/StackExchange_Client/build/web/WEB-INF/classes/model/answer/AnswerWS.class b/StackExchange_Client/build/web/WEB-INF/classes/model/answer/AnswerWS.class new file mode 100644 index 00000000..07ea5ea3 Binary files /dev/null and b/StackExchange_Client/build/web/WEB-INF/classes/model/answer/AnswerWS.class differ diff --git a/StackExchange_Client/build/web/WEB-INF/classes/model/answer/AnswerWS_Service.class b/StackExchange_Client/build/web/WEB-INF/classes/model/answer/AnswerWS_Service.class new file mode 100644 index 00000000..53f6c167 Binary files /dev/null and b/StackExchange_Client/build/web/WEB-INF/classes/model/answer/AnswerWS_Service.class differ diff --git a/StackExchange_Client/build/web/WEB-INF/classes/model/answer/GetAnswerByID.class b/StackExchange_Client/build/web/WEB-INF/classes/model/answer/GetAnswerByID.class new file mode 100644 index 00000000..ba2d8244 Binary files /dev/null and b/StackExchange_Client/build/web/WEB-INF/classes/model/answer/GetAnswerByID.class differ diff --git a/StackExchange_Client/build/web/WEB-INF/classes/model/answer/GetAnswerByIDResponse.class b/StackExchange_Client/build/web/WEB-INF/classes/model/answer/GetAnswerByIDResponse.class new file mode 100644 index 00000000..e0677a50 Binary files /dev/null and b/StackExchange_Client/build/web/WEB-INF/classes/model/answer/GetAnswerByIDResponse.class differ diff --git a/StackExchange_Client/build/web/WEB-INF/classes/model/answer/GetAnswerCount.class b/StackExchange_Client/build/web/WEB-INF/classes/model/answer/GetAnswerCount.class new file mode 100644 index 00000000..c28e66d2 Binary files /dev/null and b/StackExchange_Client/build/web/WEB-INF/classes/model/answer/GetAnswerCount.class differ diff --git a/StackExchange_Client/build/web/WEB-INF/classes/model/answer/GetAnswerCountResponse.class b/StackExchange_Client/build/web/WEB-INF/classes/model/answer/GetAnswerCountResponse.class new file mode 100644 index 00000000..69210511 Binary files /dev/null and b/StackExchange_Client/build/web/WEB-INF/classes/model/answer/GetAnswerCountResponse.class differ diff --git a/StackExchange_Client/build/web/WEB-INF/classes/model/answer/GetAnswersByQID.class b/StackExchange_Client/build/web/WEB-INF/classes/model/answer/GetAnswersByQID.class new file mode 100644 index 00000000..a9f154ac Binary files /dev/null and b/StackExchange_Client/build/web/WEB-INF/classes/model/answer/GetAnswersByQID.class differ diff --git a/StackExchange_Client/build/web/WEB-INF/classes/model/answer/GetAnswersByQIDResponse.class b/StackExchange_Client/build/web/WEB-INF/classes/model/answer/GetAnswersByQIDResponse.class new file mode 100644 index 00000000..10a757d3 Binary files /dev/null and b/StackExchange_Client/build/web/WEB-INF/classes/model/answer/GetAnswersByQIDResponse.class differ diff --git a/StackExchange_Client/build/web/WEB-INF/classes/model/answer/ObjectFactory.class b/StackExchange_Client/build/web/WEB-INF/classes/model/answer/ObjectFactory.class new file mode 100644 index 00000000..fa5d4676 Binary files /dev/null and b/StackExchange_Client/build/web/WEB-INF/classes/model/answer/ObjectFactory.class differ diff --git a/StackExchange_Client/build/web/WEB-INF/classes/model/answer/package-info.class b/StackExchange_Client/build/web/WEB-INF/classes/model/answer/package-info.class new file mode 100644 index 00000000..ea3e50ef Binary files /dev/null and b/StackExchange_Client/build/web/WEB-INF/classes/model/answer/package-info.class differ diff --git a/StackExchange_Client/build/web/WEB-INF/classes/model/question/AddQuestion.class b/StackExchange_Client/build/web/WEB-INF/classes/model/question/AddQuestion.class new file mode 100644 index 00000000..d7bfabf0 Binary files /dev/null and b/StackExchange_Client/build/web/WEB-INF/classes/model/question/AddQuestion.class differ diff --git a/StackExchange_Client/build/web/WEB-INF/classes/model/question/AddQuestionResponse.class b/StackExchange_Client/build/web/WEB-INF/classes/model/question/AddQuestionResponse.class new file mode 100644 index 00000000..001c0b53 Binary files /dev/null and b/StackExchange_Client/build/web/WEB-INF/classes/model/question/AddQuestionResponse.class differ diff --git a/StackExchange_Client/build/web/WEB-INF/classes/model/question/DeleteQuestion.class b/StackExchange_Client/build/web/WEB-INF/classes/model/question/DeleteQuestion.class new file mode 100644 index 00000000..401f2eef Binary files /dev/null and b/StackExchange_Client/build/web/WEB-INF/classes/model/question/DeleteQuestion.class differ diff --git a/StackExchange_Client/build/web/WEB-INF/classes/model/question/DeleteQuestionResponse.class b/StackExchange_Client/build/web/WEB-INF/classes/model/question/DeleteQuestionResponse.class new file mode 100644 index 00000000..ac403264 Binary files /dev/null and b/StackExchange_Client/build/web/WEB-INF/classes/model/question/DeleteQuestionResponse.class differ diff --git a/StackExchange_Client/build/web/WEB-INF/classes/model/question/EditQuestion.class b/StackExchange_Client/build/web/WEB-INF/classes/model/question/EditQuestion.class new file mode 100644 index 00000000..e37bd2fa Binary files /dev/null and b/StackExchange_Client/build/web/WEB-INF/classes/model/question/EditQuestion.class differ diff --git a/StackExchange_Client/build/web/WEB-INF/classes/model/question/EditQuestionResponse.class b/StackExchange_Client/build/web/WEB-INF/classes/model/question/EditQuestionResponse.class new file mode 100644 index 00000000..9f97bcde Binary files /dev/null and b/StackExchange_Client/build/web/WEB-INF/classes/model/question/EditQuestionResponse.class differ diff --git a/StackExchange_Client/build/web/WEB-INF/classes/model/question/GetAllQuestions.class b/StackExchange_Client/build/web/WEB-INF/classes/model/question/GetAllQuestions.class new file mode 100644 index 00000000..977c29bf Binary files /dev/null and b/StackExchange_Client/build/web/WEB-INF/classes/model/question/GetAllQuestions.class differ diff --git a/StackExchange_Client/build/web/WEB-INF/classes/model/question/GetAllQuestionsResponse.class b/StackExchange_Client/build/web/WEB-INF/classes/model/question/GetAllQuestionsResponse.class new file mode 100644 index 00000000..1ed952a2 Binary files /dev/null and b/StackExchange_Client/build/web/WEB-INF/classes/model/question/GetAllQuestionsResponse.class differ diff --git a/StackExchange_Client/build/web/WEB-INF/classes/model/question/GetQuestionByID.class b/StackExchange_Client/build/web/WEB-INF/classes/model/question/GetQuestionByID.class new file mode 100644 index 00000000..272aa6f2 Binary files /dev/null and b/StackExchange_Client/build/web/WEB-INF/classes/model/question/GetQuestionByID.class differ diff --git a/StackExchange_Client/build/web/WEB-INF/classes/model/question/GetQuestionByIDResponse.class b/StackExchange_Client/build/web/WEB-INF/classes/model/question/GetQuestionByIDResponse.class new file mode 100644 index 00000000..dcbfd70d Binary files /dev/null and b/StackExchange_Client/build/web/WEB-INF/classes/model/question/GetQuestionByIDResponse.class differ diff --git a/StackExchange_Client/build/web/WEB-INF/classes/model/question/ObjectFactory.class b/StackExchange_Client/build/web/WEB-INF/classes/model/question/ObjectFactory.class new file mode 100644 index 00000000..20e169c1 Binary files /dev/null and b/StackExchange_Client/build/web/WEB-INF/classes/model/question/ObjectFactory.class differ diff --git a/StackExchange_Client/build/web/WEB-INF/classes/model/question/Question.class b/StackExchange_Client/build/web/WEB-INF/classes/model/question/Question.class new file mode 100644 index 00000000..869591dc Binary files /dev/null and b/StackExchange_Client/build/web/WEB-INF/classes/model/question/Question.class differ diff --git a/StackExchange_Client/build/web/WEB-INF/classes/model/question/QuestionWS.class b/StackExchange_Client/build/web/WEB-INF/classes/model/question/QuestionWS.class new file mode 100644 index 00000000..d6eb2164 Binary files /dev/null and b/StackExchange_Client/build/web/WEB-INF/classes/model/question/QuestionWS.class differ diff --git a/StackExchange_Client/build/web/WEB-INF/classes/model/question/QuestionWS_Service.class b/StackExchange_Client/build/web/WEB-INF/classes/model/question/QuestionWS_Service.class new file mode 100644 index 00000000..e6255d18 Binary files /dev/null and b/StackExchange_Client/build/web/WEB-INF/classes/model/question/QuestionWS_Service.class differ diff --git a/StackExchange_Client/build/web/WEB-INF/classes/model/question/SearchQuestions.class b/StackExchange_Client/build/web/WEB-INF/classes/model/question/SearchQuestions.class new file mode 100644 index 00000000..5dbce3ca Binary files /dev/null and b/StackExchange_Client/build/web/WEB-INF/classes/model/question/SearchQuestions.class differ diff --git a/StackExchange_Client/build/web/WEB-INF/classes/model/question/SearchQuestionsResponse.class b/StackExchange_Client/build/web/WEB-INF/classes/model/question/SearchQuestionsResponse.class new file mode 100644 index 00000000..816702c9 Binary files /dev/null and b/StackExchange_Client/build/web/WEB-INF/classes/model/question/SearchQuestionsResponse.class differ diff --git a/StackExchange_Client/build/web/WEB-INF/classes/model/question/package-info.class b/StackExchange_Client/build/web/WEB-INF/classes/model/question/package-info.class new file mode 100644 index 00000000..a3f3f0bc Binary files /dev/null and b/StackExchange_Client/build/web/WEB-INF/classes/model/question/package-info.class differ diff --git a/StackExchange_Client/build/web/WEB-INF/classes/model/user/AddUser.class b/StackExchange_Client/build/web/WEB-INF/classes/model/user/AddUser.class new file mode 100644 index 00000000..09f9e1ad Binary files /dev/null and b/StackExchange_Client/build/web/WEB-INF/classes/model/user/AddUser.class differ diff --git a/StackExchange_Client/build/web/WEB-INF/classes/model/user/GetIDbyEmail.class b/StackExchange_Client/build/web/WEB-INF/classes/model/user/GetIDbyEmail.class new file mode 100644 index 00000000..3d6e0fd0 Binary files /dev/null and b/StackExchange_Client/build/web/WEB-INF/classes/model/user/GetIDbyEmail.class differ diff --git a/StackExchange_Client/build/web/WEB-INF/classes/model/user/GetIDbyEmailResponse.class b/StackExchange_Client/build/web/WEB-INF/classes/model/user/GetIDbyEmailResponse.class new file mode 100644 index 00000000..6d9d758f Binary files /dev/null and b/StackExchange_Client/build/web/WEB-INF/classes/model/user/GetIDbyEmailResponse.class differ diff --git a/StackExchange_Client/build/web/WEB-INF/classes/model/user/GetUserByID.class b/StackExchange_Client/build/web/WEB-INF/classes/model/user/GetUserByID.class new file mode 100644 index 00000000..2badaed9 Binary files /dev/null and b/StackExchange_Client/build/web/WEB-INF/classes/model/user/GetUserByID.class differ diff --git a/StackExchange_Client/build/web/WEB-INF/classes/model/user/GetUserByIDResponse.class b/StackExchange_Client/build/web/WEB-INF/classes/model/user/GetUserByIDResponse.class new file mode 100644 index 00000000..545d344e Binary files /dev/null and b/StackExchange_Client/build/web/WEB-INF/classes/model/user/GetUserByIDResponse.class differ diff --git a/StackExchange_Client/build/web/WEB-INF/classes/model/user/GetUserByToken.class b/StackExchange_Client/build/web/WEB-INF/classes/model/user/GetUserByToken.class new file mode 100644 index 00000000..5f751f16 Binary files /dev/null and b/StackExchange_Client/build/web/WEB-INF/classes/model/user/GetUserByToken.class differ diff --git a/StackExchange_Client/build/web/WEB-INF/classes/model/user/GetUserByTokenResponse.class b/StackExchange_Client/build/web/WEB-INF/classes/model/user/GetUserByTokenResponse.class new file mode 100644 index 00000000..67942cf1 Binary files /dev/null and b/StackExchange_Client/build/web/WEB-INF/classes/model/user/GetUserByTokenResponse.class differ diff --git a/StackExchange_Client/build/web/WEB-INF/classes/model/user/ObjectFactory.class b/StackExchange_Client/build/web/WEB-INF/classes/model/user/ObjectFactory.class new file mode 100644 index 00000000..0a178670 Binary files /dev/null and b/StackExchange_Client/build/web/WEB-INF/classes/model/user/ObjectFactory.class differ diff --git a/StackExchange_Client/build/web/WEB-INF/classes/model/user/User.class b/StackExchange_Client/build/web/WEB-INF/classes/model/user/User.class new file mode 100644 index 00000000..418a85bd Binary files /dev/null and b/StackExchange_Client/build/web/WEB-INF/classes/model/user/User.class differ diff --git a/StackExchange_Client/build/web/WEB-INF/classes/model/user/UserWS.class b/StackExchange_Client/build/web/WEB-INF/classes/model/user/UserWS.class new file mode 100644 index 00000000..fd5f08ee Binary files /dev/null and b/StackExchange_Client/build/web/WEB-INF/classes/model/user/UserWS.class differ diff --git a/StackExchange_Client/build/web/WEB-INF/classes/model/user/UserWS_Service.class b/StackExchange_Client/build/web/WEB-INF/classes/model/user/UserWS_Service.class new file mode 100644 index 00000000..5b778def Binary files /dev/null and b/StackExchange_Client/build/web/WEB-INF/classes/model/user/UserWS_Service.class differ diff --git a/StackExchange_Client/build/web/WEB-INF/classes/model/user/package-info.class b/StackExchange_Client/build/web/WEB-INF/classes/model/user/package-info.class new file mode 100644 index 00000000..4c248496 Binary files /dev/null and b/StackExchange_Client/build/web/WEB-INF/classes/model/user/package-info.class differ diff --git a/StackExchange_Client/build/web/WEB-INF/classes/model/vote/GetAnswerVotes.class b/StackExchange_Client/build/web/WEB-INF/classes/model/vote/GetAnswerVotes.class new file mode 100644 index 00000000..5a799dc4 Binary files /dev/null and b/StackExchange_Client/build/web/WEB-INF/classes/model/vote/GetAnswerVotes.class differ diff --git a/StackExchange_Client/build/web/WEB-INF/classes/model/vote/GetAnswerVotesResponse.class b/StackExchange_Client/build/web/WEB-INF/classes/model/vote/GetAnswerVotesResponse.class new file mode 100644 index 00000000..e21a92d4 Binary files /dev/null and b/StackExchange_Client/build/web/WEB-INF/classes/model/vote/GetAnswerVotesResponse.class differ diff --git a/StackExchange_Client/build/web/WEB-INF/classes/model/vote/GetQuestionVotes.class b/StackExchange_Client/build/web/WEB-INF/classes/model/vote/GetQuestionVotes.class new file mode 100644 index 00000000..05582e46 Binary files /dev/null and b/StackExchange_Client/build/web/WEB-INF/classes/model/vote/GetQuestionVotes.class differ diff --git a/StackExchange_Client/build/web/WEB-INF/classes/model/vote/GetQuestionVotesResponse.class b/StackExchange_Client/build/web/WEB-INF/classes/model/vote/GetQuestionVotesResponse.class new file mode 100644 index 00000000..09adf990 Binary files /dev/null and b/StackExchange_Client/build/web/WEB-INF/classes/model/vote/GetQuestionVotesResponse.class differ diff --git a/StackExchange_Client/build/web/WEB-INF/classes/model/vote/HasVotedAnswer.class b/StackExchange_Client/build/web/WEB-INF/classes/model/vote/HasVotedAnswer.class new file mode 100644 index 00000000..533d17d6 Binary files /dev/null and b/StackExchange_Client/build/web/WEB-INF/classes/model/vote/HasVotedAnswer.class differ diff --git a/StackExchange_Client/build/web/WEB-INF/classes/model/vote/HasVotedAnswerResponse.class b/StackExchange_Client/build/web/WEB-INF/classes/model/vote/HasVotedAnswerResponse.class new file mode 100644 index 00000000..edcd7660 Binary files /dev/null and b/StackExchange_Client/build/web/WEB-INF/classes/model/vote/HasVotedAnswerResponse.class differ diff --git a/StackExchange_Client/build/web/WEB-INF/classes/model/vote/HasVotedQuestion.class b/StackExchange_Client/build/web/WEB-INF/classes/model/vote/HasVotedQuestion.class new file mode 100644 index 00000000..2da42774 Binary files /dev/null and b/StackExchange_Client/build/web/WEB-INF/classes/model/vote/HasVotedQuestion.class differ diff --git a/StackExchange_Client/build/web/WEB-INF/classes/model/vote/HasVotedQuestionResponse.class b/StackExchange_Client/build/web/WEB-INF/classes/model/vote/HasVotedQuestionResponse.class new file mode 100644 index 00000000..22faa61a Binary files /dev/null and b/StackExchange_Client/build/web/WEB-INF/classes/model/vote/HasVotedQuestionResponse.class differ diff --git a/StackExchange_Client/build/web/WEB-INF/classes/model/vote/ObjectFactory.class b/StackExchange_Client/build/web/WEB-INF/classes/model/vote/ObjectFactory.class new file mode 100644 index 00000000..8f72704d Binary files /dev/null and b/StackExchange_Client/build/web/WEB-INF/classes/model/vote/ObjectFactory.class differ diff --git a/StackExchange_Client/build/web/WEB-INF/classes/model/vote/VoteAnswer.class b/StackExchange_Client/build/web/WEB-INF/classes/model/vote/VoteAnswer.class new file mode 100644 index 00000000..27741fff Binary files /dev/null and b/StackExchange_Client/build/web/WEB-INF/classes/model/vote/VoteAnswer.class differ diff --git a/StackExchange_Client/build/web/WEB-INF/classes/model/vote/VoteAnswerResponse.class b/StackExchange_Client/build/web/WEB-INF/classes/model/vote/VoteAnswerResponse.class new file mode 100644 index 00000000..80476b31 Binary files /dev/null and b/StackExchange_Client/build/web/WEB-INF/classes/model/vote/VoteAnswerResponse.class differ diff --git a/StackExchange_Client/build/web/WEB-INF/classes/model/vote/VoteQuestion.class b/StackExchange_Client/build/web/WEB-INF/classes/model/vote/VoteQuestion.class new file mode 100644 index 00000000..f8f24111 Binary files /dev/null and b/StackExchange_Client/build/web/WEB-INF/classes/model/vote/VoteQuestion.class differ diff --git a/StackExchange_Client/build/web/WEB-INF/classes/model/vote/VoteQuestionResponse.class b/StackExchange_Client/build/web/WEB-INF/classes/model/vote/VoteQuestionResponse.class new file mode 100644 index 00000000..3369b292 Binary files /dev/null and b/StackExchange_Client/build/web/WEB-INF/classes/model/vote/VoteQuestionResponse.class differ diff --git a/StackExchange_Client/build/web/WEB-INF/classes/model/vote/VoteWS.class b/StackExchange_Client/build/web/WEB-INF/classes/model/vote/VoteWS.class new file mode 100644 index 00000000..bac064d9 Binary files /dev/null and b/StackExchange_Client/build/web/WEB-INF/classes/model/vote/VoteWS.class differ diff --git a/StackExchange_Client/build/web/WEB-INF/classes/model/vote/VoteWS_Service.class b/StackExchange_Client/build/web/WEB-INF/classes/model/vote/VoteWS_Service.class new file mode 100644 index 00000000..f8ce1175 Binary files /dev/null and b/StackExchange_Client/build/web/WEB-INF/classes/model/vote/VoteWS_Service.class differ diff --git a/StackExchange_Client/build/web/WEB-INF/classes/model/vote/package-info.class b/StackExchange_Client/build/web/WEB-INF/classes/model/vote/package-info.class new file mode 100644 index 00000000..f1b4c987 Binary files /dev/null and b/StackExchange_Client/build/web/WEB-INF/classes/model/vote/package-info.class differ diff --git a/StackExchange_Client/build/web/WEB-INF/glassfish-web.xml b/StackExchange_Client/build/web/WEB-INF/glassfish-web.xml new file mode 100644 index 00000000..13e0059f --- /dev/null +++ b/StackExchange_Client/build/web/WEB-INF/glassfish-web.xml @@ -0,0 +1,10 @@ + + + + + + + Keep a copy of the generated servlet class' java code. + + + diff --git a/StackExchange_Client/build/web/WEB-INF/jax-ws-catalog.xml b/StackExchange_Client/build/web/WEB-INF/jax-ws-catalog.xml new file mode 100644 index 00000000..2cce1a7d --- /dev/null +++ b/StackExchange_Client/build/web/WEB-INF/jax-ws-catalog.xml @@ -0,0 +1,11 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/StackExchange_Client/build/web/WEB-INF/lib/json-simple.jar b/StackExchange_Client/build/web/WEB-INF/lib/json-simple.jar new file mode 100644 index 00000000..03617177 Binary files /dev/null and b/StackExchange_Client/build/web/WEB-INF/lib/json-simple.jar differ diff --git a/StackExchange_Client/build/web/WEB-INF/web.xml b/StackExchange_Client/build/web/WEB-INF/web.xml new file mode 100644 index 00000000..76694fc9 --- /dev/null +++ b/StackExchange_Client/build/web/WEB-INF/web.xml @@ -0,0 +1,104 @@ + + + + LoginIS + LoginIS.LoginIS + + + ConnectionIS + ConnectionIS.ConnectionIS + + + QuestionListServlet + Question.QuestionListServlet + + + ViewQuestionServlet + Question.ViewQuestionServlet + + + AddAnswerServlet + Answer.AddAnswerServlet + + + VoteServlet + Vote.VoteServlet + + + AddUserServlet + User.AddUserServlet + + + AddQuestionServlet + Question.AddQuestionServlet + + + SearchQuestionServlet + Question.SearchQuestionServlet + + + EditQuestionServlet + Question.EditQuestionServlet + + + UpdateQuestionServlet + Question.UpdateQuestionServlet + + + DeleteQuestionServlet + Question.DeleteQuestionServlet + + + LoginIS + /login + + + ConnectionIS + /ConnectionIS + + + QuestionListServlet + + + + ViewQuestionServlet + /view + + + AddAnswerServlet + /addAnswer + + + VoteServlet + /vote + + + AddUserServlet + /addUser + + + AddQuestionServlet + /addQuestion + + + SearchQuestionServlet + /search + + + EditQuestionServlet + /edit + + + UpdateQuestionServlet + /updateQuestion + + + DeleteQuestionServlet + /delete + + + + 30 + + + diff --git a/StackExchange_Client/build/web/WEB-INF/wsdl/localhost_8081/StackExchange_WS/AnswerWS.wsdl b/StackExchange_Client/build/web/WEB-INF/wsdl/localhost_8081/StackExchange_WS/AnswerWS.wsdl new file mode 100644 index 00000000..3d2ccaca --- /dev/null +++ b/StackExchange_Client/build/web/WEB-INF/wsdl/localhost_8081/StackExchange_WS/AnswerWS.wsdl @@ -0,0 +1,93 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/StackExchange_Client/build/web/WEB-INF/wsdl/localhost_8081/StackExchange_WS/AnswerWS.xsd_1.xsd b/StackExchange_Client/build/web/WEB-INF/wsdl/localhost_8081/StackExchange_WS/AnswerWS.xsd_1.xsd new file mode 100644 index 00000000..8cd4ce24 --- /dev/null +++ b/StackExchange_Client/build/web/WEB-INF/wsdl/localhost_8081/StackExchange_WS/AnswerWS.xsd_1.xsd @@ -0,0 +1,79 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/StackExchange_Client/build/web/WEB-INF/wsdl/localhost_8081/StackExchange_WS/QuestionWS.wsdl b/StackExchange_Client/build/web/WEB-INF/wsdl/localhost_8081/StackExchange_WS/QuestionWS.wsdl new file mode 100644 index 00000000..613b554e --- /dev/null +++ b/StackExchange_Client/build/web/WEB-INF/wsdl/localhost_8081/StackExchange_WS/QuestionWS.wsdl @@ -0,0 +1,131 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/StackExchange_Client/build/web/WEB-INF/wsdl/localhost_8081/StackExchange_WS/QuestionWS.xsd_1.xsd b/StackExchange_Client/build/web/WEB-INF/wsdl/localhost_8081/StackExchange_WS/QuestionWS.xsd_1.xsd new file mode 100644 index 00000000..73343ee3 --- /dev/null +++ b/StackExchange_Client/build/web/WEB-INF/wsdl/localhost_8081/StackExchange_WS/QuestionWS.xsd_1.xsd @@ -0,0 +1,115 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/StackExchange_Client/build/web/WEB-INF/wsdl/localhost_8081/StackExchange_WS/UserWS.wsdl b/StackExchange_Client/build/web/WEB-INF/wsdl/localhost_8081/StackExchange_WS/UserWS.wsdl new file mode 100644 index 00000000..bd101151 --- /dev/null +++ b/StackExchange_Client/build/web/WEB-INF/wsdl/localhost_8081/StackExchange_WS/UserWS.wsdl @@ -0,0 +1,86 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/StackExchange_Client/build/web/WEB-INF/wsdl/localhost_8081/StackExchange_WS/UserWS.xsd_1.xsd b/StackExchange_Client/build/web/WEB-INF/wsdl/localhost_8081/StackExchange_WS/UserWS.xsd_1.xsd new file mode 100644 index 00000000..e7aa250d --- /dev/null +++ b/StackExchange_Client/build/web/WEB-INF/wsdl/localhost_8081/StackExchange_WS/UserWS.xsd_1.xsd @@ -0,0 +1,69 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/StackExchange_Client/build/web/WEB-INF/wsdl/localhost_8081/StackExchange_WS/VoteWS.wsdl b/StackExchange_Client/build/web/WEB-INF/wsdl/localhost_8081/StackExchange_WS/VoteWS.wsdl new file mode 100644 index 00000000..59a463d2 --- /dev/null +++ b/StackExchange_Client/build/web/WEB-INF/wsdl/localhost_8081/StackExchange_WS/VoteWS.wsdl @@ -0,0 +1,131 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/StackExchange_Client/build/web/WEB-INF/wsdl/localhost_8081/StackExchange_WS/VoteWS.xsd_1.xsd b/StackExchange_Client/build/web/WEB-INF/wsdl/localhost_8081/StackExchange_WS/VoteWS.xsd_1.xsd new file mode 100644 index 00000000..77c1b0d5 --- /dev/null +++ b/StackExchange_Client/build/web/WEB-INF/wsdl/localhost_8081/StackExchange_WS/VoteWS.xsd_1.xsd @@ -0,0 +1,104 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/StackExchange_Client/build/web/ask.jsp b/StackExchange_Client/build/web/ask.jsp new file mode 100644 index 00000000..d4745e03 --- /dev/null +++ b/StackExchange_Client/build/web/ask.jsp @@ -0,0 +1,18 @@ +<%-- + Document : create_question + Created on : Nov 18, 2015, 11:11:58 AM + Author : Fitra Rahmamuliani +--%> + +<%@page contentType="text/html" pageEncoding="UTF-8"%> + +
What's your question?
+
+ + + +
+ + + + diff --git a/StackExchange_Client/build/web/css/style.css b/StackExchange_Client/build/web/css/style.css new file mode 100644 index 00000000..532fd67a --- /dev/null +++ b/StackExchange_Client/build/web/css/style.css @@ -0,0 +1,241 @@ +/* +To change this license header, choose License Headers in Project Properties. +To change this template file, choose Tools | Templates +and open the template in the editor. +*/ +/* + Created on : Nov 17, 2015, 11:43:08 AM + Author : Venny +*/ + +html { + font-family: "Lucida Sans Unicode", "Lucida Grande", sans-serif; +} + +a:link, a:visited, a:active { + color: #000000; + text-decoration: none; +} + +a:hover { + color: #909090; + text-decoration: none; +} + +a.edit:link, +a.edit:visited, +a.edit:active { + color: #FFA500; + text-decoration: none; +} + +a.delete:link, +a.delete:visited, +a.delete:active { + color: #DC143C; + text-decoration: none; +} + +a.edit:hover, a.delete:hover { + color: #909090; + text-decoration: none; +} + +h1 { + text-align: center; + font-weight: normal; +} + +h2 { + text-align: left; + font-weight: normal; + border-bottom: solid; +} + +.grey-title{ + text-align: left; + font-weight: normal; + color: #909090; + font-size: 22px; +} + +h3 { + text-align: left; + font-weight: normal; +} + +h5 { + margin-top:5px; + text-align: center; + font-weight: normal; +} + +p{ + font-size:14px; + margin:2px; +} + +textarea { + padding: 7px; + border: 1; + width: 95%; + margin: 5px; + float: left; + text-align: top; + font-family: "Lucida Sans Unicode", "Lucida Grande", sans-serif; +} + +button { + background-color: #FFFFFF; + border: 1px solid #909090; + padding:10px; +} + + +.input-search{ + padding: 6px; + border: 2; + width: 80%; + margin: 7px; + margin-left: 10px; + float: left; + display: inline-block; + font-family: "Lucida Sans Unicode", "Lucida Grande", sans-serif; +} + +.button-right{ + margin-top: 1px; + margin-right: 3%; + padding: 6px; + float: right; + display: inline-block; +} + +.container{ + margin: auto; + width: 55%; + padding: 10px; +} + +.login{ + width:50%; + margin: auto; +} + +.content{ + padding: 10px; + margin-top:5px; +} + +textarea { + resize:none; +} + +.question-home{ + padding: 10px; + border-top: solid; +} + +.answer-list{ + padding: 10px; + border-bottom: solid; +} + +.input-group { + padding: 7px; + border: 1; + width: 95%; + margin: 5px; + float: left; + font-family: "Lucida Sans Unicode", "Lucida Grande", sans-serif; +} + +.button-bottom{ + margin-top: 10px; + float: right; +} +#vote, #answer { + display: inline-block; + width: 10%; + text-align:center; + vertical-align: top; + font-size:13px; +} + +#question-content { + display: inline-block; + width: 75%; +} + +#question-title{ + font-size: 14px; +} + +#question-description{ + font-size: 12px; +} + +.question-sign{ + padding: 10px; + margin-top:0px; + width:95%; + text-align: right; +} + +.question-sign p{ + font-size:13px; +} + +.voting{ + padding-top:10px; + width:10%; + display: inline-block; + text-align:center; + vertical-align: top; +} + +.voting{ + font-size: 24px; + color: #A9A9A9; +} + +.answer-content{ + padding-top:10px; + width:85%; + display: inline-block; +} + +.arrow-up, .arrow-down { + cursor: pointer; +} +.arrow-up { + width: 0; + height: 0; + margin-left: 20px; + border-left: 15px solid transparent; + border-right: 15px solid transparent; + border-bottom: 15px solid #D3D3D3; +} + +.arrow-up:hover{ + border-bottom: 15px solid #808080; +} + +.arrow-down { + width: 0; + height: 0; + margin-left: 20px; + border-left: 15px solid transparent; + border-right: 15px solid transparent; + border-top: 15px solid #D3D3D3; +} + +.arrow-down:hover{ + border-top: 15px solid #808080; +} + +.question-content { + padding-top:10px; + width:85%; + display: inline-block; +} \ No newline at end of file diff --git a/StackExchange_Client/build/web/edit.jsp b/StackExchange_Client/build/web/edit.jsp new file mode 100644 index 00000000..d91c33b8 --- /dev/null +++ b/StackExchange_Client/build/web/edit.jsp @@ -0,0 +1,14 @@ +<%@page contentType="text/html" pageEncoding="UTF-8"%> + + +
Edit your question
+
+ + + + +
+ + + + diff --git a/StackExchange_Client/build/web/gfv3ee6.dpf b/StackExchange_Client/build/web/gfv3ee6.dpf new file mode 100644 index 00000000..e69de29b diff --git a/StackExchange_Client/build/web/header.jsp b/StackExchange_Client/build/web/header.jsp new file mode 100644 index 00000000..01a3047f --- /dev/null +++ b/StackExchange_Client/build/web/header.jsp @@ -0,0 +1,29 @@ +<%-- + Document : header + Created on : Nov 27, 2015, 6:37:12 PM + Author : ASUS X202E +--%> + +<%@page contentType="text/html" pageEncoding="UTF-8"%> +<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> + + + + + Simple StackExchange + + + + +
+
+ + + Login | Register + + + Hello, ${uname} | Logout + + +
+

Simple StackExchange

\ No newline at end of file diff --git a/StackExchange_Client/build/web/index.jsp b/StackExchange_Client/build/web/index.jsp new file mode 100644 index 00000000..17931ce8 --- /dev/null +++ b/StackExchange_Client/build/web/index.jsp @@ -0,0 +1,50 @@ +<%-- + Document : index + Created on : Nov 18, 2015, 1:51:38 PM + Author : Asanilta +--%> + + + + + + +
+ + +
+

+ Cannot find what you are looking for? Ask here +
+
+

+

Recently Asked Question

+ + <% for (model.question.Question question : questions) { %> +
+
+
<%= question.getVote() %>
+
Votes
+
+ <% int answerCount = answers.get(question.getQuestionId()); %> +
+
<%= answerCount %>
+
Answers
+
+
+ <% String topic = question.getTopic(); if (topic.length() > 153) topic = topic.substring(0,150)+ "..."; %> + + <% String content = question.getContent();if (content.length() > 503) content = content.substring(0,500)+"..."; %> +
<%= content %>
+
+ <% model.user.User user = users.get(question.getQuestionId()); %> +
+ asked by + <%= user.getName() %> (<%= user.getEmail() %>) + <% if (question.getUserId() == uid) { %>editdelete
<% } %> +
+
+ <% } %> + + + diff --git a/StackExchange_Client/build/web/js/functions.js b/StackExchange_Client/build/web/js/functions.js new file mode 100644 index 00000000..7ab23ef6 --- /dev/null +++ b/StackExchange_Client/build/web/js/functions.js @@ -0,0 +1,42 @@ + function validateQuestionForm() { + var re = /^(([^<>()[\]\.,;:\s@\"]+(\.[^<>()[\]\.,;:\s@\"]+)*)|(\".+\"))@(([^<>()[\]\.,;:\s@\"]+\.)+[^<>()[\]\.,;:\s@\"]{2,})$/i; + if (document.forms["createquestion"]["createname"].value == null || document.forms["createquestion"]["createname"].value == "" || + document.forms["createquestion"]["createemail"].value == null || document.forms["createquestion"]["createemail"].value == "" || + document.forms["createquestion"]["createtopic"].value == null || document.forms["createquestion"]["createtopic"].value == "" || + document.forms["createquestion"]["createcontent"].value == null || document.forms["createquestion"]["createcontent"].value == "") { + alert("All required fields must be filled out"); + return false; + } + else if(!re.test(document.forms["createquestion"]["createemail"].value)){ + alert("Incorrect email address"); + return false; + } + } +function validateAnswerForm(){ + var re = /^(([^<>()[\]\.,;:\s@\"]+(\.[^<>()[\]\.,;:\s@\"]+)*)|(\".+\"))@(([^<>()[\]\.,;:\s@\"]+\.)+[^<>()[\]\.,;:\s@\"]{2,})$/i; + if (document.forms["createquestion"]["createname"].value == null || document.forms["createquestion"]["createname"].value == "" || + document.forms["createquestion"]["createemail"].value == null || document.forms["createquestion"]["createemail"].value == "" || + document.forms["createquestion"]["createcontent"].value == null || document.forms["createquestion"]["createcontent"].value == "") { + alert("All required fields must be filled out"); + return false; + } + else if(!re.test(document.forms["createquestion"]["createemail"].value)){ + alert("Incorrect email address"); + return false; + } +} + +function vote(id, change, db) { + var xhttp = new XMLHttpRequest(); + xhttp.onreadystatechange = function() { + if (xhttp.readyState === 4 && xhttp.status === 200) { + if (db=="question") { //question + document.getElementById("vote-q").innerHTML = xhttp.responseText; + } else { //answer + document.getElementById("vote-a"+id).innerHTML = xhttp.responseText; + } + } + } + xhttp.open("GET", "vote?id="+id+"&vote="+change+"&db="+db, true); + xhttp.send(); +} \ No newline at end of file diff --git a/StackExchange_Client/build/web/js/validate.js b/StackExchange_Client/build/web/js/validate.js new file mode 100644 index 00000000..c8ebd612 --- /dev/null +++ b/StackExchange_Client/build/web/js/validate.js @@ -0,0 +1,27 @@ + function validateQuestionForm() { + var re = /^(([^<>()[\]\.,;:\s@\"]+(\.[^<>()[\]\.,;:\s@\"]+)*)|(\".+\"))@(([^<>()[\]\.,;:\s@\"]+\.)+[^<>()[\]\.,;:\s@\"]{2,})$/i; + if (document.forms["createquestion"]["createname"].value == null || document.forms["createquestion"]["createname"].value == "" || + document.forms["createquestion"]["createemail"].value == null || document.forms["createquestion"]["createemail"].value == "" || + document.forms["createquestion"]["createtopic"].value == null || document.forms["createquestion"]["createtopic"].value == "" || + document.forms["createquestion"]["createcontent"].value == null || document.forms["createquestion"]["createcontent"].value == "") { + alert("All required fields must be filled out"); + return false; + } + else if(!re.test(document.forms["createquestion"]["createemail"].value)){ + alert("Incorrect email address"); + return false; + } + } +function validateAnswerForm(){ + var re = /^(([^<>()[\]\.,;:\s@\"]+(\.[^<>()[\]\.,;:\s@\"]+)*)|(\".+\"))@(([^<>()[\]\.,;:\s@\"]+\.)+[^<>()[\]\.,;:\s@\"]{2,})$/i; + if (document.forms["createquestion"]["createname"].value == null || document.forms["createquestion"]["createname"].value == "" || + document.forms["createquestion"]["createemail"].value == null || document.forms["createquestion"]["createemail"].value == "" || + document.forms["createquestion"]["createcontent"].value == null || document.forms["createquestion"]["createcontent"].value == "") { + alert("All required fields must be filled out"); + return false; + } + else if(!re.test(document.forms["createquestion"]["createemail"].value)){ + alert("Incorrect email address"); + return false; + } +} \ No newline at end of file diff --git a/StackExchange_Client/build/web/login.jsp b/StackExchange_Client/build/web/login.jsp new file mode 100644 index 00000000..591efbfe --- /dev/null +++ b/StackExchange_Client/build/web/login.jsp @@ -0,0 +1,38 @@ +<%-- + Document : index + Created on : Nov 17, 2015, 11:36:58 AM + Author : Venny +--%> + +<%@page contentType="text/html" pageEncoding="UTF-8"%> + + + + + Simple StackExchange + + + + + + +
+

Simple StackExchange

+ + +
+ + + diff --git a/StackExchange_Client/build/web/register.jsp b/StackExchange_Client/build/web/register.jsp new file mode 100644 index 00000000..ff6fa461 --- /dev/null +++ b/StackExchange_Client/build/web/register.jsp @@ -0,0 +1,38 @@ +<%-- + Document : register + Created on : Nov 17, 2015, 12:00:08 PM + Author : Venny +--%> + +<%@page contentType="text/html" pageEncoding="UTF-8"%> + + + + + Simple StackExchange: Register + + + + + + +
+

Simple StackExchange

+ + +
+ + + \ No newline at end of file diff --git a/StackExchange_Client/build/web/search.jsp b/StackExchange_Client/build/web/search.jsp new file mode 100644 index 00000000..30b30284 --- /dev/null +++ b/StackExchange_Client/build/web/search.jsp @@ -0,0 +1,56 @@ +<%-- + Document : index + Created on : Nov 18, 2015, 1:51:38 PM + Author : Asanilta +--%> + +<%@page contentType="text/html" pageEncoding="UTF-8"%> + + + + + +
+ + +
+

+ Cannot find what you are looking for? Ask here +

+ < Back to Home +
+
+

+

Search Results

+ + <% for (model.question.Question question : questions) { %> +
+
+
<%= question.getVote() %>
+
Votes
+
+ <% int answerCount = answers.get(question.getQuestionId()); %> +
+
<%= answerCount %>
+
Answers
+
+
+ <% String topic = question.getTopic(); if (topic.length() > 153) topic = topic.substring(0,150)+ "..."; %> + + <% String content = question.getContent();if (content.length() > 503) content = content.substring(0,500)+"..."; %> +
<%= content %>
+
+ <% model.user.User user = users.get(question.getQuestionId()); %> +
+ asked by + <%= user.getName() %> (<%= user.getEmail() %>) + <% if (question.getUserId() == uid) { %>editdelete
<% } %> +
+ + <% } %> + <% if (questions.isEmpty()) {%> + No results found. + <% } %> + + + diff --git a/StackExchange_Client/build/web/style.css b/StackExchange_Client/build/web/style.css new file mode 100644 index 00000000..a983025c --- /dev/null +++ b/StackExchange_Client/build/web/style.css @@ -0,0 +1,429 @@ +body{ + margin: 0; + background-color: #fffaf0; + font-family: 'Dosis', sans-serif; +} + +.container{ + margin-left: 15%; + margin-right: 15%; + width: 75%; + height: auto; +} + +h1{ + font-family: 'Dosis',sans-serif; + font-size: 30pt; + text-align: center; + margin-top: 2.5%; + margin-bottom: 2%; +} +h1 a{ + color: black; + text-decoration: none; +} +.formsearch:before, formsearch:after{ + content: ""; + display: table; +} + +.formsearch:after{ + clear: both; +} +.formsearch{ + zoom:1; +} +.formwrap{ + height: 43px; + width: 97%; + padding: 15px; + margin: 0px auto 0px auto; + background: rgba(0,0,0,.2); + border-radius: 10px; + box-shadow: 0 1px 1px rgba(0,0,0,.4) inset, 0 1px 0 rgba(255,255,255,.2); +} +.formwrap input{ + width: 94.3%; + height: 20px; + padding: 10px 20px; + float: left; + font: bold 15px 'lucida sans', 'trebuchet MS', 'Tahoma'; + border: 0; + background: #FFFFFF; + border-radius: 3px 0 0 3px; +} +.formwrap input:focus{ + outline: 0; + background: #fff; + box-shadow: 0 0 2px rgba(0,0,0,.8) inset; +} +.formwrap input::-webkit-input-placeholder { + color: #999; + font-weight: normal; + font-style: italic; +} + +.formwrap input:-moz-placeholder { + color: #999; + font-weight: normal; + font-style: italic; +} + +.formwrap input:-ms-input-placeholder { + color: #999; + font-weight: normal; + font-style: italic; +} +.formwrap button{ + margin-left: -100px; + overflow: visible; + position: absolute; + float: right; + border: 0; + padding: 0; + cursor: pointer; + height: 40px; + width: 110px; + font: bold 13pt 'lucida sans', 'trebuchet MS', 'Tahoma'; + color: #fff; + background: #d83c3c; + border-radius: 0 3px 3px 0; + text-shadow: 0 -1px 0 rgba(0, 0 ,0, .3); +} +.formwrap button:hover{ + background: #e54040; +} +.formwrap button:active, .formwrap button:focus{ + background: #c42f2f; + outline: 0; +} +.formwrap button:before { /* left arrow */ + content: ''; + position: absolute; + border-width: 8px 8px 8px 0; + border-style: solid solid solid none; + border-color: transparent #d83c3c transparent; + top: 12px; + left: -6px; +} + +.formwrap button:hover:before{ + border-right-color: #e54040; +} + +.formwrap button:focus:before, +.formwrap button:active:before{ + border-right-color: #c42f2f; +} + +.formwrap button::-moz-focus-inner { /* remove extra button spacing for Mozilla Firefox */ + border: 0; + padding: 0; +} +.textunder{ + text-align: center; + margin: 0 auto 0 auto; + font-size: 12pt; + height: 100%; +} +.text1{ + display: inline-block; +} +.ah{ + margin-left: 5px; + color: darkorange; + text-decoration: none; +} +.textunder > p{ + -webkit-margin-before: 10px; +} +.raqtext{ + font-size: 16pt; + padding-bottom: 1.5px; + padding-left: 10px; + border-bottom: 2px solid black; +} +.raq{ + padding-top: 3%; + padding-bottom: 3%; + border-bottom: 2px solid black; +} +.raq > *{ + vertical-align: middle; +} +.votepart{ + margin-left: 2.5%; + text-align: center; + font-size: 14pt; + display: inline-block; + padding-right: 2%; + +} +.answerpart{ + font-size: 14pt; + text-align: center; + display: inline-block; + padding-right: 2%; +} +.questionpart{ + display: inline-block; + width: 75%; +} +.qtopic{ + font-size: 12pt; + font-weight: bold; +} +.qcontent{ + font-size: 10pt; + text-align: left; +} +.labelunder{ + right: 15%; + font-size: 12pt; + vertical-align: middle; +} +.ab{ + color: black; + display: inline-block; +} +.name{ + color:blue; + display: inline-block; + padding-right: 3px; +} +/* +.edit{ + font-family: 'Dosis',sans-serif; + background: none; + border: none; + color: darkorange; + display: block; + border-right: 1px solid black; + font-size: 12pt; + vertical-align: middle; +} +.edit:hover{ + cursor: pointer; +}*/ +.delete{ + color: red; + display: inline-block; +} +a{ + text-decoration: none; +} +.labelunder > p, p.raqtext{ + -webkit-margin-before: 2px; + -webkit-margin-after: 0; +} + +.subq{ + font-size: 24pt; +} +.inputform{ + float: left; + width:97%; + margin-top: 10px; +} +.inputform input, .inputform textarea{ + line-height: 1.5; + font-family: 'Dosis', sans-serif; + font-size: 14pt; + padding: 5px 10px; + display: block; + width: 100%; + background: white; + border: 3px solid white; + border-bottom-color: #ffe1a4; + margin-bottom: 10px; +} +.inputform textarea{ + min-height: 150px; +} +.inputform button{ + background: #ffc03f; + color: white; + padding: 7px 20px; + font-size: 14pt; + font-family: 'Dosis', sans-serif; + border: none; + border-radius: 2px; + text-transform: uppercase; + text-align: center; + margin-left: 94%; + cursor: pointer; +} +.inputform button:hover{ + background: darkorange; +} +.abu{ + color: grey; + margin-left: 10px; + margin-top: 3%; +} +.black{ + border-bottom: 2px solid black; + padding-bottom: 1.5px; +} +.black a{ + color: black; +} +.question{ + padding-top: 3%; + padding-bottom: 3%; +} +.question > *, .answer > *{ + vertical-align: middle; +} +.voteup{ + margin-bottom: 5px; + width: 16px; + height: 16px; +} +.votedown{ + margin-top: 5px; + width: 16px; + height: 16px; +} +.medium{ + font-size: 12pt !important; +} +.partmedium{ + width: 875px !important; +} +.date{ + display: inline-block; +} +.qtopic a{ + color: black; +} +.askedname{ + color: darkblue; +} +.answernum{ + display: inline-block; +} +.hiddenform{ + display: inline-block; + padding-right: 3px; + padding-left: 0; +} +.qlist{ + height: 100%; +} + +.details { + position: absolute; + right: 0; + bottom: 5px; +} + +.edit { + border-left: 1px solid black; + border-right: 1px solid black; + padding: 0 5px; + color: darkorange; +} +.delete { + padding: 0 5px; +} + +.question-block { + position: relative; + height: 85px; + vertical-align: middle; +} +.userinfo { + position: absolute; + right: 20px; + top: 10px; +} +a:visited { + color: black; +} + +.content{ + padding: 10px; + margin-top:5px; +} + +.question-sign{ + padding: 10px; + margin-top:0px; + width:95%; + text-align: right; +} + +.question-sign p{ + font-size:13px; +} + +.voting{ + padding-top:10px; + width:10%; + display: inline-block; + text-align:center; + vertical-align: top; +} + +.votenumber{ + font-size: 24px; + color: #A9A9A9; +} + +.answer-content{ + padding-top:10px; + width:85%; + display: inline-block; +} + +.arrow-up, .arrow-down { + cursor: pointer; +} +.arrow-up { + width: 0; + height: 0; + margin-left: 20px; + border-left: 15px solid transparent; + border-right: 15px solid transparent; + border-bottom: 15px solid #D3D3D3; +} + +.arrow-up:hover{ + border-bottom: 15px solid #808080; +} + +.arrow-down { + width: 0; + height: 0; + margin-left: 20px; + border-left: 15px solid transparent; + border-right: 15px solid transparent; + border-top: 15px solid #D3D3D3; +} + +.arrow-down:hover{ + border-top: 15px solid #808080; +} + +.question-content { + padding-top:10px; + width:85%; + display: inline-block; +} + +.button-bottom{ + margin-top: 10px; + margin-bottom: 10px; + float: right; +} + +.answer-list{ + padding: 10px; + border-bottom: solid; +} +.arrow-up, .arrow-down { + margin-left: auto; + margin-right: auto; + display: block; +} \ No newline at end of file diff --git a/StackExchange_Client/build/web/view.jsp b/StackExchange_Client/build/web/view.jsp new file mode 100644 index 00000000..f6a51762 --- /dev/null +++ b/StackExchange_Client/build/web/view.jsp @@ -0,0 +1,65 @@ +<%-- + Document : view + Created on : Nov 22, 2015, 6:18:46 AM + Author : Venny +--%> + +<%@page contentType="text/html" pageEncoding="UTF-8"%> + + + + + + + +
+

<%= question.getTopic() %>

+
+
+
<%= question.getVote() %>
+
+
+
+

<%= question.getContent() %>

+
+
+

asked by <%= q_user.getName() %> (<%= q_user.getEmail() %>) at <%= question.getCreateTime() %>
+ <% if (question.getUserId() == uid) { %>editdelete

<% } %> +
+ +
+

Answers

+ <% if (!answers.isEmpty()) { %> + <% for (model.answer.Answer answer : answers) { %> +
+
+
+
<%= answer.getVote() %>
+
+
+
+

<%= answer.getContent() %>

+
+
+

answered by <%= a_user.get(answer.getAnswerId()).getName() %> (<%= a_user.get(answer.getAnswerId()).getEmail() %>) at <%= answer.getCreateTime() %>

+
+
+ <% } %> + <% }%> +
+ +
+

Your Answer

+
+ + +
+ +
+
+
+ + + + + diff --git a/StackExchange_Client/catalog.xml b/StackExchange_Client/catalog.xml new file mode 100644 index 00000000..6581d665 --- /dev/null +++ b/StackExchange_Client/catalog.xml @@ -0,0 +1,11 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/StackExchange_Client/dist/StackExchange_Client.war b/StackExchange_Client/dist/StackExchange_Client.war new file mode 100644 index 00000000..f0b422eb Binary files /dev/null and b/StackExchange_Client/dist/StackExchange_Client.war differ diff --git a/StackExchange_Client/nbproject/ant-deploy.xml b/StackExchange_Client/nbproject/ant-deploy.xml new file mode 100644 index 00000000..2d5f8778 --- /dev/null +++ b/StackExchange_Client/nbproject/ant-deploy.xml @@ -0,0 +1,111 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/StackExchange_Client/nbproject/build-impl.xml b/StackExchange_Client/nbproject/build-impl.xml new file mode 100644 index 00000000..f8abf6ec --- /dev/null +++ b/StackExchange_Client/nbproject/build-impl.xml @@ -0,0 +1,1445 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must set src.dir + Must set test.src.dir + Must set build.dir + Must set build.web.dir + Must set build.generated.dir + Must set dist.dir + Must set build.classes.dir + Must set dist.javadoc.dir + Must set build.test.classes.dir + Must set build.test.results.dir + Must set build.classes.excludes + Must set dist.war + + + + + + + + + +The Java EE server classpath is not correctly set up - server home directory is missing. +Either open the project in the IDE and assign the server or setup the server classpath manually. +For example like this: + ant -Dj2ee.server.home=<app_server_installation_directory> + + +The Java EE server classpath is not correctly set up. Your active server type is ${j2ee.server.type}. +Either open the project in the IDE and assign the server or setup the server classpath manually. +For example like this: + ant -Duser.properties.file=<path_to_property_file> (where you put the property "j2ee.platform.classpath" in a .properties file) +or ant -Dj2ee.platform.classpath=<server_classpath> (where no properties file is used) + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must set javac.includes + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + No tests executed. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +The libs.CopyLibs.classpath property is not set up. +This property must point to +org-netbeans-modules-java-j2seproject-copylibstask.jar file which is part +of NetBeans IDE installation and is usually located at +<netbeans_installation>/java<version>/ant/extra folder. +Either open the project in the IDE and make sure CopyLibs library +exists or setup the property manually. For example like this: + ant -Dlibs.CopyLibs.classpath=a/path/to/org-netbeans-modules-java-j2seproject-copylibstask.jar + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must set JVM to use for profiling in profiler.info.jvm + Must set profiler agent JVM arguments in profiler.info.jvmargs.agent + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must select some files in the IDE or set javac.includes + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must select some files in the IDE or set javac.jsp.includes + + + + + + + + + + + + + + + + + + + + + + + + + + Must select a file in the IDE or set jsp.includes + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Browser not found, cannot launch the deployed application. Try to set the BROWSER environment variable. + + + Launching ${browse.url} + + + + + + Must select one file in the IDE or set run.class + + + + Must select one file in the IDE or set run.class + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must select one file in the IDE or set debug.class + + + + + + + + + + + + Must select one file in the IDE or set debug.class + + + + + Must set fix.includes + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + This target only works when run from inside the NetBeans IDE. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must select some files in the IDE or set javac.includes + + + + + + + + + + + + + + + + + + + Some tests failed; see details above. + + + + + + + + + Must select some files in the IDE or set test.includes + + + + Some tests failed; see details above. + + + + Must select some files in the IDE or set test.class + Must select some method in the IDE or set test.method + + + + Some tests failed; see details above. + + + + + Must select one file in the IDE or set test.class + + + + Must select one file in the IDE or set test.class + Must select some method in the IDE or set test.method + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/StackExchange_Client/nbproject/genfiles.properties b/StackExchange_Client/nbproject/genfiles.properties new file mode 100644 index 00000000..1a6a43ea --- /dev/null +++ b/StackExchange_Client/nbproject/genfiles.properties @@ -0,0 +1,9 @@ +build.xml.data.CRC32=b3c01c89 +build.xml.script.CRC32=11abd630 +build.xml.stylesheet.CRC32=651128d4@1.68.1.1 +# This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml. +# Do not edit this file. You may delete it but then the IDE will never regenerate such files for you. +nbproject/build-impl.xml.data.CRC32=b3c01c89 +nbproject/build-impl.xml.script.CRC32=98c5606f +nbproject/build-impl.xml.stylesheet.CRC32=99ea4b56@1.68.1.1 +nbproject/jaxws-build.xml.stylesheet.CRC32=6608c2cf diff --git a/StackExchange_Client/nbproject/jax-ws.xml b/StackExchange_Client/nbproject/jax-ws.xml new file mode 100644 index 00000000..b9d5fbd8 --- /dev/null +++ b/StackExchange_Client/nbproject/jax-ws.xml @@ -0,0 +1,138 @@ + + + + + + http://localhost:8081/StackExchange_WS/QuestionWS?wsdl + localhost_8081/StackExchange_WS/QuestionWS.wsdl + model.question + catalog.xml + + + extension + true + + + verbose + true + + + fork + false + + + wsdlLocation + http://localhost:8081/StackExchange_WS/QuestionWS?wsdl + + + xnocompile + true + + + xendorsed + true + + + package + model.question + + + + + http://localhost:8081/StackExchange_WS/AnswerWS?wsdl + localhost_8081/StackExchange_WS/AnswerWS.wsdl + model.answer + catalog.xml + + + extension + true + + + verbose + true + + + fork + false + + + wsdlLocation + http://localhost:8081/StackExchange_WS/AnswerWS?wsdl + + + xnocompile + true + + + xendorsed + true + + + + + http://localhost:8081/StackExchange_WS/UserWS?wsdl + localhost_8081/StackExchange_WS/UserWS.wsdl + model.user + catalog.xml + + + extension + true + + + verbose + true + + + fork + false + + + wsdlLocation + http://localhost:8081/StackExchange_WS/UserWS?wsdl + + + xnocompile + true + + + xendorsed + true + + + + + http://localhost:8081/StackExchange_WS/VoteWS?wsdl + localhost_8081/StackExchange_WS/VoteWS.wsdl + model.vote + catalog.xml + + + extension + true + + + verbose + true + + + fork + false + + + wsdlLocation + http://localhost:8081/StackExchange_WS/VoteWS?wsdl + + + xnocompile + true + + + xendorsed + true + + + + + diff --git a/StackExchange_Client/nbproject/jaxws-build.xml b/StackExchange_Client/nbproject/jaxws-build.xml new file mode 100644 index 00000000..65dce566 --- /dev/null +++ b/StackExchange_Client/nbproject/jaxws-build.xml @@ -0,0 +1,94 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/StackExchange_Client/nbproject/private/private.properties b/StackExchange_Client/nbproject/private/private.properties new file mode 100644 index 00000000..d7cfa5cc --- /dev/null +++ b/StackExchange_Client/nbproject/private/private.properties @@ -0,0 +1,10 @@ +deploy.ant.properties.file=C:\\Users\\Venny\\AppData\\Roaming\\NetBeans\\8.1\\config\\GlassFishEE6\\Properties\\gfv31590470762.properties +j2ee.platform.is.jsr109=true +j2ee.server.domain=C:/Users/Venny/GlassFish_Server/glassfish/domains/domain-client +j2ee.server.home=C:/Users/Venny/GlassFish_Server/glassfish +j2ee.server.instance=[C:\\Users\\Venny\\GlassFish_Server\\glassfish;C:\\Users\\Venny\\GlassFish_Server\\glassfish\\domains\\domain-client]deployer:gfv3ee6wc:localhost:24898 +j2ee.server.middleware=C:/Users/Venny/GlassFish_Server +javac.debug=true +javadoc.preview=true +selected.browser=default +user.properties.file=C:\\Users\\Venny\\AppData\\Roaming\\NetBeans\\8.1\\build.properties diff --git a/StackExchange_Client/nbproject/private/private.xml b/StackExchange_Client/nbproject/private/private.xml new file mode 100644 index 00000000..872bc5da --- /dev/null +++ b/StackExchange_Client/nbproject/private/private.xml @@ -0,0 +1,14 @@ + + + + + + file:/C:/Users/Venny/Documents/NetBeansProjects/IF3110-2015-T2/StackExchange_Client/src/java/ConnectionIS/ConnectionIS.java + file:/C:/Users/Venny/Documents/NetBeansProjects/IF3110-2015-T2/StackExchange_Client/src/java/User/AddUserServlet.java + file:/C:/Users/Venny/Documents/NetBeansProjects/IF3110-2015-T2/StackExchange_Client/web/edit.jsp + file:/C:/Users/Venny/Documents/NetBeansProjects/IF3110-2015-T2/StackExchange_Client/src/java/Question/UpdateQuestionServlet.java + file:/C:/Users/Venny/Documents/NetBeansProjects/IF3110-2015-T2/StackExchange_Client/src/java/Question/DeleteQuestionServlet.java + file:/C:/Users/Venny/Documents/NetBeansProjects/IF3110-2015-T2/StackExchange_Client/src/java/LoginIS/LoginIS.java + + + diff --git a/StackExchange_Client/nbproject/project.properties b/StackExchange_Client/nbproject/project.properties new file mode 100644 index 00000000..5510db1d --- /dev/null +++ b/StackExchange_Client/nbproject/project.properties @@ -0,0 +1,90 @@ +annotation.processing.enabled=true +annotation.processing.enabled.in.editor=true +annotation.processing.processors.list= +annotation.processing.run.all.processors=true +annotation.processing.source.output=${build.generated.sources.dir}/ap-source-output +build.classes.dir=${build.web.dir}/WEB-INF/classes +build.classes.excludes=**/*.java,**/*.form +build.dir=build +build.generated.dir=${build.dir}/generated +build.generated.sources.dir=${build.dir}/generated-sources +build.test.classes.dir=${build.dir}/test/classes +build.test.results.dir=${build.dir}/test/results +build.web.dir=${build.dir}/web +build.web.excludes=${build.classes.excludes} +client.urlPart= +compile.jsps=false +conf.dir=${source.root}/conf +debug.classpath=${build.classes.dir}:${javac.classpath} +debug.test.classpath=\ + ${run.test.classpath} +display.browser=true +# Files to be excluded from distribution war +dist.archive.excludes= +dist.dir=dist +dist.ear.war=${dist.dir}/${war.ear.name} +dist.javadoc.dir=${dist.dir}/javadoc +dist.war=${dist.dir}/${war.name} +endorsed.classpath=\ + ${libs.javaee-endorsed-api-6.0.classpath} +excludes= +file.reference.json-simple.jar=..\\json-simple.jar +includes=** +j2ee.compile.on.save=true +j2ee.copy.static.files.on.save=true +j2ee.deploy.on.save=true +j2ee.platform=1.7-web +j2ee.platform.classpath=${j2ee.server.home}/modules/endorsed/javax.annotation-api.jar:${j2ee.server.home}/modules/endorsed/jaxb-api.jar:${j2ee.server.home}/modules/endorsed/webservices-api-osgi.jar:${j2ee.server.home}/modules/bean-validator.jar:${j2ee.server.home}/modules/cdi-api.jar:${j2ee.server.home}/modules/javax.batch-api.jar:${j2ee.server.home}/modules/javax.ejb-api.jar:${j2ee.server.home}/modules/javax.el.jar:${j2ee.server.home}/modules/javax.enterprise.concurrent-api.jar:${j2ee.server.home}/modules/javax.enterprise.concurrent.jar:${j2ee.server.home}/modules/javax.enterprise.deploy-api.jar:${j2ee.server.home}/modules/javax.faces.jar:${j2ee.server.home}/modules/javax.inject.jar:${j2ee.server.home}/modules/javax.interceptor-api.jar:${j2ee.server.home}/modules/javax.jms-api.jar:${j2ee.server.home}/modules/javax.json.jar:${j2ee.server.home}/modules/javax.mail.jar:${j2ee.server.home}/modules/javax.management.j2ee-api.jar:${j2ee.server.home}/modules/javax.persistence.jar:${j2ee.server.home}/modules/javax.resource-api.jar:${j2ee.server.home}/modules/javax.security.auth.message-api.jar:${j2ee.server.home}/modules/javax.security.jacc-api.jar:${j2ee.server.home}/modules/javax.servlet-api.jar:${j2ee.server.home}/modules/javax.servlet.jsp-api.jar:${j2ee.server.home}/modules/javax.servlet.jsp.jar:${j2ee.server.home}/modules/javax.servlet.jsp.jstl-api.jar:${j2ee.server.home}/modules/javax.servlet.jsp.jstl.jar:${j2ee.server.home}/modules/javax.transaction-api.jar:${j2ee.server.home}/modules/javax.websocket-api.jar:${j2ee.server.home}/modules/javax.ws.rs-api.jar:${j2ee.server.home}/modules/javax.xml.registry-api.jar:${j2ee.server.home}/modules/javax.xml.rpc-api.jar:${j2ee.server.home}/modules/jaxb-osgi.jar:${j2ee.server.home}/modules/webservices-osgi.jar:${j2ee.server.home}/modules/weld-osgi-bundle.jar:${j2ee.server.middleware}/mq/lib/jaxm-api.jar +j2ee.platform.embeddableejb.classpath=${j2ee.server.home}/lib/embedded/glassfish-embedded-static-shell.jar +j2ee.platform.wscompile.classpath=${j2ee.server.home}/modules/webservices-osgi.jar +j2ee.platform.wsgen.classpath=${j2ee.server.home}/modules/webservices-osgi.jar:${j2ee.server.home}/modules/endorsed/webservices-api-osgi.jar:${j2ee.server.home}/modules/jaxb-osgi.jar:${j2ee.server.home}/modules/endorsed/jaxb-api.jar +j2ee.platform.wsimport.classpath=${j2ee.server.home}/modules/webservices-osgi.jar:${j2ee.server.home}/modules/endorsed/webservices-api-osgi.jar:${j2ee.server.home}/modules/jaxb-osgi.jar:${j2ee.server.home}/modules/endorsed/jaxb-api.jar +j2ee.platform.wsit.classpath= +j2ee.server.type=gfv3ee6 +jar.compress=false +javac.classpath=\ + ${file.reference.json-simple.jar} +# Space-separated list of extra javac options +javac.compilerargs= +javac.debug=true +javac.deprecation=false +javac.processorpath=\ + ${javac.classpath} +javac.source=1.8 +javac.target=1.8 +javac.test.classpath=\ + ${javac.classpath}:\ + ${build.classes.dir} +javac.test.processorpath=\ + ${javac.test.classpath} +javadoc.additionalparam= +javadoc.author=false +javadoc.encoding=${source.encoding} +javadoc.noindex=false +javadoc.nonavbar=false +javadoc.notree=false +javadoc.preview=true +javadoc.private=false +javadoc.splitindex=true +javadoc.use=true +javadoc.version=false +javadoc.windowtitle= +lib.dir=${web.docbase.dir}/WEB-INF/lib +persistence.xml.dir=${conf.dir} +platform.active=default_platform +resource.dir=setup +run.test.classpath=\ + ${javac.test.classpath}:\ + ${build.test.classes.dir} +# Space-separated list of JVM arguments used when running a class with a main method or a unit test +# (you may also define separate properties like run-sys-prop.name=value instead of -Dname=value): +runmain.jvmargs= +source.encoding=UTF-8 +source.root=src +src.dir=${source.root}/java +test.src.dir=test +war.content.additional= +war.ear.name=${war.name} +war.name=StackExchange_Client.war +web.docbase.dir=web +webinf.dir=web/WEB-INF diff --git a/StackExchange_Client/nbproject/project.xml b/StackExchange_Client/nbproject/project.xml new file mode 100644 index 00000000..cf807c49 --- /dev/null +++ b/StackExchange_Client/nbproject/project.xml @@ -0,0 +1,28 @@ + + + org.netbeans.modules.web.project + + + + + + + + StackExchange_Client + 1.6.5 + + + ${file.reference.json-simple.jar} + WEB-INF/lib + + + + + + + + + + + + diff --git a/StackExchange_Client/src/conf/MANIFEST.MF b/StackExchange_Client/src/conf/MANIFEST.MF new file mode 100644 index 00000000..59499bce --- /dev/null +++ b/StackExchange_Client/src/conf/MANIFEST.MF @@ -0,0 +1,2 @@ +Manifest-Version: 1.0 + diff --git a/StackExchange_Client/src/conf/xml-resources/web-service-references/AnswerWS/wsdl/localhost_8081/StackExchange_WS/AnswerWS.wsdl b/StackExchange_Client/src/conf/xml-resources/web-service-references/AnswerWS/wsdl/localhost_8081/StackExchange_WS/AnswerWS.wsdl new file mode 100644 index 00000000..f16806f4 --- /dev/null +++ b/StackExchange_Client/src/conf/xml-resources/web-service-references/AnswerWS/wsdl/localhost_8081/StackExchange_WS/AnswerWS.wsdl @@ -0,0 +1,93 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/StackExchange_Client/src/conf/xml-resources/web-service-references/AnswerWS/wsdl/localhost_8081/StackExchange_WS/AnswerWS.xsd_1.xsd b/StackExchange_Client/src/conf/xml-resources/web-service-references/AnswerWS/wsdl/localhost_8081/StackExchange_WS/AnswerWS.xsd_1.xsd new file mode 100644 index 00000000..96157639 --- /dev/null +++ b/StackExchange_Client/src/conf/xml-resources/web-service-references/AnswerWS/wsdl/localhost_8081/StackExchange_WS/AnswerWS.xsd_1.xsd @@ -0,0 +1,79 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/StackExchange_Client/src/conf/xml-resources/web-service-references/QuestionWS/wsdl/localhost_8081/StackExchange_WS/QuestionWS.wsdl b/StackExchange_Client/src/conf/xml-resources/web-service-references/QuestionWS/wsdl/localhost_8081/StackExchange_WS/QuestionWS.wsdl new file mode 100644 index 00000000..cb9ca5d7 --- /dev/null +++ b/StackExchange_Client/src/conf/xml-resources/web-service-references/QuestionWS/wsdl/localhost_8081/StackExchange_WS/QuestionWS.wsdl @@ -0,0 +1,131 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/StackExchange_Client/src/conf/xml-resources/web-service-references/QuestionWS/wsdl/localhost_8081/StackExchange_WS/QuestionWS.xsd_1.xsd b/StackExchange_Client/src/conf/xml-resources/web-service-references/QuestionWS/wsdl/localhost_8081/StackExchange_WS/QuestionWS.xsd_1.xsd new file mode 100644 index 00000000..73343ee3 --- /dev/null +++ b/StackExchange_Client/src/conf/xml-resources/web-service-references/QuestionWS/wsdl/localhost_8081/StackExchange_WS/QuestionWS.xsd_1.xsd @@ -0,0 +1,115 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/StackExchange_Client/src/conf/xml-resources/web-service-references/UserWS/wsdl/localhost_8081/StackExchange_WS/UserWS.wsdl b/StackExchange_Client/src/conf/xml-resources/web-service-references/UserWS/wsdl/localhost_8081/StackExchange_WS/UserWS.wsdl new file mode 100644 index 00000000..bd101151 --- /dev/null +++ b/StackExchange_Client/src/conf/xml-resources/web-service-references/UserWS/wsdl/localhost_8081/StackExchange_WS/UserWS.wsdl @@ -0,0 +1,86 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/StackExchange_Client/src/conf/xml-resources/web-service-references/UserWS/wsdl/localhost_8081/StackExchange_WS/UserWS.xsd_1.xsd b/StackExchange_Client/src/conf/xml-resources/web-service-references/UserWS/wsdl/localhost_8081/StackExchange_WS/UserWS.xsd_1.xsd new file mode 100644 index 00000000..e7aa250d --- /dev/null +++ b/StackExchange_Client/src/conf/xml-resources/web-service-references/UserWS/wsdl/localhost_8081/StackExchange_WS/UserWS.xsd_1.xsd @@ -0,0 +1,69 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/StackExchange_Client/src/conf/xml-resources/web-service-references/VoteWS/wsdl/localhost_8081/StackExchange_WS/VoteWS.wsdl b/StackExchange_Client/src/conf/xml-resources/web-service-references/VoteWS/wsdl/localhost_8081/StackExchange_WS/VoteWS.wsdl new file mode 100644 index 00000000..871c6e53 --- /dev/null +++ b/StackExchange_Client/src/conf/xml-resources/web-service-references/VoteWS/wsdl/localhost_8081/StackExchange_WS/VoteWS.wsdl @@ -0,0 +1,131 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/StackExchange_Client/src/conf/xml-resources/web-service-references/VoteWS/wsdl/localhost_8081/StackExchange_WS/VoteWS.xsd_1.xsd b/StackExchange_Client/src/conf/xml-resources/web-service-references/VoteWS/wsdl/localhost_8081/StackExchange_WS/VoteWS.xsd_1.xsd new file mode 100644 index 00000000..77c1b0d5 --- /dev/null +++ b/StackExchange_Client/src/conf/xml-resources/web-service-references/VoteWS/wsdl/localhost_8081/StackExchange_WS/VoteWS.xsd_1.xsd @@ -0,0 +1,104 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/StackExchange_Client/src/java/Answer/AddAnswerServlet.java b/StackExchange_Client/src/java/Answer/AddAnswerServlet.java new file mode 100644 index 00000000..348f1572 --- /dev/null +++ b/StackExchange_Client/src/java/Answer/AddAnswerServlet.java @@ -0,0 +1,76 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package Answer; + +import java.io.IOException; +import javax.servlet.ServletException; +import javax.servlet.RequestDispatcher; +import javax.servlet.annotation.WebServlet; +import javax.servlet.http.Cookie; +import javax.servlet.http.HttpServlet; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import javax.xml.ws.WebServiceRef; +import model.answer.AnswerWS_Service; + +/** + * + * @author ASUS X202E + */ +@WebServlet(name = "AddAnswerServlet", urlPatterns = {"/addAnswer"}) +public class AddAnswerServlet extends HttpServlet { + @WebServiceRef(wsdlLocation = "WEB-INF/wsdl/localhost_8081/StackExchange_WS/AnswerWS.wsdl") + private AnswerWS_Service service; + + /** + * Handles the HTTP POST method. + * + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + @Override + protected void doPost(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + + Cookie cookies[] = request.getCookies(); + + String token_id=""; + boolean found = false; + int i=0; + while (i 0) { + response.sendRedirect("view?id="+question_id); + } + } + if (!found || success==-1) { + request.setAttribute("message","Session expired. please login again."); + RequestDispatcher dispatcher = request.getRequestDispatcher("login"); + dispatcher.forward(request,response); + } + } + + private int addAnswer(java.lang.String token, int questionId, java.lang.String content) { + // Note that the injected javax.xml.ws.Service reference as well as port objects are not thread safe. + // If the calling of port operations may lead to race condition some synchronization is required. + model.answer.AnswerWS port = service.getAnswerWSPort(); + return port.addAnswer(token, questionId, content); + } + +} diff --git a/StackExchange_Client/src/java/ConnectionIS/ConnectionIS.java b/StackExchange_Client/src/java/ConnectionIS/ConnectionIS.java new file mode 100644 index 00000000..9c6b2498 --- /dev/null +++ b/StackExchange_Client/src/java/ConnectionIS/ConnectionIS.java @@ -0,0 +1,84 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package ConnectionIS; + +import java.io.BufferedReader; +import java.io.IOException; +import java.io.InputStreamReader; +import java.io.OutputStream; +import java.io.UnsupportedEncodingException; +import java.net.URL; +import java.net.URLConnection; +import java.net.URLEncoder; +import java.util.logging.Level; +import java.util.logging.Logger; +import org.json.simple.JSONObject; +import org.json.simple.parser.JSONParser; +import org.json.simple.parser.ParseException; + +/** + * + * @author Fitra Rahmamuliani + */ +public class ConnectionIS { + private static final String CONTEXT_PATH = "http://localhost:8082/Identity_Service"; + + private static JSONObject request(String servletPath, byte[] query) { + JSONObject jo = null; + try { + if (servletPath != null && !servletPath.startsWith("/")) + servletPath = "/" + servletPath; + URLConnection connection = new URL(CONTEXT_PATH + servletPath).openConnection(); + connection.setDoOutput(true); + connection.setRequestProperty("Content-Type", "application/x-www-form-urlencoded"); + try (OutputStream output = connection.getOutputStream()) { + output.write(query); + } + StringBuilder builder = new StringBuilder(); + BufferedReader buf = new BufferedReader(new InputStreamReader(connection.getInputStream())); + String read; + while ((read = buf.readLine()) != null) + builder.append(read); + jo = (JSONObject)new JSONParser().parse(builder.toString()); + } + catch (IOException ex) { + System.err.println(ex.getMessage()); + } catch (ParseException ex) { + Logger.getLogger(ConnectionIS.class.getName()).log(Level.SEVERE, null, ex); + } + return jo; + } + + public static JSONObject requestLogin(String email, String password) { + JSONObject jo = null; + try { + String charset = java.nio.charset.StandardCharsets.UTF_8.name(); + String query = String.format( + "email=%s&password=%s", + URLEncoder.encode(email, charset), + URLEncoder.encode(password, charset)); + jo = request("/login", query.getBytes()); + } catch (Exception ex) { + System.err.println(ex.getMessage()); + } + return jo; + } + + public static JSONObject requestAuth(String token_id) { + JSONObject jo = null; + try { + String charset = java.nio.charset.StandardCharsets.UTF_8.name(); + String query = String.format( + "auth=%s", + URLEncoder.encode(token_id, charset)); + jo = request("/auth", query.getBytes()); + } catch (Exception ex) { + System.err.println(ex.getMessage()); + } + return jo; + } + +} \ No newline at end of file diff --git a/StackExchange_Client/src/java/LoginIS/LoginIS.java b/StackExchange_Client/src/java/LoginIS/LoginIS.java new file mode 100644 index 00000000..c8d8a9ed --- /dev/null +++ b/StackExchange_Client/src/java/LoginIS/LoginIS.java @@ -0,0 +1,146 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package LoginIS; + +import ConnectionIS.ConnectionIS; +import model.user.UserWS_Service; +import java.io.IOException; +import java.io.PrintWriter; +import java.util.Date; +import javax.servlet.ServletException; +import javax.servlet.annotation.WebServlet; +import javax.servlet.http.Cookie; +import javax.servlet.http.HttpServlet; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import javax.servlet.http.HttpSession; +import javax.xml.ws.WebServiceRef; +import model.user.User; +import model.user.UserWS_Service; +import org.json.simple.JSONObject; +import java.sql.Timestamp; + +/** + * + * @author HP + */ +@WebServlet(name = "LoginIS", urlPatterns = {"/login"}) +public class LoginIS extends HttpServlet { + @WebServiceRef(wsdlLocation = "WEB-INF/wsdl/localhost_8081/StackExchange_WS/UserWS.wsdl") + private UserWS_Service service; + /** + * Processes requests for both HTTP GET and POST + * methods. + * + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + protected void processRequest(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + response.setContentType("text/html;charset=UTF-8"); + try (PrintWriter out = response.getWriter()) { + /* TODO output your page here. You may use following sample code. */ + out.println(""); + out.println(""); + out.println(""); + out.println("Servlet LoginIS"); + out.println(""); + out.println(""); + out.println("

Servlet LoginIS at " + request.getContextPath() + "

"); + out.println(""); + out.println(""); + } + } + + // + /** + * Handles the HTTP GET method. + * + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + @Override + protected void doGet(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + User user = (User) request.getAttribute("user"); + if (user != null) { + response.sendRedirect(request.getContextPath()); + } else { + HttpSession session = request.getSession(false); + String error = null; + if (session != null && (error = (String) session.getAttribute("error")) != null) { + request.setAttribute("error", error); + session.removeAttribute("error"); + } + request.getRequestDispatcher("/login.jsp").forward(request, response); + } + } + + /** + * Handles the HTTP POST method. + * + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + @Override + protected void doPost(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + User userlogin = (User) request.getAttribute("user"); + if (userlogin!=null) + { + response.sendRedirect(request.getContextPath()); + return; + } + else + { + String email = request.getParameter("email"); + String password = request.getParameter("password"); + JSONObject json = null; + if (email!=null && password != null && (json = ConnectionIS.requestLogin(email,password))!=null) + { + if (json.containsKey("token")) + { + Cookie cookie = new Cookie("stackexchange_token", (String)json.get("token")); + cookie.setPath("/"); + long umur= -1; + if (json.containsKey("token_expired")) + { + umur = new Timestamp(new Date().getTime()).getTime() - (long) json.get("token_expired"); + umur/=1000; + } + cookie.setMaxAge((int) umur); + response.addCookie(cookie); + response.sendRedirect(request.getContextPath()); + return; + } + else + { + if(json.containsKey("ERROR")) + { + request.setAttribute("error", (String) json.get("ERROR")); + } + } + } + } + doGet(request, response); + } + /** + * Returns a short description of the servlet. + * + * @return a String containing servlet description + */ + @Override + public String getServletInfo() { + return "Short description"; + }// + +} diff --git a/StackExchange_Client/src/java/LogoutIS/LogoutServlet.java b/StackExchange_Client/src/java/LogoutIS/LogoutServlet.java new file mode 100644 index 00000000..bdfcef6f --- /dev/null +++ b/StackExchange_Client/src/java/LogoutIS/LogoutServlet.java @@ -0,0 +1,85 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package LogoutIS; + +import java.io.IOException; +import java.io.PrintWriter; +import javax.servlet.ServletException; +import javax.servlet.annotation.WebServlet; +import javax.servlet.http.Cookie; +import javax.servlet.http.HttpServlet; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +/** + * + * @author Venny + */ +@WebServlet(name = "LogoutServlet", urlPatterns = {"/logout"}) +public class LogoutServlet extends HttpServlet { + + /** + * Processes requests for both HTTP GET and POST + * methods. + * + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + protected void processRequest(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + response.setContentType("text/html;charset=UTF-8"); + PrintWriter out=response.getWriter(); + request.getRequestDispatcher("index").include(request, response); + + Cookie ck= new Cookie("stackexchange_token", null); + ck.setMaxAge(0); + response.addCookie(ck); + + out.print("you are successfully logged out!"); + } + + // + /** + * Handles the HTTP GET method. + * + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + @Override + protected void doGet(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + processRequest(request, response); + } + + /** + * Handles the HTTP POST method. + * + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + @Override + protected void doPost(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + processRequest(request, response); + } + + /** + * Returns a short description of the servlet. + * + * @return a String containing servlet description + */ + @Override + public String getServletInfo() { + return "Short description"; + }// + +} diff --git a/StackExchange_Client/src/java/Question/AddQuestionServlet.java b/StackExchange_Client/src/java/Question/AddQuestionServlet.java new file mode 100644 index 00000000..5c2bd4f9 --- /dev/null +++ b/StackExchange_Client/src/java/Question/AddQuestionServlet.java @@ -0,0 +1,79 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package Question; + +import java.io.IOException; +import java.io.PrintWriter; +import javax.servlet.RequestDispatcher; +import javax.servlet.ServletException; +import javax.servlet.annotation.WebServlet; +import javax.servlet.http.Cookie; +import javax.servlet.http.HttpServlet; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import javax.xml.ws.WebServiceRef; +import model.question.QuestionWS_Service; + +/** + * + * @author ASUS X202E + */ +@WebServlet(name = "AddQuestionServlet", urlPatterns = {"/addQuestion"}) +public class AddQuestionServlet extends HttpServlet { + @WebServiceRef(wsdlLocation = "WEB-INF/wsdl/localhost_8081/StackExchange_WS/QuestionWS.wsdl") + private QuestionWS_Service service; + + +/** + * Handles the HTTP POST method. + * + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + @Override + protected void doPost(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + Cookie cookies[] = request.getCookies(); + + String token_id = ""; + boolean found = false; + int i=0; + while (i 0) { + response.sendRedirect("view?id="+question_id); + } + } + if (!found || question_id==-1) { + request.setAttribute("message",token_id); + RequestDispatcher dispatcher = request.getRequestDispatcher("login"); + dispatcher.forward(request,response); + } + } + + private int addQuestion(java.lang.String token, java.lang.String topic, java.lang.String content) { + // Note that the injected javax.xml.ws.Service reference as well as port objects are not thread safe. + // If the calling of port operations may lead to race condition some synchronization is required. + model.question.QuestionWS port = service.getQuestionWSPort(); + return port.addQuestion(token, topic, content); + } + + + +} diff --git a/StackExchange_Client/src/java/Question/DeleteQuestionServlet.java b/StackExchange_Client/src/java/Question/DeleteQuestionServlet.java new file mode 100644 index 00000000..1ef4af2e --- /dev/null +++ b/StackExchange_Client/src/java/Question/DeleteQuestionServlet.java @@ -0,0 +1,114 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package Question; + +import java.io.IOException; +import javax.servlet.RequestDispatcher; +import javax.servlet.ServletException; +import javax.servlet.annotation.WebServlet; +import javax.servlet.http.Cookie; +import javax.servlet.http.HttpServlet; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import javax.xml.ws.WebServiceRef; +import model.question.QuestionWS_Service; +import model.question.Question; + +/** + * + * @author Venny + */ +@WebServlet(name = "DeleteQuestionServlet", urlPatterns = {"/delete"}) +public class DeleteQuestionServlet extends HttpServlet { + @WebServiceRef(wsdlLocation = "WEB-INF/wsdl/localhost_8081/StackExchange_WS/QuestionWS.wsdl") + private QuestionWS_Service service; + /** + * Processes requests for both HTTP GET and POST + * methods. + * + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + protected void processRequest(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + int question_id = Integer.parseInt(request.getParameter("id")); + int status = -1; + Cookie cookies[] = request.getCookies(); + + String token_id = ""; + boolean found = false; + int i=0; + while (i 0) { + response.sendRedirect(""); + } + } + if (!found || status==-1) { + request.setAttribute("message","Session expired. please login again."); + RequestDispatcher dispatcher = request.getRequestDispatcher("login"); + dispatcher.forward(request,response); + } + + } + + // + /** + * Handles the HTTP GET method. + * + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + @Override + protected void doGet(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + processRequest(request, response); + } + + /** + * Handles the HTTP POST method. + * + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + @Override + protected void doPost(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + processRequest(request, response); + } + + /** + * Returns a short description of the servlet. + * + * @return a String containing servlet description + */ + @Override + public String getServletInfo() { + return "Short description"; + }// + + private int deleteQuestion(String token, int question_id) { + model.question.QuestionWS port = service.getQuestionWSPort(); + return port.deleteQuestion(token, question_id); + } + +} diff --git a/StackExchange_Client/src/java/Question/EditQuestionServlet.java b/StackExchange_Client/src/java/Question/EditQuestionServlet.java new file mode 100644 index 00000000..6169e4dc --- /dev/null +++ b/StackExchange_Client/src/java/Question/EditQuestionServlet.java @@ -0,0 +1,79 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package Question; + +import java.io.IOException; +import javax.servlet.RequestDispatcher; +import javax.servlet.ServletException; +import javax.servlet.annotation.WebServlet; +import javax.servlet.http.Cookie; +import javax.servlet.http.HttpServlet; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import javax.xml.ws.WebServiceRef; +import model.question.Question; +import model.question.QuestionWS_Service; + +/** + * + * @author ASUS X202E + */ +@WebServlet(name = "EditQuestionServlet", urlPatterns = {"/edit"}) +public class EditQuestionServlet extends HttpServlet { + @WebServiceRef(wsdlLocation = "WEB-INF/wsdl/localhost_8081/StackExchange_WS/QuestionWS.wsdl") + private QuestionWS_Service service; + +/** + * Handles the HTTP GET method. + * + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + @Override + protected void doGet(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + Cookie cookies[] = request.getCookies(); + + String token_id = ""; + boolean found = false; + int i=0; + int uid=-1; + while (iGET and POST + * methods. + * + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + protected void processRequest(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + Cookie cookies[] = request.getCookies(); + + String token_id = ""; + boolean found = false; + int i=0; + int uid=-1; + while (i questionList = getAllQuestions(); + java.util.Map userMap = new java.util.HashMap<>(); + java.util.Map answerMap = new java.util.HashMap<>(); + for (model.question.Question q : questionList) { + userMap.put(q.getQuestionId(),getUserByID(q.getUserId())); + answerMap.put(q.getQuestionId(),getAnswerCount(q.getQuestionId())); + } + + request.setAttribute("uid",uid); + request.setAttribute("questions",questionList); + request.setAttribute("users",userMap); + request.setAttribute("answers",answerMap); + RequestDispatcher dispatcher = request.getRequestDispatcher("/index.jsp"); + dispatcher.forward(request,response); + } + + // + /** + * Handles the HTTP GET method. + * + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + @Override + protected void doGet(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + processRequest(request, response); + } + + /** + * Handles the HTTP POST method. + * + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + @Override + protected void doPost(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + processRequest(request, response); + } + + /** + * Returns a short description of the servlet. + * + * @return a String containing servlet description + */ + @Override + public String getServletInfo() { + return "Short description"; + }// + + + + private User getUserByID(int userId) { + // Note that the injected javax.xml.ws.Service reference as well as port objects are not thread safe. + // If the calling of port operations may lead to race condition some synchronization is required. + model.user.UserWS port = service_1.getUserWSPort(); + return port.getUserByID(userId); + } + + private int getAnswerCount(int questionId) { + // Note that the injected javax.xml.ws.Service reference as well as port objects are not thread safe. + // If the calling of port operations may lead to race condition some synchronization is required. + model.answer.AnswerWS port = service_2.getAnswerWSPort(); + return port.getAnswerCount(questionId); + } + + private java.util.List getAllQuestions() { + // Note that the injected javax.xml.ws.Service reference as well as port objects are not thread safe. + // If the calling of port operations may lead to race condition some synchronization is required. + model.question.QuestionWS port = service.getQuestionWSPort(); + return port.getAllQuestions(); + } + + + + + + + +} diff --git a/StackExchange_Client/src/java/Question/SearchQuestionServlet.java b/StackExchange_Client/src/java/Question/SearchQuestionServlet.java new file mode 100644 index 00000000..7d3e5c90 --- /dev/null +++ b/StackExchange_Client/src/java/Question/SearchQuestionServlet.java @@ -0,0 +1,111 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package Question; + +import java.io.IOException; +import javax.servlet.RequestDispatcher; +import javax.servlet.ServletException; +import javax.servlet.annotation.WebServlet; +import javax.servlet.http.Cookie; +import javax.servlet.http.HttpServlet; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import javax.xml.ws.WebServiceRef; +import model.answer.AnswerWS_Service; +import model.question.QuestionWS_Service; +import model.user.User; +import model.user.UserWS_Service; + +/** + * + * @author ASUS X202E + */ +@WebServlet(name = "SearchQuestionServlet", urlPatterns = {"/search"}) +public class SearchQuestionServlet extends HttpServlet { + @WebServiceRef(wsdlLocation = "WEB-INF/wsdl/localhost_8081/StackExchange_WS/QuestionWS.wsdl") + private QuestionWS_Service service_2; + @WebServiceRef(wsdlLocation = "WEB-INF/wsdl/localhost_8081/StackExchange_WS/AnswerWS.wsdl") + private AnswerWS_Service service_1; + @WebServiceRef(wsdlLocation = "WEB-INF/wsdl/localhost_8081/StackExchange_WS/UserWS.wsdl") + private UserWS_Service service; + + + // + /** + * Handles the HTTP GET method. + * + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + @Override + protected void doGet(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + Cookie cookies[] = request.getCookies(); + + String token_id = ""; + boolean found = false; + int i=0; + int uid=-1; + while (i searchResults = searchQuestions(query); + java.util.Map userMap = new java.util.HashMap<>(); + java.util.Map answerMap = new java.util.HashMap<>(); + for (model.question.Question q : searchResults) { + userMap.put(q.getQuestionId(),getUserByID(q.getUserId())); + answerMap.put(q.getQuestionId(),getAnswerCount(q.getQuestionId())); + } + + request.setAttribute("uid",uid); + request.setAttribute("questions",searchResults); + request.setAttribute("users",userMap); + request.setAttribute("answers",answerMap); + RequestDispatcher dispatcher = request.getRequestDispatcher("/search.jsp"); + dispatcher.forward(request,response); + } + + private User getUserByID(int userId) { + // Note that the injected javax.xml.ws.Service reference as well as port objects are not thread safe. + // If the calling of port operations may lead to race condition some synchronization is required. + model.user.UserWS port = service.getUserWSPort(); + return port.getUserByID(userId); + } + + private int getAnswerCount(int questionId) { + // Note that the injected javax.xml.ws.Service reference as well as port objects are not thread safe. + // If the calling of port operations may lead to race condition some synchronization is required. + model.answer.AnswerWS port = service_1.getAnswerWSPort(); + return port.getAnswerCount(questionId); + } + + private java.util.List searchQuestions(java.lang.String arg0) { + // Note that the injected javax.xml.ws.Service reference as well as port objects are not thread safe. + // If the calling of port operations may lead to race condition some synchronization is required. + model.question.QuestionWS port = service_2.getQuestionWSPort(); + return port.searchQuestions(arg0); + } + +} diff --git a/StackExchange_Client/src/java/Question/UpdateQuestionServlet.java b/StackExchange_Client/src/java/Question/UpdateQuestionServlet.java new file mode 100644 index 00000000..03aa1092 --- /dev/null +++ b/StackExchange_Client/src/java/Question/UpdateQuestionServlet.java @@ -0,0 +1,78 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package Question; + +import java.io.IOException; +import java.io.PrintWriter; +import javax.servlet.RequestDispatcher; +import javax.servlet.ServletException; +import javax.servlet.annotation.WebServlet; +import javax.servlet.http.Cookie; +import javax.servlet.http.HttpServlet; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import javax.xml.ws.WebServiceRef; +import model.question.QuestionWS_Service; + +/** + * + * @author ASUS X202E + */ +@WebServlet(name = "UpdateQuestionServlet", urlPatterns = {"/updateQuestion"}) +public class UpdateQuestionServlet extends HttpServlet { + @WebServiceRef(wsdlLocation = "WEB-INF/wsdl/localhost_8081/StackExchange_WS/QuestionWS.wsdl") + private QuestionWS_Service service; + + /** + * Handles the HTTP POST method. + * + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + @Override + protected void doPost(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + Cookie cookies[] = request.getCookies(); + + String token_id = ""; + boolean found = false; + int i=0; + while (i 0) { + response.sendRedirect("view?id="+question_id); + } + } + + if (!found || success==-1) { + request.setAttribute("message","Session expired. please login again."); + RequestDispatcher dispatcher = request.getRequestDispatcher("login"); + dispatcher.forward(request,response); + } + } + + private int editQuestion(java.lang.String token, int questionId, java.lang.String topic, java.lang.String content) { + // Note that the injected javax.xml.ws.Service reference as well as port objects are not thread safe. + // If the calling of port operations may lead to race condition some synchronization is required. + model.question.QuestionWS port = service.getQuestionWSPort(); + return port.editQuestion(token, questionId, topic, content); + } + +} diff --git a/StackExchange_Client/src/java/Question/ViewQuestionServlet.java b/StackExchange_Client/src/java/Question/ViewQuestionServlet.java new file mode 100644 index 00000000..cfdb73ff --- /dev/null +++ b/StackExchange_Client/src/java/Question/ViewQuestionServlet.java @@ -0,0 +1,108 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package Question; + +import java.io.IOException; +import javax.servlet.RequestDispatcher; +import javax.servlet.ServletException; +import javax.servlet.annotation.WebServlet; +import javax.servlet.http.Cookie; +import javax.servlet.http.HttpServlet; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import javax.xml.ws.WebServiceRef; +import model.question.Question; +import model.question.QuestionWS_Service; +import model.answer.Answer; +import model.answer.AnswerWS_Service; +import model.user.User; +import model.user.UserWS_Service; + +/** + * + * @author Venny + */ +@WebServlet(name = "ViewQuestionServlet", urlPatterns = {"/view"}) +public class ViewQuestionServlet extends HttpServlet { + @WebServiceRef(wsdlLocation = "WEB-INF/wsdl/localhost_8081/StackExchange_WS/QuestionWS.wsdl") + private QuestionWS_Service q_service; + @WebServiceRef(wsdlLocation = "WEB-INF/wsdl/localhost_8081/StackExchange_WS/AnswerWS.wsdl") + private AnswerWS_Service a_service; + @WebServiceRef(wsdlLocation = "WEB-INF/wsdl/localhost_8081/StackExchange_WS/UserWS.wsdl") + private UserWS_Service u_service; + + /** + * Handles the HTTP GET method. + * + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + @Override + protected void doGet(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + Cookie cookies[] = request.getCookies(); + + String token_id = ""; + boolean found = false; + int i=0; + int uid=-1; + while (i answerList = getAnswersByQID(Integer.parseInt(request.getParameter("id"))); + java.util.Map userMap = new java.util.HashMap<>(); + + for (Answer a: answerList){ + userMap.put(a.getAnswerId(), getUserByID(a.getUserId())); + } + + request.setAttribute("uid",uid); + request.setAttribute("question",q); + request.setAttribute("answers",answerList); + request.setAttribute("q_user", q_user); + request.setAttribute("a_user", userMap); + + RequestDispatcher dispatcher = request.getRequestDispatcher("/view.jsp"); + dispatcher.forward(request,response); + } + + + private Question getQuestionByID(int questionId) { + // Note that the injected javax.xml.ws.Service reference as well as port objects are not thread safe. + // If the calling of port operations may lead to race condition some synchronization is required. + model.question.QuestionWS port = q_service.getQuestionWSPort(); + return port.getQuestionByID(questionId); + } + + private java.util.List getAnswersByQID(int i) { + model.answer.AnswerWS port = a_service.getAnswerWSPort(); + return port.getAnswersByQID(i); + } + + private User getUserByID(int userId) { + model.user.UserWS port = u_service.getUserWSPort(); + return port.getUserByID(userId); + } +} diff --git a/StackExchange_Client/src/java/User/AddUserServlet.java b/StackExchange_Client/src/java/User/AddUserServlet.java new file mode 100644 index 00000000..8709bb26 --- /dev/null +++ b/StackExchange_Client/src/java/User/AddUserServlet.java @@ -0,0 +1,68 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package User; + +import java.io.IOException; +import javax.servlet.RequestDispatcher; +import javax.servlet.ServletException; +import javax.servlet.annotation.WebServlet; +import javax.servlet.http.HttpServlet; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import javax.xml.ws.WebServiceRef; +import model.user.User; +import model.user.UserWS_Service; + +/** + * + * @author Venny + */ +@WebServlet(name = "AddUserServlet", urlPatterns = {"/addUser"}) +public class AddUserServlet extends HttpServlet { + @WebServiceRef(wsdlLocation = "WEB-INF/wsdl/localhost_8081/StackExchange_WS/UserWS.wsdl") + private UserWS_Service service; + + /** + * Handles the HTTP POST method. + * + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + @Override + protected void doPost(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + model.user.User newUser = new model.user.User(); + String name = request.getParameter("name"); + String email = request.getParameter("email"); + String password = request.getParameter("password"); + newUser.setName(name); + newUser.setEmail(email); + newUser.setPassword(password); + int id = getIDbyEmail(email); + if (id == -1){ + //user doen't exist + addUser(newUser); + request.setAttribute("message","Register successful. Please login to continue."); + RequestDispatcher dispatcher = request.getRequestDispatcher("login"); + dispatcher.forward(request,response); + } else { + request.setAttribute("message","Email already registered. Please try again."); + RequestDispatcher dispatcher = request.getRequestDispatcher("register.jsp"); + dispatcher.forward(request,response); + } + } + + private void addUser(User u) { + model.user.UserWS port = service.getUserWSPort(); + port.addUser(u); + } + private int getIDbyEmail(String email) { + model.user.UserWS port = service.getUserWSPort(); + return port.getIDbyEmail(email); + } +} diff --git a/StackExchange_Client/src/java/Vote/VoteServlet.java b/StackExchange_Client/src/java/Vote/VoteServlet.java new file mode 100644 index 00000000..d94330cc --- /dev/null +++ b/StackExchange_Client/src/java/Vote/VoteServlet.java @@ -0,0 +1,125 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package Vote; + +import java.io.IOException; +import java.io.PrintWriter; +import javax.servlet.RequestDispatcher; +import javax.servlet.ServletException; +import javax.servlet.annotation.WebServlet; +import javax.servlet.http.Cookie; +import javax.servlet.http.HttpServlet; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import javax.xml.ws.WebServiceRef; + +/** + * + * @author ASUS X202E + */ +@WebServlet(name = "VoteServlet", urlPatterns = {"/vote"}) +public class VoteServlet extends HttpServlet { + @WebServiceRef(wsdlLocation = "WEB-INF/wsdl/localhost_8081/StackExchange_WS/VoteWS.wsdl") + private model.vote.VoteWS_Service service; + + /** + * Handles the HTTP GET method. + * + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + @Override + protected void doGet(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + response.setContentType("text/html;charset=UTF-8"); + + Cookie cookies[] = request.getCookies(); + + String token_id=""; + boolean found = false; + int i=0; + while (i0) out.print(getQuestionVotes(id)+""); + } else if ("answer".equals(db)) { + success = voteAnswer(token_id,id,vote); + if (success>0) out.print(getAnswerVotes(id)+""); + } + } + } + + } + + /** + * Handles the HTTP POST method. + * + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + @Override + protected void doPost(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + } + + /** + * Returns a short description of the servlet. + * + * @return a String containing servlet description + */ + @Override + public String getServletInfo() { + return "Short description"; + }// + + private int getQuestionVotes(int questionId) { + // Note that the injected javax.xml.ws.Service reference as well as port objects are not thread safe. + // If the calling of port operations may lead to race condition some synchronization is required. + model.vote.VoteWS port = service.getVoteWSPort(); + return port.getQuestionVotes(questionId); + } + + + private int getAnswerVotes(int answerId) { + // Note that the injected javax.xml.ws.Service reference as well as port objects are not thread safe. + // If the calling of port operations may lead to race condition some synchronization is required. + model.vote.VoteWS port = service.getVoteWSPort(); + return port.getAnswerVotes(answerId); + } + + private int voteAnswer(java.lang.String token, int answerId, int vote) { + // Note that the injected javax.xml.ws.Service reference as well as port objects are not thread safe. + // If the calling of port operations may lead to race condition some synchronization is required. + model.vote.VoteWS port = service.getVoteWSPort(); + return port.voteAnswer(token, answerId, vote); + } + + private int voteQuestion(java.lang.String token, int questionId, int vote) { + // Note that the injected javax.xml.ws.Service reference as well as port objects are not thread safe. + // If the calling of port operations may lead to race condition some synchronization is required. + model.vote.VoteWS port = service.getVoteWSPort(); + return port.voteQuestion(token, questionId, vote); + } + +} diff --git a/StackExchange_Client/web/WEB-INF/jax-ws-catalog.xml b/StackExchange_Client/web/WEB-INF/jax-ws-catalog.xml new file mode 100644 index 00000000..2cce1a7d --- /dev/null +++ b/StackExchange_Client/web/WEB-INF/jax-ws-catalog.xml @@ -0,0 +1,11 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/StackExchange_Client/web/WEB-INF/web.xml b/StackExchange_Client/web/WEB-INF/web.xml new file mode 100644 index 00000000..76694fc9 --- /dev/null +++ b/StackExchange_Client/web/WEB-INF/web.xml @@ -0,0 +1,104 @@ + + + + LoginIS + LoginIS.LoginIS + + + ConnectionIS + ConnectionIS.ConnectionIS + + + QuestionListServlet + Question.QuestionListServlet + + + ViewQuestionServlet + Question.ViewQuestionServlet + + + AddAnswerServlet + Answer.AddAnswerServlet + + + VoteServlet + Vote.VoteServlet + + + AddUserServlet + User.AddUserServlet + + + AddQuestionServlet + Question.AddQuestionServlet + + + SearchQuestionServlet + Question.SearchQuestionServlet + + + EditQuestionServlet + Question.EditQuestionServlet + + + UpdateQuestionServlet + Question.UpdateQuestionServlet + + + DeleteQuestionServlet + Question.DeleteQuestionServlet + + + LoginIS + /login + + + ConnectionIS + /ConnectionIS + + + QuestionListServlet + + + + ViewQuestionServlet + /view + + + AddAnswerServlet + /addAnswer + + + VoteServlet + /vote + + + AddUserServlet + /addUser + + + AddQuestionServlet + /addQuestion + + + SearchQuestionServlet + /search + + + EditQuestionServlet + /edit + + + UpdateQuestionServlet + /updateQuestion + + + DeleteQuestionServlet + /delete + + + + 30 + + + diff --git a/StackExchange_Client/web/WEB-INF/wsdl/localhost_8081/StackExchange_WS/AnswerWS.wsdl b/StackExchange_Client/web/WEB-INF/wsdl/localhost_8081/StackExchange_WS/AnswerWS.wsdl new file mode 100644 index 00000000..3d2ccaca --- /dev/null +++ b/StackExchange_Client/web/WEB-INF/wsdl/localhost_8081/StackExchange_WS/AnswerWS.wsdl @@ -0,0 +1,93 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/StackExchange_Client/web/WEB-INF/wsdl/localhost_8081/StackExchange_WS/AnswerWS.xsd_1.xsd b/StackExchange_Client/web/WEB-INF/wsdl/localhost_8081/StackExchange_WS/AnswerWS.xsd_1.xsd new file mode 100644 index 00000000..8cd4ce24 --- /dev/null +++ b/StackExchange_Client/web/WEB-INF/wsdl/localhost_8081/StackExchange_WS/AnswerWS.xsd_1.xsd @@ -0,0 +1,79 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/StackExchange_Client/web/WEB-INF/wsdl/localhost_8081/StackExchange_WS/QuestionWS.wsdl b/StackExchange_Client/web/WEB-INF/wsdl/localhost_8081/StackExchange_WS/QuestionWS.wsdl new file mode 100644 index 00000000..613b554e --- /dev/null +++ b/StackExchange_Client/web/WEB-INF/wsdl/localhost_8081/StackExchange_WS/QuestionWS.wsdl @@ -0,0 +1,131 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/StackExchange_Client/web/WEB-INF/wsdl/localhost_8081/StackExchange_WS/QuestionWS.xsd_1.xsd b/StackExchange_Client/web/WEB-INF/wsdl/localhost_8081/StackExchange_WS/QuestionWS.xsd_1.xsd new file mode 100644 index 00000000..73343ee3 --- /dev/null +++ b/StackExchange_Client/web/WEB-INF/wsdl/localhost_8081/StackExchange_WS/QuestionWS.xsd_1.xsd @@ -0,0 +1,115 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/StackExchange_Client/web/WEB-INF/wsdl/localhost_8081/StackExchange_WS/UserWS.wsdl b/StackExchange_Client/web/WEB-INF/wsdl/localhost_8081/StackExchange_WS/UserWS.wsdl new file mode 100644 index 00000000..bd101151 --- /dev/null +++ b/StackExchange_Client/web/WEB-INF/wsdl/localhost_8081/StackExchange_WS/UserWS.wsdl @@ -0,0 +1,86 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/StackExchange_Client/web/WEB-INF/wsdl/localhost_8081/StackExchange_WS/UserWS.xsd_1.xsd b/StackExchange_Client/web/WEB-INF/wsdl/localhost_8081/StackExchange_WS/UserWS.xsd_1.xsd new file mode 100644 index 00000000..e7aa250d --- /dev/null +++ b/StackExchange_Client/web/WEB-INF/wsdl/localhost_8081/StackExchange_WS/UserWS.xsd_1.xsd @@ -0,0 +1,69 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/StackExchange_Client/web/WEB-INF/wsdl/localhost_8081/StackExchange_WS/VoteWS.wsdl b/StackExchange_Client/web/WEB-INF/wsdl/localhost_8081/StackExchange_WS/VoteWS.wsdl new file mode 100644 index 00000000..59a463d2 --- /dev/null +++ b/StackExchange_Client/web/WEB-INF/wsdl/localhost_8081/StackExchange_WS/VoteWS.wsdl @@ -0,0 +1,131 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/StackExchange_Client/web/WEB-INF/wsdl/localhost_8081/StackExchange_WS/VoteWS.xsd_1.xsd b/StackExchange_Client/web/WEB-INF/wsdl/localhost_8081/StackExchange_WS/VoteWS.xsd_1.xsd new file mode 100644 index 00000000..77c1b0d5 --- /dev/null +++ b/StackExchange_Client/web/WEB-INF/wsdl/localhost_8081/StackExchange_WS/VoteWS.xsd_1.xsd @@ -0,0 +1,104 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/StackExchange_Client/web/ask.jsp b/StackExchange_Client/web/ask.jsp new file mode 100644 index 00000000..d4745e03 --- /dev/null +++ b/StackExchange_Client/web/ask.jsp @@ -0,0 +1,18 @@ +<%-- + Document : create_question + Created on : Nov 18, 2015, 11:11:58 AM + Author : Fitra Rahmamuliani +--%> + +<%@page contentType="text/html" pageEncoding="UTF-8"%> + +
What's your question?
+
+ + + +
+ + + + diff --git a/StackExchange_Client/web/css/style.css b/StackExchange_Client/web/css/style.css new file mode 100644 index 00000000..532fd67a --- /dev/null +++ b/StackExchange_Client/web/css/style.css @@ -0,0 +1,241 @@ +/* +To change this license header, choose License Headers in Project Properties. +To change this template file, choose Tools | Templates +and open the template in the editor. +*/ +/* + Created on : Nov 17, 2015, 11:43:08 AM + Author : Venny +*/ + +html { + font-family: "Lucida Sans Unicode", "Lucida Grande", sans-serif; +} + +a:link, a:visited, a:active { + color: #000000; + text-decoration: none; +} + +a:hover { + color: #909090; + text-decoration: none; +} + +a.edit:link, +a.edit:visited, +a.edit:active { + color: #FFA500; + text-decoration: none; +} + +a.delete:link, +a.delete:visited, +a.delete:active { + color: #DC143C; + text-decoration: none; +} + +a.edit:hover, a.delete:hover { + color: #909090; + text-decoration: none; +} + +h1 { + text-align: center; + font-weight: normal; +} + +h2 { + text-align: left; + font-weight: normal; + border-bottom: solid; +} + +.grey-title{ + text-align: left; + font-weight: normal; + color: #909090; + font-size: 22px; +} + +h3 { + text-align: left; + font-weight: normal; +} + +h5 { + margin-top:5px; + text-align: center; + font-weight: normal; +} + +p{ + font-size:14px; + margin:2px; +} + +textarea { + padding: 7px; + border: 1; + width: 95%; + margin: 5px; + float: left; + text-align: top; + font-family: "Lucida Sans Unicode", "Lucida Grande", sans-serif; +} + +button { + background-color: #FFFFFF; + border: 1px solid #909090; + padding:10px; +} + + +.input-search{ + padding: 6px; + border: 2; + width: 80%; + margin: 7px; + margin-left: 10px; + float: left; + display: inline-block; + font-family: "Lucida Sans Unicode", "Lucida Grande", sans-serif; +} + +.button-right{ + margin-top: 1px; + margin-right: 3%; + padding: 6px; + float: right; + display: inline-block; +} + +.container{ + margin: auto; + width: 55%; + padding: 10px; +} + +.login{ + width:50%; + margin: auto; +} + +.content{ + padding: 10px; + margin-top:5px; +} + +textarea { + resize:none; +} + +.question-home{ + padding: 10px; + border-top: solid; +} + +.answer-list{ + padding: 10px; + border-bottom: solid; +} + +.input-group { + padding: 7px; + border: 1; + width: 95%; + margin: 5px; + float: left; + font-family: "Lucida Sans Unicode", "Lucida Grande", sans-serif; +} + +.button-bottom{ + margin-top: 10px; + float: right; +} +#vote, #answer { + display: inline-block; + width: 10%; + text-align:center; + vertical-align: top; + font-size:13px; +} + +#question-content { + display: inline-block; + width: 75%; +} + +#question-title{ + font-size: 14px; +} + +#question-description{ + font-size: 12px; +} + +.question-sign{ + padding: 10px; + margin-top:0px; + width:95%; + text-align: right; +} + +.question-sign p{ + font-size:13px; +} + +.voting{ + padding-top:10px; + width:10%; + display: inline-block; + text-align:center; + vertical-align: top; +} + +.voting{ + font-size: 24px; + color: #A9A9A9; +} + +.answer-content{ + padding-top:10px; + width:85%; + display: inline-block; +} + +.arrow-up, .arrow-down { + cursor: pointer; +} +.arrow-up { + width: 0; + height: 0; + margin-left: 20px; + border-left: 15px solid transparent; + border-right: 15px solid transparent; + border-bottom: 15px solid #D3D3D3; +} + +.arrow-up:hover{ + border-bottom: 15px solid #808080; +} + +.arrow-down { + width: 0; + height: 0; + margin-left: 20px; + border-left: 15px solid transparent; + border-right: 15px solid transparent; + border-top: 15px solid #D3D3D3; +} + +.arrow-down:hover{ + border-top: 15px solid #808080; +} + +.question-content { + padding-top:10px; + width:85%; + display: inline-block; +} \ No newline at end of file diff --git a/StackExchange_Client/web/edit.jsp b/StackExchange_Client/web/edit.jsp new file mode 100644 index 00000000..d91c33b8 --- /dev/null +++ b/StackExchange_Client/web/edit.jsp @@ -0,0 +1,14 @@ +<%@page contentType="text/html" pageEncoding="UTF-8"%> + + +
Edit your question
+
+ + + + +
+ + + + diff --git a/StackExchange_Client/web/header.jsp b/StackExchange_Client/web/header.jsp new file mode 100644 index 00000000..01a3047f --- /dev/null +++ b/StackExchange_Client/web/header.jsp @@ -0,0 +1,29 @@ +<%-- + Document : header + Created on : Nov 27, 2015, 6:37:12 PM + Author : ASUS X202E +--%> + +<%@page contentType="text/html" pageEncoding="UTF-8"%> +<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> + + + + + Simple StackExchange + + + + +
+
+ + + Login | Register + + + Hello, ${uname} | Logout + + +
+

Simple StackExchange

\ No newline at end of file diff --git a/StackExchange_Client/web/index.jsp b/StackExchange_Client/web/index.jsp new file mode 100644 index 00000000..17931ce8 --- /dev/null +++ b/StackExchange_Client/web/index.jsp @@ -0,0 +1,50 @@ +<%-- + Document : index + Created on : Nov 18, 2015, 1:51:38 PM + Author : Asanilta +--%> + + + + + + +
+ + +
+

+ Cannot find what you are looking for? Ask here +
+
+

+

Recently Asked Question

+ + <% for (model.question.Question question : questions) { %> +
+
+
<%= question.getVote() %>
+
Votes
+
+ <% int answerCount = answers.get(question.getQuestionId()); %> +
+
<%= answerCount %>
+
Answers
+
+
+ <% String topic = question.getTopic(); if (topic.length() > 153) topic = topic.substring(0,150)+ "..."; %> + + <% String content = question.getContent();if (content.length() > 503) content = content.substring(0,500)+"..."; %> +
<%= content %>
+
+ <% model.user.User user = users.get(question.getQuestionId()); %> +
+ asked by + <%= user.getName() %> (<%= user.getEmail() %>) + <% if (question.getUserId() == uid) { %>editdelete
<% } %> +
+
+ <% } %> + + + diff --git a/StackExchange_Client/web/js/functions.js b/StackExchange_Client/web/js/functions.js new file mode 100644 index 00000000..7ab23ef6 --- /dev/null +++ b/StackExchange_Client/web/js/functions.js @@ -0,0 +1,42 @@ + function validateQuestionForm() { + var re = /^(([^<>()[\]\.,;:\s@\"]+(\.[^<>()[\]\.,;:\s@\"]+)*)|(\".+\"))@(([^<>()[\]\.,;:\s@\"]+\.)+[^<>()[\]\.,;:\s@\"]{2,})$/i; + if (document.forms["createquestion"]["createname"].value == null || document.forms["createquestion"]["createname"].value == "" || + document.forms["createquestion"]["createemail"].value == null || document.forms["createquestion"]["createemail"].value == "" || + document.forms["createquestion"]["createtopic"].value == null || document.forms["createquestion"]["createtopic"].value == "" || + document.forms["createquestion"]["createcontent"].value == null || document.forms["createquestion"]["createcontent"].value == "") { + alert("All required fields must be filled out"); + return false; + } + else if(!re.test(document.forms["createquestion"]["createemail"].value)){ + alert("Incorrect email address"); + return false; + } + } +function validateAnswerForm(){ + var re = /^(([^<>()[\]\.,;:\s@\"]+(\.[^<>()[\]\.,;:\s@\"]+)*)|(\".+\"))@(([^<>()[\]\.,;:\s@\"]+\.)+[^<>()[\]\.,;:\s@\"]{2,})$/i; + if (document.forms["createquestion"]["createname"].value == null || document.forms["createquestion"]["createname"].value == "" || + document.forms["createquestion"]["createemail"].value == null || document.forms["createquestion"]["createemail"].value == "" || + document.forms["createquestion"]["createcontent"].value == null || document.forms["createquestion"]["createcontent"].value == "") { + alert("All required fields must be filled out"); + return false; + } + else if(!re.test(document.forms["createquestion"]["createemail"].value)){ + alert("Incorrect email address"); + return false; + } +} + +function vote(id, change, db) { + var xhttp = new XMLHttpRequest(); + xhttp.onreadystatechange = function() { + if (xhttp.readyState === 4 && xhttp.status === 200) { + if (db=="question") { //question + document.getElementById("vote-q").innerHTML = xhttp.responseText; + } else { //answer + document.getElementById("vote-a"+id).innerHTML = xhttp.responseText; + } + } + } + xhttp.open("GET", "vote?id="+id+"&vote="+change+"&db="+db, true); + xhttp.send(); +} \ No newline at end of file diff --git a/StackExchange_Client/web/js/validate.js b/StackExchange_Client/web/js/validate.js new file mode 100644 index 00000000..c8ebd612 --- /dev/null +++ b/StackExchange_Client/web/js/validate.js @@ -0,0 +1,27 @@ + function validateQuestionForm() { + var re = /^(([^<>()[\]\.,;:\s@\"]+(\.[^<>()[\]\.,;:\s@\"]+)*)|(\".+\"))@(([^<>()[\]\.,;:\s@\"]+\.)+[^<>()[\]\.,;:\s@\"]{2,})$/i; + if (document.forms["createquestion"]["createname"].value == null || document.forms["createquestion"]["createname"].value == "" || + document.forms["createquestion"]["createemail"].value == null || document.forms["createquestion"]["createemail"].value == "" || + document.forms["createquestion"]["createtopic"].value == null || document.forms["createquestion"]["createtopic"].value == "" || + document.forms["createquestion"]["createcontent"].value == null || document.forms["createquestion"]["createcontent"].value == "") { + alert("All required fields must be filled out"); + return false; + } + else if(!re.test(document.forms["createquestion"]["createemail"].value)){ + alert("Incorrect email address"); + return false; + } + } +function validateAnswerForm(){ + var re = /^(([^<>()[\]\.,;:\s@\"]+(\.[^<>()[\]\.,;:\s@\"]+)*)|(\".+\"))@(([^<>()[\]\.,;:\s@\"]+\.)+[^<>()[\]\.,;:\s@\"]{2,})$/i; + if (document.forms["createquestion"]["createname"].value == null || document.forms["createquestion"]["createname"].value == "" || + document.forms["createquestion"]["createemail"].value == null || document.forms["createquestion"]["createemail"].value == "" || + document.forms["createquestion"]["createcontent"].value == null || document.forms["createquestion"]["createcontent"].value == "") { + alert("All required fields must be filled out"); + return false; + } + else if(!re.test(document.forms["createquestion"]["createemail"].value)){ + alert("Incorrect email address"); + return false; + } +} \ No newline at end of file diff --git a/StackExchange_Client/web/login.jsp b/StackExchange_Client/web/login.jsp new file mode 100644 index 00000000..591efbfe --- /dev/null +++ b/StackExchange_Client/web/login.jsp @@ -0,0 +1,38 @@ +<%-- + Document : index + Created on : Nov 17, 2015, 11:36:58 AM + Author : Venny +--%> + +<%@page contentType="text/html" pageEncoding="UTF-8"%> + + + + + Simple StackExchange + + + + + + +
+

Simple StackExchange

+ + +
+ + + diff --git a/StackExchange_Client/web/register.jsp b/StackExchange_Client/web/register.jsp new file mode 100644 index 00000000..ff6fa461 --- /dev/null +++ b/StackExchange_Client/web/register.jsp @@ -0,0 +1,38 @@ +<%-- + Document : register + Created on : Nov 17, 2015, 12:00:08 PM + Author : Venny +--%> + +<%@page contentType="text/html" pageEncoding="UTF-8"%> + + + + + Simple StackExchange: Register + + + + + + +
+

Simple StackExchange

+ + +
+ + + \ No newline at end of file diff --git a/StackExchange_Client/web/search.jsp b/StackExchange_Client/web/search.jsp new file mode 100644 index 00000000..30b30284 --- /dev/null +++ b/StackExchange_Client/web/search.jsp @@ -0,0 +1,56 @@ +<%-- + Document : index + Created on : Nov 18, 2015, 1:51:38 PM + Author : Asanilta +--%> + +<%@page contentType="text/html" pageEncoding="UTF-8"%> + + + + + +
+ + +
+

+ Cannot find what you are looking for? Ask here +

+ < Back to Home +
+
+

+

Search Results

+ + <% for (model.question.Question question : questions) { %> +
+
+
<%= question.getVote() %>
+
Votes
+
+ <% int answerCount = answers.get(question.getQuestionId()); %> +
+
<%= answerCount %>
+
Answers
+
+
+ <% String topic = question.getTopic(); if (topic.length() > 153) topic = topic.substring(0,150)+ "..."; %> + + <% String content = question.getContent();if (content.length() > 503) content = content.substring(0,500)+"..."; %> +
<%= content %>
+
+ <% model.user.User user = users.get(question.getQuestionId()); %> +
+ asked by + <%= user.getName() %> (<%= user.getEmail() %>) + <% if (question.getUserId() == uid) { %>editdelete
<% } %> +
+ + <% } %> + <% if (questions.isEmpty()) {%> + No results found. + <% } %> + + + diff --git a/StackExchange_Client/web/style.css b/StackExchange_Client/web/style.css new file mode 100644 index 00000000..a983025c --- /dev/null +++ b/StackExchange_Client/web/style.css @@ -0,0 +1,429 @@ +body{ + margin: 0; + background-color: #fffaf0; + font-family: 'Dosis', sans-serif; +} + +.container{ + margin-left: 15%; + margin-right: 15%; + width: 75%; + height: auto; +} + +h1{ + font-family: 'Dosis',sans-serif; + font-size: 30pt; + text-align: center; + margin-top: 2.5%; + margin-bottom: 2%; +} +h1 a{ + color: black; + text-decoration: none; +} +.formsearch:before, formsearch:after{ + content: ""; + display: table; +} + +.formsearch:after{ + clear: both; +} +.formsearch{ + zoom:1; +} +.formwrap{ + height: 43px; + width: 97%; + padding: 15px; + margin: 0px auto 0px auto; + background: rgba(0,0,0,.2); + border-radius: 10px; + box-shadow: 0 1px 1px rgba(0,0,0,.4) inset, 0 1px 0 rgba(255,255,255,.2); +} +.formwrap input{ + width: 94.3%; + height: 20px; + padding: 10px 20px; + float: left; + font: bold 15px 'lucida sans', 'trebuchet MS', 'Tahoma'; + border: 0; + background: #FFFFFF; + border-radius: 3px 0 0 3px; +} +.formwrap input:focus{ + outline: 0; + background: #fff; + box-shadow: 0 0 2px rgba(0,0,0,.8) inset; +} +.formwrap input::-webkit-input-placeholder { + color: #999; + font-weight: normal; + font-style: italic; +} + +.formwrap input:-moz-placeholder { + color: #999; + font-weight: normal; + font-style: italic; +} + +.formwrap input:-ms-input-placeholder { + color: #999; + font-weight: normal; + font-style: italic; +} +.formwrap button{ + margin-left: -100px; + overflow: visible; + position: absolute; + float: right; + border: 0; + padding: 0; + cursor: pointer; + height: 40px; + width: 110px; + font: bold 13pt 'lucida sans', 'trebuchet MS', 'Tahoma'; + color: #fff; + background: #d83c3c; + border-radius: 0 3px 3px 0; + text-shadow: 0 -1px 0 rgba(0, 0 ,0, .3); +} +.formwrap button:hover{ + background: #e54040; +} +.formwrap button:active, .formwrap button:focus{ + background: #c42f2f; + outline: 0; +} +.formwrap button:before { /* left arrow */ + content: ''; + position: absolute; + border-width: 8px 8px 8px 0; + border-style: solid solid solid none; + border-color: transparent #d83c3c transparent; + top: 12px; + left: -6px; +} + +.formwrap button:hover:before{ + border-right-color: #e54040; +} + +.formwrap button:focus:before, +.formwrap button:active:before{ + border-right-color: #c42f2f; +} + +.formwrap button::-moz-focus-inner { /* remove extra button spacing for Mozilla Firefox */ + border: 0; + padding: 0; +} +.textunder{ + text-align: center; + margin: 0 auto 0 auto; + font-size: 12pt; + height: 100%; +} +.text1{ + display: inline-block; +} +.ah{ + margin-left: 5px; + color: darkorange; + text-decoration: none; +} +.textunder > p{ + -webkit-margin-before: 10px; +} +.raqtext{ + font-size: 16pt; + padding-bottom: 1.5px; + padding-left: 10px; + border-bottom: 2px solid black; +} +.raq{ + padding-top: 3%; + padding-bottom: 3%; + border-bottom: 2px solid black; +} +.raq > *{ + vertical-align: middle; +} +.votepart{ + margin-left: 2.5%; + text-align: center; + font-size: 14pt; + display: inline-block; + padding-right: 2%; + +} +.answerpart{ + font-size: 14pt; + text-align: center; + display: inline-block; + padding-right: 2%; +} +.questionpart{ + display: inline-block; + width: 75%; +} +.qtopic{ + font-size: 12pt; + font-weight: bold; +} +.qcontent{ + font-size: 10pt; + text-align: left; +} +.labelunder{ + right: 15%; + font-size: 12pt; + vertical-align: middle; +} +.ab{ + color: black; + display: inline-block; +} +.name{ + color:blue; + display: inline-block; + padding-right: 3px; +} +/* +.edit{ + font-family: 'Dosis',sans-serif; + background: none; + border: none; + color: darkorange; + display: block; + border-right: 1px solid black; + font-size: 12pt; + vertical-align: middle; +} +.edit:hover{ + cursor: pointer; +}*/ +.delete{ + color: red; + display: inline-block; +} +a{ + text-decoration: none; +} +.labelunder > p, p.raqtext{ + -webkit-margin-before: 2px; + -webkit-margin-after: 0; +} + +.subq{ + font-size: 24pt; +} +.inputform{ + float: left; + width:97%; + margin-top: 10px; +} +.inputform input, .inputform textarea{ + line-height: 1.5; + font-family: 'Dosis', sans-serif; + font-size: 14pt; + padding: 5px 10px; + display: block; + width: 100%; + background: white; + border: 3px solid white; + border-bottom-color: #ffe1a4; + margin-bottom: 10px; +} +.inputform textarea{ + min-height: 150px; +} +.inputform button{ + background: #ffc03f; + color: white; + padding: 7px 20px; + font-size: 14pt; + font-family: 'Dosis', sans-serif; + border: none; + border-radius: 2px; + text-transform: uppercase; + text-align: center; + margin-left: 94%; + cursor: pointer; +} +.inputform button:hover{ + background: darkorange; +} +.abu{ + color: grey; + margin-left: 10px; + margin-top: 3%; +} +.black{ + border-bottom: 2px solid black; + padding-bottom: 1.5px; +} +.black a{ + color: black; +} +.question{ + padding-top: 3%; + padding-bottom: 3%; +} +.question > *, .answer > *{ + vertical-align: middle; +} +.voteup{ + margin-bottom: 5px; + width: 16px; + height: 16px; +} +.votedown{ + margin-top: 5px; + width: 16px; + height: 16px; +} +.medium{ + font-size: 12pt !important; +} +.partmedium{ + width: 875px !important; +} +.date{ + display: inline-block; +} +.qtopic a{ + color: black; +} +.askedname{ + color: darkblue; +} +.answernum{ + display: inline-block; +} +.hiddenform{ + display: inline-block; + padding-right: 3px; + padding-left: 0; +} +.qlist{ + height: 100%; +} + +.details { + position: absolute; + right: 0; + bottom: 5px; +} + +.edit { + border-left: 1px solid black; + border-right: 1px solid black; + padding: 0 5px; + color: darkorange; +} +.delete { + padding: 0 5px; +} + +.question-block { + position: relative; + height: 85px; + vertical-align: middle; +} +.userinfo { + position: absolute; + right: 20px; + top: 10px; +} +a:visited { + color: black; +} + +.content{ + padding: 10px; + margin-top:5px; +} + +.question-sign{ + padding: 10px; + margin-top:0px; + width:95%; + text-align: right; +} + +.question-sign p{ + font-size:13px; +} + +.voting{ + padding-top:10px; + width:10%; + display: inline-block; + text-align:center; + vertical-align: top; +} + +.votenumber{ + font-size: 24px; + color: #A9A9A9; +} + +.answer-content{ + padding-top:10px; + width:85%; + display: inline-block; +} + +.arrow-up, .arrow-down { + cursor: pointer; +} +.arrow-up { + width: 0; + height: 0; + margin-left: 20px; + border-left: 15px solid transparent; + border-right: 15px solid transparent; + border-bottom: 15px solid #D3D3D3; +} + +.arrow-up:hover{ + border-bottom: 15px solid #808080; +} + +.arrow-down { + width: 0; + height: 0; + margin-left: 20px; + border-left: 15px solid transparent; + border-right: 15px solid transparent; + border-top: 15px solid #D3D3D3; +} + +.arrow-down:hover{ + border-top: 15px solid #808080; +} + +.question-content { + padding-top:10px; + width:85%; + display: inline-block; +} + +.button-bottom{ + margin-top: 10px; + margin-bottom: 10px; + float: right; +} + +.answer-list{ + padding: 10px; + border-bottom: solid; +} +.arrow-up, .arrow-down { + margin-left: auto; + margin-right: auto; + display: block; +} \ No newline at end of file diff --git a/StackExchange_Client/web/view.jsp b/StackExchange_Client/web/view.jsp new file mode 100644 index 00000000..f6a51762 --- /dev/null +++ b/StackExchange_Client/web/view.jsp @@ -0,0 +1,65 @@ +<%-- + Document : view + Created on : Nov 22, 2015, 6:18:46 AM + Author : Venny +--%> + +<%@page contentType="text/html" pageEncoding="UTF-8"%> + + + + + + + +
+

<%= question.getTopic() %>

+
+
+
<%= question.getVote() %>
+
+
+
+

<%= question.getContent() %>

+
+
+

asked by <%= q_user.getName() %> (<%= q_user.getEmail() %>) at <%= question.getCreateTime() %>
+ <% if (question.getUserId() == uid) { %>editdelete

<% } %> +
+ +
+

Answers

+ <% if (!answers.isEmpty()) { %> + <% for (model.answer.Answer answer : answers) { %> +
+
+
+
<%= answer.getVote() %>
+
+
+
+

<%= answer.getContent() %>

+
+
+

answered by <%= a_user.get(answer.getAnswerId()).getName() %> (<%= a_user.get(answer.getAnswerId()).getEmail() %>) at <%= answer.getCreateTime() %>

+
+
+ <% } %> + <% }%> +
+ +
+

Your Answer

+
+ + +
+ +
+
+
+ + + + + diff --git a/json-20131018.jar b/json-20131018.jar new file mode 100644 index 00000000..394caded Binary files /dev/null and b/json-20131018.jar differ diff --git a/json-simple.jar b/json-simple.jar new file mode 100644 index 00000000..03617177 Binary files /dev/null and b/json-simple.jar differ diff --git a/wbd2.sql b/wbd2.sql new file mode 100644 index 00000000..d6782da0 --- /dev/null +++ b/wbd2.sql @@ -0,0 +1,189 @@ +-- phpMyAdmin SQL Dump +-- version 4.5.1 +-- http://www.phpmyadmin.net +-- +-- Host: 127.0.0.1 +-- Generation Time: Nov 27, 2015 at 10:44 AM +-- Server version: 10.1.8-MariaDB +-- PHP Version: 5.6.14 + +SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; +SET time_zone = "+00:00"; + + +/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; +/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; +/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; +/*!40101 SET NAMES utf8mb4 */; + +-- +-- Database: `wbd2` +-- + +-- -------------------------------------------------------- + +-- +-- Table structure for table `answer` +-- + +CREATE TABLE `answer` ( + `answer_id` int(11) NOT NULL, + `question_id` int(11) NOT NULL, + `user_id` int(11) NOT NULL, + `content` text NOT NULL, + `vote` int(11) NOT NULL DEFAULT '0', + `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP +) ENGINE=InnoDB DEFAULT CHARSET=latin1; + +-- -------------------------------------------------------- + +-- +-- Table structure for table `question` +-- + +CREATE TABLE `question` ( + `question_id` int(11) NOT NULL, + `topic` varchar(255) DEFAULT NULL, + `content` text, + `user_id` int(11) DEFAULT NULL, + `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP, + `vote` int(11) NOT NULL DEFAULT '0' +) ENGINE=InnoDB DEFAULT CHARSET=latin1; + +-- +-- Dumping data for table `question` +-- + +INSERT INTO `question` (`question_id`, `topic`, `content`, `user_id`, `create_time`, `vote`) VALUES +(3, 'abc', 'def', 1, '2015-11-27 15:29:29', 0); + +-- -------------------------------------------------------- + +-- +-- Table structure for table `token` +-- + +CREATE TABLE `token` ( + `token_id` varchar(255) NOT NULL, + `user_id` int(11) NOT NULL, + `token_expired` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP +) ENGINE=InnoDB DEFAULT CHARSET=latin1; + +-- +-- Dumping data for table `token` +-- + +INSERT INTO `token` (`token_id`, `user_id`, `token_expired`) VALUES +('3140bb5cbfa84122a505e9c3d725013e', 1, '2015-11-28 09:30:40'); + +-- -------------------------------------------------------- + +-- +-- Table structure for table `user` +-- + +CREATE TABLE `user` ( + `name` varchar(255) NOT NULL, + `email` varchar(255) NOT NULL, + `password` varchar(255) NOT NULL, + `user_id` int(11) NOT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; + +-- +-- Dumping data for table `user` +-- + +INSERT INTO `user` (`name`, `email`, `password`, `user_id`) VALUES +('Venny', 'venylaras@gmail.com', '12345', 1); + +-- -------------------------------------------------------- + +-- +-- Table structure for table `vote_answer` +-- + +CREATE TABLE `vote_answer` ( + `user_id` int(11) NOT NULL, + `answer_id` int(11) NOT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; + +-- +-- Dumping data for table `vote_answer` +-- + +INSERT INTO `vote_answer` (`user_id`, `answer_id`) VALUES +(1, 1); + +-- -------------------------------------------------------- + +-- +-- Table structure for table `vote_question` +-- + +CREATE TABLE `vote_question` ( + `user_id` int(11) NOT NULL, + `question_id` int(11) NOT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; + +-- +-- Dumping data for table `vote_question` +-- + +INSERT INTO `vote_question` (`user_id`, `question_id`) VALUES +(1, 1); + +-- +-- Indexes for dumped tables +-- + +-- +-- Indexes for table `answer` +-- +ALTER TABLE `answer` + ADD PRIMARY KEY (`answer_id`), + ADD KEY `question_id` (`question_id`); + +-- +-- Indexes for table `question` +-- +ALTER TABLE `question` + ADD PRIMARY KEY (`question_id`); + +-- +-- Indexes for table `user` +-- +ALTER TABLE `user` + ADD PRIMARY KEY (`user_id`); + +-- +-- AUTO_INCREMENT for dumped tables +-- + +-- +-- AUTO_INCREMENT for table `answer` +-- +ALTER TABLE `answer` + MODIFY `answer_id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3; +-- +-- AUTO_INCREMENT for table `question` +-- +ALTER TABLE `question` + MODIFY `question_id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4; +-- +-- AUTO_INCREMENT for table `user` +-- +ALTER TABLE `user` + MODIFY `user_id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2; +-- +-- Constraints for dumped tables +-- + +-- +-- Constraints for table `answer` +-- +ALTER TABLE `answer` + ADD CONSTRAINT `deleteforeignkey` FOREIGN KEY (`question_id`) REFERENCES `answer` (`answer_id`) ON DELETE CASCADE; + +/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; +/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; +/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; diff --git a/wbd_database(dump).sql b/wbd_database(dump).sql new file mode 100644 index 00000000..7c2d1dfb --- /dev/null +++ b/wbd_database(dump).sql @@ -0,0 +1,143 @@ +-- phpMyAdmin SQL Dump +-- version 4.3.11 +-- http://www.phpmyadmin.net +-- +-- Host: 127.0.0.1 +-- Generation Time: Nov 18, 2015 at 03:20 PM +-- Server version: 5.6.24 +-- PHP Version: 5.6.8 + +SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; +SET time_zone = "+00:00"; + + +/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; +/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; +/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; +/*!40101 SET NAMES utf8 */; + +-- +-- Database: `wbd2` +-- + +-- -------------------------------------------------------- + +-- +-- Table structure for table `answer` +-- + +CREATE TABLE IF NOT EXISTS `answer` ( + `answer_id` int(11) NOT NULL, + `question_id` int(11) NOT NULL, + `user_id` int(11) NOT NULL, + `content` text NOT NULL, + `vote` int(11) NOT NULL DEFAULT '0', + `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP +) ENGINE=InnoDB DEFAULT CHARSET=latin1; + +-- -------------------------------------------------------- + +-- +-- Table structure for table `question` +-- + +CREATE TABLE IF NOT EXISTS `question` ( + `question_id` int(11) NOT NULL, + `topic` varchar(255) DEFAULT NULL, + `content` text, + `user_id` int(11) DEFAULT NULL, + `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP, + `vote` int(11) NOT NULL DEFAULT '0' +) ENGINE=InnoDB DEFAULT CHARSET=latin1; + +-- -------------------------------------------------------- + +-- +-- Table structure for table `token` +-- + +CREATE TABLE IF NOT EXISTS `token` ( + `token_id` varchar(255) NOT NULL, + `user_id` int(11) NOT NULL, + `token_expired` varchar(255) NOT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; + +-- -------------------------------------------------------- + +-- +-- Table structure for table `user` +-- + +CREATE TABLE IF NOT EXISTS `user` ( + `name` varchar(255) NOT NULL, + `email` varchar(255) NOT NULL, + `password` varchar(255) NOT NULL, + `user_id` int(11) NOT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; + +-- -------------------------------------------------------- + +-- +-- Table structure for table `vote_answer` +-- + +CREATE TABLE IF NOT EXISTS `vote_answer` ( + `user_id` int(11) NOT NULL, + `answer_id` int(11) NOT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; + +-- -------------------------------------------------------- + +-- +-- Table structure for table `vote_question` +-- + +CREATE TABLE IF NOT EXISTS `vote_question` ( + `user_id` int(11) NOT NULL, + `question_id` int(11) NOT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; + +-- +-- Indexes for dumped tables +-- + +-- +-- Indexes for table `answer` +-- +ALTER TABLE `answer` + ADD PRIMARY KEY (`answer_id`), ADD KEY `question_id` (`question_id`); + +-- +-- Indexes for table `question` +-- +ALTER TABLE `question` + ADD PRIMARY KEY (`question_id`); + +-- +-- Indexes for table `user` +-- +ALTER TABLE `user` + ADD PRIMARY KEY (`user_id`); + +-- +-- AUTO_INCREMENT for dumped tables +-- + +-- +-- AUTO_INCREMENT for table `answer` +-- +ALTER TABLE `answer` + MODIFY `answer_id` int(11) NOT NULL AUTO_INCREMENT; +-- +-- AUTO_INCREMENT for table `question` +-- +ALTER TABLE `question` + MODIFY `question_id` int(11) NOT NULL AUTO_INCREMENT; +-- +-- AUTO_INCREMENT for table `user` +-- +ALTER TABLE `user` + MODIFY `user_id` int(11) NOT NULL AUTO_INCREMENT; +/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; +/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; +/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;