Monday, December 24, 2007

Why POJO web services does not require Binding?


Hi Folks,

Recently one of my friends put forth this question to me ?
Why POJO web services does not require binding and what are the limitations of POJO web services?

I tried convincing him by giving many answers like, When you are dealing with Business web services you need some kind of contract , so you need to bind the Java objects with the XML data together and also to handle security of the data passing between systems, He didnt agree to any of my suggestions?

Then I asked him can you tell me when do you use a Java Bean vs Java class,to see whether he gets the point here,but no luck, he is a hard nut to crack.

So my question to everyone of folks interested in POJO Web Services,please provide me any answers to this question and avoid more embarrassment for me.

Cheers,
Yaseen

Print this post

2 comments:

  1. Re: Why POJO web services does not require data binding ?

    POJO Webservices have simple data types.. for example A webservice that accepts a Symbol String and returns its MArket price.

    But .. when you have complex business services that have complex data structures as parameters... then these POJO services wont do.

    Also.. as u said.. contract is also important... because when 2 applications written in 2 different languages communicate then they have to follow the rules agreed as per the contract.

    Posted by: Krishna Pothula on December 25, 2007

    ReplyDelete
  2. Re: Why POJO web services does not require data binding ?

    I believe annotated POJOs could be used as a Transfer Object/DTO (complex data type) as an attribute in the POJO method implementation.
    Like say,transferring complex objects over the wire such as CustomerAccount details in Bank applications by registering bean mappings on the client side in server-config.wsdd(Axis)

    Correct me if iam wrong, if yes, then we definitely need some kind of binding,again Iam not sure about this if we need that, when you pass this object?

    My question is why POJO web services dont use anything like ADB,XMLBeans or JIXB for that matter?

    Posted by: yaseen khan on December 27, 2007

    ReplyDelete