axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Eric Chijioke" <>
Subject Axis and .NET interoperability - Arrays
Date Thu, 09 Sep 2004 16:03:18 GMT

I have read a LOT of discussions concerning problems serializing and
deserializing arrays between an Axis server and a .NET client but can't
seem to find any definitive discussion/document. Is there one?


I have a .NET client that is attempting to deserialize an array of
custom types that are serialized by an Axis server.
I am using Axis 1.2 beta.
The Axis server is configured for document/litteral (wrapped).
The method being invoked by the client is called getFactors();

The SOAP response being sent by the server looks as follows:

--------------------------- getFactors Reponse

<?xml version="1.0" encoding="utf-8"?>
<soapenv:Envelope ...namespaces omitted...>
  <getFactorsResponse xmlns="">
   <factors xsi:type="ns1:Factor" xmlns:ns1="">
    <name>Root Factor</name>
   <factors xsi:type="ns2:Factor" xmlns:ns2="">
    <name>Factor 1</name>
   <factors xsi:type="ns3:Factor" xmlns:ns3="">
    <name>Factor 2</name>


The relevant fragments from my wsdd file are as follows (some namespaces

----------------- WSDD operation and typemapping fragments

<operation name="getFactors" qname="ns:getFactors"
returnQName="ns1:factors" returnType="ns1:FactorArray">
	<parameter name="ids" type="ns1:stringArray"/>

<typeMapping qname="ns1:FactorArray"


The relevant fragments from my WSDL are as follows (some namespaces

--------- WSDL element and type fragments (operation & message ommitted)

<element name="getFactors">
			<element minOccurs="1" maxOccurs="1" name="ids"

<element name="getFactorsResponse">
			<element minOccurs="1" maxOccurs="1"
name="factors" type="intf:FactorArray"/>

<complexType name="FactorArray">
		<element name="factor" type="intf:Factor" minOccurs="0"


I have a couple of questions:

1) How come Axis doesn't create a single <factors> container element
with many <factor> elements as the WSDL schema seems to describe? The
<factors> array item elements in the response  are being driven by the
{returnQName="ns1:factors"} in the wsdd operation. Why isn't it using
the FactorArray definition from the WSDL?

2) If this response is correct (with no <factors> container element),
how does one make this work with a .NET client which seems to expect a
container element (to provide to the XmlArrayAttribute if your familiar
with .NET webservices)?


Eric Chijioke 

View raw message