axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ian_d_stew...@bankone.com
Subject Re: Hashtable and Vector Question
Date Tue, 21 Oct 2003 13:03:21 GMT


If your hashtable has a pre-determined set of keys, the easiest way would
be to create a JavaBean that represents the return data, and use the
BeanSerializer/Deserializer via the <beanMapping> element in your WSDD.

Example:

public class BeanExample {
    public BusinessBean business(String input) {
     ...
    }

    public BusinessBean allBusinesses() {
        ...
    }
}

<service name="BeanExample">
    <parameter name="className" value="BusinessExample"/>
    <parameter name="allowedMethods" value="business,allBusinesses"/>
    <beanMapping qname="biz:Business" languageSpecificType
="java:BusinessBean" xmlns:biz="urn:Business"/>
</service>

Now the return value of business() will be encoded as a complex data type
of type 'Business' and the return value of allBusinesses() will be encoded
as a SOAP array of Business elements, which even .NET should be able to
understand.


HTH,
Ian

Ian D. Stewart
Open Systems Engineer II
Enterprise Midrange - Bank One Infrastructure & Operations
ian_d_stewart@bankone.com
(614) 244-2564




joao.lopes@santander.pt on 10/21/2003 07:00:23 AM

Please respond to axis-user@ws.apache.org

To:   axis-user@ws.apache.org
cc:   jorge.paulo@santander.pt

Subject:  Hashtable and Vector Question












This transmission may contain information that is privileged, confidential and/or exempt from
disclosure under applicable law. If you are not the intended recipient, you are hereby notified
that any disclosure, copying, distribution, or use of the information contained herein (including
any reliance thereon) is STRICTLY PROHIBITED. If you received this transmission in error,
please immediately contact the sender and destroy the material in its entirety, whether in
electronic or hard copy format. Thank you.


Mime
View raw message