Reusing unwrapped array elements in WSDL

From: Ryan LeCompte <>
Date: Thu, 12 May 2005 08:20:27 -0400

Hello all,


If there are multiple operations in a WSDL that return the same type of
array, and we define the return element using the unwrapped array convention
as follows:


<element name="getItemsResponse">



            <element name="item" type="types:Item" minOccurs="0"





Do we need to repeat the above element declaration for each operation? So
there would be an <element name="getOperationOneResponse"> and <element
name="getOperationTwoResponse"> etc. Or is it possible to just reuse the
same element declaration for each <message> part attribute? I tried reusing
the element as such, and it appears that the code generated from the WSDL by
wscompile wasn't correct (it was using wrapped types as opposed to Item[]).
I'm currently defining separate elements for each return type, and the
generated code looks fine. However I'm noticing that wscompile is generating
objects called, for example, "GetOperationOneResponse" and
"GetOperationTwoResponse", which essentially look identical as they both
contain a single Item[] attribute. Is there anything that I can do at the
WSDL-level to avoid duplication of such objects?