xml-soap-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Erich Izdepski" <eizdep...@cysive.com>
Subject RE: Passing primitives into SOAP calls
Date Thu, 20 Jun 2002 21:57:44 GMT
Java has class types for primitives that work with the Parameter class. Each
object wrapper has a static member called TYPE that gives the class of the
associated primitive. For example, the class for int is given by

Erich Izdepski
Senior Software Engineer
Cysive, Inc.

-----Original Message-----
From: Jason Wells [mailto:jason@semanticresearch.com]
Sent: Thursday, June 20, 2002 5:54 PM
To: soap-user@xml.apache.org
Subject: Passing primitives into SOAP calls


I'm trying to understand how to expose a SOAP service with a method that
takes a primitive data types (such as int) rather than objects (like
Integer). Most of the code examples I've found set up the call's method
arguments like this:

Call call = new Call();
Vector params = new Vector();
params.addElement(new Parameter("caller", String.class, "whatever",

The problem is that the Parameter constructor only takes object-based
parameters (a String in this case), but won't take primitives. I
reviewed the source code for Parameter and I don't see any way to give
it a non-object parameter.

So I began to wonder if it wasn't possible. Then I ran into this
document, "Creating Type Mappings":


It seems to imply that at least from a XML serialization perspective,
Apache SOAP knows about primitive types. So how do you use one as a call


To unsubscribe, e-mail:   <mailto:soap-user-unsubscribe@xml.apache.org>
For additional commands, e-mail: <mailto:soap-user-help@xml.apache.org>

To unsubscribe, e-mail:   <mailto:soap-user-unsubscribe@xml.apache.org>
For additional commands, e-mail: <mailto:soap-user-help@xml.apache.org>

View raw message