當前位置: 首頁>>代碼示例>>Java>>正文


Java WebServiceOperations類代碼示例

本文整理匯總了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);
}
 
開發者ID:lukas-krecan,項目名稱:smock,代碼行數:15,代碼來源:ClientTestHelperTest.java

示例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);
	
}
 
開發者ID:lukas-krecan,項目名稱:smock,代碼行數:14,代碼來源:ClientTestHelperTest.java

示例3: getWebServiceOperations

import org.springframework.ws.client.core.WebServiceOperations; //導入依賴的package包/類
public WebServiceOperations getWebServiceOperations() {
	return webServiceOperations;
}
 
開發者ID:Bedework,項目名稱:exchange-ws-client,代碼行數:4,代碼來源:SoapAutodiscoverServiceImpl.java

示例4: setWebServiceOperations

import org.springframework.ws.client.core.WebServiceOperations; //導入依賴的package包/類
public void setWebServiceOperations(WebServiceOperations webServiceOperations) {
    this.webServiceOperations = webServiceOperations;
}
 
開發者ID:Bedework,項目名稱:exchange-ws-client,代碼行數:4,代碼來源:SoapAutodiscoverServiceImpl.java

示例5: getWsTemplate

import org.springframework.ws.client.core.WebServiceOperations; //導入依賴的package包/類
public WebServiceOperations getWsTemplate() {
	return wsTemplate;
}
 
開發者ID:lukas-krecan,項目名稱:smock,代碼行數:4,代碼來源:Calc.java

示例6: setWsTemplate

import org.springframework.ws.client.core.WebServiceOperations; //導入依賴的package包/類
public void setWsTemplate(WebServiceOperations wsTemplate) {
	this.wsTemplate = wsTemplate;
}
 
開發者ID:lukas-krecan,項目名稱:smock,代碼行數:4,代碼來源:Calc.java

示例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);
}
 
開發者ID:lukas-krecan,項目名稱:smock,代碼行數:7,代碼來源:ClientMockitoTest.java

示例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);
}
 
開發者ID:lukas-krecan,項目名稱:smock,代碼行數:7,代碼來源:ClientEasyMockTest.java


注:本文中的org.springframework.ws.client.core.WebServiceOperations類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。