Alex, I'm sure this answer is not the one you're looking for, but it might help you in the long term and would at least help others. It seems to me you're making an unnecessary architectural assumption. Your application is not your web application; your webapp is one way of looking at your application.

If I were you, I would do some refactoring and separate out the true heart of your application (the M in MVC) from the webapp-specific portions of it -- the JSP pages (which would be the V) and any webapp-specific controllers (the C), a la Struts. I would make sure the application itself is in a separate package and presents an interface that, at least to some extent, could be used interchangeably by a webapp or as a web service.

I did this myself and thoroughly tested my model component before I even looked at presenting it as a web service. The one sacrifice to web services I subsequently had to make with the interface was to change my List values into raw arrays. I did this directly in the interface, although I could have just added an extra layer of interface over it and preserved the List instances.

At 00:41 27.11.02 -0800, Alex Bates wrote:

Hi,



I have an existing webapp running on Tomcat. I want to expose some methods in this webapp as Axis web services. Axis is a separate webapp the examples I ve seen so far have had to copy .class or .jar files into the Axis WEB-INF\classes directory.



But this approach doesn t seem reasonable, it would lead to versioning issues (i.e. how often to copy from tomcat\webapps\MyWebApp\WEB-INF\classes to tomcat\webapps\axis\WEB-INF\classes to keep the two versions in sync ).



What I m looking for is something similar to the ability to expose existing COM components as web services with Microsoft s WSTK; but instead of COM components they re Java components running in a webapp.



I tried simply creating a WSDD for my existing app and not copying the .class and .jar files into the axis\WEB-INF directory, and got the following exeption:





Fault - org.apache.axis.ConfigurationException: Could not find class for the service named: com.mycompany.myservice
Hint: you may need to copy your class files/tree into the right location (which depends on the servlet system you are using).
AxisFault
faultCode: {http://xml.apache.org/axis/}Server.generalException
faultString: Could not find class for the service named:
com.mycompany.myservice
Hint: you may need to copy your class files/tree into the right location (which depends on the servlet system you are using).
faultActor: null
faultDetail:






Thanks in advance



Alex

(please cc: <mailto:[EMAIL PROTECTED]>[EMAIL PROTECTED])




Reply via email to