This week's book giveaway is in the Java 8 forum.
We're giving away four copies of Java 8 in Action and have Raoul-Gabriel Urma, Mario Fusco, and Alan Mycroft on-line!
See this thread for details.
The moose likes Web Services and the fly likes Web Service Design Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Java » Web Services
Bookmark "Web Service Design" Watch "Web Service Design" New topic
Author

Web Service Design

Mat Anthony
Ranch Hand

Joined: May 21, 2008
Posts: 229
Hi All,

I have just created my first web service . Behind the scene I used axis2, acegi, struts2, spring and hibernate.
I found that every time I changed my web service (i.e. added a new method), then the skeleton that was created
during wsdl2java was deleted, hence all my code (i.e. spring injected in services) within the skeleton are deleted
What would be the best design strategy for production? (i.e. still be able to keep my code, but generate a new skeleton).

Secondly what would be the best design strategy to authenticate a user using acegi and axis2?

Thanks for any help.
Jimmy Clark
Ranch Hand

Joined: Apr 16, 2008
Posts: 2187
I found that every time I changed my web service (i.e. added a new method), then the skeleton that was created
during wsdl2java was deleted, hence all my code (i.e. spring injected in services) within the skeleton are deleted


How is this happening? What do you mean by "change my web service"? What activities are you doing? It is not clear from your post how code is being deleted.
Peer Reynders
Bartender

Joined: Aug 19, 2005
Posts: 2906
If you'll have a look at the SOA Glossary: Web Service


you'll notice that the service logic is distinct and separate from the message processing logic. The service skeleton really should be seen as a part of the message processing logic, not the service logic. The service logic should probably be encapsulated as an Application Service. Any conversion logic that doesn't belong into the service logic can be placed into a service façade (SOA Glossary).
.
Once this separation is complete only the delegation code to the façade/logic would need to be replaced after a skeleton regeneration. Also in many cases you should simply be able to "cut and paste" (or merge) the "additions" found in the new skeleton into the previous "wired-up" version of the skeleton.
Mat Anthony wrote:Secondly what would be the best design strategy to authenticate a user using acegi and axis2?

Apparently Spring-WS 1.5 is already integrated with Spring Security (Acegi-based) which would enable you to use WS-Security rather than HTTP Basic Authentication (which is discussed in Integration of Acegi with Axis2).

"Don't succumb to the false authority of a tool or model. There is no substitute for thinking."
Andy Hunt, Pragmatic Thinking & Learning: Refactor Your Wetware p.41
Mat Anthony
Ranch Hand

Joined: May 21, 2008
Posts: 229
Thanks Peer
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Web Service Design
 
Similar Threads
WebServices with JBoss
New to WebService
Design problem
Axis2 web service from WSDL - What is a good Eclipse project type for this
should we create wsdl files ?