示例#1
0
  @Before
  public void setUp() throws Exception {
    super.setUp();
    // hack to get around having to have a httpservletrequest when accessing the producer services
    // I don't know why its really needed, seems to be a dependency where wsrp connects with the pc
    // module

    // NOTE: ideally we could just use the MockHttpServlerRequest and Response, but JBossWeb is
    // looking for particular implementations,
    //      we we havce to use the Catalina specific classes. Interestingly, its only appears that
    // JBossWeb requires these classes and not upstream Tomcat
    //      ServletAccess.setRequestAndResponse(MockHttpServletRequest.createMockRequest(null),
    // MockHttpServletResponse
    //            .createMockResponse());

    Request request = new MockRequest();
    request.setCoyoteRequest(new org.apache.coyote.Request());

    RequestFacade requestFacade = new RequestFacade(request);
    ServletAccess.setRequestAndResponse(
        requestFacade, MockHttpServletResponse.createMockResponse());
  }
示例#2
0
 @After
 public void tearDown() throws Exception {
   super.tearDown();
 }