本文整理匯總了Java中org.springframework.ws.client.core.WebServiceOperations類的典型用法代碼示例。如果您正苦於以下問題:Java WebServiceOperations類的具體用法?Java WebServiceOperations怎麽用?Java WebServiceOperations使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
WebServiceOperations類屬於org.springframework.ws.client.core包,在下文中一共展示了WebServiceOperations類的8個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: example
import org.springframework.ws.client.core.WebServiceOperations; //導入依賴的package包/類
@Test
public void example()
{
Calc calc = new Calc();
WebServiceOperations wsTemplate = createMock(WebServiceOperations.class);
calc.setWsTemplate(wsTemplate);
expect(wsTemplate.marshalSendAndReceive(is(message("xml/request2.xml")))).andReturn(response("xml/response1.xml", PlusResponse.class));
replay(wsTemplate);
assertEquals(3, calc.plus(1, 2));
verify(wsTemplate);
}
示例2: exampleInvalid
import org.springframework.ws.client.core.WebServiceOperations; //導入依賴的package包/類
@Test(expected=AssertionError.class)
public void exampleInvalid()
{
Calc calc = new Calc();
WebServiceOperations wsTemplate = createMock(WebServiceOperations.class);
calc.setWsTemplate(wsTemplate);
expect(wsTemplate.marshalSendAndReceive(is(message("xml/valid-message.xml")))).andReturn(response("xml/response1.xml", PlusResponse.class));
replay(wsTemplate);
calc.plus(1, 2);
}
示例3: getWebServiceOperations
import org.springframework.ws.client.core.WebServiceOperations; //導入依賴的package包/類
public WebServiceOperations getWebServiceOperations() {
return webServiceOperations;
}
示例4: setWebServiceOperations
import org.springframework.ws.client.core.WebServiceOperations; //導入依賴的package包/類
public void setWebServiceOperations(WebServiceOperations webServiceOperations) {
this.webServiceOperations = webServiceOperations;
}
示例5: getWsTemplate
import org.springframework.ws.client.core.WebServiceOperations; //導入依賴的package包/類
public WebServiceOperations getWsTemplate() {
return wsTemplate;
}
示例6: setWsTemplate
import org.springframework.ws.client.core.WebServiceOperations; //導入依賴的package包/類
public void setWsTemplate(WebServiceOperations wsTemplate) {
this.wsTemplate = wsTemplate;
}
示例7: setUpMocks
import org.springframework.ws.client.core.WebServiceOperations; //導入依賴的package包/類
@Before
public void setUpMocks() throws Exception {
airlineClient = new AirlineClient();
webServiceTemplate = mock(WebServiceOperations.class);
airlineClient.setWsTemplate(webServiceTemplate);
}
示例8: setUpMocks
import org.springframework.ws.client.core.WebServiceOperations; //導入依賴的package包/類
@Before
public void setUpMocks() throws Exception {
airlineClient = new AirlineClient();
webServiceTemplate = createMock(WebServiceOperations.class);
airlineClient.setWsTemplate(webServiceTemplate);
}