Tuesday, December 27, 2005

Web Services - RPC Vs Document

For Beginners, RPC Style Vs Document Style would be confusing.

Mitch has done a good job of clarifying it in his article.

A Distinction has been made between Communication Pattern and Style.

Excerpt:

we turn to the two decisions for formatting the contents of a message's element.

The style, or binding style, decision controls how the elements just under the SOAP body are constructed. The two choices are:

  • RPC: Add extra elements to simulate a method call. (Note that RPC is also a communication pattern.)
  • Document: Just send the XML as is. There's also a variation called wrapped that is still specified as document.

Here's an example of an RPC-style message:




0000000000
000000000B



RPC relies on some rules. Observe that the root element is qualified with a namespace, but the two child elements use unqualified names. The root element is named after the operation: opName for a SOAP request, opNameResponse for a SOAP response. Each child is a parameter, or a return value named opNameReturn.

Now here's an example of a document-style message:



test



Observe that all elements are defined within the same namespace. With a document-style Web service, you're free to define the XML however you wish because all the XML is explicitly specified.

Next, we examine how binding style is specified in the WSDL. There actually is a style attribute in the element, which is the element's first child. Also, each nonempty has one or more child elements, into which style factors.


Table 1. How binding style is specified in a WSDL document

RPCDocument
elementstyle="rpc" style="document"
element(s) Any number of elements, each containing a type attribute Single element containing an element attribute; zero also allowed






A WSDL document provides the interface (a generic "list of methods") and a set of instructions that describe how the service is bound to a messaging protocol.

The WSDL 1.1 specification distinguishes two different binding styles, as follows:

* RPC Style: This style specifies that the contains an element with the name of the service method being invoked (the wrapper element). This element, in turn, contains an entry for each parameter and the return value of this method.

* Document Style: In this style, there is no wrapper element. Instead, the message parts appear directly under the element. There are no SOAP formatting rules for what the contains. The contains what the sender and receiver agreed on as an XML document.

Within those styles, you can also have an encoded use or a literal use:

* Encoded: In this use, each message part references an abstract type using the type attribute. The message is produced using an encoding specified by the encodingStyle attribute. The encoding most frequently used is SOAP Encoding, which is a set of serialization rules defined in SOAP 1.1. The rules specify how objects, structures, arrays, and object graphs should be serialized. In general, applications that use SOAP encoding focus on remote procedure calls, and likely use the RPC message style.

* Literal: In this use, each part references a concrete schema definition using either the element or type attribute. In other words, data is serialized according to a given schema. In practice, this schema is usually expressed using W3C XML Schema.

To summarize, the binding style/use combinations are:

* RPC/encoded
* RPC/literal
* Document/encoded
* Document/literal

Refer to this JDC Tip

Websphere - Utility Jar

At times, We need to reference some jar files from more than 1 web/ejb module.

This article suggests different ways to achieve the same in WSAD/RAD.

Web Services - What a Pain it is to work with?

Anyone who has tried to develop Web Services with J2EE/.NET would attest to the fact that it is too messy. Too Many Specs..

Read this bileblog entry to understand it better....

Tuesday, November 15, 2005

Greg Chappell on Importance of Processes

Recently, CricInfo has published an interview with Greg Chappell which is worth reading.

He has been trying to develop healthy work ethic with Indian Cricket Team.
As a part of that, He is pushing players to follow right processes.

Read this Answer from him:
CricInfo:You've spoken about concentrating on the "processes" and not worrying about the results. What exactly are these processes?

Chappell:I don't want to give too much away from the point of view of exactly what we're thinking about. But basically, if you're worrying about the outcomes, about things you can't control, then you're going to get into trouble. We really focused on the areas that we can control and we're focusing on getting good in those areas. We're making sure that we engender the culture of creating successful habits. That's something we've worked very hard on over the last few months and we saw the benefits during the Sri Lankan series.

Hats off to Chappell.
He is doing us an immense service.

Saturday, October 29, 2005

Sacred Psychiatry

Sacred Psychiatry

In Kerala the mentally disturbed have a remarkable alternative to drugs and dungeon

It seems that there is a temple in Kerala, India which is credited with healing of lots of people with mental health problem.

You can read the article here

Vimanika Shastra - Does it indicate that we had UFOs thousands of years back

Vimanika Shastra is a Hindu Scripture which deals with art and science of flying and flying machines.

I came across its english translation here.

It makes an interesting read and does indicate that UFOs might not be an object of our imagination.

Friday, October 28, 2005

MS Office 12 - A Way for Microsoft to get into BI Market?

Looks like Office 12 is going to be real interesting as it might be the piece of zigsaw puzzle which Microsoft needs to gain a foothold in BI Market...

E-Week story is indicating it to be so...

Friday, October 21, 2005

PHP - It is gaining Momentum

PHP is gaining some mainstream traction as is evident by the recent speech made by Marc Andressen.

PHP 6 would be supporting Unicode and that should help its adoption.

Certainly, it is worth watching out for...

Monday, October 17, 2005

Good Primer on Attack Vectors and Worms

This is a good primer on Attack Vectos and Worms

Good Starting point to know about these things..