Android UI 屬性筆記(持續更新)

不管是 Swing、HTML/CSS 還是 Android,UI 跟排版相關的屬性總是容易讓人搞混,只要不常寫就忘光光了,比如 layout_gravity、gravity、padding、layout_margin…等。

網路上資料很多,千言萬語還是自己整理一下,用圖說明解釋才比較容易理解。最下方附上原始碼,讓大家自己修改來玩看看。

Eclipse 產生 Web Service Client 問題排除

網路上 step by step 的文章已經很多了,這邊僅記錄我在 Eclipse + JBoss7 上產生 Client 遇到的問題。不定期更新(如果我還持續踩到雷的話)。

不支援 static array

編輯 WSDL 時,Eclipse 會回報以下錯誤。
Multiple annotations found at this line:
    - WS-I: (BP2108) An Array declaration uses - restricts or extends - the soapenc:Array type, or the 
     wsdl:arrayType attribute is used in the type declaration.
    - WS-I: (BP2102) An XML schema import element references something other than an XML 
     schema definition: the referenced element does not have "schema" from XML namespace "http://
     www.w3.org/2001/XMLSchema" as root element.
修改 WSDL ,改為 dynamic array style。

參考:

不支援 RPC / Encoded

編輯 WSDL 時,Eclipse 會回報以下錯誤。
WS-I: (BP2406) The use attribute of a soapbind:body, soapbind:fault, soapbind:header and soapbind:headerfault does not have value of "literal".

修改 WSDL ,將 encoded 改為 literal。雖然這樣修改能順利產生 Web Service Client 的程式碼,但最終還是要看 Web Service 的 Server 端能不能接受 literal 的 SOAP。
<soap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace=http://foo/bar use="encoded"/>

<soap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace=http://foo/bar use="literal"/>

Eclipse 執行完成卻沒有產生任何程式碼

沒有產生程式碼,沒有任何報錯。

用 console 模式來產生程式碼,以 JBoss 7 為例,直接使用 ${jboss_home}/bin/wsconsume.bat 來產生程式碼,錯誤就能正確顯示。



參考:

上海必去 - 豫園商城

豫園商城是來上海的遊客必來的景點,一來是古色古香(外表啦),二來是就在市區,逛完要去外灘看夜景還是要去南京步行街逛街都很方便。基本上這一區就是一個大型的主題商城,附近還有城隍廟、豫園這兩個古蹟可晃,不過這就是要另外收費了(城隍廟門票10塊人民幣、豫園門票40塊人民幣),建議先上網看看別人拍的照片,再安排要不要花錢進去逛。