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

📄 operationnstest.java

📁 Xfire文件 用于开发web service 的一个开源工具 很好用的
💻 JAVA
字号:
package org.codehaus.xfire.aegis.type.java5;import java.util.List;import javax.jws.Oneway;import javax.jws.WebMethod;import javax.jws.WebParam;import javax.jws.WebResult;import javax.jws.WebService;import org.codehaus.xfire.aegis.AbstractXFireAegisTest;import org.codehaus.xfire.annotations.AnnotationServiceFactory;import org.codehaus.xfire.annotations.jsr181.Jsr181WebAnnotations;import org.codehaus.xfire.service.Service;import org.codehaus.xfire.soap.SoapConstants;import org.jdom.Document;public class OperationNSTest    extends AbstractXFireAegisTest{    private Service service;        public void setUp() throws Exception    {        super.setUp();                AnnotationServiceFactory sf = new AnnotationServiceFactory(new Jsr181WebAnnotations(),                                                                    getTransportManager());        sf.setStyle("document");        service = sf.create(NotificationLogImpl.class);        getServiceRegistry().register(service);    }    public void testWSDL() throws Exception    {        Document wsdl = getWSDLDocument(service.getSimpleName());        addNamespace("xsd", SoapConstants.XSD);        assertValid("//xsd:element[@name='Notify']", wsdl);    }        @WebService(name = "NotificationLog", targetNamespace =    "http://www.sics.se/NotificationLog")    public static interface NotificationLog {       @WebMethod(operationName = "Notify", action = "")       @Oneway       public void Notify(           @WebParam(name = "Notify",  targetNamespace =    "http://docs.oasis-open.org/wsn/b-2")           Document Notify);       @WebMethod(operationName = "query", action = "")       @WebResult(name = "queryResponse", targetNamespace =    "http://www.sics.se/NotificationLog")       public List<Document> query(           @WebParam(name = "xpath", targetNamespace =    "http://www.sics.se/NotificationLog")           String xpath);       @WebMethod(operationName = "Notify2", action = "")       @Oneway       public void Notify2(           @WebParam(name = "Notify", targetNamespace =    "http://docs.oasis-open.org/wsn/2004/06/wsn-WS-BaseNotification-1.2-draft-01.xsd")           Document Notify);    }     @WebService(endpointInterface="org.codehaus.xfire.aegis.type.java5.OperationNSTest$NotificationLog")    public static class NotificationLogImpl implements NotificationLog {        public void Notify(Document Notify)        {        }        public void Notify2(Document Notify)        {        }        public List<Document> query(String xpath)        {            return null;        }    }}

⌨️ 快捷键说明

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