GeeCON Prague 2014*
The moose likes Web Services and the fly likes Web Service integration Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Java » Web Services
Bookmark "Web Service integration" Watch "Web Service integration" New topic
Author

Web Service integration

Balachandran Vijayarajan
Greenhorn

Joined: Jun 23, 2005
Posts: 29
We want to integrate lots of services (web services). I want to know the best practice and good design pattern on this front. So, can you please given me some idea or point me to the good links/material on this. Thanks a lot in advance.

Cheers,

Bala
Peer Reynders
Bartender

Joined: Aug 19, 2005
Posts: 2922
    
    5
Originally posted by Balachandran Vijayarajan:
We want to integrate lots of services (web services).


It isn't quite clear what you are trying to accomplish. Web services are often used to integrate heterogeneous systems by virtue of only requiring HTTP and XML tools/libraries. However integrating of the services themselves sounds more like you are trying to
  • compose Basic Services into Composed Services
  • compose Composed Services into Process Services

  • SOA in Practice: The Art of Distributed System Design does discuss these situations though it isn't squarely aimed at web services.

    At the most basic level creating composed services often involves manipulating the messages directly in their XML-form rather than their "translated" Java-object form; for example incoming messages of various formats may be processed by XSLT transformations toward a unified form that can be processed by a target web service. If it fits your requirements Apache ODE (Orchestration Director Engine) might be useful.


    Asynchronous Web services operations using JMS
    Encapsulate business logic with a command facade pattern
    Creating flexible Web service implementations with the Router pattern
    Understand and implement the message bus pattern
    Asynchronous operations and Web services, Part 1: A primer on asynchronous transactions
    Asynchronous operations and Web services, Part 2

    Though the discussed implementation is JAX-RPC - the principles still apply:
    Patterns and Strategies for Building Document-Based Web Services
    (i.e. prefer document-oriented web services First Stop: WS-I, The "wrapped" document/literal convention)

    Even for web services many of the enterprise integration patterns still apply.
    [ April 05, 2008: Message edited by: Peer Reynders ]
    Balachandran Vijayarajan
    Greenhorn

    Joined: Jun 23, 2005
    Posts: 29
    Thanks a lot for reply. I have not selected better wording I believe. This is my requirement,Having lots of webservice. Need to know the best practice and patterns to follow to the environment better. Like more scalable, performace, maintainable and etc

    Cheers,
    Bala
    Peer Reynders
    Bartender

    Joined: Aug 19, 2005
    Posts: 2922
        
        5
    Originally posted by Balachandran Vijayarajan:
    This is my requirement,Having lots of webservice.


    That is not a requirement. Web services can be part of a solution developed in response to requirements, but they are never a requirement in themselves. Otherwise you simply end up with a whole mess of web services that do not solve any particular problem. And often lots of web services are only a very small part of a solution to a much "larger scale" set of problems.

    So what problem are you trying to solve?

    Like more scalable, performance, maintainable ..

  • Scalabilty - ensure that your web services are stateless. That means that the do not store any client or application state. As they are often used in the processing of "long running business transactions" (we are talking about hours, days, possibly weeks) they usually delegate storage of transaction state to their persistence store rather than keeping it in memory - and compensation is preferred over two-phase commit (Your Coffee Shop Doesn�t Use Two-Phase Commit (PDF))
  • Performance - only use web services for large-grained interactions. For example: only submit an entire purchase order - don't submit it a line-item at a time.
  • Maintainability - this is where things get complicated. Any web service endpoint exposes an interface - which means that changing the interface will affect both the service and consumer. There is some freedom in XML Schema as you should be able to add new optional elements without problems; however that will only work if your client's SOAP stack will simply ignore elements that it isn't expecting. Often changing the interface requires exposing the new interface on a separate endpoint so that new clients can use it while the old client aren't forced to upgrade; often this make the service more complicated as it has to support multiple web service interfaces.

  • Balachandran Vijayarajan
    Greenhorn

    Joined: Jun 23, 2005
    Posts: 29
    Peer, thanks a lot..was very useful.
    Binildas Christudas
    author
    Greenhorn

    Joined: Sep 02, 2002
    Posts: 25
    We want to integrate lots of services (web services). I want to know the best practice and good design pattern on this front


    Integrating services?! - You may also be interested in the below book:

    PACKT title "Service Oriented Java Business Integration":
    http://www.packtpub.com/service-oriented-java-business-integration/book
    http://www.amazon.com/Service-Oriented-Business-Integration-Binildas-Christudas/dp/1847194400


    Binildas C. A.<br />Principal Architect, <a href="http://www.infosys.com/" target="_blank" rel="nofollow">http://www.infosys.com/</a><br />(SCJP, SCJD, SCBCD, SCEA, MCP, TOGAF, LZA)<br /><a href="http://www.packtpub.com/author_view_profile/id/180" target="_blank" rel="nofollow">http://www.packtpub.com/author_view_profile/id/180</a>
    Pradeep bhatt
    Ranch Hand

    Joined: Feb 27, 2002
    Posts: 8919

    Peer,

    What are composed services and processed services ?

    Thanks,


    Groovy
    Peer Reynders
    Bartender

    Joined: Aug 19, 2005
    Posts: 2922
        
        5
    Originally posted by Prad Dip:
    Peer,

    What are composed services and processed services ?


    If you would have followed the links that I gave you earlier in your topic you would already know.
    Anil Vupputuri
    Ranch Hand

    Joined: Oct 31, 2000
    Posts: 527
    Originally posted by Peer Reynders:

    Often changing the interface requires exposing the new interface on a separate endpoint so that new clients can use it while the old client aren't forced to upgrade; often this make the service more complicated as it has to support multiple web service interfaces.


    This is one of the hot topic. Service versioning is starting to loom large on the horizon, so it would be interesting how the companies are approaching towards Web Service versioning without impacting consumer sometimes it could be unknown consumer too.


    SCJP 1.5, SCEA, ICED (287,484,486)
     
    GeeCON Prague 2014
     
    subject: Web Service integration