• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

maxOccurs issue

 
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have the below WSDL . The problem here is that WSDL2java does not bother about the MaxOccur .Which means for any value of maxoccur more than 1,it considers as unbound. Is this an error ?

For example in the below WSDL empSkills elelement has a maxOccur ="2" ,but WSDL2java converts this as maxOccur=unbound . After deploying the application ,when i try to hit the end point URI i get the WSDL with empSkills element representing maxOccurs=unbound.

ENVIRONMENT: Axis 1.4,Weblogic 8.1




 
Ranch Hand
Posts: 2198
1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi!

Bala'J'i Rags wrote:I have the below WSDL . The problem here is that WSDL2java does not bother about the MaxOccur .Which means for any value of maxoccur more than 1,it considers as unbound. Is this an error ?


No. So far, I haven't seen any utility program like WSDL2Java that generates code for boundary checking.
If you want total control of the WSDL, you should deploy your own WSDL, instead of letting the server generate one. In your Java code, you specify the presence of an existing WSDL by using the wsdlLocation attribute in the @WebService or @WebServiceProvider annotations.
Best wishes!
 
Bala'J'i Rags
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks for the quick reply Ivan.

Actually Axis1.4 comes with utility -Wsdl2Java which autogenerates stub/skeleton given a WSDL file. Since i am using a Top down approach and iam using jdk1.4..iam

handicapped with this issue.

Where should i give the wsdl location in the program.Can you suggest some sample code snippet

Thanks for your time..
 
All of the following truths are shameless lies. But what about this tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic