• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

petstore question

 
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi all,

In Java petstore 1.3.2 version the Admin swing gui application connects to EJB Tier via Web Tier and with http post and passes plain XML over http. It also receives the same (i.e plain XML over http ) . So, parsing the XML and converting the java objects back to XML is there in both sides. [ I am talking about HttpPostPetStoreProxy.java ].

In Java petstore 1.3.1 version the Admin swing gui application connects to EJB Tier via Web Tier but it uses JAX-RPC (i.e WebServices ). [I am talking about WebServicePetStoreProxy.java ]

So, I have 2 questions.
=======================
(1) Why in 1.3.2 which is a later version of Petstore than 1.3.1 the WebService approach has been taken out and old "plain XML over http" has been taken ?
In this respect someone has told me that Sun has moved it WebServices related samples to Adventure Builder. Is it true ? If that is the reason to taken away the WebServices approach from Petstore demo then I think it is not good.
Is there any architectural advantage using "plain XML over http" instead of WebServices here?

(2) What is the reason Sun has taken this Swing Client --> Web Tier --> EJB Tier approach ?
Why not Swing Client -> EJB Tier ( using RMI-IIOP not EJB WebService Endpoint ). It should be faster ,no XML parsing will be there . ( If we use WebServices still the XML to object conversion will happen internally].
Or Marshalling and demarshalling of RMI-IIOP request is more expensive than WebService XML parsing/simple XML parsing ?

Has sun provided any good reason to choose this path ? Actually I have not found it in the document.

Any help will be highly appreciated.

Thanks
Roy
 
roy siju
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

Can anyone please throw some light on the issue ?

Thanks in advance.
Roy
 
Sheriff
Posts: 5782
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by roy siju:


Is there any architectural advantage using "plain XML over http" instead of WebServices here?



Although I can't speak for authors of Petstore, architecturally WebServices is more expensive than XML-RPC because of the overheads in publish-find-bind cycles. A service has to publish it self in a registry and the client(s) will have to query the registry and bind to the service.

XML-RPC just gets about two layes below the WS protocol stack and talks to the service end point directly. Therefore it not only performs better, but also reduces book-keeping activities.

This is my analysis, but they may beg to differ
 
roy siju
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Ajit,

In case of WebService also, publishing in a registry and binding it is not an mandatory action. If u know the end-point you can bind and call the Service. Isn't it ?

Any of the JAX-RPC Client types ( i.e static stub, dynamic proxy or DII ) can bind and call an endpoint without finding it in registry.

Then the binding and finding overhead will not be there. If u use Static Stub then most of the tools generate the necessary classes from the WSDL. So, the developer deals with only mainly with POJOs . Life is simpler .Isn't it ?

Thanks & Regards
Roy
 
Ranch Hand
Posts: 215
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
EJB vs Web tier is related to security issue.
All firewalls allow HTTP but may block RMI-IIOP connection.
So with XML over HTTP, your clients could be anywhere, inside or otside of firewall.
 
I am going to test your electrical conductivity with this tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic