You are viewing a plain text version of this content. The canonical link for it is here.
Posted to soap-user@xml.apache.org by Michael Svoboda <mi...@softwired-inc.com> on 2001/07/12 17:12:53 UTC

Generic Compound Type?

I'd like to use a generic compound type, as it is described in the
Soap-Spec in chapter 5.4.3.
But I have no idea what has to be done, to use it. I even don't know if
Apache supports it.

Does anyone tried it out and has a code snipplet from a client and the
web-service method?
How do I deploy it? Do I need a schema?

I would like to use a generic compound type because I have a generic
method that takes 0 to n Parameters of different simple types. 

In Java I would use a Hashtable as single parameter that would contain
all parameters inside. Because the Hashtable-type is not part of the
Soap-Spec I can't use it, otherwise I would loose compatibility to other
implementation.

I'm thankful for any help or hint
cheers

michael svoboda

Re: Generic Compound Type?

Posted by Oliver Rettig <Ol...@telda.net>.
Hi Michael,

> I'd like to use a generic compound type, as it is described in the
> Soap-Spec in chapter 5.4.3.
> But I have no idea what has to be done, to use it. I even don't know if
> Apache supports it.
>
> Does anyone tried it out and has a code snipplet from a client and the
> web-service method?
> How do I deploy it? Do I need a schema?
>
> I would like to use a generic compound type because I have a generic
> method that takes 0 to n Parameters of different simple types.
>
> In Java I would use a Hashtable as single parameter that would contain
> all parameters inside. Because the Hashtable-type is not part of the
> Soap-Spec I can't use it, otherwise I would loose compatibility to other
> implementation.

I had the same problem and I had solved it by using a Properties Objekt
instead a Hashtable. The Properties-Objekt has Methods for writing all in a
File or something like this and I write all in a String and than I use
simple String as parameter or result-value instead of Hashtable.
It´s not a really good way but it works find and you don´t need a lot of
time for implementation. The nices way should be to write
serializers/deserializers for your client.

Hope that helps you

Oliver


Re: Generic Compound Type?

Posted by Oliver Rettig <Ol...@telda.net>.
Hi Michael,

> I'd like to use a generic compound type, as it is described in the
> Soap-Spec in chapter 5.4.3.
> But I have no idea what has to be done, to use it. I even don't know if
> Apache supports it.
>
> Does anyone tried it out and has a code snipplet from a client and the
> web-service method?
> How do I deploy it? Do I need a schema?
>
> I would like to use a generic compound type because I have a generic
> method that takes 0 to n Parameters of different simple types.
>
> In Java I would use a Hashtable as single parameter that would contain
> all parameters inside. Because the Hashtable-type is not part of the
> Soap-Spec I can't use it, otherwise I would loose compatibility to other
> implementation.

I had the same problem and I had solved it by using a Properties Objekt
instead a Hashtable. The Properties-Objekt has Methods for writing all in a
File or something like this and I write all in a String and than I use
simple String as parameter or result-value instead of Hashtable.
It´s not a really good way but it works find and you don´t need a lot of
time for implementation. The nices way should be to write
serializers/deserializers for your client.

Hope that helps you

Oliver