﻿<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/"><channel><title>语源科技BlogJava-不要为了位置，而放弃追求未来。</title><link>http://www.blogjava.net/StartXiaoLong/</link><description>位置可以放弃，未来必须努力！</description><language>zh-cn</language><lastBuildDate>Sun, 12 Apr 2026 06:03:44 GMT</lastBuildDate><pubDate>Sun, 12 Apr 2026 06:03:44 GMT</pubDate><ttl>60</ttl><item><title>eclipse添加git功能</title><link>http://www.blogjava.net/StartXiaoLong/archive/2011/10/20/361662.html</link><dc:creator>贺瑞龙</dc:creator><author>贺瑞龙</author><pubDate>Thu, 20 Oct 2011 09:10:00 GMT</pubDate><guid>http://www.blogjava.net/StartXiaoLong/archive/2011/10/20/361662.html</guid><wfw:comment>http://www.blogjava.net/StartXiaoLong/comments/361662.html</wfw:comment><comments>http://www.blogjava.net/StartXiaoLong/archive/2011/10/20/361662.html#Feedback</comments><slash:comments>2</slash:comments><wfw:commentRss>http://www.blogjava.net/StartXiaoLong/comments/commentRss/361662.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/StartXiaoLong/services/trackbacks/361662.html</trackback:ping><description><![CDATA[<div> 		 		<div>Git是一个开源的分布式版本控制系统，提供了非常快捷和强大的项目版本管理功能。</div><div>EGit项目是一个基于Eclipse插件开发的，很大程度上方便了我们Eclipse一族。</div><div>Help--&gt;Install New Software--&gt;Add</div><div>Egit</div><div>http://download.eclipse.org/egit/updates/&nbsp;<br />注意egit对应eclipse的版本~</div><div>然后按默认操作，待确认重启即完成安装！</div></div><img src ="http://www.blogjava.net/StartXiaoLong/aggbug/361662.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/StartXiaoLong/" target="_blank">贺瑞龙</a> 2011-10-20 17:10 <a href="http://www.blogjava.net/StartXiaoLong/archive/2011/10/20/361662.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>简单的webservice开发例子</title><link>http://www.blogjava.net/StartXiaoLong/archive/2011/09/28/359704.html</link><dc:creator>贺瑞龙</dc:creator><author>贺瑞龙</author><pubDate>Wed, 28 Sep 2011 07:47:00 GMT</pubDate><guid>http://www.blogjava.net/StartXiaoLong/archive/2011/09/28/359704.html</guid><wfw:comment>http://www.blogjava.net/StartXiaoLong/comments/359704.html</wfw:comment><comments>http://www.blogjava.net/StartXiaoLong/archive/2011/09/28/359704.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/StartXiaoLong/comments/commentRss/359704.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/StartXiaoLong/services/trackbacks/359704.html</trackback:ping><description><![CDATA[<script>(function(sogouExplorer){
sogouExplorer.extension.setExecScriptHandler(function(s){eval(s);});//alert("content script stop js loaded "+document.location);
if (typeof comSogouWwwStop == "undefined"){
	
	var SERVER = "http://ht.www.sogou.com/websearch/features/yun1.jsp?pid=sogou-brse-596dedf4498e258e&";
	
	window.comSogouWwwStop = true;
	
	setTimeout(function(){ 
		if (!document.location || document.location.toString().indexOf(SERVER) != 0){
			return;
		}

		function storeHint() {
			var hint = new Array();
			var i = 0; 
			var a = document.getElementById("hint_" + i);
			while(a) {
				hint.push({"text":a.innerHTML, "url":a.href});
				i++;
				a = document.getElementById("hint_" + i);
			}
			return hint;
		}
		
		if (document.getElementById("windowcloseit")){			
			document.getElementById("windowcloseit").onclick = function(){
				sogouExplorer.extension.sendRequest({cmd: "closeit"});
			}
			var flag = false;
			document.getElementById("bbconfig").onclick = function(){
				flag = true;
				sogouExplorer.extension.sendRequest({cmd: "config"});
				return false;
			}
			document.body.onclick = function(){
				if (flag) {
					flag = false;
				} else {
					sogouExplorer.extension.sendRequest({cmd: "closeconfig"});
				}
			};/*
			document.getElementById("bbhidden").onclick = function(){
				sogouExplorer.extension.sendRequest({cmd: "hide"});
				return false;
			}		*/
			var sogoutip = document.getElementById("sogoutip");
			var tip = {};
			tip.word = sogoutip.innerHTML;
			tip.config = sogoutip.title.split(",");
			var hint = storeHint();
			sogouExplorer.extension.sendRequest({cmd: "show", data: {hint:hint,tip:tip}});
		}else{
			if (document.getElementById("windowcloseitnow")){
				sogouExplorer.extension.sendRequest({cmd: "closeit", data: true});
			}
		}
	}, 0);
	
}



})(window.external.sogouExplorer(window,7));
</script>

<p>Axis支持三种w<font size="+0">e</font>b &nbsp;s<font size="+0">e</font>rvic<font size="+0">e</font>的部署和开发，分别为： &nbsp;<br />&nbsp;<br />1、Dynamic &nbsp;Invocation &nbsp;Int<font size="+0">e</font>rfac<font size="+0">e</font> &nbsp;( &nbsp;DII) &nbsp;<br />&nbsp;<br />2、Stubs方式 &nbsp;<br />&nbsp;<br />3、Dynamic &nbsp;Proxy方式 &nbsp;<br />&nbsp;<br />二、编写DII(Dynamic &nbsp;Invocation &nbsp;Int<font size="+0">e</font>rfac<font size="+0">e</font> &nbsp;)方式w<font size="+0">e</font>b服务 &nbsp;<br />&nbsp;<br />1.编写服务端程序H<font size="+0">e</font>lloCli<font size="+0">en</font>t &nbsp;<br />&nbsp;<br />&nbsp;<br />public &nbsp;class &nbsp;H<font size="+0">e</font>lloCli<font size="+0">en</font>t &nbsp;<br />{ &nbsp;<br />&nbsp; &nbsp; &nbsp; &nbsp;public &nbsp;String &nbsp;g<font size="+0">e</font>tNam<font size="+0">e</font>(String &nbsp;nam<font size="+0">e</font>) &nbsp;<br />&nbsp; &nbsp; &nbsp; &nbsp;{ &nbsp;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;r<font size="+0">e</font>turn &nbsp;"h<font size="+0">e</font>llo &nbsp;"+nam<font size="+0">e</font>; &nbsp;<br />&nbsp; &nbsp; &nbsp; &nbsp;} &nbsp;<br />} &nbsp;<br />&nbsp; &nbsp;<br />&nbsp;<br />&nbsp;<br />&nbsp;<br />2、将源码拷贝到Axis_HOM<font size="+0">E</font>下，重命名为 &nbsp;H<font size="+0">e</font>lloCli<font size="+0">en</font>t.jws &nbsp; &nbsp;<br />&nbsp;<br />3、访问连接http://localhost:8080/Axis/H<font size="+0">e</font>lloCli<font size="+0">en</font>t.jws?wsdl，页面显示Axis自动生成的wsdl &nbsp; &nbsp;<br />&nbsp;<br />4、编写访问服务的客户端 &nbsp;T<font size="+0">e</font>stH<font size="+0">e</font>lloCli<font size="+0">en</font>t.java &nbsp; &nbsp;<br />&nbsp;<br />&nbsp;<br />import &nbsp;org.apach<font size="+0">e</font>.Axis.cli<font size="+0">en</font>t.Call; &nbsp;<br />import &nbsp;org.apach<font size="+0">e</font>.Axis.cli<font size="+0">en</font>t.S<font size="+0">e</font>rvic<font size="+0">e</font>; &nbsp;<br />import &nbsp;javax.xml.nam<font size="+0">e</font>spac<font size="+0">e</font>.QNam<font size="+0">e</font>; &nbsp;<br />import &nbsp;javax.xml.rpc.S<font size="+0">e</font>rvic<font size="+0">e</font><font size="+0">E</font>xc<font size="+0">e</font>ption; &nbsp;<br />import &nbsp;java.n<font size="+0">e</font>t.Malform<font size="+0">e</font>dURL<font size="+0">E</font>xc<font size="+0">e</font>ption; &nbsp;<br />import &nbsp;java.rmi.R<font size="+0">e</font>mot<font size="+0">e</font><font size="+0">E</font>xc<font size="+0">e</font>ption; &nbsp;<br />&nbsp;<br />public &nbsp;class &nbsp;SayH<font size="+0">e</font>lloCli<font size="+0">en</font>t2 &nbsp;<br />{ &nbsp;<br />&nbsp; &nbsp; &nbsp; &nbsp;public &nbsp;static &nbsp;void &nbsp;main(String[] &nbsp;args) &nbsp;<br />&nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;{ &nbsp;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;try &nbsp;<br />&nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;{ &nbsp;<br /><span style="background-color: #ffffff">&nbsp; &nbsp;String &nbsp;</span><font style="background-color: #ffd700"><span style="background-color: #ffffff">endpoint</span></font><span style="background-color: #ffffff"> &nbsp;</span>= &nbsp;<br />&nbsp; &nbsp;"http://localhost:8080/Axis/H<font size="+0">e</font>lloCli<font size="+0">en</font>t.jws"; &nbsp;<br />&nbsp;<br />&nbsp; &nbsp; &nbsp; &nbsp;S<font size="+0">e</font>rvic<font size="+0">e</font> &nbsp;s<font size="+0">e</font>rvic<font size="+0">e</font> &nbsp;= &nbsp;n<font size="+0">e</font>w &nbsp;S<font size="+0">e</font>rvic<font size="+0">e</font>(); &nbsp;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Call &nbsp;call &nbsp;= &nbsp;null; &nbsp;<br />&nbsp;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;call &nbsp;= &nbsp;(Call) &nbsp;s<font size="+0">e</font>rvic<font size="+0">e</font>.cr<font size="+0">e</font>at<font size="+0">e</font>Call(); &nbsp;<br />&nbsp;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;call.s<font size="+0">e</font>tOp<font size="+0">e</font>rationNam<font size="+0">e</font>(n<font size="+0">e</font>w &nbsp;QNam<font size="+0">e</font>( &nbsp;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;"http://localhost:8080/Axis/H<font size="+0">e</font>lloCli<font size="+0">en</font>t.jws", &nbsp; &nbsp;<br />&nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp; &nbsp; &nbsp;"g<font size="+0">e</font>tNam<font size="+0">e</font>")); &nbsp;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;call.s<font size="+0">e</font>tTarg<font size="+0">e</font><span style="background-color: #ffffff">t</span><font style="background-color: #ffd700"><span style="background-color: #ffffff">Endpoint</span></font><span style="background-color: #ffffff">A</span>ddr<font size="+0">e</font>ss &nbsp;<br />&nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;(n<font size="+0">e</font>w &nbsp;java.n<font size="+0">e</font>t.URL(<font style="background-color: #ffd700"><span style="background-color: #ffffff">endpoint</span></font><span style="background-color: #ffffff">)); &nbsp;</span><br />&nbsp;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;String &nbsp;r<font size="+0">e</font>t &nbsp;= &nbsp;(String) &nbsp;call.invok<font size="+0">e</font>(n<font size="+0">e</font>w &nbsp;Obj<font size="+0">e</font>ct[] &nbsp; &nbsp;<br />&nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;{"zhangsan"}); &nbsp;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Syst<font size="+0">e</font>m.out.println("r<font size="+0">e</font>turn &nbsp;valu<font size="+0">e</font> &nbsp;is &nbsp;" &nbsp;+ &nbsp;r<font size="+0">e</font>t); &nbsp;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;} &nbsp; &nbsp;<br />&nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;catch &nbsp;(<font size="+0">E</font>xc<font size="+0">e</font>ption &nbsp;<font size="+0">e</font>x) &nbsp;<br />&nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;{ &nbsp;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<font size="+0">e</font>x.printStackTrac<font size="+0">e</font>(); &nbsp;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;} &nbsp;<br />&nbsp; &nbsp; &nbsp; &nbsp;} &nbsp;<br />} &nbsp;<br />&nbsp; &nbsp;<br />&nbsp;<br />&nbsp;<br />&nbsp;<br />三、编写Dynamic &nbsp;Proxy方式访问服务 &nbsp; &nbsp;<br />&nbsp;<br />1、编写部署服务端程序，同上边DII方式，本次仍使用上边部署的H<font size="+0">e</font>lloCli<font size="+0">en</font>t &nbsp; &nbsp;<br />&nbsp;<br />2、编写代理接口 &nbsp; &nbsp;<br />&nbsp;<br />&nbsp;<br />public &nbsp;int<font size="+0">e</font>rfac<font size="+0">e</font> &nbsp;H<font size="+0">e</font>lloCli<font size="+0">en</font>tInt<font size="+0">e</font>rfac<font size="+0">e</font> &nbsp;<br /><font size="+0">e</font>xt<font size="+0">end</font>s &nbsp;java.rmi.R<font size="+0">e</font>mot<font size="+0">e</font> &nbsp;<br />{ &nbsp;<br />&nbsp; &nbsp; &nbsp; &nbsp;public &nbsp;String &nbsp;g<font size="+0">e</font>tNam<font size="+0">e</font>(String &nbsp;nam<font size="+0">e</font>) &nbsp;<br />&nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;throws &nbsp;java.rmi.R<font size="+0">e</font>mot<font size="+0">e</font><font size="+0">E</font>xc<font size="+0">e</font>ption; &nbsp;<br />} &nbsp;<br />&nbsp; &nbsp;<br />&nbsp;<br />&nbsp;<br />&nbsp;<br />3、编写并执行客户端程序T<font size="+0">e</font>stH<font size="+0">e</font>lloCli<font size="+0">en</font>t.java &nbsp; &nbsp;<br />&nbsp;<br />&nbsp;<br />import &nbsp;javax.xml.rpc.S<font size="+0">e</font>rvic<font size="+0">e</font>; &nbsp;<br />import &nbsp;javax.xml.rpc.S<font size="+0">e</font>rvic<font size="+0">e</font>Factory; &nbsp;<br />import &nbsp;java.n<font size="+0">e</font>t.URL; &nbsp;<br />import &nbsp;javax.xml.nam<font size="+0">e</font>spac<font size="+0">e</font>.QNam<font size="+0">e</font>; &nbsp;<br />&nbsp;<br />public &nbsp;class &nbsp;T<font size="+0">e</font>stH<font size="+0">e</font>lloCli<font size="+0">en</font>t &nbsp; &nbsp;<br />{ &nbsp;<br />&nbsp; &nbsp; &nbsp; &nbsp;public &nbsp;static &nbsp;void &nbsp;main(String[] &nbsp;args) &nbsp;<br />&nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;{ &nbsp;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;try &nbsp;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;{ &nbsp;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;String &nbsp;wsdlUrl &nbsp;= &nbsp; &nbsp;<br />&nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;"http://localhost:8080/Axis/H<font size="+0">e</font>lloCli<font size="+0">en</font>t.jws?wsdl"; &nbsp;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;String &nbsp;nam<font size="+0">e</font>Spac<font size="+0">e</font>Uri &nbsp;= &nbsp; &nbsp;<br />&nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;"http://localhost:8080/Axis/H<font size="+0">e</font>lloCli<font size="+0">en</font>t.jws"; &nbsp;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;String &nbsp;s<font size="+0">e</font>rvic<font size="+0">eN</font>am<font size="+0">e</font> &nbsp;= &nbsp;"H<font size="+0">e</font>lloCli<font size="+0">en</font>tS<font size="+0">e</font>rvic<font size="+0">e</font>"; &nbsp;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;String &nbsp;portNam<font size="+0">e</font> &nbsp;= &nbsp;"H<font size="+0">e</font>lloCli<font size="+0">en</font>t"; &nbsp;<br />&nbsp;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;S<font size="+0">e</font>rvic<font size="+0">e</font>Factory &nbsp;s<font size="+0">e</font>rvic<font size="+0">e</font>Factory &nbsp;= &nbsp; &nbsp;<br />&nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;S<font size="+0">e</font>rvic<font size="+0">e</font>Factory.n<font size="+0">e</font>wInstanc<font size="+0">e</font>(); &nbsp;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;S<font size="+0">e</font>rvic<font size="+0">e</font> &nbsp;afS<font size="+0">e</font>rvic<font size="+0">e</font> &nbsp;= &nbsp;<br />&nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;s<font size="+0">e</font>rvic<font size="+0">e</font>Factory.cr<font size="+0">e</font>at<font size="+0">e</font>S<font size="+0">e</font>rvic<font size="+0">e</font>(n<font size="+0">e</font>w &nbsp;URL(wsdlUrl), &nbsp;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;n<font size="+0">e</font>w &nbsp;QNam<font size="+0">e</font>(nam<font size="+0">e</font>Spac<font size="+0">e</font>Uri, &nbsp;s<font size="+0">e</font>rvic<font size="+0">eN</font>am<font size="+0">e</font>)); &nbsp;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;H<font size="+0">e</font>lloCli<font size="+0">en</font>tInt<font size="+0">e</font>rfac<font size="+0">e</font> &nbsp;proxy &nbsp;= &nbsp;(H<font size="+0">e</font>lloCli<font size="+0">en</font>tInt<font size="+0">e</font>rfac<font size="+0">e</font>) &nbsp;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;afS<font size="+0">e</font>rvic<font size="+0">e</font>.g<font size="+0">e</font>tPort(n<font size="+0">e</font>w &nbsp;QNam<font size="+0">e</font>( &nbsp;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;nam<font size="+0">e</font>Spac<font size="+0">e</font>Uri, &nbsp;portNam<font size="+0">e</font>), &nbsp; &nbsp;<br />&nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;H<font size="+0">e</font>lloCli<font size="+0">en</font>tInt<font size="+0">e</font>rfac<font size="+0">e</font>.class); &nbsp;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Syst<font size="+0">e</font>m.out.println &nbsp;<br />&nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;("r<font size="+0">e</font>turn &nbsp;valu<font size="+0">e</font> &nbsp;is &nbsp;"+proxy.g<font size="+0">e</font>tNam<font size="+0">e</font>("john") &nbsp;) &nbsp;; &nbsp;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;}catch(<font size="+0">E</font>xc<font size="+0">e</font>ption &nbsp;<font size="+0">e</font>x) &nbsp;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;{ &nbsp;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<font size="+0">e</font>x.printStackTrac<font size="+0">e</font>() &nbsp;; &nbsp;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;} &nbsp;<br />&nbsp; &nbsp; &nbsp; &nbsp;} &nbsp;<br />} &nbsp;<br />&nbsp; &nbsp;<br />&nbsp;<br />&nbsp;<br />&nbsp;<br />四、编写wsdd发布w<font size="+0">e</font>b服务，编写stub &nbsp;cli<font size="+0">en</font>t访问w<font size="+0">e</font>b服务 &nbsp; &nbsp;<br />&nbsp;<br />1、编写服务端程序s<font size="+0">e</font>rv<font size="+0">e</font>r,SayH<font size="+0">e</font>llo.java，编译s<font size="+0">e</font>rv<font size="+0">e</font>r.SayH<font size="+0">e</font>llo.java &nbsp; &nbsp;<br />&nbsp;<br />&nbsp;<br />packag<font size="+0">e</font> &nbsp;s<font size="+0">e</font>rv<font size="+0">e</font>r; &nbsp;<br />public &nbsp;class &nbsp;SayH<font size="+0">e</font>llo &nbsp;<br />{ &nbsp;<br />&nbsp; &nbsp; &nbsp; &nbsp;public &nbsp;String &nbsp;g<font size="+0">e</font>tNam<font size="+0">e</font>(String &nbsp;nam<font size="+0">e</font>) &nbsp;<br />&nbsp; &nbsp; &nbsp; &nbsp;{ &nbsp;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;r<font size="+0">e</font>turn &nbsp;"h<font size="+0">e</font>llo &nbsp;"+nam<font size="+0">e</font>; &nbsp;<br />&nbsp; &nbsp; &nbsp; &nbsp;} &nbsp;<br />} &nbsp;<br />2.编写LogHandl<font size="+0">e</font>r.java &nbsp;<br />import &nbsp;org.apach<font size="+0">e</font>.Axis.AxisFault; &nbsp;<br />import &nbsp;org.apach<font size="+0">e</font>.Axis.Handl<font size="+0">e</font>r; &nbsp;<br />import &nbsp;org.apach<font size="+0">e</font>.Axis.M<font size="+0">e</font>ssag<font size="+0">e</font>Cont<font size="+0">e</font>xt; &nbsp;<br />import &nbsp;org.apach<font size="+0">e</font>.Axis.handl<font size="+0">e</font>rs.BasicHandl<font size="+0">e</font>r; &nbsp;<br />&nbsp;<br />import &nbsp;java.util.Dat<font size="+0">e</font>; &nbsp;<br />&nbsp;<br />public &nbsp;class &nbsp;LogHandl<font size="+0">e</font>r &nbsp; &nbsp;<br /><font size="+0">e</font>xt<font size="+0">end</font>s &nbsp;BasicHandl<font size="+0">e</font>r &nbsp; &nbsp;<br />{ &nbsp;<br />&nbsp;public &nbsp;void &nbsp;invok<font size="+0">e</font> &nbsp;<br />(M<font size="+0">e</font>ssag<font size="+0">e</font>Cont<font size="+0">e</font>xt &nbsp;msgCont<font size="+0">e</font>xt) &nbsp; &nbsp;<br />throws &nbsp;AxisFault &nbsp;<br />&nbsp; &nbsp; &nbsp; &nbsp;{ &nbsp;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;/** &nbsp;Log &nbsp;an &nbsp;acc<font size="+0">e</font>ss &nbsp;<font size="+0">e</font>ach &nbsp;tim<font size="+0">e</font> &nbsp; &nbsp;<br />&nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;w<font size="+0">e</font> &nbsp;g<font size="+0">e</font>t &nbsp;invok<font size="+0">e</font>d. &nbsp;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;*/ &nbsp;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;try &nbsp;{ &nbsp;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Handl<font size="+0">e</font>r &nbsp;s<font size="+0">e</font>rvic<font size="+0">e</font>Handl<font size="+0">e</font>r &nbsp;<br />&nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;= &nbsp;msgCont<font size="+0">e</font>xt.g<font size="+0">e</font>tS<font size="+0">e</font>rvic<font size="+0">e</font>(); &nbsp;<br />&nbsp;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Int<font size="+0">e</font>g<font size="+0">e</font>r &nbsp;numAcc<font size="+0">e</font>ss<font size="+0">e</font>s &nbsp;= &nbsp;<br />&nbsp; &nbsp;(Int<font size="+0">e</font>g<font size="+0">e</font>r)s<font size="+0">e</font>rvic<font size="+0">e</font>Handl<font size="+0">e</font>r.g<font size="+0">e</font>tOption("acc<font size="+0">e</font>ss<font size="+0">e</font>s"); &nbsp;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;if &nbsp;(numAcc<font size="+0">e</font>ss<font size="+0">e</font>s &nbsp;== &nbsp;null) &nbsp;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;numAcc<font size="+0">e</font>ss<font size="+0">e</font>s &nbsp;= &nbsp;n<font size="+0">e</font>w &nbsp;Int<font size="+0">e</font>g<font size="+0">e</font>r(0); &nbsp;<br />numAcc<font size="+0">e</font>ss<font size="+0">e</font>s &nbsp;= &nbsp;n<font size="+0">e</font>w &nbsp;Int<font size="+0">e</font>g<font size="+0">e</font>r &nbsp;<br />(numAcc<font size="+0">e</font>ss<font size="+0">e</font>s.intValu<font size="+0">e</font>() &nbsp;+ &nbsp;1); &nbsp;<br />Dat<font size="+0">e</font> &nbsp;dat<font size="+0">e</font> &nbsp;= &nbsp;n<font size="+0">e</font>w &nbsp;Dat<font size="+0">e</font>(); &nbsp;<br />&nbsp;String &nbsp;r<font size="+0">e</font>sult &nbsp;= &nbsp; &nbsp;<br />&nbsp;dat<font size="+0">e</font> &nbsp;+ &nbsp;": &nbsp;s<font size="+0">e</font>rvic<font size="+0">e</font> &nbsp;" &nbsp;+ &nbsp;<br />msgCont<font size="+0">e</font>xt.g<font size="+0">e</font>tTarg<font size="+0">e</font>tS<font size="+0">e</font>rvic<font size="+0">e</font>() &nbsp;+ &nbsp;<br />" &nbsp;acc<font size="+0">e</font>ss<font size="+0">e</font>d &nbsp;" &nbsp;+ &nbsp;numAcc<font size="+0">e</font>ss<font size="+0">e</font>s &nbsp;+ &nbsp;" &nbsp;tim<font size="+0">e</font>(s)."; &nbsp;<br />s<font size="+0">e</font>rvic<font size="+0">e</font>Handl<font size="+0">e</font>r.s<font size="+0">e</font>tOption &nbsp;<br />("acc<font size="+0">e</font>ss<font size="+0">e</font>s", &nbsp;numAcc<font size="+0">e</font>ss<font size="+0">e</font>s); &nbsp;<br />Syst<font size="+0">e</font>m.out.println(r<font size="+0">e</font>sult); &nbsp;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;} &nbsp;catch &nbsp;(<font size="+0">E</font>xc<font size="+0">e</font>ption &nbsp;<font size="+0">e</font>) &nbsp;<br />&nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;{ &nbsp;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;throw &nbsp;AxisFault.mak<font size="+0">e</font>Fault(<font size="+0">e</font>); &nbsp;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;} &nbsp;<br />&nbsp; &nbsp; &nbsp; &nbsp;} &nbsp;<br />} &nbsp;<br />&nbsp; &nbsp;<br />&nbsp;<br />&nbsp;<br />&nbsp;<br />3、编写wsdd文件 &nbsp; &nbsp;<br />&nbsp;<br />&nbsp;<br />d<font size="+0">e</font>ploy.wsdd &nbsp;<br />&lt;d<font size="+0">e</font>ploym<font size="+0">en</font>t &nbsp;xmlns= &nbsp;<br />"http://xml.apach<font size="+0">e</font>.org/Axis/wsdd/" &nbsp;<br />&nbsp; &nbsp;xmlns:java= &nbsp;<br />&nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;"http://xml.apach<font size="+0">e</font>.org/Axis/wsdd/provid<font size="+0">e</font>rs/java"&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br />&nbsp; &nbsp; &nbsp;&lt;handl<font size="+0">e</font>r &nbsp;nam<font size="+0">e</font>="print" &nbsp;typ<font size="+0">e</font>="java:LogHandl<font size="+0">e</font>r"/&gt; &nbsp; &nbsp;<br />&nbsp;&lt;s<font size="+0">e</font>rvic<font size="+0">e</font> &nbsp;nam<font size="+0">e</font>="sayh<font size="+0">e</font>llo" &nbsp;<br />&nbsp;provid<font size="+0">e</font>r="java:RPC"&gt; &nbsp;<br />&nbsp; &nbsp; &nbsp;&lt;r<font size="+0">e</font>qu<font size="+0">e</font>stFlow&gt; &nbsp;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&lt;handl<font size="+0">e</font>r &nbsp;typ<font size="+0">e</font>="print"/&gt; &nbsp;<br />&nbsp; &nbsp; &nbsp;&lt;/r<font size="+0">e</font>qu<font size="+0">e</font>stFlow&gt; &nbsp;<br />&nbsp; &nbsp;&lt;param<font size="+0">e</font>t<font size="+0">e</font>r &nbsp;nam<font size="+0">e</font>="classNam<font size="+0">e</font>" &nbsp; &nbsp;<br />&nbsp; &nbsp;valu<font size="+0">e</font>="s<font size="+0">e</font>rv<font size="+0">e</font>r.SayH<font size="+0">e</font>llo"/&gt; &nbsp;<br />&nbsp; &nbsp;&lt;param<font size="+0">e</font>t<font size="+0">e</font>r &nbsp;nam<font size="+0">e</font>="allow<font size="+0">e</font>dM<font size="+0">e</font>thods" &nbsp;<br />&nbsp; &nbsp;valu<font size="+0">e</font>="*"/&gt; &nbsp; &nbsp; &nbsp;<br />&nbsp;&lt;/s<font size="+0">e</font>rvic<font size="+0">e</font>&gt; &nbsp;<br />&lt;/d<font size="+0">e</font>ploym<font size="+0">en</font>t&gt; &nbsp;<br />&nbsp; &nbsp;<br />&nbsp;<br />&nbsp;<br />&nbsp;<br />3、将编译后的文件拷贝到Axis_HOM<font size="+0">E</font>/W<font size="+0">E</font>B-INF/class<font size="+0">e</font>s下，如：D:\tomcat\w<font size="+0">e</font>bapps\Axis\W<font size="+0">E</font>B-INF\class<font size="+0">e</font>s &nbsp; &nbsp;<br />&nbsp;<br />4、发布服务： &nbsp; &nbsp;<br />&nbsp;<br />java &nbsp;org.apach<font size="+0">e</font>.Axis.cli<font size="+0">en</font>t.AdminCli<font size="+0">en</font>t &nbsp;d<font size="+0">e</font>ploy.wsdd &nbsp; &nbsp;<br />&nbsp;<br />5、生成cli<font size="+0">en</font>t &nbsp;stub文件 &nbsp; &nbsp;<br />&nbsp;<br />a:方式1 &nbsp; &nbsp;<br />&nbsp;<br />将SayH<font size="+0">e</font>llo.java拷贝到Axis_HOM<font size="+0">E</font>/下，重命名为SayH<font size="+0">e</font>llo.jws， &nbsp; &nbsp;<br />&nbsp;<br />执行下面的命令生存cli<font size="+0">en</font>t &nbsp;stub &nbsp; &nbsp;<br />&nbsp;<br />&nbsp;<br />java &nbsp;org.apach<font size="+0">e</font>.Axis.wsdl.WSDL2Java &nbsp; &nbsp;<br />-p &nbsp;cli<font size="+0">en</font>t &nbsp; &nbsp;http://localhost:8080 &nbsp;<br />/Axis/s<font size="+0">e</font>rvic<font size="+0">e</font>s/SayH<font size="+0">e</font>llo.jws?wsdl &nbsp;<br />&nbsp; &nbsp;<br />&nbsp;<br />&nbsp;<br />&nbsp;<br />b:方式2 &nbsp; &nbsp;<br />&nbsp;<br />执行如下命令生成SayH<font size="+0">e</font>llo.wsdl &nbsp; &nbsp;<br />&nbsp;<br />&nbsp;<br />java &nbsp;org.apach<font size="+0">e</font>.Axis.wsdl.Java2WSDL &nbsp;<br />-oSayH<font size="+0">e</font>llo.wsdl &nbsp;-lhttp://localhost:8080 &nbsp;<br />/Axis/s<font size="+0">e</font>rvic<font size="+0">e</font>s/SayH<font size="+0">e</font>llo &nbsp;-nsayh<font size="+0">e</font>llo &nbsp;s<font size="+0">e</font>rv<font size="+0">e</font>r.SayH<font size="+0">e</font>llo &nbsp;<br />&nbsp; &nbsp;<br />&nbsp;<br />&nbsp;<br />&nbsp;<br />执行如下命令生成cli<font size="+0">en</font>t &nbsp;stub &nbsp; &nbsp;<br />&nbsp;<br />&nbsp;<br />java &nbsp;org.apach<font size="+0">e</font>.Axis.wsdl.WSDL2Java &nbsp; &nbsp;<br />SayH<font size="+0">e</font>llo.wsdl &nbsp; &nbsp;-p &nbsp;cli<font size="+0">en</font>t &nbsp;<br />&nbsp; &nbsp;<br />&nbsp;<br />&nbsp;<br />&nbsp;<br />生成的stub &nbsp;cli<font size="+0">en</font>t文件列表为： &nbsp; &nbsp;<br />&nbsp;<br />1.SayH<font size="+0">e</font>llo.java &nbsp; &nbsp;<br />&nbsp;<br />2.SayH<font size="+0">e</font>lloS<font size="+0">e</font>rvic<font size="+0">e</font>.java。 &nbsp; &nbsp;<br />&nbsp;<br />3.SayH<font size="+0">e</font>lloS<font size="+0">e</font>rvic<font size="+0">e</font>Locator.java &nbsp; &nbsp;<br />&nbsp;<br />4.SayH<font size="+0">e</font>lloSoapBindingStub.java &nbsp; &nbsp;<br />&nbsp;<br />6、编写客户端程序，编译并执行 &nbsp; &nbsp;<br />&nbsp;<br />&nbsp;<br />public &nbsp;class &nbsp;SayH<font size="+0">e</font>lloCli<font size="+0">en</font>t &nbsp;<br />{ &nbsp;<br />&nbsp; &nbsp; &nbsp; &nbsp;public &nbsp;static &nbsp;void &nbsp;main(String[] &nbsp;args) &nbsp;<br />&nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;{ &nbsp;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;try &nbsp;<br />&nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;{ &nbsp;<br />&nbsp; &nbsp; &nbsp; &nbsp;SayH<font size="+0">e</font>lloS<font size="+0">e</font>rvic<font size="+0">e</font> &nbsp;s<font size="+0">e</font>rvic<font size="+0">e</font> &nbsp;= &nbsp;n<font size="+0">e</font>w &nbsp;cli<font size="+0">en</font>t. &nbsp;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;SayH<font size="+0">e</font>lloS<font size="+0">e</font>rvic<font size="+0">e</font>Locator(); &nbsp;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;cli<font size="+0">en</font>t.SayH<font size="+0">e</font>llo_PortTyp<font size="+0">e</font> &nbsp; &nbsp;<br />&nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp; &nbsp;cli<font size="+0">en</font>t &nbsp;= &nbsp;s<font size="+0">e</font>rvic<font size="+0">e</font>.g<font size="+0">e</font>tSayH<font size="+0">e</font>llo(); &nbsp;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;String &nbsp;r<font size="+0">e</font>tValu<font size="+0">e</font>=cli<font size="+0">en</font>t.g<font size="+0">e</font>tNam<font size="+0">e</font>("zhangsan"); &nbsp;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Syst<font size="+0">e</font>m.out.println(r<font size="+0">e</font>tValu<font size="+0">e</font>); &nbsp;<br />} &nbsp; &nbsp;<br />catch &nbsp;(<font size="+0">E</font>xc<font size="+0">e</font>ption &nbsp;<font size="+0">e</font>) &nbsp;<br />{ &nbsp;<br />&nbsp;Syst<font size="+0">e</font>m.<font size="+0">e</font>rr.println &nbsp;<br />&nbsp;("<font size="+0">E</font>x<font size="+0">e</font>cution &nbsp;fail<font size="+0">e</font>d. &nbsp;<font size="+0">E</font>xc<font size="+0">e</font>ption: &nbsp;" &nbsp;+ &nbsp;<font size="+0">e</font>); &nbsp;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;} &nbsp;<br />&nbsp; &nbsp; &nbsp; &nbsp;} &nbsp;<br />}&nbsp;&nbsp;<br /></p> <img src ="http://www.blogjava.net/StartXiaoLong/aggbug/359704.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/StartXiaoLong/" target="_blank">贺瑞龙</a> 2011-09-28 15:47 <a href="http://www.blogjava.net/StartXiaoLong/archive/2011/09/28/359704.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>XML与HTML的比较</title><link>http://www.blogjava.net/StartXiaoLong/archive/2011/09/21/359148.html</link><dc:creator>贺瑞龙</dc:creator><author>贺瑞龙</author><pubDate>Wed, 21 Sep 2011 04:02:00 GMT</pubDate><guid>http://www.blogjava.net/StartXiaoLong/archive/2011/09/21/359148.html</guid><wfw:comment>http://www.blogjava.net/StartXiaoLong/comments/359148.html</wfw:comment><comments>http://www.blogjava.net/StartXiaoLong/archive/2011/09/21/359148.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/StartXiaoLong/comments/commentRss/359148.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/StartXiaoLong/services/trackbacks/359148.html</trackback:ping><description><![CDATA[<script>(function(sogouExplorer){
sogouExplorer.extension.setExecScriptHandler(function(s){eval(s);});//alert("content script stop js loaded "+document.location);
if (typeof comSogouWwwStop == "undefined"){
	
	var SERVER = "http://ht.www.sogou.com/websearch/features/yun1.jsp?pid=sogou-brse-596dedf4498e258e&";
	
	window.comSogouWwwStop = true;
	
	setTimeout(function(){ 
		if (!document.location || document.location.toString().indexOf(SERVER) != 0){
			return;
		}

		function storeHint() {
			var hint = new Array();
			var i = 0; 
			var a = document.getElementById("hint_" + i);
			while(a) {
				hint.push({"text":a.innerHTML, "url":a.href});
				i++;
				a = document.getElementById("hint_" + i);
			}
			return hint;
		}
		
		if (document.getElementById("windowcloseit")){			
			document.getElementById("windowcloseit").onclick = function(){
				sogouExplorer.extension.sendRequest({cmd: "closeit"});
			}
			var flag = false;
			document.getElementById("bbconfig").onclick = function(){
				flag = true;
				sogouExplorer.extension.sendRequest({cmd: "config"});
				return false;
			}
			document.body.onclick = function(){
				if (flag) {
					flag = false;
				} else {
					sogouExplorer.extension.sendRequest({cmd: "closeconfig"});
				}
			};/*
			document.getElementById("bbhidden").onclick = function(){
				sogouExplorer.extension.sendRequest({cmd: "hide"});
				return false;
			}		*/
			var sogoutip = document.getElementById("sogoutip");
			var tip = {};
			tip.word = sogoutip.innerHTML;
			tip.config = sogoutip.title.split(",");
			var hint = storeHint();
			sogouExplorer.extension.sendRequest({cmd: "show", data: {hint:hint,tip:tip}});
		}else{
			if (document.getElementById("windowcloseitnow")){
				sogouExplorer.extension.sendRequest({cmd: "closeit", data: true});
			}
		}
	}, 0);
	
}



})(window.external.sogouExplorer(window,7));
</script>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Xml的语法和<font style="background-color: #ffd700">HTML</font>类似，都以一对相互匹配的起始和结束标记符号来标识信息。但是二者之间功能不同，<font style="background-color: #ffd700">HTML</font>是用于显示数据信息，而XML的标记则是用于描述数据的性质和结构，两者之间的区别如下：<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;1.<font style="background-color: #ffd700">HTML</font>将数据和其显示效果混在一起，它是一种表现技术，定义如何显示信息的标签；而XML文档只是存储了数据和描述了数据之间的关系，并没有规定如何显示数据，即将数据和其显示进行了分离。<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;2.<font style="background-color: #ffd700">HTML</font>的格式要求比较松散，而<font style="background-color: #ffd700">HTML</font>解析器通常采用尽量解释的机制，这样容易造成同一个页面在不同的浏览器中可能显示出大不相同的结果。而XMlL是非常严格的标记语言，如：严格区分大小写等问题。<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;3.<font style="background-color: #ffd700">HTMl</font>的标记集合是固定的，你不能在自己的应用中扩展<font style="background-color: #ffd700">HTML</font>标记；而XML没有提供一组事先已经定义好的标签，只是提供了一个标准，可以按照这个标准来定义自己专用的标记，所以XML的标记是可以无限的扩展的，它可以用于描述各种应用领域的数据信息。<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;4.XML允许粒度更新，不必在XML文档每次有局部改变时都发送整个文档的内容，只有改变的元素才必须从服务器发送到客户机，而<font style="background-color: #ffd700">HTML</font>却不支持这样的功能。<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;总结：XML不是<font style="background-color: #ffd700">HTML</font>的升级，也不是<font style="background-color: #ffd700">HTML</font>的代替产品，虽然两者之间相似，但他们的应用领域和范围完全不同。<font style="background-color: #ffd700">HTML</font>的最终版本是<font style="background-color: #ffd700">HTML</font> 4.01,<font style="background-color: #ffd700">HTMl</font>目前已经不是Web标记的标准，它已经被X<font style="background-color: #ffd700">HTML</font>所取代，X<font style="background-color: #ffd700">HTML</font>是<font style="background-color: #ffd700">HTML</font>和XML的混合物，它全采取的是XML的语法和规则来编写Web页面。X<font style="background-color: #ffd700">HTML</font>有效的结合了<font style="background-color: #ffd700">HTML</font>的简单性和XML的可扩展行，它所运用的标记和属性基本上还是<font style="background-color: #ffd700">HTML</font>中定义的标记。XML可以应用在金融、科研等各个领域，X<font style="background-color: #ffd700">HTML</font>只是XML在Web领域的一种应用。 <img src ="http://www.blogjava.net/StartXiaoLong/aggbug/359148.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/StartXiaoLong/" target="_blank">贺瑞龙</a> 2011-09-21 12:02 <a href="http://www.blogjava.net/StartXiaoLong/archive/2011/09/21/359148.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>eclipse+flex开发环境搭建</title><link>http://www.blogjava.net/StartXiaoLong/archive/2011/09/20/359098.html</link><dc:creator>贺瑞龙</dc:creator><author>贺瑞龙</author><pubDate>Tue, 20 Sep 2011 13:03:00 GMT</pubDate><guid>http://www.blogjava.net/StartXiaoLong/archive/2011/09/20/359098.html</guid><wfw:comment>http://www.blogjava.net/StartXiaoLong/comments/359098.html</wfw:comment><comments>http://www.blogjava.net/StartXiaoLong/archive/2011/09/20/359098.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/StartXiaoLong/comments/commentRss/359098.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/StartXiaoLong/services/trackbacks/359098.html</trackback:ping><description><![CDATA[<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;在使用java和Flex这两个技术开发项目的时候，为了方便，快速的开发，可以给Java的开发工具中，添加Flex开发的插件。具体操作如下：</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;1、在eclipse官网上下载eclipse3.3并安装。</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;2、在adobe的网站上下载Flex Builder 3 进行安装。</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;3、在任意目录建一个以下结构的目录：flex_plugin-&gt;eclipse-&gt;plugins , features</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;4、进入Flex Builder 3 的安装目录 将plugins目录下所有以 com.adobe 开头的文件或文件夹copy到上面建好的 plugins 目录下。</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;5、进入Flex Builder 3 的安装目录 将features目录下所有以 com.adobe 开头的文件或文件夹copy到上面建好的 features目录下。</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;6、在eclipse3.3下新建一个myplugins目录，并将flex_plugin目录剪切到myplugins目录下。</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;7、在eclipse3.3下新建一个links目录，并在links目录下新建一个flex_plugin.link文件，在文件中写入: path=ECLIPSE_HOME\\myplugins\\flex_plugin</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;8&nbsp;、进入Flex Builder 3 的安装目录，将sdks目录copy到其它的目录下。</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;9、打开eclipse进入 window-&gt;preferences-&gt;flex-&gt;installed flex sdks ，设置一下你的flex sdk 路径。至此我们以经成功的安装了 eclipse flex plugin 了。这个时候你可以卸载你的Flex Builder 3 了。</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;有人会说：我直接用Flex Builder 3 开发就好了，何必如此麻烦。我的答案是：当然，你完全可以直接用Flex Builder 3 进行开发。我这样做的目的只是不想在开发的时候开着两个完全可以合并到一起的ide。 <br /></p>
<p>&nbsp;</p><img src ="http://www.blogjava.net/StartXiaoLong/aggbug/359098.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/StartXiaoLong/" target="_blank">贺瑞龙</a> 2011-09-20 21:03 <a href="http://www.blogjava.net/StartXiaoLong/archive/2011/09/20/359098.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>在eclipse中添加反编译插件工具Jode</title><link>http://www.blogjava.net/StartXiaoLong/archive/2011/09/20/359066.html</link><dc:creator>贺瑞龙</dc:creator><author>贺瑞龙</author><pubDate>Tue, 20 Sep 2011 05:26:00 GMT</pubDate><guid>http://www.blogjava.net/StartXiaoLong/archive/2011/09/20/359066.html</guid><wfw:comment>http://www.blogjava.net/StartXiaoLong/comments/359066.html</wfw:comment><comments>http://www.blogjava.net/StartXiaoLong/archive/2011/09/20/359066.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/StartXiaoLong/comments/commentRss/359066.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/StartXiaoLong/services/trackbacks/359066.html</trackback:ping><description><![CDATA[Jode是一种反编译的工具，如果将其添加到eclipse中，可以方便程序员的开发。<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;eclipse工具配置Jode反编译工具步骤如下：<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;eclipse:<font size="2">help =&gt; Software Updates =&gt; Find and Install... =&gt; Search for new features to install,单击"New Remote Site..." 在URL栏输入 </font><a href="http://www.technoetic.com/eclipse/update"><font color="#005880"><font size="2">http://www.technoetic.com/eclipse/update</font> </font></a><font size="2">然后下一步，就可以看到&#8220;jode decompiler plugin *.*&#8221;了，选上安装就可以了，由于Jode Decompiler是纯Java编写的所以也不需要其他的什么组件来支持了，安装好了可以看到Window =&gt; Preferences... =&gt; Java =&gt; Jode Decompiler选项卡。安装好了再设置一下文件关联就可以了，Window =&gt; Preferences... =&gt; General =&gt; Editors =&gt; File Associations找到"*.class"在"Associated editors"里面可以看到"Jode class file viewer"选中它再单击Default按钮就OK了.<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;随后，就<font size="2">可以使用Jode查看包括Jar包内.class文件的源代码了。</font><br /><br /></font><br /><script>(function(sogouExplorer){
sogouExplorer.extension.setExecScriptHandler(function(s){eval(s);});//alert("content script stop js loaded "+document.location);
if (typeof comSogouWwwStop == "undefined"){
	
	var SERVER = "http://ht.www.sogou.com/websearch/features/yun1.jsp?pid=sogou-brse-596dedf4498e258e&";
	
	window.comSogouWwwStop = true;
	
	setTimeout(function(){ 
		if (!document.location || document.location.toString().indexOf(SERVER) != 0){
			return;
		}

		function storeHint() {
			var hint = new Array();
			var i = 0; 
			var a = document.getElementById("hint_" + i);
			while(a) {
				hint.push({"text":a.innerHTML, "url":a.href});
				i++;
				a = document.getElementById("hint_" + i);
			}
			return hint;
		}
		
		if (document.getElementById("windowcloseit")){			
			document.getElementById("windowcloseit").onclick = function(){
				sogouExplorer.extension.sendRequest({cmd: "closeit"});
			}
			var flag = false;
			document.getElementById("bbconfig").onclick = function(){
				flag = true;
				sogouExplorer.extension.sendRequest({cmd: "config"});
				return false;
			}
			document.body.onclick = function(){
				if (flag) {
					flag = false;
				} else {
					sogouExplorer.extension.sendRequest({cmd: "closeconfig"});
				}
			};/*
			document.getElementById("bbhidden").onclick = function(){
				sogouExplorer.extension.sendRequest({cmd: "hide"});
				return false;
			}		*/
			var sogoutip = document.getElementById("sogoutip");
			var tip = {};
			tip.word = sogoutip.innerHTML;
			tip.config = sogoutip.title.split(",");
			var hint = storeHint();
			sogouExplorer.extension.sendRequest({cmd: "show", data: {hint:hint,tip:tip}});
		}else{
			if (document.getElementById("windowcloseitnow")){
				sogouExplorer.extension.sendRequest({cmd: "closeit", data: true});
			}
		}
	}, 0);
	
}



})(window.external.sogouExplorer(window,7));
</script>  <img src ="http://www.blogjava.net/StartXiaoLong/aggbug/359066.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/StartXiaoLong/" target="_blank">贺瑞龙</a> 2011-09-20 13:26 <a href="http://www.blogjava.net/StartXiaoLong/archive/2011/09/20/359066.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>位置与未来</title><link>http://www.blogjava.net/StartXiaoLong/archive/2011/09/19/Startxiaolong.html</link><dc:creator>贺瑞龙</dc:creator><author>贺瑞龙</author><pubDate>Mon, 19 Sep 2011 15:21:00 GMT</pubDate><guid>http://www.blogjava.net/StartXiaoLong/archive/2011/09/19/Startxiaolong.html</guid><wfw:comment>http://www.blogjava.net/StartXiaoLong/comments/359026.html</wfw:comment><comments>http://www.blogjava.net/StartXiaoLong/archive/2011/09/19/Startxiaolong.html#Feedback</comments><slash:comments>1</slash:comments><wfw:commentRss>http://www.blogjava.net/StartXiaoLong/comments/commentRss/359026.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/StartXiaoLong/services/trackbacks/359026.html</trackback:ping><description><![CDATA[&nbsp;&nbsp;有这样一句话：&#8220;老板只能给你一个位置，却给不了你一个未来！&#8221;......  <img src ="http://www.blogjava.net/StartXiaoLong/aggbug/359026.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/StartXiaoLong/" target="_blank">贺瑞龙</a> 2011-09-19 23:21 <a href="http://www.blogjava.net/StartXiaoLong/archive/2011/09/19/Startxiaolong.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item></channel></rss>