• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Paul Clapham
  • Jeanne Boyarsky
  • Junilu Lacar
  • Henry Wong
  • Ron McLeod
  • Devaka Cooray
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Frits Walraven
  • Tim Holloway
  • Carey Brown
  • Piet Souris
  • salvin francis
  • fred rosenberger

Generated Holder Types

Ranch Hand
Posts: 577
Tomcat Server Notepad Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi folks,
While studying "Generated Holder Types" in RMH, page 463, I've got a doubt for the example quoted in the section. In the Listing 15-50, the WSDL XML Schema defines a complexType "StringArray". The complexType definition is as follows.

<xsd:complexType name="StringArray">
<xsd:element name="item" type="xsd:string" maxOccurs="unbounded"/>

So the generated Holder for StringArray should look like this.

public class StringArrayHolder implements javax.xml.rpc.Holder{
public StringArray stringArray;
public StringArrayHolder(){
public StringArrayHolder(StringArray stringArray){

I don't understand two points here.
1. Why the StringArrayHolder class mentioned in the book is not like above. I strongly believe that the above StringArrayHolder is correct because JAX-RPC compiler also generates a Java Bean class StringArray with a field of type String[].
2. Why the class is final while the previous example (Listing 15-49) doesn't have final qualifier.

Also, if the WSDL XML Schema defined the StringArray in the following way

<element name="StringArray" type="xsd:string" maxOccurs="unbounded"/>

then StringArrayHolder given in the book is correct i.e.

public class StringArrayHolder implements javax.xml.rpc.Holder{
public String[] value;
public StringArrayHolder(){
public StringArrayHolder(String[] value){

Someone please clarify me.

I feel this would the question most of the people get, so apologies if the question is repeated although I don't find one like this.

Thanks and Regards,

[ June 07, 2008: Message edited by: Naren Chivukula ]
[ June 07, 2008: Message edited by: Naren Chivukula ]
Hey! You're stepping on my hand! Help me tiny ad!
Devious Experiments for a Truly Passive Greenhouse!
    Bookmark Topic Watch Topic
  • New Topic