Developer: Hey! I need some help!
Developer: You know anything about "Invalid SOAP Envelope" error?
Me: Hmmm... Not very sure, but it looks like the SOAP message you generated could have an issue.
Me: Print out the SOAP message you're sending over.
Me: You're using JAX-RPC, rite? Check the API to see how you can print out the SOAP message..
Developer: API? Huh? I dunno how-le...
Well... I hoped that the developer didn't mistake API for "fire". ^_^
In Malay, API translates to fire. However, for us in the IT world, API is something very common that we come across with everyday at work.
If you must know... API = Application Programming Interface...
In the days of old, APIs were commonly known as libraries (esp if you were a C/C++ programmer) and during those days, some were "free" or proprietary. (Opensource back then was a "hippy" concept.. Kekeke) Anyway, if you were a C/C++ programmer, you would have been very familiar with the header files that someone would send over and from that file (plus documents), you would have an API to work on for your application.
Anyway, for Java, we benefit a lot more because we can have HTML-based documentation for the methods and classes that we built. This is the infamous Javadocs. It's nifty that to build the JavaDocs for your application, you don't need additional tools as it comes FOC with your standard JSDK. So, this means, once you're done with your development, you've compiled your code into little neat JARs (Java ARchives), you can run javadoc from command-line or IDE to generate your HTML-based documentation!
Neato, huh! ^____^
That's a little bit of history for ya.. So, this means for Java, the API would encompass not only the JARs that you get, but the JavaDocs as well. It sure beats writing a lot of documentation to document the methods!
Now that you know what are APIs, do you know how to use them? -____-|||
A lot of developers I know don't even know how to use the standard JavaDocs from Sun. It's sad... In fact, some don't even know that they even exist!! Perhaps they are the "CnP" (Cut n Paste) developers, who copy other people's code and just use it as they feel that they are not experienced enough. However, something as easy as finding out what methods a class has shouldn't be too hard, right?
Anyway, here are a list of very useful JavaDocs that you may want to keep bookmarked on your browser. If you're a bit kiasu, you can download the JavaDocs and create a bookmark to view it locally.
- J2SE 1.4 --> http://java.sun.com/j2se/1.4.2/docs/api/
- J2SE 5.0 --> http://java.sun.com/j2se/1.5.0/docs/api/
- J2EE 1.3 --> http://java.sun.com/j2ee/sdk_1.3/techdocs/api/index.html
- J2EE 1.4 --> http://java.sun.com/j2ee/1.4/docs/api/index.html