receiving array of user-defined object

ChangWoo Jung <[email protected]> Wed, 4 Feb 2004 14:43:50 +0900
Newsgroups gmane.comp.java.enhydra.ksoap
Message-ID <OF1C45B287.61C5DD72-ON49256E30.001EBF07-49256E30.001FFA3D@kr.ibm.com>
This is a multipart message in MIME format.
--=_alternative 001FFA3449256E30_=
Content-Type: text/plain; charset="US-ASCII"

I am newbie in ksoap. I want to recieve array of TransRecord user-defined 
object using KvmSerialize.
I tried to make implementation of KvmSerialize like below, but I only get 
SoapObject instead TransRecord.
Any help will be appreciated.

                ClassMap cm = new ClassMap(Soap.VER11);
                cm.prefixMap = new PrefixMap(cm.prefixMap, "ns-946433677", 
"http://model.bank");
                cm.addMapping("http://model.bank", "TransRecord", new 
TransRecord2().getClass());
                rpc.setClassMap(cm);
 
 
                SoapObject so=null;
                TransRecord[] tr = null;
 
                try {
                        so = (SoapObject)rpc.call(method);
                        //tr = (TransRecord[])rpc.call(method);
                ....

package bank.model;

import java.math.BigDecimal;
import java.util.Calendar;
import java.util.Date;

import org.kobjects.isodate.IsoDate;
import org.kobjects.serialization.ElementType;
import org.kobjects.serialization.KvmSerializable;
import org.kobjects.serialization.PropertyInfo;
import org.ksoap.SoapObject;
import org.ksoap.SoapPrimitive;

public class TransRecord implements KvmSerializable {
    private java.util.Calendar timeStamp;
    private java.lang.String transType;
    private java.math.BigDecimal transAmt;


        private static int PROP_COUNT = 3;
        private static PropertyInfo PI_timeStamp = new PropertyInfo (
"timeStamp", Calendar.class.getClass());
        private static PropertyInfo PI_transType = new PropertyInfo (
"transType", ElementType.STRING_CLASS);
        private static PropertyInfo PI_transAmt = new PropertyInfo (
"transAmt", BigDecimal.class.getClass());
 
        private static PropertyInfo[] PI_PROP_ARRAY = {PI_timeStamp, 
PI_transType, PI_transAmt}; 


    public TransRecord() {
    }


    public java.util.Calendar getTimeStamp() {
        return timeStamp;
    }

    public void setTimeStamp(java.util.Calendar timeStamp) {
        this.timeStamp = timeStamp;
    }

    public java.lang.String getTransType() {
        return transType;
    }

    public void setTransType(java.lang.String transType) {
        this.transType = transType;
    }

    public java.math.BigDecimal getTransAmt() {
        return transAmt;
    }

    public void setTransAmt(java.math.BigDecimal transAmt) {
        this.transAmt = transAmt;
    }
 
 
        /**
         * @see 
org.kobjects.serialization.KvmSerializable#getProperty(int)
         */
        public Object getProperty(int param) {
                switch (param) {
                        case 0 : return getTimeStamp();
                        case 1 : return getTransType();
                        case 2 : return getTransAmt();
                        default : 
                                System.err.println ("FATAL: Unknown type : 
param");
                                return null;
                }
        }

        /**
         * @see 
org.kobjects.serialization.KvmSerializable#getPropertyCount()
         */
        public int getPropertyCount() {
                return PI_PROP_ARRAY.length;
        }

        /**
         * @see 
org.kobjects.serialization.KvmSerializable#setProperty(int, Object)
         */
        public void setProperty(int param, Object obj) {
                switch (param) {
                        case 0 : 
                                setTimeStamp((Calendar)obj);
                                break;
                        case 1 : 
                                setTransType((String)obj);
                                break;
                        case 2 : 
                                setTransAmt((BigDecimal)obj);
                                break;
                        default : 
                                System.err.println ("FATAL: Unknown type : 
param");
                                return;
                }
        }

        /**
         * @see 
org.kobjects.serialization.KvmSerializable#getPropertyInfo(int, 
PropertyInfo)
         */
        public void getPropertyInfo(int param, PropertyInfo propertyInfo) 
{
                propertyInfo.name = PI_PROP_ARRAY[param].name;
                propertyInfo.nonpermanent = 
PI_PROP_ARRAY[param].nonpermanent;
                propertyInfo.copy(PI_PROP_ARRAY[param]);
        }

}


Here is the SOAP message request/response.
1. request
    <?xml version="1.0" encoding="UTF-8" ?> 
    <SOAP-ENV:Envelope 
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" 
xmlns:q0="http://service.bank" 
xmlns:xsd="http://www.w3.org/2001/XMLSchema" 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
   <SOAP-ENV:Body>
   <q0:getTransactions>
   <q0:accountID>00</q0:accountID> 
  </q0:getTransactions>
  </SOAP-ENV:Body>
  </SOAP-ENV:Envelope>
2. response
  <?xml version="1.0" encoding="UTF-8" ?> 
  <soapenv:Envelope 
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" 
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" 
xmlns:xsd="http://www.w3.org/2001/XMLSchema" 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <soapenv:Body>
  <getTransactionsResponse xmlns="http://service.bank">
  <ns-946433677:TransRecord xmlns:ns-946433677="http://model.bank">
 <ns-946433677:timeStamp>2004-02-04T05:16:36.132Z</ns-946433677:timeStamp> 

  <ns-946433677:transType>Trx1</ns-946433677:transType> 
  <ns-946433677:transAmt>80</ns-946433677:transAmt> 
  </ns-946433677:TransRecord>
  <ns-946433677:TransRecord xmlns:ns-946433677="http://model.bank">
 <ns-946433677:timeStamp>2004-02-04T05:16:36.132Z</ns-946433677:timeStamp> 

  <ns-946433677:transType>Trx2</ns-946433677:transType> 
  <ns-946433677:transAmt>81</ns-946433677:transAmt> 
  </ns-946433677:TransRecord>
  <ns-946433677:TransRecord xmlns:ns-946433677="http://model.bank">
 <ns-946433677:timeStamp>2004-02-04T05:16:36.132Z</ns-946433677:timeStamp> 

  <ns-946433677:transType>Trx3</ns-946433677:transType> 
  <ns-946433677:transAmt>82</ns-946433677:transAmt> 
  </ns-946433677:TransRecord>
  <ns-946433677:TransRecord xmlns:ns-946433677="http://model.bank">
 <ns-946433677:timeStamp>2004-02-04T05:16:36.132Z</ns-946433677:timeStamp> 

  <ns-946433677:transType>Trx4</ns-946433677:transType> 
  <ns-946433677:transAmt>83</ns-946433677:transAmt> 
  </ns-946433677:TransRecord>
  <ns-946433677:TransRecord xmlns:ns-946433677="http://model.bank">
 <ns-946433677:timeStamp>2004-02-04T05:16:36.132Z</ns-946433677:timeStamp> 

  <ns-946433677:transType>Trx5</ns-946433677:transType> 
  <ns-946433677:transAmt>84</ns-946433677:transAmt> 
  </ns-946433677:TransRecord>
  </getTransactionsResponse>
  </soapenv:Body>
  </soapenv:Envelope>


Regards,

CW.
--=_alternative 001FFA3449256E30_=
Content-Type: text/html; charset="US-ASCII"


<br><font size=2 face="sans-serif">I am newbie in ksoap. I want to recieve
array of TransRecord user-defined object using KvmSerialize.</font>
<br><font size=2 face="sans-serif">I tried to make implementation of KvmSerialize
like below, but I only get SoapObject instead TransRecord.</font>
<br><font size=2 face="sans-serif">Any help will be appreciated.</font>
<br>
<br><font size=2><tt>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; ClassMap cm = </tt></font><font size=2 color=#820040><tt><b>new</b></tt></font><font size=2><tt>
ClassMap(Soap.VER11);</tt></font>
<br><font size=2><tt>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; cm.prefixMap = </tt></font><font size=2 color=#820040><tt><b>new</b></tt></font><font size=2><tt>
PrefixMap(cm.prefixMap, </tt></font><font size=2 color=#4200ff><tt>&quot;ns-946433677&quot;</tt></font><font size=2><tt>,
</tt></font><font size=2 color=#4200ff><tt>&quot;http://model.bank&quot;</tt></font><font size=2><tt>);</tt></font>
<br><font size=2><tt>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; cm.addMapping(</tt></font><font size=2 color=#4200ff><tt>&quot;http://model.bank&quot;</tt></font><font size=2><tt>,
</tt></font><font size=2 color=#4200ff><tt>&quot;TransRecord&quot;</tt></font><font size=2><tt>,
</tt></font><font size=2 color=#820040><tt><b>new</b></tt></font><font size=2><tt>
TransRecord2().getClass());</tt></font>
<br><font size=2><tt>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; rpc.setClassMap(cm);</tt></font>
<br><font size=2><tt>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; </tt></font>
<br><font size=2><tt>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; </tt></font>
<br><font size=2><tt>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; SoapObject so=</tt></font><font size=2 color=#820040><tt><b>null</b></tt></font><font size=2><tt>;</tt></font>
<br><font size=2><tt>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; TransRecord[] tr = null;</tt></font>
<br><font size=2><tt>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; </tt></font>
<br><font size=2><tt>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; </tt></font><font size=2 color=#820040><tt><b>try</b></tt></font><font size=2><tt>
{</tt></font>
<br><font size=2><tt>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; so = (SoapObject)rpc.call(method);</tt></font>
<br><font size=2 face="sans-serif">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; //tr =
(TransRecord[])rpc.call(method);</font>
<br><font size=2 face="sans-serif">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; ....</font>
<br>
<br><font size=2 color=#820040><tt><b>package</b></tt></font><font size=2><tt>
bank.model;</tt></font>
<br>
<br><font size=2 color=#820040><tt><b>import</b></tt></font><font size=2><tt>
java.math.BigDecimal;</tt></font>
<br><font size=2 color=#820040><tt><b>import</b></tt></font><font size=2><tt>
java.util.Calendar;</tt></font>
<br><font size=2 color=#820040><tt><b>import</b></tt></font><font size=2><tt>
java.util.Date;</tt></font>
<br>
<br><font size=2 color=#820040><tt><b>import</b></tt></font><font size=2><tt>
org.kobjects.isodate.IsoDate;</tt></font>
<br><font size=2 color=#820040><tt><b>import</b></tt></font><font size=2><tt>
org.kobjects.serialization.ElementType;</tt></font>
<br><font size=2 color=#820040><tt><b>import</b></tt></font><font size=2><tt>
org.kobjects.serialization.KvmSerializable;</tt></font>
<br><font size=2 color=#820040><tt><b>import</b></tt></font><font size=2><tt>
org.kobjects.serialization.PropertyInfo;</tt></font>
<br><font size=2 color=#820040><tt><b>import</b></tt></font><font size=2><tt>
org.ksoap.SoapObject;</tt></font>
<br><font size=2 color=#820040><tt><b>import</b></tt></font><font size=2><tt>
org.ksoap.SoapPrimitive;</tt></font>
<br>
<br><font size=2 color=#820040><tt><b>public</b></tt></font><font size=2><tt>
</tt></font><font size=2 color=#820040><tt><b>class</b></tt></font><font size=2><tt>
TransRecord </tt></font><font size=2 color=#820040><tt><b>implements</b></tt></font><font size=2><tt>
KvmSerializable {</tt></font>
<br><font size=2><tt>&nbsp; &nbsp; </tt></font><font size=2 color=#820040><tt><b>private</b></tt></font><font size=2><tt>
java.util.Calendar timeStamp;</tt></font>
<br><font size=2><tt>&nbsp; &nbsp; </tt></font><font size=2 color=#820040><tt><b>private</b></tt></font><font size=2><tt>
java.lang.String transType;</tt></font>
<br><font size=2><tt>&nbsp; &nbsp; </tt></font><font size=2 color=#820040><tt><b>private</b></tt></font><font size=2><tt>
java.math.BigDecimal transAmt;</tt></font>
<br>
<br>
<br><font size=2><tt>&nbsp; &nbsp; &nbsp; &nbsp; </tt></font><font size=2 color=#820040><tt><b>private</b></tt></font><font size=2><tt>
</tt></font><font size=2 color=#820040><tt><b>static</b></tt></font><font size=2><tt>
</tt></font><font size=2 color=#820040><tt><b>int</b></tt></font><font size=2><tt>
PROP_COUNT = 3;</tt></font>
<br><font size=2><tt>&nbsp; &nbsp; &nbsp; &nbsp; </tt></font><font size=2 color=#820040><tt><b>private</b></tt></font><font size=2><tt>
</tt></font><font size=2 color=#820040><tt><b>static</b></tt></font><font size=2><tt>
PropertyInfo PI_timeStamp = </tt></font><font size=2 color=#820040><tt><b>new</b></tt></font><font size=2><tt>
PropertyInfo (</tt></font><font size=2 color=#4200ff><tt>&quot;timeStamp&quot;</tt></font><font size=2><tt>,
Calendar.</tt></font><font size=2 color=#820040><tt><b>class</b></tt></font><font size=2><tt>.getClass());</tt></font>
<br><font size=2><tt>&nbsp; &nbsp; &nbsp; &nbsp; </tt></font><font size=2 color=#820040><tt><b>private</b></tt></font><font size=2><tt>
</tt></font><font size=2 color=#820040><tt><b>static</b></tt></font><font size=2><tt>
PropertyInfo PI_transType = </tt></font><font size=2 color=#820040><tt><b>new</b></tt></font><font size=2><tt>
PropertyInfo (</tt></font><font size=2 color=#4200ff><tt>&quot;transType&quot;</tt></font><font size=2><tt>,
ElementType.STRING_CLASS);</tt></font>
<br><font size=2><tt>&nbsp; &nbsp; &nbsp; &nbsp; </tt></font><font size=2 color=#820040><tt><b>private</b></tt></font><font size=2><tt>
</tt></font><font size=2 color=#820040><tt><b>static</b></tt></font><font size=2><tt>
PropertyInfo PI_transAmt = </tt></font><font size=2 color=#820040><tt><b>new</b></tt></font><font size=2><tt>
PropertyInfo (</tt></font><font size=2 color=#4200ff><tt>&quot;transAmt&quot;</tt></font><font size=2><tt>,
BigDecimal.</tt></font><font size=2 color=#820040><tt><b>class</b></tt></font><font size=2><tt>.getClass());</tt></font>
<br><font size=2><tt>&nbsp; &nbsp; &nbsp; &nbsp; </tt></font>
<br><font size=2><tt>&nbsp; &nbsp; &nbsp; &nbsp; </tt></font><font size=2 color=#820040><tt><b>private</b></tt></font><font size=2><tt>
</tt></font><font size=2 color=#820040><tt><b>static</b></tt></font><font size=2><tt>
PropertyInfo[] PI_PROP_ARRAY = {PI_timeStamp, PI_transType, PI_transAmt};
&nbsp;</tt></font>
<br>
<br>
<br><font size=2><tt>&nbsp; &nbsp; </tt></font><font size=2 color=#820040><tt><b>public</b></tt></font><font size=2><tt>
TransRecord() {</tt></font>
<br><font size=2><tt>&nbsp; &nbsp; }</tt></font>
<br>
<br>
<br><font size=2><tt>&nbsp; &nbsp; </tt></font><font size=2 color=#820040><tt><b>public</b></tt></font><font size=2><tt>
java.util.Calendar getTimeStamp() {</tt></font>
<br><font size=2><tt>&nbsp; &nbsp; &nbsp; &nbsp; </tt></font><font size=2 color=#820040><tt><b>return</b></tt></font><font size=2><tt>
timeStamp;</tt></font>
<br><font size=2><tt>&nbsp; &nbsp; }</tt></font>
<br>
<br><font size=2><tt>&nbsp; &nbsp; </tt></font><font size=2 color=#820040><tt><b>public</b></tt></font><font size=2><tt>
</tt></font><font size=2 color=#820040><tt><b>void</b></tt></font><font size=2><tt>
setTimeStamp(java.util.Calendar timeStamp) {</tt></font>
<br><font size=2><tt>&nbsp; &nbsp; &nbsp; &nbsp; </tt></font><font size=2 color=#820040><tt><b>this</b></tt></font><font size=2><tt>.timeStamp
= timeStamp;</tt></font>
<br><font size=2><tt>&nbsp; &nbsp; }</tt></font>
<br>
<br><font size=2><tt>&nbsp; &nbsp; </tt></font><font size=2 color=#820040><tt><b>public</b></tt></font><font size=2><tt>
java.lang.String getTransType() {</tt></font>
<br><font size=2><tt>&nbsp; &nbsp; &nbsp; &nbsp; </tt></font><font size=2 color=#820040><tt><b>return</b></tt></font><font size=2><tt>
transType;</tt></font>
<br><font size=2><tt>&nbsp; &nbsp; }</tt></font>
<br>
<br><font size=2><tt>&nbsp; &nbsp; </tt></font><font size=2 color=#820040><tt><b>public</b></tt></font><font size=2><tt>
</tt></font><font size=2 color=#820040><tt><b>void</b></tt></font><font size=2><tt>
setTransType(java.lang.String transType) {</tt></font>
<br><font size=2><tt>&nbsp; &nbsp; &nbsp; &nbsp; </tt></font><font size=2 color=#820040><tt><b>this</b></tt></font><font size=2><tt>.transType
= transType;</tt></font>
<br><font size=2><tt>&nbsp; &nbsp; }</tt></font>
<br>
<br><font size=2><tt>&nbsp; &nbsp; </tt></font><font size=2 color=#820040><tt><b>public</b></tt></font><font size=2><tt>
java.math.BigDecimal getTransAmt() {</tt></font>
<br><font size=2><tt>&nbsp; &nbsp; &nbsp; &nbsp; </tt></font><font size=2 color=#820040><tt><b>return</b></tt></font><font size=2><tt>
transAmt;</tt></font>
<br><font size=2><tt>&nbsp; &nbsp; }</tt></font>
<br>
<br><font size=2><tt>&nbsp; &nbsp; </tt></font><font size=2 color=#820040><tt><b>public</b></tt></font><font size=2><tt>
</tt></font><font size=2 color=#820040><tt><b>void</b></tt></font><font size=2><tt>
setTransAmt(java.math.BigDecimal transAmt) {</tt></font>
<br><font size=2><tt>&nbsp; &nbsp; &nbsp; &nbsp; </tt></font><font size=2 color=#820040><tt><b>this</b></tt></font><font size=2><tt>.transAmt
= transAmt;</tt></font>
<br><font size=2><tt>&nbsp; &nbsp; }</tt></font>
<br><font size=2><tt>&nbsp; &nbsp; </tt></font>
<br><font size=2><tt>&nbsp; &nbsp; </tt></font>
<br><font size=2><tt>&nbsp; &nbsp; &nbsp; &nbsp; </tt></font><font size=2 color=#4040c2><tt>/**</tt></font>
<br><font size=2><tt>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</tt></font><font size=2 color=#4040c2><tt>*</tt></font><font size=2><tt>
</tt></font><font size=2 color=#71b2cf><tt><b>@see</b></tt></font><font size=2><tt>
</tt></font><font size=2 color=#4040c2><tt>org.kobjects.serialization.KvmSerializable#getProperty(int)</tt></font>
<br><font size=2><tt>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</tt></font><font size=2 color=#4040c2><tt>*/</tt></font>
<br><font size=2><tt>&nbsp; &nbsp; &nbsp; &nbsp; </tt></font><font size=2 color=#820040><tt><b>public</b></tt></font><font size=2><tt>
Object getProperty(</tt></font><font size=2 color=#820040><tt><b>int</b></tt></font><font size=2><tt>
param) {</tt></font>
<br><font size=2><tt>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; </tt></font><font size=2 color=#820040><tt><b>switch</b></tt></font><font size=2><tt>
(param) {</tt></font>
<br><font size=2><tt>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </tt></font><font size=2 color=#820040><tt><b>case</b></tt></font><font size=2><tt>
0 : </tt></font><font size=2 color=#820040><tt><b>return</b></tt></font><font size=2><tt>
getTimeStamp();</tt></font>
<br><font size=2><tt>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </tt></font><font size=2 color=#820040><tt><b>case</b></tt></font><font size=2><tt>
1 : </tt></font><font size=2 color=#820040><tt><b>return</b></tt></font><font size=2><tt>
getTransType();</tt></font>
<br><font size=2><tt>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </tt></font><font size=2 color=#820040><tt><b>case</b></tt></font><font size=2><tt>
2 : </tt></font><font size=2 color=#820040><tt><b>return</b></tt></font><font size=2><tt>
getTransAmt();</tt></font>
<br><font size=2><tt>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </tt></font><font size=2 color=#820040><tt><b>default</b></tt></font><font size=2><tt>
: </tt></font>
<br><font size=2><tt>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; System.err.println (</tt></font><font size=2 color=#4200ff><tt>&quot;FATAL:
Unknown type : param&quot;</tt></font><font size=2><tt>);</tt></font>
<br><font size=2><tt>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; </tt></font><font size=2 color=#820040><tt><b>return</b></tt></font><font size=2><tt>
</tt></font><font size=2 color=#820040><tt><b>null</b></tt></font><font size=2><tt>;</tt></font>
<br><font size=2><tt>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; }</tt></font>
<br><font size=2><tt>&nbsp; &nbsp; &nbsp; &nbsp; }</tt></font>
<br>
<br><font size=2><tt>&nbsp; &nbsp; &nbsp; &nbsp; </tt></font><font size=2 color=#4040c2><tt>/**</tt></font>
<br><font size=2><tt>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</tt></font><font size=2 color=#4040c2><tt>*</tt></font><font size=2><tt>
</tt></font><font size=2 color=#71b2cf><tt><b>@see</b></tt></font><font size=2><tt>
</tt></font><font size=2 color=#4040c2><tt>org.kobjects.serialization.KvmSerializable#getPropertyCount()</tt></font>
<br><font size=2><tt>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</tt></font><font size=2 color=#4040c2><tt>*/</tt></font>
<br><font size=2><tt>&nbsp; &nbsp; &nbsp; &nbsp; </tt></font><font size=2 color=#820040><tt><b>public</b></tt></font><font size=2><tt>
</tt></font><font size=2 color=#820040><tt><b>int</b></tt></font><font size=2><tt>
getPropertyCount() {</tt></font>
<br><font size=2><tt>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; </tt></font><font size=2 color=#820040><tt><b>return</b></tt></font><font size=2><tt>
PI_PROP_ARRAY.length;</tt></font>
<br><font size=2><tt>&nbsp; &nbsp; &nbsp; &nbsp; }</tt></font>
<br>
<br><font size=2><tt>&nbsp; &nbsp; &nbsp; &nbsp; </tt></font><font size=2 color=#4040c2><tt>/**</tt></font>
<br><font size=2><tt>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</tt></font><font size=2 color=#4040c2><tt>*</tt></font><font size=2><tt>
</tt></font><font size=2 color=#71b2cf><tt><b>@see</b></tt></font><font size=2><tt>
</tt></font><font size=2 color=#4040c2><tt>org.kobjects.serialization.KvmSerializable#setProperty(int,</tt></font><font size=2><tt>
</tt></font><font size=2 color=#4040c2><tt>Object)</tt></font>
<br><font size=2><tt>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</tt></font><font size=2 color=#4040c2><tt>*/</tt></font>
<br><font size=2><tt>&nbsp; &nbsp; &nbsp; &nbsp; </tt></font><font size=2 color=#820040><tt><b>public</b></tt></font><font size=2><tt>
</tt></font><font size=2 color=#820040><tt><b>void</b></tt></font><font size=2><tt>
setProperty(</tt></font><font size=2 color=#820040><tt><b>int</b></tt></font><font size=2><tt>
param, Object obj) {</tt></font>
<br><font size=2><tt>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; </tt></font><font size=2 color=#820040><tt><b>switch</b></tt></font><font size=2><tt>
(param) {</tt></font>
<br><font size=2><tt>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </tt></font><font size=2 color=#820040><tt><b>case</b></tt></font><font size=2><tt>
0 : </tt></font>
<br><font size=2><tt>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; setTimeStamp((Calendar)obj);</tt></font>
<br><font size=2><tt>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; </tt></font><font size=2 color=#820040><tt><b>break</b></tt></font><font size=2><tt>;</tt></font>
<br><font size=2><tt>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </tt></font><font size=2 color=#820040><tt><b>case</b></tt></font><font size=2><tt>
1 : </tt></font>
<br><font size=2><tt>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; setTransType((String)obj);</tt></font>
<br><font size=2><tt>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; </tt></font><font size=2 color=#820040><tt><b>break</b></tt></font><font size=2><tt>;</tt></font>
<br><font size=2><tt>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </tt></font><font size=2 color=#820040><tt><b>case</b></tt></font><font size=2><tt>
2 : </tt></font>
<br><font size=2><tt>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; setTransAmt((BigDecimal)obj);</tt></font>
<br><font size=2><tt>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; </tt></font><font size=2 color=#820040><tt><b>break</b></tt></font><font size=2><tt>;</tt></font>
<br><font size=2><tt>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </tt></font><font size=2 color=#820040><tt><b>default</b></tt></font><font size=2><tt>
: </tt></font>
<br><font size=2><tt>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; System.err.println (</tt></font><font size=2 color=#4200ff><tt>&quot;FATAL:
Unknown type : param&quot;</tt></font><font size=2><tt>);</tt></font>
<br><font size=2><tt>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; </tt></font><font size=2 color=#820040><tt><b>return</b></tt></font><font size=2><tt>;</tt></font>
<br><font size=2><tt>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; }</tt></font>
<br><font size=2><tt>&nbsp; &nbsp; &nbsp; &nbsp; }</tt></font>
<br>
<br><font size=2><tt>&nbsp; &nbsp; &nbsp; &nbsp; </tt></font><font size=2 color=#4040c2><tt>/**</tt></font>
<br><font size=2><tt>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</tt></font><font size=2 color=#4040c2><tt>*</tt></font><font size=2><tt>
</tt></font><font size=2 color=#71b2cf><tt><b>@see</b></tt></font><font size=2><tt>
</tt></font><font size=2 color=#4040c2><tt>org.kobjects.serialization.KvmSerializable#getPropertyInfo(int,</tt></font><font size=2><tt>
</tt></font><font size=2 color=#4040c2><tt>PropertyInfo)</tt></font>
<br><font size=2><tt>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</tt></font><font size=2 color=#4040c2><tt>*/</tt></font>
<br><font size=2><tt>&nbsp; &nbsp; &nbsp; &nbsp; </tt></font><font size=2 color=#820040><tt><b>public</b></tt></font><font size=2><tt>
</tt></font><font size=2 color=#820040><tt><b>void</b></tt></font><font size=2><tt>
getPropertyInfo(</tt></font><font size=2 color=#820040><tt><b>int</b></tt></font><font size=2><tt>
param, PropertyInfo propertyInfo) {</tt></font>
<br><font size=2><tt>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; propertyInfo.name = PI_PROP_ARRAY[param].name;</tt></font>
<br><font size=2><tt>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; propertyInfo.nonpermanent = PI_PROP_ARRAY[param].nonpermanent;</tt></font>
<br><font size=2><tt>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; propertyInfo.copy(PI_PROP_ARRAY[param]);</tt></font>
<br><font size=2><tt>&nbsp; &nbsp; &nbsp; &nbsp; }</tt></font>
<br>
<br><font size=2><tt>}</tt></font>
<br>
<br>
<br><font size=2 face="sans-serif">Here is the SOAP message request/response.</font>
<br><font size=2 face="sans-serif">1. request</font>
<br><font size=2 face="sans-serif">&nbsp; &nbsp; &lt;?xml version=&quot;1.0&quot;
encoding=&quot;UTF-8&quot; ?&gt; </font>
<br><font size=2 face="sans-serif">&nbsp; &nbsp; &lt;SOAP-ENV:Envelope
xmlns:SOAP-ENV=&quot;http://schemas.xmlsoap.org/soap/envelope/&quot; xmlns:q0=&quot;http://service.bank&quot;
xmlns:xsd=&quot;http://www.w3.org/2001/XMLSchema&quot; xmlns:xsi=&quot;http://www.w3.org/2001/XMLSchema-instance&quot;&gt;</font>
<br><font size=2 face="sans-serif">&nbsp; &nbsp;&lt;SOAP-ENV:Body&gt;</font>
<br><font size=2 face="sans-serif">&nbsp; &nbsp;&lt;q0:getTransactions&gt;</font>
<br><font size=2 face="sans-serif">&nbsp; &nbsp;&lt;q0:accountID&gt;00&lt;/q0:accountID&gt;
</font>
<br><font size=2 face="sans-serif">&nbsp; &lt;/q0:getTransactions&gt;</font>
<br><font size=2 face="sans-serif">&nbsp; &lt;/SOAP-ENV:Body&gt;</font>
<br><font size=2 face="sans-serif">&nbsp; &lt;/SOAP-ENV:Envelope&gt;</font>
<br><font size=2 face="sans-serif">2. response</font>
<br><font size=2 face="sans-serif">&nbsp; &lt;?xml version=&quot;1.0&quot;
encoding=&quot;UTF-8&quot; ?&gt; </font>
<br><font size=2 face="sans-serif">&nbsp; &lt;soapenv:Envelope xmlns:soapenv=&quot;http://schemas.xmlsoap.org/soap/envelope/&quot;
xmlns:soapenc=&quot;http://schemas.xmlsoap.org/soap/encoding/&quot; xmlns:xsd=&quot;http://www.w3.org/2001/XMLSchema&quot;
xmlns:xsi=&quot;http://www.w3.org/2001/XMLSchema-instance&quot;&gt;</font>
<br><font size=2 face="sans-serif">&nbsp; &lt;soapenv:Body&gt;</font>
<br><font size=2 face="sans-serif">&nbsp; &lt;getTransactionsResponse xmlns=&quot;http://service.bank&quot;&gt;</font>
<br><font size=2 face="sans-serif">&nbsp; &lt;ns-946433677:TransRecord
xmlns:ns-946433677=&quot;http://model.bank&quot;&gt;</font>
<br><font size=2 face="sans-serif">&nbsp; &lt;ns-946433677:timeStamp&gt;2004-02-04T05:16:36.132Z&lt;/ns-946433677:timeStamp&gt;
</font>
<br><font size=2 face="sans-serif">&nbsp; &lt;ns-946433677:transType&gt;Trx1&lt;/ns-946433677:transType&gt;
</font>
<br><font size=2 face="sans-serif">&nbsp; &lt;ns-946433677:transAmt&gt;80&lt;/ns-946433677:transAmt&gt;
</font>
<br><font size=2 face="sans-serif">&nbsp; &lt;/ns-946433677:TransRecord&gt;</font>
<br><font size=2 face="sans-serif">&nbsp; &lt;ns-946433677:TransRecord
xmlns:ns-946433677=&quot;http://model.bank&quot;&gt;</font>
<br><font size=2 face="sans-serif">&nbsp; &lt;ns-946433677:timeStamp&gt;2004-02-04T05:16:36.132Z&lt;/ns-946433677:timeStamp&gt;
</font>
<br><font size=2 face="sans-serif">&nbsp; &lt;ns-946433677:transType&gt;Trx2&lt;/ns-946433677:transType&gt;
</font>
<br><font size=2 face="sans-serif">&nbsp; &lt;ns-946433677:transAmt&gt;81&lt;/ns-946433677:transAmt&gt;
</font>
<br><font size=2 face="sans-serif">&nbsp; &lt;/ns-946433677:TransRecord&gt;</font>
<br><font size=2 face="sans-serif">&nbsp; &lt;ns-946433677:TransRecord
xmlns:ns-946433677=&quot;http://model.bank&quot;&gt;</font>
<br><font size=2 face="sans-serif">&nbsp; &lt;ns-946433677:timeStamp&gt;2004-02-04T05:16:36.132Z&lt;/ns-946433677:timeStamp&gt;
</font>
<br><font size=2 face="sans-serif">&nbsp; &lt;ns-946433677:transType&gt;Trx3&lt;/ns-946433677:transType&gt;
</font>
<br><font size=2 face="sans-serif">&nbsp; &lt;ns-946433677:transAmt&gt;82&lt;/ns-946433677:transAmt&gt;
</font>
<br><font size=2 face="sans-serif">&nbsp; &lt;/ns-946433677:TransRecord&gt;</font>
<br><font size=2 face="sans-serif">&nbsp; &lt;ns-946433677:TransRecord
xmlns:ns-946433677=&quot;http://model.bank&quot;&gt;</font>
<br><font size=2 face="sans-serif">&nbsp; &lt;ns-946433677:timeStamp&gt;2004-02-04T05:16:36.132Z&lt;/ns-946433677:timeStamp&gt;
</font>
<br><font size=2 face="sans-serif">&nbsp; &lt;ns-946433677:transType&gt;Trx4&lt;/ns-946433677:transType&gt;
</font>
<br><font size=2 face="sans-serif">&nbsp; &lt;ns-946433677:transAmt&gt;83&lt;/ns-946433677:transAmt&gt;
</font>
<br><font size=2 face="sans-serif">&nbsp; &lt;/ns-946433677:TransRecord&gt;</font>
<br><font size=2 face="sans-serif">&nbsp; &lt;ns-946433677:TransRecord
xmlns:ns-946433677=&quot;http://model.bank&quot;&gt;</font>
<br><font size=2 face="sans-serif">&nbsp; &lt;ns-946433677:timeStamp&gt;2004-02-04T05:16:36.132Z&lt;/ns-946433677:timeStamp&gt;
</font>
<br><font size=2 face="sans-serif">&nbsp; &lt;ns-946433677:transType&gt;Trx5&lt;/ns-946433677:transType&gt;
</font>
<br><font size=2 face="sans-serif">&nbsp; &lt;ns-946433677:transAmt&gt;84&lt;/ns-946433677:transAmt&gt;
</font>
<br><font size=2 face="sans-serif">&nbsp; &lt;/ns-946433677:TransRecord&gt;</font>
<br><font size=2 face="sans-serif">&nbsp; &lt;/getTransactionsResponse&gt;</font>
<br><font size=2 face="sans-serif">&nbsp; &lt;/soapenv:Body&gt;</font>
<br><font size=2 face="sans-serif">&nbsp; &lt;/soapenv:Envelope&gt;<br>
</font>
<br>
<br><font size=2 face="sans-serif">Regards,</font>
<br>
<br><font size=2 face="sans-serif">CW.</font>
--=_alternative 001FFA3449256E30_=--