xml-soap-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jason Wells <ja...@semanticresearch.com>
Subject Passing primitives into SOAP calls
Date Thu, 20 Jun 2002 21:53:33 GMT
Hello,

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", 
null));
call.setParams(params);

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":

http://xml.apache.org/soap/docs/guide/serializer.html

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 
parameter?

Thanks,
Jason


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


Mime
View raw message