I had created a web service client from an online web service while learning it for the first time and then had written a tutorial on creating a client with JAX-WS and JAXP. At that time I had JDK 1.5 and JWSDP 2.0 pack for web services.
I tried today working in JDK 1.6 and to my surprise I found out that it comes shipped in with web services utilities which include JAX-WS 2.0, JAXB 2.0, JAXP2.0. This means a lot of ease in the development of web services for the developer. The benefits are:
- There is no need to separately download the JWSDP 2.0 as I had mentioned in my tutorial
- There is no need to remember all the different set of libraries which are required to be included in the classpath before your program has to run.
- It eases out the development and saves your time.
Does that mean there are no Issues?
There are some. Read the rest of this entry »
In this tutorial you will learn how to make a standalone Web Service client using JAX-WS. JAX-WS and JAXP API together, provide an easy way to develop a web service client. This tutorial makes use of an existing online web service instead of creating one from scratch just for making a client. For this tutorial you would need the following:
- JWSDP 2.0 pack
- JDK 1.5 or above
- The required Web Service WSDL
- Eclipse 3.1 or above
The procedure for creating the client have been broken down into 3 easy steps which are:
- Creating the Stubs from WSDL
- Building the Web Service Client using JAX-WS
- Parsing the Output using JAXP
JAXWS & JAXP
JAX-WS is an API for creating as well as invoking web services. It succeeds the JAX RPC API and makes it easier by reducing the XML configurations, through the use of annotations available in Java 5. However you don’t need annotations for this tutorial.
JAXP is a wrapper API over the legacy XML parsing API’s such as DOM and SAX and leverages their usage through its generic interfaces. JAXP is typically used in a web service which is implemented with a Document Literal style. This is because such web services return an XML document and not a simple String Value. The XML Document then has to be parsed using the JAXP API.
So let us begin with the tutorial Read the rest of this entry »
The purpose of annotations have been well put forward with the recent upgradation of EJB to EJB 3.0 and also in the web services field by JAX-WS. Annotations help in reducing the learning curve associated with these specifications by avoiding the need to learn the deployment descriptors which are necessary to properly deploy an EJB or a JAX-WS web service respectively.
Annotations – a boon or a curse?
Due to the above situation, the influence on the usage of annotations is steadily rising. It is but natural that programmers would try to do their work quickly without having to waste the time in learning the XML Schema’s required for deployment. Annotations are purposely aimed at this programmer’s dilemma. In fact when I was working in JAX RPC, I used to think as to when I would get a tool to code those ugly descriptors in an easier fashion. With annotation based web services creation in JAX-WS, half of my work is done when I put them in the POJO itself.
All of this can be attributed as a boon to the presence of annotations. But the point of worry is, Read the rest of this entry »
XML is document-oriented and JSON is data-oriented. So if you want to deal with highly structured documents that requires a complex structure, binary data, exact ordering of elements and be able to render itself then use XML. If you are focused on light-weight data exchange then JSON is the way to go.
In my opinion too JSON is handy only for light weight data transfer and nothing more than that. But with more nesting of data JSON can get utterly complex than XML. With XML you can define Schemas, form standardized document structures , extend exisiting document structures or import them when needed. The namespaces concept of XML has been very well established and incorporated in today’s applications and libraries.
Read the rest of this entry »
Before the actual exam it is always a better thing to give some mock tests to get a feel of how to prepare for the final exam and also to find out the weak points and to do a revision of the course material for them. You would be excited to know that there are in fact a couple of nice mock tests for SCDJWS. The ones I have tried and would advice include the following: Read the rest of this entry »
Where do I learn from for SCDJWS? Its a good question and probably the best question. In the arena of SCDJWS you should mark my words, you would never go through with a single source of material in your hand. Well its not to scare you though, its just a matter of fact. The vast scope of SCDJWS makes you learn from various sources. I have told you about how to get a kick start in preparing for SCDJWS, but haven’t yet mentioned from where you should prepare. It was a whole new section in itself and requires a detailed information. You don’t have to fret because Ill give you the thing you crave for. The material of course. Not in a bundled form but a set of links which would see you through in flying colors in the final test. Read the rest of this entry »
If you are looking for getting started with preparing for SCDJWS (Sun Certified Developer for Java Web Services) certification then its very normal that you will be stuck on the material required for it. SCDJWS in nature is very vast in its scope. So you have to be very careful in choosing the appropriate resources. There are many varied implementations on the usage of the API’s which help you implement J2EE web services but you have to remember one thing. You are giving the SUN certification, so its but obvious that you have to use the API’s that SUN provides for creating the J2EE web services. There are many different API versions of the same J2EE web services specifications like those from Apache, BEA, IBM, but since the implementations can be somewhat different from each other, you always have to study the core API’s provided by SUN. This will help you avoid confusion. Moreover, studying SUN API’s is more beneficial since they are present in any vendor implementation. The vice versa is not true. Read the rest of this entry »