axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ben Reif" <Ben.R...@cgi-ams.com>
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?
 
Ben 

________________________________

From: Anne Thomas Manes [mailto:atmanes@gmail.com] 
Sent: Monday, December 19, 2005 10:50 AM
To: axis-user@ws.apache.org
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.

Anne


On 12/19/05, Ben Reif <Ben.Reif@cgi-ams.com> 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:
	 
	<arrayMapping
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" 
	    innerType="coretest671:WSObject" 
	
languageSpecificType="java:com.ams.coretest.domain.test.webservices.WSOb
ject[]" 
	    qname="ns:ArrayOfWSObject" 
	
xmlns:coretest="http://CoretestWebServices/service/WSObjectService" 
	
xmlns:coretest671="http://webservices.test.domain.coretest.ams.com"/>
	 
	<operation name="query" qname="ns:query" returnQName="ns:Array"
returnType="ns:ArrayOfWSObject"
xmlns:ns="http://schemas.xmlsoap.org/soap/encoding/">
	    <parameter mode="IN" name="list" qname="ns:list"
type="soapenc:Array"
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"/
<http://schemas.xmlsoap.org/soap/encoding/%22/> >
	</operation> 
	 
	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,
	Ben

________________________________

	From: Anne Thomas Manes [mailto:atmanes@gmail.com] 
	Sent: Friday, December 16, 2005 4:25 PM
	To: axis-user@ws.apache.org
	Subject: Re: wsdd <operation> - How do I represent return type
of List?
	
	
	
	Ben,
	
	For better interoperability, you should convert your list into
an array. 
	
	See http://www.osmoticweb.com/axis-wsdd/operation.htm 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
	
	Anne
	
	
	On 12/16/05, Ben Reif <Ben.Reif@cgi-ams.com> 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="?"
returnType="?">
		 
		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,
		
		Ben




Mime
View raw message