xfireconfigurableservletnewtest.java
来自「Xfire文件 用于开发web service 的一个开源工具 很好用的」· Java 代码 · 共 47 行
JAVA
47 行
package org.codehaus.xfire.transport.http;import org.codehaus.xfire.addressing.AddressingInHandler;import org.codehaus.xfire.addressing.AddressingOutHandler;import org.codehaus.xfire.service.Service;import org.codehaus.xfire.service.ServiceRegistry;import org.codehaus.xfire.test.AbstractServletTest;import com.meterware.httpunit.HttpNotFoundException;public class XFireConfigurableServletNewTest extends AbstractServletTest{ public void testServlet() throws Exception { try { newClient().getResponse("http://localhost/services/"); } catch(HttpNotFoundException e) {} ServiceRegistry reg = getXFire().getServiceRegistry(); assertTrue(reg.hasService("Echo")); Service echo = reg.getService("Echo"); assertNotNull(echo.getName()); assertNotSame("", echo.getName().getNamespaceURI()); assertTrue(reg.hasService("Echo1")); Service echo1 = reg.getService("Echo1"); assertNotNull(echo1.getBinding(SoapHttpTransport.SOAP12_HTTP_BINDING)); assertEquals(3, echo1.getInHandlers().size()); assertTrue(echo1.getInHandlers().get(2) instanceof AddressingInHandler); assertEquals(2, echo1.getOutHandlers().size()); assertTrue(echo1.getOutHandlers().get(1) instanceof AddressingOutHandler); assertEquals(2, getXFire().getInHandlers().size()); } protected String getConfiguration() { return "/org/codehaus/xfire/transport/http/configurable-web.xml"; }}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?