[ 
http://jira.codehaus.org/browse/JIBX-329?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Dennis Sosnoski closed JIBX-329.
--------------------------------


> Codegen: results in "test-method can only be used with optional property"
> -------------------------------------------------------------------------
>
>                 Key: JIBX-329
>                 URL: http://jira.codehaus.org/browse/JIBX-329
>             Project: JiBX
>          Issue Type: Bug
>          Components: CodeGen
>    Affects Versions: JiBX 1.2.1
>            Reporter: Nigel Charman
>            Assignee: Dennis Sosnoski
>             Fix For: JiBX 1.2.2
>
>
> Running codegen on following schema:
> <xsd:schema xmlns="urn:ns1" xmlns:xsd="http://www.w3.org/2001/XMLSchema"; 
> targetNamespace="urn:ns1" elementFormDefault="qualified">
>       <xsd:complexType name="ContentType">
>               <xsd:sequence>
>                       <xsd:element name="Notes" type="xsd:anyType" 
> minOccurs="0"/>
>               </xsd:sequence>
>       </xsd:complexType>
>       <xsd:element name="Content" type="ContentType"/>
> </xsd:schema>
> creates binding file:
> <binding xmlns:tns="urn:ns1" name="binding" package="ns1">
>   <namespace uri="urn:ns1" default="elements"/>
>   <mapping abstract="true" type-name="tns:ContentType" 
> class="ns1.ContentType">
>     <structure test-method="ifNotesPresent" flag-method="flagNotesPresent" 
> name="Notes"/>
>   </mapping>
>   <mapping class="ns1.ContentType" name="Content">
>     <structure map-as="tns:ContentType"/>
>   </mapping>
> </binding>
> When running the binding compiler, this results in:
>      [bind] Error: test-method can only be used with optional property; on 
> structure element at (line 4, col 90, in binding.xml)
>      [bind] Error: name attribute not allowed on concrete mapping reference; 
> on structure element at (line 4, col 90, in binding.xml)
>      [bind] Error: name attribute not allowed on concrete mapping reference; 
> on structure element at (line 4, col 90, in binding.xml)
> A manual workaround is to usage="optional" to the line 4 of the binding file

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

------------------------------------------------------------------------------
SOLARIS 10 is the OS for Data Centers - provides features such as DTrace,
Predictive Self Healing and Award Winning ZFS. Get Solaris 10 NOW
http://p.sf.net/sfu/solaris-dev2dev
_______________________________________________
jibx-devs mailing list
jibx-devs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jibx-devs

Reply via email to