On 5 Jul 2005, at 01:14, Keith Hatton wrote:

Axis uses the JAX-RPC specification for mapping between Java and XSD
types.
You can get the JAX-RPC 1.1 specification from here:
http://java.sun.com/xml/downloads/jaxrpc.html

Okay. So it's a restriction imposed by a Java specification, rather than SOAP itself?

That's frustrating, but it makes more sense.

I'd seen that site before; guess I'll start looking at it more thoroughly.

Lists (and other collection types) are not supported. End of story.
You're barking up the wrong tree to try and force sophisticated
collection objects into SOAP. Really, SOAP is just a way of passing
messages between systems, not objects.
http://weblogs.cs.cornell.edu/AllThingsDistributed/archives/ 000343.html

Hmm. That's depressing.

What I really want to do is treat SOAP like XML-RPC. We have a bunch of older code using XMLRPC and a bunch of newer code using SOAP. The older code is simple. (It's using Hashtable and Vector instead of Map and List, but that's easy to change.) The newer code is not so simple.

Of course, to turn an array into a list is as simple as
java.util.Arrays.asList(Object[]); to turn a list into an array is as
simple as java.util.List.toArray().

Right. This is what I'm doing now, but it's not simple. I have to make near-duplicates of the classes Axis generates for me with the collections types I want. Then I need wrapper code around the calls to translate between the two. That's what I'm trying to avoid.

It seems like if I'm going to be making my own stuff anyway, I'd rather just get SAX-style stuff rather than a DOM-style tree that doesn't make sense.

--
Scott Lamb <http://www.slamb.org/>

Reply via email to