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年2月23日

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) | 编辑 收藏

    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) | 编辑 收藏

    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) | 编辑 收藏

     
    Powered by:
    BlogJava
    Copyright © Andy