Minesh Desai created JIBX-475:
---------------------------------

             Summary: Unmarshalling Exception - Optional Empty Tag
                 Key: JIBX-475
                 URL: https://jira.codehaus.org/browse/JIBX-475
             Project: JiBX
          Issue Type: Bug
            Reporter: Minesh Desai


Hi,

JiBX throws an exception while unmarshalling a empty element which is defined 
as an optional structure in a binding file. 

XML Tag name: HierarchyInfo


XSD:

<xsd:complexType name="CorporationInfo">
                <xsd:sequence>
                        <xsd:element name="CorpIdInfo" type="ns1:CorpIdInfo" 
minOccurs="0"/>
                        <xsd:element name="HierarchyInfo" 
type="ns1:HierarchyInfo"  minOccurs="0"/>
                </xsd:sequence>
        </xsd:complexType>


<xsd:complexType name="HierarchyInfo">
                <xsd:sequence >
                        <xsd:element name="rootId" type="xsd:integer"/>
                        <xsd:element name="rootName" type="genericText40" 
minOccurs="0"/>
                        <xsd:element name="nodeId" type="genericText10" 
minOccurs="0"/>
                        <xsd:element name="parentId" type="genericText10" 
minOccurs="0"/>
                        <xsd:element name="rootDesc" type="genericText80" 
minOccurs="0"/>
                        <xsd:element name="billCycle" type="xsd:integer" 
minOccurs="0"/>
                        <xsd:element name="corpId" type="genericText16" 
minOccurs="0"/>
                        <xsd:element name="hierarchyLinkId" 
type="genericText10" minOccurs="0"/>
                        <xsd:element name="blockSubCreationInd" 
type="xsd:boolean"/>
                        <xsd:element name="SsitInfo" type="ns1:SsitInfo" 
minOccurs="0"/>
                        <xsd:element name="SasInfo" type="ns1:SasInfo" 
minOccurs="0"/>
                </xsd:sequence>
        </xsd:complexType>


Generated binding file:


- <mapping abstract="true" type-name="ns1:CorporationInfo" 
class="com.spcs.cos.xdl.model.ban.info.response.CorporationInfo">
  <structure map-as="ns1:CorpIdInfo" get-method="getCorpIdInfo" 
set-method="setCorpIdInfo" usage="optional" name="CorpIdInfo" /> 
  <structure map-as="ns1:HierarchyInfo" get-method="getHierarchyInfoType" 
set-method="setHierarchyInfoType" usage="optional" name="HierarchyInfo" /> 

- <mapping abstract="true" type-name="ns1:HierarchyInfo" 
class="com.spcs.cos.xdl.model.ban.info.response.HierarchyInfo">
  <value style="element" name="rootId" get-method="getRootId" 
set-method="setRootId" /> 
  <value style="element" name="rootName" get-method="getRootName" 
set-method="setRootName" usage="optional" /> 
  <value style="element" name="nodeId" get-method="getNodeId" 
set-method="setNodeId" usage="optional" /> 
  <value style="element" name="parentId" get-method="getParentId" 
set-method="setParentId" usage="optional" /> 
  <value style="element" name="rootDesc" get-method="getRootDesc" 
set-method="setRootDesc" usage="optional" /> 
  <value style="element" name="billCycle" get-method="getBillCycle" 
set-method="setBillCycle" usage="optional" /> 
  <value style="element" name="corpId" get-method="getCorpId" 
set-method="setCorpId" usage="optional" /> 
  <value style="element" name="hierarchyLinkId" get-method="getHierarchyLinkId" 
set-method="setHierarchyLinkId" usage="optional" /> 
  <value style="element" name="blockSubCreationInd" 
get-method="isBlockSubCreationInd" set-method="setBlockSubCreationInd" /> 
  <structure map-as="ns1:SsitInfo" get-method="getSsitInfo" 
set-method="setSsitInfo" usage="optional" name="SsitInfo" /> 
  <structure map-as="ns1:SasInfo" get-method="getSasInfo" 
set-method="setSasInfo" usage="optional" name="SasInfo" /> 
  </mapping>


Input XML File:

- <CorporationInfo>
  <HierarchyInfo /> 
  </CorporationInfo>





  </mapping>





--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

------------------------------------------------------------------------------
Try before you buy = See our experts in action!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-dev2
_______________________________________________
jibx-devs mailing list
jibx-devs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jibx-devs

Reply via email to