View Javadoc

    1   package org.codehaus.xfire.spring.remoting;
    2
    3   import javax.servlet.http.HttpServletRequest;
    4   import javax.servlet.http.HttpServletResponse;
    5
    6   import org.codehaus.xfire.spring.ServiceBean;
    7   import org.springframework.web.servlet.ModelAndView;
    8   import org.springframework.web.servlet.mvc.Controller;
    9
    10
    11  /***
    12   * Web controller that exports the specified service bean as a XFire Soap service endpoint.
    13   *
    14   * @author <a href="mailto:dan@envoisolutions.com">Dan Diephouse </a>
    15   * @author <a href="mailto:poutsma@mac.com">Arjen Poutsma</a>
    16   */
    17  public class XFireExporter
    18          extends ServiceBean
    19          implements Controller
    20  {
    21      private XFireServletControllerAdapter delegate;
    22
    23      public void afterPropertiesSet()
    24              throws Exception
    25      {
    26          super.afterPropertiesSet();
    27
    28          delegate = new XFireServletControllerAdapter(getXfire(),
    29                                                       getXFireService().getServiceInfo().getName());
    30      }
    31
    32      /***
    33       * Process the incoming SOAP request and create a SOAP response.
    34       *
    35       * @param request  current HTTP request
    36       * @param response current HTTP response
    37       * @return <code>null</code>
    38       * @throws Exception in case of errors
    39       */
    40      public ModelAndView handleRequest(HttpServletRequest request, HttpServletResponse response)
    41              throws Exception
    42      {
    43          return delegate.handleRequest(request, response);
    44      }
    45  }