亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? plexusxfiretest.java

?? Xfire文件 用于開發web service 的一個開源工具 很好用的
?? JAVA
字號:
package org.codehaus.xfire.plexus;import java.io.ByteArrayOutputStream;import java.io.InputStream;import java.io.InputStreamReader;import java.io.Reader;import java.io.StringReader;import java.util.HashMap;import java.util.List;import java.util.Map;import javax.xml.stream.XMLInputFactory;import javax.xml.stream.XMLStreamException;import org.codehaus.plexus.PlexusTestCase;import org.codehaus.xfire.MessageContext;import org.codehaus.xfire.XFire;import org.codehaus.xfire.exchange.InMessage;import org.codehaus.xfire.service.Service;import org.codehaus.xfire.service.ServiceFactory;import org.codehaus.xfire.service.ServiceRegistry;import org.codehaus.xfire.service.binding.MessageBindingProvider;import org.codehaus.xfire.service.binding.ObjectServiceFactory;import org.codehaus.xfire.soap.Soap11;import org.codehaus.xfire.soap.Soap12;import org.codehaus.xfire.soap.SoapConstants;import org.codehaus.xfire.test.XPathAssert;import org.codehaus.xfire.transport.Channel;import org.codehaus.xfire.transport.Transport;import org.codehaus.xfire.transport.local.LocalTransport;import org.codehaus.xfire.util.STAXUtils;import org.codehaus.xfire.util.jdom.StaxBuilder;import org.codehaus.xfire.wsdl.WSDLWriter;import org.jdom.Document;import org.jdom.Element;import org.jdom.output.XMLOutputter;/** * Contains helpful methods to test SOAP services. * * @author <a href="mailto:dan@envoisolutions.com">Dan Diephouse</a> */public class PlexusXFireTest        extends PlexusTestCase{    private ServiceFactory factory;        private XMLInputFactory defaultInputFactory = XMLInputFactory.newInstance();        /**     * Namespaces for the XPath expressions.     */    private Map namespaces = new HashMap();    protected void printNode(Document node)        throws Exception    {        XMLOutputter writer = new XMLOutputter();        writer.output(node, System.out);    }        protected void printNode(Element node)            throws Exception    {        XMLOutputter writer = new XMLOutputter();        writer.output(node, System.out);    }    /**     * Invoke a service with the specified document.     *     * @param service  The name of the service.     * @param document The request as an xml document in the classpath.     */    protected Document invokeService(String service, String document)            throws Exception    {        ByteArrayOutputStream out = new ByteArrayOutputStream();        MessageContext context = new MessageContext();        context.setXFire(getXFire());        context.setProperty(Channel.BACKCHANNEL_URI, out);        if (service != null)            context.setService(getServiceRegistry().getService(service));                InputStream stream = getResourceAsStream(document);         InMessage msg = new InMessage(STAXUtils.createXMLStreamReader(stream, "UTF-8",null));        Transport t = getXFire().getTransportManager().getTransport(LocalTransport.BINDING_ID);        Channel c = t.createChannel();                c.receive(context, msg);                String response = out.toString();        if (response == null || response.length() == 0)            return null;        return readDocument(response);    }    protected Document readDocument(String text)            throws XMLStreamException    {        return readDocument(text, defaultInputFactory);    }    protected Document readDocument(String text, XMLInputFactory ifactory)            throws XMLStreamException    {        try        {            StaxBuilder builder = new StaxBuilder(ifactory);            return builder.build(new StringReader(text));        }        catch (XMLStreamException e)        {            System.err.println("Could not read the document!");            System.err.println(text);            throw e;        }    }        protected Document getWSDLDocument(String service)            throws Exception    {        ByteArrayOutputStream out = new ByteArrayOutputStream();        getXFire().generateWSDL(service, out);        return readDocument(out.toString());    }    /**     * @see junit.framework.TestCase#setUp()     */    protected void setUp()            throws Exception    {        super.setUp();                addNamespace("s", Soap11.getInstance().getNamespace());        addNamespace("soap12", Soap12.getInstance().getNamespace());    }    /**     * Assert that the following XPath query selects one or more nodes.     *     * @param xpath     */    public List assertValid(String xpath, Object node)            throws Exception    {        return XPathAssert.assertValid(xpath, node, namespaces);    }    /**     * Assert that the following XPath query selects no nodes.     *     * @param xpath     */    public List assertInvalid(String xpath, Object node)            throws Exception    {        return XPathAssert.assertInvalid(xpath, node, namespaces);    }    /**     * Asser that the text of the xpath node retrieved is equal to the value specified.     *     * @param xpath     * @param value     * @param node     */    public void assertXPathEquals(String xpath, String value, Document node)            throws Exception    {        XPathAssert.assertXPathEquals(xpath, value, node, namespaces);    }    public void assertNoFault(Document node)            throws Exception    {        XPathAssert.assertNoFault(node);    }    /**     * Add a namespace that will be used for XPath expressions.     *     * @param ns  Namespace name.     * @param uri The namespace uri.     */    public void addNamespace(String ns, String uri)    {        namespaces.put(ns, uri);    }    /**     * Get the WSDL for a service.     *     * @param service The name of the service.     */    protected WSDLWriter getWSDL(String service)            throws Exception    {        ServiceRegistry reg = getServiceRegistry();        Service hello = reg.getService(service);        return hello.getWSDLWriter();    }    public ServiceFactory getServiceFactory() throws Exception    {        if (factory == null)        {            ObjectServiceFactory ofactory =                 new ObjectServiceFactory(getXFire().getTransportManager(),                                         new MessageBindingProvider());                        ofactory.setStyle(SoapConstants.STYLE_MESSAGE);                        factory = ofactory;        }        return factory;    }    public void setServiceFactory(ServiceFactory factory)    {        this.factory = factory;    }    protected InputStream getResourceAsStream(String resource)    {        return getClass().getResourceAsStream(resource);    }    protected Reader getResourceAsReader(String resource)    {        return new InputStreamReader(getResourceAsStream(resource));    }    protected XFire getXFire()            throws Exception    {        return (XFire) lookup(XFire.ROLE);    }    protected ServiceRegistry getServiceRegistry()            throws Exception    {        return getXFire().getServiceRegistry();    }}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲欧洲日韩av| 欧美丰满少妇xxxxx高潮对白| 国产日韩欧美制服另类| 国产99久久久国产精品| 国产精品美女久久久久高潮| 92国产精品观看| 亚洲国产欧美一区二区三区丁香婷| 日本丶国产丶欧美色综合| 亚洲福利国产精品| 日韩久久精品一区| 成人免费高清视频| 亚洲一区二区三区免费视频| 欧美精品一级二级| 国内精品视频一区二区三区八戒| 久久一二三国产| 99re这里只有精品视频首页| 亚洲午夜精品在线| 欧美精品一区二区蜜臀亚洲| 成人午夜激情影院| 亚洲成av人片在线观看| 久久尤物电影视频在线观看| 91丨porny丨中文| 日韩经典中文字幕一区| 国产精品视频看| 欧美日韩国产高清一区二区| 国产福利91精品| 一二三四区精品视频| 精品999久久久| 在线看日本不卡| 国产精品99久久久| 天涯成人国产亚洲精品一区av| 久久久久久久久久美女| 欧美这里有精品| 国产精品99久久久久久似苏梦涵| 亚洲电影中文字幕在线观看| 久久久不卡网国产精品二区| 在线播放91灌醉迷j高跟美女| 国产精品一区二区黑丝| 午夜私人影院久久久久| 亚洲欧美一区二区视频| 26uuu亚洲综合色欧美 | 精品一区二区免费看| 亚洲欧美在线观看| 久久久久9999亚洲精品| 91精品国产综合久久精品麻豆| 成人黄色一级视频| 免费人成黄页网站在线一区二区 | 欧美成人高清电影在线| 色噜噜狠狠成人网p站| 国产激情一区二区三区| 日日夜夜免费精品| 一区二区三区av电影| 欧美激情中文字幕一区二区| 日韩欧美一区二区视频| 欧美在线小视频| 91视频精品在这里| 国产精品一区一区三区| 麻豆91精品视频| 天天av天天翘天天综合网 | 午夜精品福利一区二区三区蜜桃| 国产精品无圣光一区二区| 精品国产乱码久久久久久久久| 欧美精品丝袜久久久中文字幕| 一本大道久久a久久综合婷婷| 国产成人av电影在线播放| 精品综合久久久久久8888| 奇米综合一区二区三区精品视频| 亚洲无线码一区二区三区| 亚洲美女免费视频| 亚洲啪啪综合av一区二区三区| 中文文精品字幕一区二区| 国产亚洲视频系列| 久久精品日产第一区二区三区高清版| 欧美一级在线免费| 日韩欧美精品在线| 精品日韩欧美在线| 2022国产精品视频| 中文字幕成人av| 色欧美乱欧美15图片| 成人av资源网站| 国产成人无遮挡在线视频| 激情综合网av| 国产在线精品一区二区夜色| 久久66热偷产精品| 国产成人免费高清| 成人高清在线视频| 色综合中文字幕国产 | 欧美一区二区三区男人的天堂| 欧美三级日韩三级国产三级| 欧美日韩一级视频| 欧美二区乱c少妇| 欧美一区二区三区公司| 69精品人人人人| 欧美精品一区二区精品网| 国产女人18毛片水真多成人如厕 | 26uuu色噜噜精品一区二区| 精品国精品国产| 欧美国产精品一区二区三区| 亚洲精品综合在线| 日韩综合小视频| 国产成人福利片| 在线观看欧美精品| 欧美一级免费观看| 国产欧美日韩在线| 一区二区三区视频在线看| 水野朝阳av一区二区三区| 国产一区二区三区日韩| 99在线精品视频| 欧美精品在欧美一区二区少妇| 26uuu国产一区二区三区| 国产精品久久久久久久第一福利| 亚洲九九爱视频| 九九九久久久精品| 一本一道久久a久久精品| 欧美一级精品大片| 国产精品福利一区二区| 午夜精品福利久久久| 国产一区二区在线视频| 一本一道久久a久久精品| 日韩精品一区在线| 亚洲图片激情小说| 青青草成人在线观看| av不卡免费在线观看| 日韩免费电影一区| 亚洲视频免费在线| 精品在线免费观看| 欧美性生交片4| 国产日韩高清在线| 日本欧美一区二区三区| 成人动漫一区二区三区| 欧美一级欧美一级在线播放| 亚洲人成精品久久久久久| 国产在线不卡视频| 欧美精品成人一区二区三区四区| 国产婷婷色一区二区三区在线| 亚洲综合区在线| 成人动漫精品一区二区| 日韩亚洲欧美成人一区| 一区二区在线观看视频| 成人精品视频.| 欧美精品一区在线观看| 热久久国产精品| 欧美日韩色一区| 亚洲男帅同性gay1069| 国产激情偷乱视频一区二区三区| 欧美一区二区不卡视频| 午夜精品久久久久久久| 欧美在线一二三四区| 日韩毛片精品高清免费| 国产成人免费在线视频| 精品国产乱码久久久久久老虎| 日韩av在线发布| 欧美日韩小视频| 亚洲国产精品久久不卡毛片 | 欧美日韩成人一区| 亚洲韩国精品一区| 一本大道综合伊人精品热热| 国产精品午夜久久| 成人毛片老司机大片| 国产午夜亚洲精品羞羞网站| 国产一区二区精品久久99| 精品少妇一区二区三区日产乱码 | 国产无一区二区| 国内偷窥港台综合视频在线播放| 日韩三级视频在线看| 日韩成人一级大片| 91精品黄色片免费大全| 午夜精品福利一区二区三区蜜桃| 欧美日韩视频在线一区二区 | 免费一区二区视频| 91精品国产丝袜白色高跟鞋| 日韩精品成人一区二区在线| 337p亚洲精品色噜噜噜| 日本午夜精品视频在线观看 | 欧美日韩一区国产| 亚洲图片欧美一区| 制服丝袜中文字幕一区| 美女www一区二区| 久久综合色8888| 成人h动漫精品一区二区| 亚洲婷婷综合色高清在线| 欧美午夜精品理论片a级按摩| 亚洲综合一区在线| 91麻豆精品国产91| 久久精品国产在热久久| 久久精品人人做人人爽人人| av资源网一区| 亚洲成在人线免费| 日韩视频一区二区在线观看| 国产一区二区三区四区五区入口| 中文字幕国产一区| 欧美自拍偷拍一区| 久久国产剧场电影| 国产精品成人一区二区三区夜夜夜| 色噜噜久久综合| 麻豆成人久久精品二区三区红| 欧美国产精品v| 欧美久久久一区| 国产在线精品一区在线观看麻豆| 中文字幕一区在线|