[ http://jira.codehaus.org/browse/JIBX-64?page=all ]
     
Dennis Sosnoski closed JIBX-64:
-------------------------------


> Namespace Index Incorrect for custom marshallers
> ------------------------------------------------
>
>          Key: JIBX-64
>          URL: http://jira.codehaus.org/browse/JIBX-64
>      Project: JiBX
>         Type: Bug
>   Components: core
>     Versions: CVS
>     Reporter: Chris Chen
>     Assignee: Dennis Sosnoski
>     Priority: Minor

>
>
> When a binding file contains custom marshaller and unmarshaller for a 
> particular mapping in a specific namespace, the following is required:
> 1) The namespace must be declared globally, because
> 2) mappings with custom (un)marshallers cannot have child elements.
> When the binding file contains mappings with these custom (un)marshallers, 
> the generated code passes an index of 0 to the custom marshalling class's 
> constructor.
> Interestingly, if the mapping with the custom (un)marshallers is referenced 
> in other mappings that do not use custom (un)marshallers, then the proper 
> index for the namespace will be passed.
> For instance,
> <binding>
>   <namespace uri="ns:a" default="elements"/>
>   <mapping name="a" class="AClass" unmarshaller="AMapper" 
> marshaller="AMapper" ns="ns:a"/>
> </binding>
> The generated code for the above binding file should pass index 2 to 
> AMapper's constructor.  However, it does not.
> In the following binding file,
> <binding>
>   <namespace uri="ns:a" default="elements"/>
>   <mapping name="a" class="AClass" unmarshaller="AMapper" 
> marshaller="AMapper" ns="ns:a"/>
>   <mapping name="b" class="BClass">
>     <structure field="a" usage="optional"/>
>   </mapping>
> </binding>
> When the custom mapping (a) is referenced in another mapping, then this will 
> produce the proper code.  The generated class will pass an index of 2 to 
> AClass' constructor.
> I am not entirely sure if this is the intended behavior.  If not, then this 
> issue can be closed.
> Thanks,
> Chris

-- 
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



-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO September
19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
jibx-devs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jibx-devs

Reply via email to