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

Dennis Sosnoski resolved JIBX-280.
----------------------------------

       Resolution: Fixed
    Fix Version/s: JiBX 1.2.2

Verified that the generated binding appears to be correct, both with and 
without the customization. The binding fragment with the customization is now:

  <mapping abstract="true" type-name="ns3:SecurityHeaderType" 
class="org.oasisopen.docs.wss.oasis200401wsswssecuritysecext1.SecurityHeaderType">
    <collection get-method="getAny" set-method="setAny" usage="optional" 
create-type="java.util.ArrayList">
      <structure type="java.lang.Object"/>
    </collection>
  </mapping>

> 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
>             Fix For: JiBX 1.2.2
>
>
> 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

        

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