上海必去 - 1933老場坊

網路上心得和資訊都很多,所以我現在遊記越來越懶得打字了。1933老場坊離捷運站出口有一小段路,出門前記得地圖要先查好,要不然有點難找。以前這裡是屠宰場,室內走進去不知道是不是陰氣還真的很涼爽,現在改成商辦大樓(招租中),有看到一些餐廳、商店、個人工作室還有辦公室(租在這應該都不用開冷氣了)。

建築物本身很有特色,頂樓看出去的風景也不錯,是個適合拍照的好地方(去的時候也剛好有大叔再外拍模特兒)。但附近大多是住宅區,四周就沒有其他什麼好逛好吃的(以我觀光客角度看是如此),如果對此景點沒有太執著的怨念的話,可以 pass!

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 來產生程式碼,錯誤就能正確顯示。



參考: