• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

maxOccurs issue

 
Bala'J'i Rags
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
  • 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




 
Ivan Krizsan
Ranch Hand
Posts: 2198
1
  • Mark post as helpful
  • send pies
  • 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
  • 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..
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic