This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Web Services and the fly likes maxOccurs issue Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Web Services
Bookmark "maxOccurs issue " Watch "maxOccurs issue " New topic
Author

maxOccurs issue

Bala'J'i Rags
Greenhorn

Joined: Jul 29, 2008
Posts: 26
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





SCJP 1.5,SCWCD 1.5
Bala'J'i
Ivan Krizsan
Ranch Hand

Joined: Oct 04, 2006
Posts: 2198
    
    1
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!


My free books and tutorials: http://www.slideshare.net/krizsan
Bala'J'i Rags
Greenhorn

Joined: Jul 29, 2008
Posts: 26
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..
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: maxOccurs issue
 
Similar Threads
order of request parameters causing unexpected subelement exception
Axis2 - Transfer document using MTOM
AXIS 1.4 Response XML Help-Urgent
Axis2 - Transfer document using MTOM
Web Service message level Encryption Decryption through public and private key