net.javacrumbs.smock.springws.server
Class AbstractSmockServerTest
java.lang.Object
net.javacrumbs.smock.common.server.AbstractCommonWebServiceServerTest
net.javacrumbs.smock.common.server.AbstractCommonSmockServerTest
net.javacrumbs.smock.springws.server.AbstractSmockServerTest
- All Implemented Interfaces:
- org.springframework.context.ApplicationContextAware
public abstract class AbstractSmockServerTest
- extends AbstractCommonSmockServerTest
- implements org.springframework.context.ApplicationContextAware
Extends AbstractWebServiceServerTest and adds Smock specific methods.
- Author:
- Lukas Krecan
|
Field Summary |
protected org.springframework.ws.test.server.MockWebServiceClient |
mockWebServiceClient
|
|
Method Summary |
protected org.springframework.ws.test.server.MockWebServiceClient |
createClient(org.springframework.context.ApplicationContext applicationContext,
org.springframework.ws.client.support.interceptor.ClientInterceptor[] interceptors)
Creates a MockWebServiceClient instance based on the given ApplicationContext. |
protected org.springframework.ws.client.support.interceptor.ClientInterceptor[] |
getInterceptors()
To be overriden by a subclass that needs to set interceptors. |
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.AbstractCommonSmockServerTest |
fromResource, message, message, message, message, resource, setResourceLoader, setTemplateProcessor, withMessage, withMessage, withMessage, withMessage |
| 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 |
mockWebServiceClient
protected org.springframework.ws.test.server.MockWebServiceClient mockWebServiceClient
AbstractSmockServerTest
public AbstractSmockServerTest()
getInterceptors
protected org.springframework.ws.client.support.interceptor.ClientInterceptor[] getInterceptors()
- To be overriden by a subclass that needs to set interceptors.
- Returns:
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
protected org.springframework.ws.test.server.MockWebServiceClient createClient(org.springframework.context.ApplicationContext applicationContext,
org.springframework.ws.client.support.interceptor.ClientInterceptor[] interceptors)
- Creates a
MockWebServiceClient instance based on the given ApplicationContext.
This factory method works in a similar fashion as the standard
MessageDispatcherServlet. That is:
- If a
WebServiceMessageReceiver is configured in the given application context, it will use that.
If no message receiver is configured, it will create a default SoapMessageDispatcher.
- If a
WebServiceMessageFactory is configured in the given application context, it will use that.
If no message factory is configured, it will create a default SaajSoapMessageFactory.
- 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.