Return-Path: Delivered-To: apmail-ws-axis-dev-archive@www.apache.org Received: (qmail 10137 invoked from network); 13 Nov 2006 09:28:01 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 13 Nov 2006 09:28:01 -0000 Received: (qmail 75852 invoked by uid 500); 13 Nov 2006 09:28:12 -0000 Delivered-To: apmail-ws-axis-dev-archive@ws.apache.org Received: (qmail 75592 invoked by uid 500); 13 Nov 2006 09:28:11 -0000 Mailing-List: contact axis-cvs-help@ws.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: List-Id: Delivered-To: mailing list axis-cvs@ws.apache.org Received: (qmail 75581 invoked by uid 500); 13 Nov 2006 09:28:11 -0000 Delivered-To: apmail-ws-axis2-cvs@ws.apache.org Received: (qmail 75578 invoked by uid 99); 13 Nov 2006 09:28:11 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 13 Nov 2006 01:28:11 -0800 X-ASF-Spam-Status: No, hits=-9.4 required=10.0 tests=ALL_TRUSTED,NO_REAL_NAME X-Spam-Check-By: apache.org Received: from [140.211.11.3] (HELO eris.apache.org) (140.211.11.3) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 13 Nov 2006 01:27:59 -0800 Received: by eris.apache.org (Postfix, from userid 65534) id DCF851A9846; Mon, 13 Nov 2006 01:27:29 -0800 (PST) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r474211 - /webservices/axis2/branches/java/1_1/xdocs/1_1/adb/adb-advanced.html Date: Mon, 13 Nov 2006 09:27:29 -0000 To: axis2-cvs@ws.apache.org From: chatra@apache.org X-Mailer: svnmailer-1.1.0 Message-Id: <20061113092729.DCF851A9846@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: chatra Date: Mon Nov 13 01:27:29 2006 New Revision: 474211 URL: http://svn.apache.org/viewvc?view=rev&rev=474211 Log: minor improvements Modified: webservices/axis2/branches/java/1_1/xdocs/1_1/adb/adb-advanced.html Modified: webservices/axis2/branches/java/1_1/xdocs/1_1/adb/adb-advanced.html URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/1_1/xdocs/1_1/adb/adb-advanced.html?view=diff&rev=474211&r1=474210&r2=474211 ============================================================================== --- webservices/axis2/branches/java/1_1/xdocs/1_1/adb/adb-advanced.html (original) +++ webservices/axis2/branches/java/1_1/xdocs/1_1/adb/adb-advanced.html Mon Nov 13 01:27:29 2006 @@ -14,16 +14,16 @@

Content

- -

xsi:type Support

+ +

xsi:type Support

This is implemented by adding a extension maping class. The code that calls the extension mapper is generated inside the Factory.parse method of the beans and gets active when the xsi:type attribute is present. The -following code fragment shows how the generated type mapper looks like

+following code fragment shows how the generated type mapper looks like :

            public static java.lang.Object getTypeObject(java.lang.String namespaceURI,
                                 java.lang.String typeName,
                                 javax.xml.stream.XMLStreamReader reader) throws java.lang.Exception{
@@ -38,10 +38,10 @@
 
 

Inside every Factory.parse method, the extension mapper gets called when a xsi:type attribute is encountered and that type is not the -type that is being parsed

+type that is being parsed.

The following code fragment shows how the ADB deserialize method calls the -mapper class

+mapper class :

 	     if (reader.getAttributeValue("http://www.w3.org/2001/XMLSchema-instance","type")!=null){
                   java.lang.String fullTypeName = reader.getAttributeValue("http://www.w3.org/2001/XMLSchema-instance",
@@ -62,7 +62,7 @@
 	      }

This should make the xsi:type based parsing possible and should -result in proper xsi:type based serializations at runtime

+result in proper xsi:type based serializations at runtime.

This is automatically done but the package name for the mapper class can be set as an CompilerOption.

@@ -82,14 +82,15 @@

When the mapping package is not specified it is derived from the -targetnamespace of the first schema that is encountered

+targetnamespace of the first schema that is encountered.

-

Helper mode

+ +

Helper mode

Helper mode is a fairly new feature. In the helper mode, the beans are plain Java beans and all the deserialization/serialization code is moved to a -helper class. For example the simple schema mentioned in the ADB-howto -document will yield four classes for the two that has been previously seen

+helper class. For example, the simple schema mentioned in the ADB-howto +document will yield four classes for the two that has been previously seen.

  1. MyElement.java
  2. MyElementHelper.java
  3. @@ -100,13 +101,14 @@

    The helpers basically contain all the code that went into the ADBBeans. Hence the beans in the helper mode are pretty much readable than the rest. Also note that the helper mode is available only if you are in the unpacked -mode. The code generator by default does not expand the classes

    +mode. The code generator by default does not expand the classes.

    Helper mode can be switched on by using the setHelperMode method -in CompilerOptions

    +in CompilerOptions :

    compilerOptions.setHelperMode(true);
    -

    More Stuff on ADB?

    + +

    More Stuff on ADB?

    • Tweaking the ADB Code Generator- explains available mechanisms to extend ADB and possibly adopt it to --------------------------------------------------------------------- To unsubscribe, e-mail: axis-cvs-unsubscribe@ws.apache.org For additional commands, e-mail: axis-cvs-help@ws.apache.org