?? echotest.java
字號:
package org.codehaus.xfire.rpclit;import org.codehaus.xfire.aegis.AbstractXFireAegisTest;import org.codehaus.xfire.service.Service;import org.codehaus.xfire.service.binding.ObjectServiceFactory;import org.codehaus.xfire.services.Echo;import org.codehaus.xfire.soap.SoapConstants;import org.jdom.Document;public class EchoTest extends AbstractXFireAegisTest{ private Service service; protected void setUp() throws Exception { super.setUp(); ObjectServiceFactory osf = (ObjectServiceFactory) getServiceFactory(); osf.setStyle(SoapConstants.STYLE_RPC); service = osf.create(Echo.class, null, "urn:xfire:echo", null); getServiceRegistry().register(service); } public void testService() throws Exception { Document response = invokeService("Echo", "echo.xml"); addNamespace("e", "urn:xfire:echo"); assertValid("//out[text()='Yo Yo']", response); response = invokeService("Echo", "echo-nil.xml"); assertValid("//out[@xsi:nil='true']", response); } public void testWSDL() throws Exception { getWSDLDocument(service.getSimpleName()); }}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -