This week's book giveaway is in the Clojure forum.
We're giving away four copies of Clojure in Action and have Amit Rathore and Francis Avila on-line!
See this thread for details.
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

publish a Servlet as an SOA implementation?

 
Bret Waldow
Ranch Hand
Posts: 59
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Relative newbie here.

We have a service which provides a servlet as it's public interface. We want to make it available as an SOA implementation, with a WSDL description for clients to use.

The public interface is just the doGet() and doPost() methods of an HttpServlet.

As a servlet, it receives HttpServletRequest objects, and returns HttpServletResponse objects. These are not known SOAP types, and in fact, are interfaces. Java2WSDL doesn't understand them, and I don't know how to go about coming up with serializable equivalents for them.

What to do? Should we refactor the public interface as something built of known objects instead (like Strings, etc.)?

Thanks in advance.
 
Lasse Koskela
author
Sheriff
Posts: 11962
5
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
First of all, I would refactor everything you can out of the servlet and into a plain old Java class, a business object.

Then, you could create a web service which uses the new Java class directly and translates your custom interfaces to standard data types or use a document-style web service where you specify your custom XML input and output messages (and translate these to your business object's interface).
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic