⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 xfiretest.java

📁 Xfire文件 用于开发web service 的一个开源工具 很好用的
💻 JAVA
字号:
package org.codehaus.xfire;import java.io.ByteArrayOutputStream;import org.codehaus.xfire.service.EchoImpl;import org.codehaus.xfire.service.Service;import org.codehaus.xfire.test.AbstractXFireTest;import org.codehaus.xfire.wsdl.ResourceWSDL;import org.codehaus.xfire.wsdl.WSDLWriter;import org.jdom.Document;/** * XFireTest * * @author <a href="mailto:dan@envoisolutions.com">Dan Diephouse</a> */public class XFireTest        extends AbstractXFireTest{    public void setUp()            throws Exception    {        super.setUp();        Service service = getServiceFactory().create(EchoImpl.class);        WSDLWriter writer = new ResourceWSDL(getClass().getResource("/org/codehaus/xfire/echo11.wsdl"));        service.setWSDLWriter(writer);        getServiceRegistry().register(service);    }    public void testSoap11()            throws Exception    {        Document response = invokeService("EchoImpl", "/org/codehaus/xfire/echo11.xml");        addNamespace("m", "urn:Echo");        assertValid("//m:echo", response);    }    public void testSoap12()        throws Exception    {        Document response = invokeService("EchoImpl", "/org/codehaus/xfire/echo12.xml");                addNamespace("m", "urn:Echo");        assertValid("//soap12:Body/m:echo", response);    }        public void testWSDL()            throws Exception    {        Service service = (Service) getServiceRegistry().getService("EchoImpl");        WSDLWriter wsdl = service.getWSDLWriter();        assertNotNull(wsdl);        ByteArrayOutputStream out = new ByteArrayOutputStream();        getXFire().generateWSDL("EchoImpl", out);    }}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -