I think your right, I am not sure how you can achieve both objectives
in this case.
Ryan LeCompte wrote:
> Doug,
>
> Thanks for the suggestion. However, this won't work if I want to use the
> "unwrapped array convention" right?
>
> Ryan
>
> -----Original Message-----
> From: Doug Kohlert [mailto:Doug.Kohlert_at_Sun.COM]
> Sent: Thursday, May 12, 2005 12:07 PM
> To: users_at_jax-rpc.dev.java.net
> Subject: Re: Reusing unwrapped array elements in WSDL
>
> Ryan,
> Just don't use an anonymous type. Instead refer to the same named type.
>
>
> <element name="getItemsResponse" type="ResponseType"/>
>
>
> <element name ="getOperationTwoResponse" type="ResponseType"/>
>
> <complexType name="ResponseType">
>
> <sequence>
>
> <element name="item" type="types:Item" minOccurs="0" maxOccurs="unbounded"/>
>
> </sequence>
>
> </complexType>
>
>
>
> Ryan LeCompte wrote:
>
>
>>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">
>>
>><complexType>
>>
>><sequence>
>>
>><element name="item" type="types:Item" minOccurs="0"
>>maxOccurs="unbounded"/>
>>
>></sequence>
>>
>></complexType>
>>
>></element>
>>
>>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?
>>
>>Thanks,
>>
>>Ryan
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_jax-rpc.dev.java.net
> For additional commands, e-mail: users-help_at_jax-rpc.dev.java.net
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_jax-rpc.dev.java.net
> For additional commands, e-mail: users-help_at_jax-rpc.dev.java.net
>
--
Doug Kohlert
Java Software Division
Sun Microsystems, Inc.
phone: 503 345-9806