Uploaded image for project: 'JBoss Web Services'
  1. JBoss Web Services
  2. JBWS-1909

RequestHandler.handlerWSDLResquest has dependency on Servlet API

XMLWordPrintable

    • Hide

      Instead of calling RequestHandler.handleWSDLRequest() to access the contract, you could get it through an URL input stream:

      URL endpointUrl = spi.Endpoint.getAddress();
      URL wsdlUrl = endpointUrl + "?wsdl";
      InputStream in = wsdlUrl.openStream();

      Show
      Instead of calling RequestHandler.handleWSDLRequest() to access the contract, you could get it through an URL input stream: URL endpointUrl = spi.Endpoint.getAddress(); URL wsdlUrl = endpointUrl + "?wsdl"; InputStream in = wsdlUrl.openStream();

      The RequestHandler implementation that's being used with native carries an implementation error:
      It does cast the InvocationContext to a concrete implementation instead of relying on the interface. This forces clients like the ESB to work with that particular implementation, ServletRequestHandler in this case.

      Here's the code:

      public class RequestHandlerImpl implements RequestHandler
      {

      [...]

      public void handleWSDLRequest(Endpoint endpoint, OutputStream outputStream, InvocationContext context)
      {
      [...]
      ServletRequestContext reqContext = (ServletRequestContext)context;
      HttpServletRequest req = reqContext.getHttpServletRequest();
      [...]

              tdiesler@redhat.com Thomas Diesler
              rhn-support-hbraun Heiko Braun
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Created:
                Updated:
                Resolved: