Tuesday, 16 November 2010

The Processes i went through towards creating My web Service

I opened the Netbeans IDE that was installed on my laptop.

I created a New Project named "OnlineDatabaseService" by clicking on File from the menu then selected New Project from the windows dialogue box that came up i selected Java Web and then Web Application. i named my project OnlineDatabaseService, set it as the Main project then next to specify the server that i will be using to deploy the project and the path. so i selected the GlassFish v3 server from the window that was displayed. then finish and my project was automatically created in the netbeans IDE.

I proceeded to create my web service. I right-clicked on the OnlineDatabaseService project that was created, selected New then Web Service and named my Web Service OnlineDBWebService specified the package as server then selected the Create Web srvice from Scratch then finish. My Web Service was created with the Source and Design window being displayed on the coding area of the netbeans.

The next step was to create the database. I again right-clicked on the OnlineDatabaseService selected New then Entity Classes from Database. I selected the data Source as jdbc/sample then from the Available table i highlighted the Customer table and clicked on Add which took me to the next window where i specified the names and the location of the entity classes of my new table. This time around i change my source package for the database to database. Again i ticked the check box for Generate Named Query Annotations for Persistent Fields created the Persitence Unit which i named as OnlineDBWebServicePU then finish to create my Database for the project.

Next, I declared the operation parameters and initate the method. i clicked on the design tab on the coding area, on the window that was displyed i clicked on Add operation button. on the property window that was displayed i typed in the operation name as CustomerDBNumber then clicked on the Add button to add the parameters name which i declared as index and Type as int then ok.

Next, was to initiate the method calls. on the public class OnlineDBWebservice, i initated the PersistenceUnit and the EntityManagerFactory code (see practical coursework submitted to CITE, UEL). again i proceeded to the operation CustomerDBNumber with parameter index and initiated the method call for querrying the created database Customer (see practical coursework submitted to CITE, UEL).

My Web Service was good to go. so i deployed it to the server by right-clicking on the said Web Service project OnlineDatabaseService then select deploy to deploy the web Service on the Glassfish v3 server. The process displayed Build Succesful. to run the web service on the server, I right-clicked on the OnlineDBWebService then selected Test Web Service which took me to the browser where i viewed my Test page.

For the Screenshot of my Web Service (see practical coursework submitted to CITE, UEL)

Monday, 15 November 2010

Part 3 of My Coursework.... creating a Web Service

After Several Coding and Debugging i was able to come up with a Web Service that Accesses data from an Online Database.

Friday, 12 November 2010

Deploying your Web Service to your Local server.

I encountered problems deploying and testing the sample web servive given to us by the tutor but after downloading and installling the GlassFish server 3.1. it worked. Now i can continue with my Coursework Task 3.

Thursday, 11 November 2010

Making Your Web service Public

Annotation is important to make your Web service Public. and it is being declared as

import javax.jws.WebService
import javax.jws.WebMethod
import javax.jws.WebParam

Tuesday, 9 November 2010

THINGS I FOUND OUT WHILE TRYING TO DO ACTIVITY 2 OF THE PRACTICAL COURSEWORK

1. Namespaces can be declared in the Elements where they are used or in the XML root element. Name conflicts in XML can easily be avoided using a name prefix. when trying to mix XML documents from different XML application there might be conflicts if the developer does not use the right prefix for the namespace.
A namespace is defined by the xmlns attributes in the start tag of an element. namespace declaration syntax is (xmlns:prefix="URI"). colons ":" are usedc to declare namespaces.

2. an XML Element is everything from (including) the element start tag to (including) the elements end tag. Elements can contain other elements, text or attributes. an instance of an attribute is
XML element names cannot contain spaces. XML elements are Extensible and that is one of the good characteristics of XML because it can be extended without breaking Applications.

Monday, 8 November 2010

Setting Up Your PC to Run Java Applications eg Netbeans

Steps

1) Go to Control Panel
2) Select System and Maintenance
3) Select System
4) Select Advanced System Settings from the left side of the menu and click OK for Admin level access
5) Select Environment Variables
6) Scroll down under the system variables area (bottom half of screen) and select path.
7) Select Edit and go all the way to the end of the line. You need to add your path to the end. Make sure you place a semicolon before you entry. For me my path was as follows ";C:\Program Files\Java\jdk1.6.0_13\bin".
8) Select OK and you are ready to go.

Thursday, 4 November 2010

In what ways could mashups enhance web based applications and web service technology?

Mashups provides standards which support the definition of Web
services and their advertisement to the
potential user community, binding for
invocation purposes, and reuse. Mashups provides a way of creating a new
Web applications by combining existing Web resources utilizing data and
Web APIs.

Wednesday, 27 October 2010

SOAP provides for a large variety of synchronous and asynchronous usage scenarios, depending on the transport protocol used. What are they?

SOAP is a protocol for exchanging XML-based messages using HTTP/HTTPS.

What are the requirements that a SOAP message must conform to?

The root class for all SOAP messages. As transmitted on the "wire", a SOAP message is an XML document or a MIME message whose first body part is an XML/SOAP document.

A SOAPMessage object consists of a SOAP part and optionally one or more attachment parts. The SOAP part for a SOAPMessage object is a SOAPPart object, which contains information used for message routing and identification, and which can contain application-specific content. All data in the SOAP Part of a message must be in XML format.

A new SOAPMessage object contains the following by default:

* A SOAPPart object
* A SOAPEnvelope object
* A SOAPBody object
* A SOAPHeader object

The SOAP part of a message can be retrieved by calling the method SOAPMessage.getSOAPPart(). The SOAPEnvelope object is retrieved from the SOAPPart object, and the SOAPEnvelope object is used to retrieve the SOAPBody and SOAPHeader objects.

SOAPPart sp = message.getSOAPPart();
SOAPEnvelope se = sp.getEnvelope();
SOAPBody sb = se.getBody();
SOAPHeader sh = se.getHeader();

Why is SOAP used, after all we can use XML quite well without it?

Why SOAP?

It is important for application development to allow Internet communication between programs.

Today's applications communicate using Remote Procedure Calls (RPC) between objects like DCOM and CORBA, but HTTP was not designed for this. RPC represents a compatibility and security problem; firewalls and proxy servers will normally block this kind of traffic.

A better way to communicate between applications is over HTTP, because HTTP is supported by all Internet browsers and servers. SOAP was created to accomplish this.

SOAP provides a way to communicate between applications running on different operating systems, with different technologies and programming languages.

Thursday, 21 October 2010

Tutorial on XML

XML Syntax
An XML document must have a single root element that encloses all other elements. This means that the fragment below can't be a well-formed XML document as it stands:


Neddie Seagoon
12 High Road
Sometown
AB12 3CD


Jim Moriarty
45 Low Road
Someplace
EF56 7GH


Q. How could you correct the fragment above so that it becomes a well-formed XML document?

Wednesday, 13 October 2010

Kingsley's Blog for Internet App. & Web Services: Tutorial on Gmail, Docs and Wave (7th October, 201...

Kingsley's Blog for Internet App. & Web Services: Tutorial on Gmail, Docs and Wave (7th October, 201...

Kingsley's Blog for Internet App. & Web Services: WHAT IS THE DIFFERENCE BETWEEN URI AND URL

Kingsley's Blog for Internet App. & Web Services: WHAT IS THE DIFFERENCE BETWEEN URI AND URL: "URI (Universal resource Identifier) as the name implies are identifiers that points out a resource, while URL is used for identifiers that p..."

WHAT IS THE DIFFERENCE BETWEEN URI AND URL

URI (Universal resource Identifier) as the name implies are identifiers that points out a resource, while URL is used for identifiers that pionts out a location.

URL therefore can be seen as a part of the URI.

URL as described above provides a location and the protocol that would be used to access the stored data.

So it would be safe to call a hyperlink as a URI no matter what it points to, what the name is, and what protocol is used to access the data.

To sum it up, URL is simply a subgroup that is contained by the URI. It was only meant to point to the location of the resource with an indication of the protocol needed.

Read more: Difference Between URI and URL | Difference Between | URI vs URL http://www.differencebetween.net/technology/difference-between-uri-and-url/

Monday, 11 October 2010

Kingsley's Blog for Internet App. & Web Services: Tutorial on Gmail, Docs and Wave (7th October, 201...

Kingsley's Blog for Internet App. & Web Services: Tutorial on Gmail, Docs and Wave (7th October, 201...

GMAIL...GOOGLE DOC....& GOOGLE WAVE

CAN THESE TECHNOLOGIES BE CALLED A RE-INVENTION OR INNOVATION ON E-MAIL

With These Technologies, a business large or small can possibly function under one roof and onto one platform all of its office applications: A place where people can communicate and work together with richly formatted text, photos, videos, maps and more, Rasmussen wrote in a posting on the official Google blog.

Think of an open-source version of Gmail constructed via instant messaging. To start a wave, two users start what is essentially an instant-message session, which can be archived as a conversation. Other users can then be invited to join each wave or conversation, and there's even a "playback" feature to track the process of the conversation.

http://www.pcmag.com/article2/0,2817,2347795,00.asp

1. From a video i watched on youtube (see link)

http://www.youtube.com/watch?v=3ykZYKCK7AM&feature=player_embedded. It shows that these Technologies are both distributive and runs concurrently.

2. if two or more people have been working in parallel on the same document and they now come to upload the different cached copies to the server. i think there will be interrupts and slow time in processing from the server end since these document is being stored as a single copy on the server and now two clients are uploading 2 different version of a single document, the server may find it difficult to dictate which copy is actually from a particular client and there may also be slow time in processing because the clients are trying to use the same shared memory on the server. but thanks to Service Oriented Approach (SOA) which tends to handle these discrepancy or problems.

3. From Video i watched on SOA (see link) http://www-01.ibm.com/software/solutions/soa/flash/Build03.swf

SOA can be described as loosely coupled platforms or set of programs that allows internet users to read, use and share the internet applications and web services. SOA is an approach that allows different application to run on different platforms thereby allowing internet users to use applications and web services not minding the programming language or tools that was used to design them. SOA is an innovative idea which is required since most if not all sectors of the global economy now migrate from traditional to the world wide web.


Tutorial on Gmail, Docs and Wave (7th October, 2010)

Google Re-synchronizes Email, Docs With A New “Wave” Of Net Communications

Google Re-synchronizes Email, Docs With A New “Wave” Of Net Communications

Thursday, 30 September 2010

Welcome To My Blog

Kingsley's Blog For Internet Application & Web Services is Designed for the purpose of discussing and uploading materials for coursework as regards Internet Application and Web Services IMM031 with Focus on 5D's which are:

1. Demonstration and Understanding of the Scope and Application of current Internet based Technologies.
2. Development of Web Services
4. Design and Implementation of a Web based Application using an appropriate IDE.
3. Detecting and Solving the problems associated with XML syntax in relation to web services.
5. Demonstrate a high level of communication skill.