Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.


  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • DownloadDownload
  • PrintPrint
Share this Page URL
Help

Chapter 9. Building contract-first web s... > Consuming Spring-WS web services

9.5. Consuming Spring-WS web services

In chapter 8, you saw how to use JaxRpcPortProxyFactoryBean and XFireClientFactoryBean to build clients that communicate with remote web services. But both of those take a remote object view of web services, treating web services as remote objects whose methods can be invoked locally. Throughout this chapter, we’ve been talking about a message-centric approach to web services where clients send XML messages to a web service and receive XML messages back in response. A different paradigm on the service side demands a different paradigm on the client side as well. That’s where Spring-WS’s WebServiceTemplate comes in.

WebServiceTemplate is the centerpiece of Spring-WS’s client API. As shown in figure 9.10, it employs the Template design pattern to provide the ability to send and receive XML messages from message-centric web services. We’ve already seen how Spring uses the Template pattern for its data access abstractions in chapter 5. As we look at Spring-WS’s client API, you’ll find that it resembles the data access API in many ways.


  

You are currently reading a PREVIEW of this book.

                                                                                        

Get instant access to over
$1 million worth of books and videos.

  

Start a Free Trial