|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface WsTestHelper
Helps with implementing WS server side tests. The most common usage is
@RunWith(SpringJUnit4ClassRunner.class)
// your endpoint configuration + Default helper config
@ContextConfiguration(locations = { "file:src/main/webapp/WEB-INF/spring-ws-servlet.xml",
WsTestHelper.DEFAULT_CONFIG_PATH })
public class EndpointTest {
@Autowired
private WsTestHelper helper;
@Test
public void testSimple() throws Exception {
// simulates request coming to MessageDispatcherServlet
MessageContext message = helper.receiveMessage("request1.xml");
// assert that response is not fault
helper.createMessageValidator(message.getResponse()).assertNotSoapFault();
}
}
| Field Summary | |
|---|---|
static java.lang.String |
DEFAULT_CONFIG_PATH
|
| Method Summary | |
|---|---|
MessageValidator |
createMessageValidator(org.springframework.ws.WebServiceMessage message)
Creates a message validator. |
org.springframework.ws.WebServiceMessageFactory |
getMessageFactory()
|
XmlUtil |
getXmlUtil()
|
org.springframework.ws.WebServiceMessage |
loadMessage(org.springframework.core.io.Resource resource)
Loads message from given resource. |
org.springframework.ws.WebServiceMessage |
loadMessage(java.lang.String resourcePath)
Loads message from given resource. |
org.springframework.ws.context.MessageContext |
receiveMessage(org.springframework.core.io.Resource request)
Creates a MessageContext from the resource and calls WebServiceMessageReceiver.receive(MessageContext) |
org.springframework.ws.context.MessageContext |
receiveMessage(java.lang.String requestPath)
Creates a MessageContext from the resource on the requestPath and calls WebServiceMessageReceiver.receive(MessageContext) |
org.springframework.ws.context.MessageContext |
receiveMessage(org.springframework.ws.WebServiceMessage message)
Creates a MessageContext from the message and calls WebServiceMessageReceiver.receive(MessageContext) |
| Field Detail |
|---|
static final java.lang.String DEFAULT_CONFIG_PATH
| Method Detail |
|---|
org.springframework.ws.context.MessageContext receiveMessage(org.springframework.ws.WebServiceMessage message)
throws java.lang.Exception
MessageContext from the message and calls WebServiceMessageReceiver.receive(MessageContext)
message -
java.lang.Exception
org.springframework.ws.context.MessageContext receiveMessage(org.springframework.core.io.Resource request)
throws java.lang.Exception
MessageContext from the resource and calls WebServiceMessageReceiver.receive(MessageContext)
request -
java.lang.Exception
org.springframework.ws.context.MessageContext receiveMessage(java.lang.String requestPath)
throws java.lang.Exception
MessageContext from the resource on the requestPath and calls WebServiceMessageReceiver.receive(MessageContext)
requestPath -
java.lang.Exception
org.springframework.ws.WebServiceMessage loadMessage(org.springframework.core.io.Resource resource)
throws java.io.IOException
resource -
java.io.IOException
org.springframework.ws.WebServiceMessage loadMessage(java.lang.String resourcePath)
throws java.io.IOException
resource -
java.io.IOExceptionMessageValidator createMessageValidator(org.springframework.ws.WebServiceMessage message)
DefaultWsTestHelper configuration.
message -
org.springframework.ws.WebServiceMessageFactory getMessageFactory()
XmlUtil getXmlUtil()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||