Programming Tutorials

WebServices Tutorials

1. Content-Security-Policy: object-src, script-src, base-uri and report-uri

By: Niraj : 2023-03-29

Description: Content-Security-Policy: object-src 'none'; script-src 'nonce-{random}' 'unsafe-inline' 'unsafe-eval' 'strict-dynamic' https: http:; base-uri 'none';


2. Preventing your PDF files to be displayed inside other website IFrames

By: Linda Ng : 2023-03-29

Description: You can use a Content Security Policy (CSP) to prevent your PDF files from being displayed in an iframe on other websites. CSP is a security feature that allows web developers to specify which sources of content are allowed to be loaded on a web page.


3. Prevent other websites from displaying content from your website in an iframe

By: Linda Ng : 2023-03-29

Description: It is possible to prevent other websites from displaying content from your website in an iframe using a technique called "frame busting" or "clickjacking defense."


4. Returning multiple values from a web service

By: Emiley J : 2013-08-15

Description: Although this is quite a common requirement, it could be quite a daunting task for a beginner learning web service. I have seen so many questions in various forums regarding this. For example, one popular question is how to return a HashMap from a web service. In this tutorial, I will keep it very simple. I will just return two values from the webservice instead of one.


5. Java Webservices using Netbeans and Tomcat

By: Emiley J : 2013-07-11

Description: In this tutorial you will learn how to write a simple web service in Java using Netbeans IDE and deploy it to Tomcat.


6. How to Deploy a Java Web Service

By: Emiley J : 2013-07-10

Description: An appealing feature of JAX-WS is that the API can be separated cleanly from deployment options. Same web service can be deployed in different ways to suit different needs. Core Java alone is good for learning, development, and even lightweight deployment. A standalone web container such as Tomcat provides additional support.A Java application server such as GlassFish promotes easy integration of web services with other enterprise technologies


7. Java WebService connected to Database

By: Emiley J : 2013-07-10

Description: This tutorial takes one step forward in building Java Web Services by connecting your web service to a database and returning a value from a MySQL database.


8. package javax.jws does not exist

By: Emiley J : 2013-07-09

Description: From jdk 1.6, the java web services package and the related files were bundled with the JDK. The best solution therefore is to upgrade to the latest jdk (jdk 1.7). If even after installing the jdk 1.7, you still get this error, then check your JAVA_HOME environment variable and the PATH environment variable. Both these variables should be updated and pointed to your jdk 1.7 installation folder.


9. Java WebService - Create your first web service in Java

By: Emiley J : 2013-07-09

Description: If you are tasked to develop a web service in Java, you will probably try to google around and check how to get started. If you are a beginner in Web Services, you will surely get confused with the various tools, terms, acronyms, technologies related to Java based web services. In reality, it is NOT that complex. The problem usually lies in the fact that there is no complete tutorial for a beginner. Of course you can find some on the web, but they normally tend to use complex acronyms and steps that will confuse the beginner. Therefore this tutorial will help you to create your first Java web service using just the command prompt and JDK.


10. Call a webservice in Java

By: Emiley J : 2013-07-09

Description: If you have already created your first Java Web Service, and you are wondering how to consume this web service then this tutorial will show you just that. In fact one of the main advantages of Web Services is its Platform indepence. Which means your web service can be written in any language whereas you can call this web service and consume it from any other programming language