axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeff Greif <jgr...@alumni.princeton.edu>
Subject migrating custom dispatch from Axis 1 to Axis 2
Date Fri, 02 Nov 2007 23:11:36 GMT
I have this scenario working in Axis 1, which I want to migrate to Axis2:

1.  A class extending AxisServlet replaces AxisServlet to provide some 
additional initialization (via Servlet.init()).

2.  There are two services deployed in server-config.wsdd, each using a 
java:MSG provider.  Each of these services is handled by a specific 
provider plugin of mine, which is initialized in #1 above. The plugin 
determines from the request url which of an arbitrary set of web 
services that it implements should process a request that is dispatched 
to it (see #4).  Similarly, it is also responsible for providing wsdl in 
response to http GET requests for urls pertinent to it ending with ?wsdl.

3.  The http transport spec in server-config.wsdd has a custom class 
specified for the parameter qs:wsdl to handle ?wsdl requests and

4.  a custom handler in the request flow for URL mapping. 

Each of these latter two does something special for requests with urls 
intended for the two MSG services, and has the default behavior 
otherwise.  The special treatment is that a certain prefix part of the 
url specifies one of the two MSG services, and the rest specifies 
additional dispatching information handled by the plugin.

This seems to be how to do the same thing in Axis2, with some questions:

As there is still an AxisServlet, presumably there is a straightforward 
analog of #1.

Presumably #2 is handled by creating service archive files which specify 
some kind of raw MessageReceiver (or perhaps an adaptation that uses 
Element rather than OMElement).

The analog of #4 seems to be a custom RequestURIBasedDispatcher in the 
Transport phase and/or Dispatch phase of the Inflow phaseOrder and 
perhaps custom versions of its releated Service and Operation 
dispatchers.  Should it be one of these phases or both?

Regarding #3, this article
http://www.developer.com/open/article.php/3589126
suggests that in Axis2 there isn't a way to customize the provision of 
wsdls in response to ?wsdl requests.  It claims (and the source agrees 
with the claim) that wsdls are generated from the service implementation 
class unless there is a file in the META-INF directory of the service 
repository.  Am I out of luck in attempting to hook the wsdl query 
process and provide wsdl descriptors from outside the META-INF 
directory?  The only obvious way to do that I found would involve 
modifying the doGet method of AxisServlet in my extension class.

Thanks for any help you can provide.

Jeff Greif










---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org


Mime
View raw message