You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cxf.apache.org by "Santhosh Manickam (JIRA)" <ji...@apache.org> on 2012/11/01 16:33:16 UTC

[jira] [Commented] (CXF-4597) CXF - jaxws - schema validation for nillable false

    [ https://issues.apache.org/jira/browse/CXF-4597?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13488765#comment-13488765 ] 

Santhosh Manickam commented on CXF-4597:
----------------------------------------

minOccurs is not mentioned, by default minOccurs=1, here is XMLElement specification http://docs.oracle.com/javaee/5/api/javax/xml/bind/annotation/XmlElement.html

I think this is bug, that needs to be fixed.
                
> CXF - jaxws - schema validation for nillable false
> --------------------------------------------------
>
>                 Key: CXF-4597
>                 URL: https://issues.apache.org/jira/browse/CXF-4597
>             Project: CXF
>          Issue Type: Bug
>          Components: JAXB Databinding
>    Affects Versions: 2.6
>         Environment: Tomcat web server
>            Reporter: Balaji Sengeni
>            Priority: Blocker
>             Fix For: Invalid
>
>
> Hi ,
>  I apologize, if I have chosen wrong issue type.
>  I use contract first web service where xsd is defined in external file. 
>  [by default, nillable is false if we haven't mentioned for elements in xsd]
>  I used jaxws-maven-plugin to import java classes from wsdl. I noticed that nillable attribute is missing for @XmlElement(required = true) [java data type string]. I assume, its the default behaviour, so Jaxb will treat those element as nillable false.
>  But when the user sends empty tag, my web service accepts that value. 
>  Without touching the xsd (setting minLength for the string), is there a easy way to do non empty string validation?
>  
>  

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira