[ 
http://jira.codehaus.org/browse/JIBX-280?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=169629#action_169629
 ] 

Nigel Charman commented on JIBX-280:
------------------------------------

The customization I used for this schema is:

    <schema name="oasis-200401-wss-wssecurity-secext-1.0.xsd" 
generate-all="true" prefer-inline="true" any-handling="mapped">
        <class-decorator 
class="org.jibx.schema.codegen.extend.CollectionMethodsDecorator"/>
    </schema>


> Generated binding results in "java.util.ArrayList cannot be cast to 
> org.jibx.runtime.IMarshallable"
> ---------------------------------------------------------------------------------------------------
>
>                 Key: JIBX-280
>                 URL: http://jira.codehaus.org/browse/JIBX-280
>             Project: JiBX
>          Issue Type: Bug
>          Components: CodeGen
>    Affects Versions: JiBX 1.2.1
>            Reporter: Nigel Charman
>            Assignee: Dennis Sosnoski
>
> Generate code using the schema 
> http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd.
>   The generated binding file contains:
>   <mapping abstract="true" type-name="tns:SecurityHeaderType" 
> class="org.oasisopen.docs.wss.oasis200401wsswssecuritysecext1.SecurityHeaderType">
>     <structure get-method="getSecurityHeaderTypes" 
> set-method="setSecurityHeaderTypes" usage="optional" 
> create-type="java.util.ArrayList">
>       <structure type="java.lang.Object"/>
>     </structure>
>   </mapping>
> Using this binding to marshal a SecurityHeaderType results in a 
> ClassCastException: "java.util.ArrayList cannot be cast to 
> org.jibx.runtime.IMarshallable"
> I think the mapping should read:
>   <mapping abstract="true" type-name="tns:SecurityHeaderType" 
> class="org.oasisopen.docs.wss.oasis200401wsswssecuritysecext1.SecurityHeaderType">
>     <*collection* get-method="getSecurityHeaderTypes" 
> set-method="setSecurityHeaderTypes" usage="optional" 
> create-type="java.util.ArrayList">
>       <structure type="java.lang.Object"/>
>     </*collection*>
>   </mapping>
> The relevant part of the schema is:
>       <xsd:complexType name="SecurityHeaderType">
>               <xsd:annotation>
>                       <xsd:documentation>This complexType defines header 
> block to use for security-relevant data directed at a specific SOAP 
> actor.</xsd:documentation>
>               </xsd:annotation>
>               <xsd:sequence>
>                       <xsd:any processContents="lax" minOccurs="0" 
> maxOccurs="unbounded">
>                               <xsd:annotation>
>                                       <xsd:documentation>The use of "any" is 
> to allow extensibility and different forms of security 
> data.</xsd:documentation>
>                               </xsd:annotation>
>                       </xsd:any>
>               </xsd:sequence>
>               <xsd:anyAttribute namespace="##other" processContents="lax"/>
>       </xsd:complexType>

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

        

------------------------------------------------------------------------------
Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM) are
powering Web 2.0 with engaging, cross-platform capabilities. Quickly and
easily build your RIAs with Flex Builder, the Eclipse(TM)based development
software that enables intelligent coding and step-through debugging.
Download the free 60 day trial. http://p.sf.net/sfu/www-adobe-com
_______________________________________________
jibx-devs mailing list
jibx-devs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jibx-devs

Reply via email to