axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ben Reif" <>
Subject RE: wsdd <operation> - How do I represent return type of List?
Date Mon, 19 Dec 2005 16:04:36 GMT
Thanks, Anne! I had thought that Axis automatically knew how to handle
List the same way it knows how to handle Map, Vector, etc, but if not
then that makes sence. So I basically just need to add a new
<typeMapping> in my wsdd file for java.util.List and assign it to my own
Serializer and Deserializer factory class, the same as my other complex
types. Down the road wouldn't it be possible for Axis to do this
automatically? All List objects could go to a generic ListSerializer or
Deserializer class, which could use reflection to look up the internal
types and call their individual serializer and deserializers?


From: Anne Thomas Manes [] 
Sent: Monday, December 19, 2005 10:50 AM
Subject: Re: wsdd <operation> - How do I represent return type of List?

You are not passing an array -- you are passing a list. Therefore you
must define your own type mapping (not an arrayMapping). And you
definitely do not want to use the soap encoding encoding style.


On 12/19/05, Ben Reif <> wrote: 

	Unfortunately I can't change the method signiture of my existing
service class to return an array because it implements an interface that
other things expect it to conform to because they use it as well. Won't
the List automatically get handled by the ArraySerializer/Deserializer
and get transported as an array over the wire? Do I need to specify an
<arrayMapping> in my wsdd file and then make my <operation> reference
that type? Something like this:
	<operation name="query" qname="ns:query" returnQName="ns:Array"
	    <parameter mode="IN" name="list" qname="ns:list"
<> >
	Also, because it's doc / lit should I not have the encoding
style in the arrayMapping or use the soapenc prefix in my input
parameter type?
	Thanks again for all of your help and replies,


	From: Anne Thomas Manes [] 
	Sent: Friday, December 16, 2005 4:25 PM
	Subject: Re: wsdd <operation> - How do I represent return type
of List?
	For better interoperability, you should convert your list into
an array. 
	See for
documentation of the WSDD <operation> definition. 
	name = the name of the Java method
	qname = the qname of the element that represents the method name
in XML
	returnQName = the qname of the element that represents the
return value in XML
	returnType = the XML type of the element that represents the
return value
	On 12/16/05, Ben Reif <> wrote: 

		I'm using Axis 1.3 to create document / literal style
services, so as I understand it, I need to be more declarative in my
wsdd file and define the operations. I have a method in my service that
returns a List of complex type objects. In reading through the
documentation I need to set the name, qname, returnQName, and returnType
attributes. Something like: 
		<operation name="query" qname="?" returnQName="?"
		I also noticed in the WSDDConstants class there were
constants defined for returnItemQName, returnItemType, itemQName, and
itemType attributes, but there is no mention of them in the
documentation. Can anyone explain how to represent a List of complex
types as either an input parameter or a return parameter in the
<operation> tag? Also, what's the difference between qname, returnQName
and the returnType (which could also be a QName maybe?).
		Thanks a bunch,

View raw message