users@jax-rpc.java.net

Why my client-side stub classes not generated properly with all method calls ?

From: Ramasamy S/O Valliappan <rama_at_SIMTECH.A-STAR.EDU.SG>
Date: Thu, 18 Sep 2003 13:11:50 +0800

> Hi everyone
>
> Contents of InternationalString.java source code :
>
> public class InternationalString
> implements Serializable
> {
>
> public InternationalString()
> {
> strings = new HashMap();
> }
>
> public InternationalString(LocalizedString localizedstring)
>
> {
> this();
> String s = makeKey(localizedstring.getCharsetName(), localizedstring.getLocale());
> strings.put(s, localizedstring);
> }
>
> public InternationalString(Locale locale, String s)
> {
> this();
> String s1 = makeKey(DEFAULT_CHARSET, locale);
> strings.put(s1, new LocalizedString(locale, s));
> }
>
> public InternationalString(String s)
> {
> this(Locale.getDefault(), s);
> }
>
> public String getValue()
>
> {
> return getValues(Locale.getDefault());
> }
>
> public String getValues(Locale locale)
>
> {
> if(locale == null)
> {
> return null;
> } else
> {
> String s = makeKey(DEFAULT_CHARSET, locale);
> LocalizedString localizedstring = (LocalizedString)strings.get(s);
> return localizedstring != null ? localizedstring.getValue() : null;
> }
> }
>
> public void setValue(String s)
>
> {
> setValues(Locale.getDefault(), s);
> }
>
> public void setValues(Locale locale, String s)
>
> {
> String s1 = makeKey(DEFAULT_CHARSET, locale);
> strings.put(s1, new LocalizedString(locale, s));
> }
>
> public void addLocalizedString(LocalizedString localizedstring)
>
> {
> if(localizedstring == null)
> {
> //throw new JAXRException(ResourceBundle.getBundle("com/sun/xml/registry/uddi/LocalStrings").getString("InternationalStringImpl:LocalizedString_cannot_be_null"));
> } else
> {
> String s = makeKey(localizedstring.getCharsetName(), localizedstring.getLocale());
> strings.put(s, localizedstring);
> return;
> }
> }
>
> public void addLocalizedStrings(Collection collection)
>
> {
> if(collection == null)
> return;
> Iterator iterator = collection.iterator();
> try
> {
> while(iterator.hasNext())
> addLocalizedString((LocalizedString)iterator.next());
> }
> catch(ClassCastException classcastexception)
> {
> //throw new UnexpectedObjectException(ResourceBundle.getBundle("com/sun/xml/registry/uddi/LocalStrings").getString("InternationalStringImpl:Objects_in_collection_must_be_LocalizedStrings"), classcastexception);
> }
> }
>
> public void removeLocalizedString(LocalizedString localizedstring)
>
> {
> if(localizedstring == null)
> {
> return;
> } else
> {
> String s = makeKey(localizedstring.getCharsetName(), localizedstring.getLocale());
> strings.remove(s);
> return;
> }
> }
>
> public void removeLocalizedStrings(Collection collection)
>
> {
> if(collection == null)
> return;
> for(Iterator iterator = collection.iterator(); iterator.hasNext();)
> try
> {
> removeLocalizedString((LocalizedString)iterator.next());
> }
> catch(ClassCastException classcastexception)
> {
> //throw new UnexpectedObjectException(ResourceBundle.getBundle("com/sun/xml/registry/uddi/LocalStrings").getString("InternationalStringImpl:Objects_in_collection_must_be_LocalizedStrings"), classcastexception);
> }
>
> }
>
> public LocalizedString getLocalizedString(Locale locale, String s)
>
> {
> String s1 = makeKey(s, locale);>
> return (LocalizedString)strings.get(s1);
> }
>
> public Collection getLocalizedStrings()
>
> {
> return new ArrayList(strings.values());
> }
>
> private String makeKey(String s, Locale locale)
> {
> return new String(s + locale.toString());
> }
>
> static String DEFAULT_CHARSET = "UTF-8";
> private HashMap strings;
>
> }
>
> In the above source code for the InternationalString.java on the server-side, May I know why my client-side stub class is not generated properly to include all the methods like the ones I mentioned :
>
> For example, why these methods are missing like
> public void addLocalizedStrings(Collection collection),
> public Collection getLocalizedStrings(),
> public void setValues(Locale locale, String s), and
> public String getValues(Locale locale), etc.
> are not shown here below:
>
> package serviceregistry_client;
>
> public class InternationalString {
> private java.lang.String value;
>
> public InternationalString() {
> }
>
> public InternationalString(java.lang.String value) {
> this.value = value;
> }
>
> public java.lang.String getValue() {
> return value;
> }
>
> public void setValue(java.lang.String value) {
> this.value = value;
> }
> }
>
> From
> V. RAM
> 6793 8385 / 8971.
> www.jssl.org
>
>