| 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
Bartender
Joined: Oct 04, 2006
Posts: 2160
|
|
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..
|
 |
 |
|
|
subject: maxOccurs issue
|
|
|