You are viewing a plain text version of this content. The canonical link for it is here.
Posted to soap-dev@xml.apache.org by Luke Chen <lc...@parasoft.com> on 2001/04/18 22:22:20 UTC

Help with soap primitive types.

Hi,
I am new to this group, so forgive me if this question has been answered in
the recent past...  In the context of the Apache SOAP, how do I pass any of
the SOAP primitive types as arguments for any given SOAP service that
expects such a primitive type (Such as boolean, real,  timeInstant,
timeDuration, recurringInstant,
binary, uri, and language).  Any help and discussion is greatly appreciated.

Luke

Luke Chen               email: lchen@parasoft.com
Parasoft Corporation    voice:(626) 256-3680 x 1217
2031 S. Myrtle          fax:  (626) 305-9048
Monrovia, CA 91016


Re: Help with soap primitive types.

Posted by Scott Nichol <sn...@computer.org>.
Roughly speaking, the mapping of Java data types to SOAP data types is done in
SOAPMappingRegistry.  Java primitives, as well as some additional types such as
java.util.Date, are mapped one-to-one to SOAP primitives.  The mapping, however, is not
"onto" (if I remember my math terminology), i.e. there is not a mapping present for
every SOAP primitive type.  For example, GregorianCalendar maps to date and Date maps to
timeInstant, but I see nothing that maps to real, timeDuration or recurringInstant.

It is not especially difficult to add your own mappings, however; it is commonly done
for compound data types, but there is no restriction that you cannot do a mapping for a
primitive type.  You need only write a Serializer and Deserializer for the type which
stream the data as XML or parse it from a DOM, respectively, then add a mapping at run
time.  Of course, [de]serializers for SOAP primitive types might be of use generally, so
they would likely be a welcome contribution to the code base.

Scott

----- Original Message -----
From: "Luke Chen" <lc...@parasoft.com>
To: <so...@xml.apache.org>
Sent: Wednesday, April 18, 2001 4:22 PM
Subject: Help with soap primitive types.


> Hi,
> I am new to this group, so forgive me if this question has been answered in
> the recent past...  In the context of the Apache SOAP, how do I pass any of
> the SOAP primitive types as arguments for any given SOAP service that
> expects such a primitive type (Such as boolean, real,  timeInstant,
> timeDuration, recurringInstant,
> binary, uri, and language).  Any help and discussion is greatly appreciated.
>
> Luke
>
> Luke Chen               email: lchen@parasoft.com
> Parasoft Corporation    voice:(626) 256-3680 x 1217
> 2031 S. Myrtle          fax:  (626) 305-9048
> Monrovia, CA 91016
>