andyzhai

posts(9) comments(2) trackbacks(0)
  • BlogJava
  • 联系
  • RSS 2.0 Feed 聚合
  • 管理

常用链接

  • 我的随笔
  • 我的评论
  • 我的参与
  • 最新评论

留言簿

  • 给我留言
  • 查看公开留言
  • 查看私人留言

随笔档案

  • 2006年3月 (1)
  • 2006年2月 (3)
  • 2005年8月 (5)

搜索

  •  

最新评论

  • 1. re: Memory Leak of Java Editors in Eclipse
  • Yes, should take snapshot after opening editor.I have to modify it
  • --Andy
  • 2. re: Memory Leak of Java Editors in Eclipse
  • Did you know Eclipse load images into ImageRegistry in lazy mode??
  • --Dennis

阅读排行榜

评论排行榜

2006年3月3日

Understanding different web serivce encoding style " literal / encoded " in the context of relationship among SOAP encoding, WS-I basic profile and XML-Schema

Originally, SOAP 1.1 (May,2000) chapter 5 "Encoding" ( the infamous section 5 ) defines encoding style. It tried to describe the rules for serializing and deserializing xml framgments into (from) Soap elements, but the ambiguities in the SOAP encoding lead to many problems in interoperability.
a little later, (May 2001) XML Schema was at last published as a W3C recommendation and since then it got rapid and wide adoption, which inculdes: use of XML schema and instances in WSDL and SOAP.
In order to improve the interoperability of web service, WS-I organization was formed. WS-I Basic Profile, which beat the use of SOAP encoding,  was published in August 2003.  WS-I basic profile explicitly prohibit SOAP encoded style.
So we can only use 2 messaging mode: Literal / RPC  and Literal / Document according to WS-I Basic Profile.

As my understanding, the key difference between literal and encoded is:
    Literal:  based on xml schema  agreed by both service provider and requester. 
    encoded: based on pre-determined rules (xml schema) defined by SOAP section 5
In other words,
In Literal style, as long as both parties ( provider and requester) agree on one xml schema, they can communicate.Different pair can have different rules (xml schema). say, A and B share an xml schema. C and D share an xml schema.
In encoded style, all parties of web service and all pairs of web service share a common standard schema , which defined in soap section 5.
A, B, C and  D all  must conform the common rules.
Literal style is more flexible than encoded style. It also has much less ambiguities than encoded style.

see other resource about Literal / encoded, Document / RPC, and others
Books:
Java Web Service Architecure  by James Gosling and others.  Chap.4.5 Soap messaging modes. P107

J2ee Web Services   by Richard Monson-Haefel.   Chap.4. Soap encoding  P119.

Articles:

  • Developing Web Services with EMF SDOs for complex XML schema# 

    (Latest article published on IBM developerworks Feb. 28, 2006. The original Feb. 28, 2005 is a typo mistake. RAD(Rational Application Developer) 6.0.1.1 just published 2 months ago)
    See 'Perceptions and standards' for relationship among various standards. esp. soap (section 5), WS-I, xml schema, jax-rpc, jax-B

  • JavaWorld@TW - Operation Style (Document/RPC) and Message format(literal/encoded)#
    Operation Style (Document/RPC) and Message format(literal/encoded)
  • The Difference Between RPC and Document Style WSDL#
    RPC style and document style are catchphrases frequently heard in the context of web services and the SOAP protocol. What exactly do they mean? How do they relate to the pair of terms 'encoded/literal'? Where does the confusion about these terms come from? This article describes the WSDL binding style and use attributes
  • posted @ 2006-03-03 04:51 Andy 阅读(741) | 评论 (0) | 编辑 收藏

    2006年2月24日

    Notes and/or excerption about Richard Monson-Haefel "J2EE Web Services"

    P13.  To be completely blunt: I do NOT believe general Web service interoperability with anonymous parties is actually feasible without the guidance of the WS-I Basic Profile 1.0. Experienced  Web service developers can tell you numerous interoperability horror stories related to the loose language and broad visions defined  by standards like SOAP, WSDL, and UDDI. The WS-I Basic Profile eliminates many, if not all, of the ambiguities inherent in these primary standards, finally making interoperability among disparate Web service platforms (.NET, j2ee, axis, perl, etc) possible.

    posted @ 2006-02-24 03:53 Andy 阅读(163) | 评论 (0) | 编辑 收藏

    2006年2月23日

    An example of using regular expression in Eclipse WSE (web service explorer)

    Fixed the Eclipse WTP bug 118019: "WS-Explorer ignores non-proxy host settings" by using regular expression.
    https://bugs.eclipse.org/bugs/show_bug.cgi?id=118019

    See method private boolean isHostInNonProxyHosts(String host, String nonProxyHosts, boolean caseSensitive)
    and createPatternFromString(String str)
    in plugin org.eclipse.wst.ws.explorer
    http://dev.eclipse.org/viewcvs/index.cgi/wst/components/ws/plugins/org.eclipse.wst.ws.explorer/wsexplorer-src/org/eclipse/wst/ws/internal/explorer/platform/wsdl/transport/HTTPTransport.java?rev=HEAD&cvsroot=WebTools_Project&content-type=text/vnd.viewcvs-markup

    On the other hand, there is a bad example in Apache Axis,
    see following:

    2006-2-23

    • Docjar: org/apache/axis/components/net/DefaultSocketFactory.java #
      Bad example of searching and matching text. The method isHostInNonProxyList() is too complicated, error-prone, and inefficient.
    other reading:
  • 碟中碟互动网校-想学就学、想教就教 #
  • xkoto - Brighter Technology #
  • Nuvvo Free On-demand eLearning #
  • BEA的孤独感:何时走出“10亿美元”之困? - CSDN 新闻 #
  • 采访知名作家Bruce Tate 谈Java 未来机遇与挑战 - CSDN 新闻 #
  • Java: Dead Like COBOL, Not Like Elvis? #
  •  the English version on TSS of above one on CSDN

  • 用Mind Map 激发你的记忆潜能 - 纯月部落 #
  • InformationWeek | Open Source | It's Open Season | February 20, 2006 #

  • posted @ 2006-02-23 07:42 Andy 阅读(517) | 评论 (0) | 编辑 收藏

    2006年2月20日

    Test 365key

    Trying to integrate 365key into my blog.

    • 开放性增进对软件的了解 如何选择开放源代码CMS - CSDN 新闻 #
      This is the chinese version of the article 'how to choose an open source CMS http://www.zdnet.com.au/insight/software/soa/How_to_choose_an_open_source_CMS/0,39023769,39234675,00.htm
    • How to choose an open-source CMS: ZDNet Australia: Insight: Software #
      It may give me some suggestion if I want to provide open source consultant service
    • 再看BPEL - 纯月部落 #
      web service,Java RMI, C#, Jini

    posted @ 2006-02-20 23:59 Andy 阅读(190) | 评论 (0) | 编辑 收藏

    2005年8月30日

    Add -d option when use cvs init

    In our Red machine,
    to initilize cvs
    use : cvs -d /cs/home/...  init
    (if -d option is not added, then command: cvs import -m ....  does not execute correctly
    The problem maybe: without -d option, CVS doesn't know the administrative subdirectory of a repository. so import failed.
    So It seems here is the later use of CVSROOT)
    Note.
    Don't confuse the CVSROOT environment variable with CVSROOT subdirectory in repository. They are UNRELATED;
    The former is a way for users to avoid having to type -d <reporisory-location> every time they use CVS;
    The later is the administrative subdirectory of a repository.

    posted @ 2005-08-30 05:56 Andy 阅读(359) | 评论 (0) | 编辑 收藏

    2005年8月26日

    native methods used in org.eclipse.perfmsr.core.PerforanceMonitor

     /**
      * Answer the command line that started the process.
      */
     private static native String nativeGetCommandLine();
     
     /**
      * Calls the Windows GetPerformanceInfo function
      * @param counters any array of counters that corresponds to the Windows
      * PERFORMANCE_INFORMATION structure.
      */
     private static native void nativeGetPerformanceInfo(long[] counters);
     
     private static native boolean nativeGetPerformanceCounters(long[] counters);
     private static native String nativeGetUUID();

    I can find the last 3 methods in ivjperf.c
    but where is the nativeGetCommandLine() ?

    posted @ 2005-08-26 03:08 Andy 阅读(464) | 评论 (0) | 编辑 收藏

    Example of using JNI

    /** Java */
    public class Memory
    {
        public static void main(String[] args)
        {
            System.out.println("Physical memory in system="+getPhysicalMemory()/1024+" kBytes");
        }
     
        public static native long getPhysicalMemory();
     
        static
        {
            System.loadLibrary("Memory");
        }
    }
     
    /** C++/JNI */
    #include <windows.h> // windows standard include
    #include "Psapi.h"   // windows performance API
    #include "memory.h"  // JNI header file produced by JAVAH from Memory.java
     
    /*
     * Class:     Memory
     * Method:    getPhysicalMemory
     * Signature: ()J
     */
    JNIEXPORT jlong JNICALL Java_Memory_getPhysicalMemory(JNIEnv * env, jclass cls)
    {
        PERFORMANCE_INFORMATION pi;
     
        GetPerformanceInfo(&pi,sizeof(pi));
     
        return pi.PhysicalTotal*pi.PageSize;
    }
    
    original url: http://forum.java.sun.com/thread.jspa?threadID=425258&tstart=255


    useful link: http://java.sun.com/docs/books/tutorial/native1.1/

    posted @ 2005-08-26 03:01 Andy 阅读(497) | 评论 (0) | 编辑 收藏

    2005年8月9日

    Memory Leak of Java Editors in Eclipse

    I found that the Java Editor in Eclipse didn't return the resource of some Images after display dispose by using Sleak Tool (it can be downloaded from
     http://dev.eclipse.org/viewcvs/index.cgi/%7Echeckout%7E/platform-swt-home/dev.html#tools.) This may lead to memory leaks in JVM Heap dump.
    Steps:
    1. Download and install the Sleak. ( It's helpful to download performance tool to run Garbage Collector in order to get more precise result )
    2. Click the "Snap" before opening an .java file ( If Run "Garbage Collector" in performance menu before this operation, we can assure we are get rid of unused (untouched) objects in java heap)
    3. Open and exit .java file. Click "Diff" ( Again, Run GC before this operation )

    (Note:  Don't click Snap twice, clicking Diff means taking snap for current environment and then compare)   

    Sometimes, one incremental image occured. Sometimes, more seriously, 11 incremental images still live in memory. Most of them are the Icon Images of Buttons in "Outline" view.  

    posted @ 2005-08-09 05:51 Andy 阅读(644) | 评论 (2) | 编辑 收藏

    2005年8月8日

    Notes about Erich's book "Contributing to Eclipse"

    Chapter 5.
    "Run Test" action is an Object (Context) Action. Erich gave the Object Type :  IType.
    This type is NOT a java source file or bin file,  but a Class Type.
    So the action only occurs when right click like Page 43 Figure 5.3 ( In a Java Perspective)

    Chapter 10
    Includes  .classpath  (I don't think  .project is necessary, but I am not sure)  When publishing. Otherwise the contributed plugin may not find the class. (why? It's so weird!) and the action doesn't work

    Chapter 13
    Launch Eclipse with eclipse -clean After publishing, otherwise Eclipse may still use old version Plugin-in jars , plugin.xml etc. ( Even I modified plugin.xml , I also need to run with -clean option)


    posted @ 2005-08-08 02:10 Andy 阅读(397) | 评论 (0) | 编辑 收藏

    仅列出标题  
     
    Powered by:
    BlogJava
    Copyright © Andy