duplicateparamstest.java

来自「Xfire文件 用于开发web service 的一个开源工具 很好用的」· Java 代码 · 共 47 行

JAVA
47
字号
package org.codehaus.xfire.message.document;import org.codehaus.xfire.XFireRuntimeException;import org.codehaus.xfire.aegis.AbstractXFireAegisTest;import org.codehaus.xfire.service.Service;import org.codehaus.xfire.service.binding.ObjectServiceFactory;import org.codehaus.xfire.soap.SoapConstants;import org.jdom.Document;/** * @author <a href="mailto:dan@envoisolutions.com">Dan Diephouse</a> * @since Feb 21, 2004 */public class DuplicateParamsTest        extends AbstractXFireAegisTest{    public void setUp()            throws Exception    {        super.setUp();        ((ObjectServiceFactory) getServiceFactory()).setStyle(SoapConstants.STYLE_DOCUMENT);        Service service = getServiceFactory().create(DupParamsService.class);        getServiceRegistry().register(service);    }    public void testWSDL()            throws Exception    {        try        {            Document wsdl = getWSDLDocument("DupParamsService");            fail("Shouldn't allow duplicate schema elements with same qname.");        }        catch (XFireRuntimeException e)        {        }    }    public static class DupParamsService    {        public void doSomething(int foo) {}        public void doSomething(String foo) {}    }}

⌨️ 快捷键说明

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