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

Dennis Sosnoski resolved JIBX-329.
----------------------------------

       Resolution: Fixed
    Fix Version/s: JiBX 1.2.2

"Fixed" this, in the sense that the optional="true" setting now appears in the 
binding. Also corrected the handling of a required element of anyType, to 
properly generate an empty <structure> component of the binding with the 
element name. There is still no actual handling of anyType values, though - to 
do that, there'd need to be a DOM Element in the data model and a reference to 
the DOM element mapper in the binding.

> 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

        

------------------------------------------------------------------------------
Come build with us! The BlackBerry&reg; Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9&#45;12, 2009. Register now&#33;
http://p.sf.net/sfu/devconf
_______________________________________________
jibx-devs mailing list
jibx-devs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jibx-devs

Reply via email to