<rt id="bn8ez"></rt>
<label id="bn8ez"></label>

  • <span id="bn8ez"></span>

    <label id="bn8ez"><meter id="bn8ez"></meter></label>

    隨筆 - 119  文章 - 3173  trackbacks - 0
    <2007年6月>
    272829303112
    3456789
    10111213141516
    17181920212223
    24252627282930
    1234567

    交友莫獨酒,茅臺西鳳游。
    口干古井貢,心徜洋河流。
    稱多情杜康,趟無量雙溝。
    贊中華巍巍,無此不銷愁。

    常用鏈接

    留言簿(68)

    隨筆分類(136)

    隨筆檔案(122)

    最新隨筆

    搜索

    •  

    積分與排名

    • 積分 - 525276
    • 排名 - 93

    最新評論

    import ?java.io.IOException;
    import ?java.net.InetSocketAddress;
    import ?java.util.concurrent.ExecutorService;
    import ?java.util.concurrent.Executors;

    import ?javax.xml.ws.Endpoint;

    import ?com.sun.net.httpserver.HttpContext;
    import ?com.sun.net.httpserver.HttpServer;

    public ? class ?HttpServerTestService?{

    ????
    public ? static ? void ?main(String[]?args)?{
    ????????
    try ?{
    ????????????
    ????????????HttpServer?server?
    = ?HttpServer.create( new ?InetSocketAddress( 8888 ),? 0 );
    ????????????ExecutorService?threads??
    = ?Executors.newFixedThreadPool( 10 );
    ????????????server.setExecutor(threads);
    ????????????server.start();
    ????????????Endpoint?endpoint?
    = ?Endpoint.create( new ?Hello());//響應(yīng)類
    ????????????HttpContext?context?
    = ?server.createContext( " /hello " );//發(fā)布URL
    ????????????endpoint.publish(context);
    ????????}?
    catch ?(IOException?ioe)?{
    ????????????ioe.printStackTrace();
    ????????}
    ????}


    }

    import ?javax.jws.WebMethod;
    import ?javax.jws.WebService;
    import ?javax.jws.soap.SOAPBinding;

    @WebService(targetNamespace?
    = ? " http://jdk.study.hermit.org/client " )
    @SOAPBinding(style?
    = ?SOAPBinding.Style.RPC)
    public ? class ?Hello?{
    ????@WebMethod
    ????
    public ?String?sayHello(String?name)?{
    ????????
    return ? " hello: " ? + ?name;
    ????}
    }


    訪問:http://127.0.0.1:8888/hello?wsdl
    ??<?xml?version="1.0"?encoding="UTF-8"??>?
    -?
    <definitions?xmlns="http://schemas.xmlsoap.org/wsdl/"?xmlns:tns="http://jdk.study.hermit.org/client"?xmlns:xsd="http://www.w3.org/2001/XMLSchema"?xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"?targetNamespace="http://jdk.study.hermit.org/client"?name="HelloService">
    ??
    <types?/>?
    -?
    <message?name="sayHello">
    ??
    <part?name="arg0"?type="xsd:string"?/>?
    ??
    </message>
    -?
    <message?name="sayHelloResponse">
    ??
    <part?name="return"?type="xsd:string"?/>?
    ??
    </message>
    -?
    <portType?name="Hello">
    -?
    <operation?name="sayHello"?parameterOrder="arg0">
    ??
    <input?message="tns:sayHello"?/>?
    ??
    <output?message="tns:sayHelloResponse"?/>?
    ??
    </operation>
    ??
    </portType>
    -?
    <binding?name="HelloPortBinding"?type="tns:Hello">
    ??
    <soap:binding?style="rpc"?transport="http://schemas.xmlsoap.org/soap/http"?/>?
    -?
    <operation?name="sayHello">
    ??
    <soap:operation?soapAction=""?/>?
    -?
    <input>
    ??
    <soap:body?use="literal"?namespace="http://jdk.study.hermit.org/client"?/>?
    ??
    </input>
    -?
    <output>
    ??
    <soap:body?use="literal"?namespace="http://jdk.study.hermit.org/client"?/>?
    ??
    </output>
    ??
    </operation>
    ??
    </binding>
    -?
    <service?name="HelloService">
    -?
    <port?name="HelloPort"?binding="tns:HelloPortBinding">
    ??
    <soap:address?location="http://127.0.0.1:8888/hello"?/>?
    ??
    </port>
    ??
    </service>
    ??
    </definitions>
    posted on 2007-06-22 14:21 交口稱贊 閱讀(1677) 評論(1)  編輯  收藏 所屬分類: Java6

    FeedBack:
    # re: 學習Java6(十)HttpServer(3)與web service 2007-06-24 22:33 search-computer
    good....  回復(fù)  更多評論
      
    主站蜘蛛池模板: 国产男女猛烈无遮挡免费视频网站 | 黄a大片av永久免费| 老司机午夜免费视频| 亚洲精品夜夜夜妓女网| 亚州免费一级毛片| 羞羞漫画登录页面免费| 久久亚洲精品成人综合| 男女做羞羞的事视频免费观看无遮挡| MM1313亚洲精品无码久久| 亚洲精品字幕在线观看| 免费国产黄线在线观看| 中国在线观看免费的www| 亚洲精品第一国产综合精品| 国产免费直播在线观看视频| 免费福利电影在线观看| 亚洲av色香蕉一区二区三区| 日韩亚洲人成在线综合日本| 天堂在线免费观看中文版| 大地影院MV在线观看视频免费 | 黄色免费网址大全| 亚洲视频免费一区| 亚洲AV永久无码精品一区二区国产 | 久久精品国产亚洲AV久| 亚洲愉拍99热成人精品热久久| 国产美女在线精品免费观看| 中文字幕在线观看免费| 欧美激情综合亚洲一二区| 亚洲网址在线观看你懂的| 国产亚洲精品自在线观看| 卡一卡二卡三在线入口免费| 亚洲毛片免费视频| 国产又黄又爽又大的免费视频| 亚洲精品无码专区| 亚洲国产成人久久三区| 亚洲成色www久久网站夜月| 亚洲国产a级视频| 免费人成在线观看网站品爱网日本| 成人免费激情视频| 亚洲免费视频在线观看| 在线观看免费视频网站色| 国产精品成人亚洲|