axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Grimshaw, Jeffrey" <>
Subject [axis2] String arrays as a property
Date Thu, 15 Mar 2007 21:38:36 GMT
Hi all.  I generated a new web service and one of the types in the wsdl
has the following definition:

<xsd:complexType name="MyStuffResponse">
		<xsd:element name="ListOfStuff" type="xsd:String"
minOccurs="0" maxOccurs="unbounded"/>

A simple string list, right?  Well, what wsdl2java generated from this
definition is and object with this property:

	protected[] localListOfStuff;

So the adder for this list looks like this:

	public void addHeader( param) {
		if (localListOfStuff == null) {
			localListOfStuff = new[] {};

		// update the setting tracker
		localListOfStuffTracker = true;

		java.util.List list =
		this.localListOfStuff =
([]) list


Unfortunately, another part of the service that uses this class doesn't
know about the type, and I don't want it
to have to.  Is there an easy way to create an adder that has a
signature like this (which is what I was aiming for in the first place):

	public void addHeader(String param)

Perhaps make a wrapper that creates a new
and delegates?  I've been digging into the javadoc for
org.apache.axiom.*, but I don't know enough about the libraries to know
what to look for.

Any help will be very much appreciated.


Jeff Grimshaw
Sr. Programmer/Analyst
Green Point Mortgage

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message