net.javacrumbs.smock.springws.server
Class AbstractWebServiceServerTest

java.lang.Object
  extended by net.javacrumbs.smock.common.server.AbstractCommonWebServiceServerTest
      extended by net.javacrumbs.smock.springws.server.AbstractWebServiceServerTest
All Implemented Interfaces:
org.springframework.context.ApplicationContextAware

public abstract class AbstractWebServiceServerTest
extends AbstractCommonWebServiceServerTest
implements org.springframework.context.ApplicationContextAware

Simplifies usage of Spring WS testing framework. Wraps static methods of RequestCreators, ResponseMatchers and MockWebServiceClient. Moreover it automatically creates MockWebServiceClient instance.

Author:
Lukas Krecan

Field Summary
protected  org.springframework.ws.test.server.MockWebServiceClient mockWebServiceClient
           
 
Constructor Summary
AbstractWebServiceServerTest()
           
 
Method Summary
 org.springframework.ws.test.server.MockWebServiceClient createClient(org.springframework.context.ApplicationContext applicationContext)
          Creates a MockWebServiceClient instance based on the given ApplicationContext.
protected  org.springframework.ws.test.server.MockWebServiceClient getMockWebServiceClient()
           
 org.springframework.ws.test.server.ResponseActions sendRequest(org.springframework.ws.test.server.RequestCreator requestCreator)
          Sends a request message by using the given RequestCreator.
 void setApplicationContext(org.springframework.context.ApplicationContext applicationContext)
           
protected  void setMockWebServiceClient(org.springframework.ws.test.server.MockWebServiceClient mockWebServiceClient)
           
 
Methods inherited from class net.javacrumbs.smock.common.server.AbstractCommonWebServiceServerTest
clientOrSenderFault, clientOrSenderFault, mustUnderstandFault, mustUnderstandFault, noFault, payload, payload, serverOrReceiverFault, serverOrReceiverFault, soapHeader, validPayload, versionMismatchFault, versionMismatchFault, withPayload, withPayload, xpath, xpath
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

mockWebServiceClient

protected org.springframework.ws.test.server.MockWebServiceClient mockWebServiceClient
Constructor Detail

AbstractWebServiceServerTest

public AbstractWebServiceServerTest()
Method Detail

sendRequest

public org.springframework.ws.test.server.ResponseActions sendRequest(org.springframework.ws.test.server.RequestCreator requestCreator)
Sends a request message by using the given RequestCreator. Typically called by using the default request creators provided by RequestCreators.

Parameters:
requestCreator - the request creator
Returns:
the response actions
See Also:
RequestCreators

createClient

public org.springframework.ws.test.server.MockWebServiceClient createClient(org.springframework.context.ApplicationContext applicationContext)
Creates a MockWebServiceClient instance based on the given ApplicationContext. This factory method works in a similar fashion as the standard MessageDispatcherServlet. That is:

Parameters:
applicationContext - the application context to base the client on
Returns:
the created client

setApplicationContext

public void setApplicationContext(org.springframework.context.ApplicationContext applicationContext)
Specified by:
setApplicationContext in interface org.springframework.context.ApplicationContextAware

getMockWebServiceClient

protected org.springframework.ws.test.server.MockWebServiceClient getMockWebServiceClient()

setMockWebServiceClient

protected void setMockWebServiceClient(org.springframework.ws.test.server.MockWebServiceClient mockWebServiceClient)


Copyright © 2011. All Rights Reserved.