You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by "Amila Chinthaka Suriarachchi (JIRA)" <ji...@apache.org> on 2010/12/25 09:52:46 UTC
[jira] Resolved: (AXIS2-4293) Deserializing in generated C code
does not work for minOccurs=1,nillable=true element
[ https://issues.apache.org/jira/browse/AXIS2-4293?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Amila Chinthaka Suriarachchi resolved AXIS2-4293.
-------------------------------------------------
Resolution: Invalid
please report this issue under axis2 c
> Deserializing in generated C code does not work for minOccurs=1,nillable=true element
> -------------------------------------------------------------------------------------
>
> Key: AXIS2-4293
> URL: https://issues.apache.org/jira/browse/AXIS2-4293
> Project: Axis2
> Issue Type: Bug
> Components: codegen, databinding
> Affects Versions: 1.4.1
> Environment: Axis2 1.4.1
> wsdl2c
> Axis2/C from svn
> Reporter: Rutger van Eerd
>
> Deserializing in generated C code does not work for minOccurs=1,nillable=true element.
> Here is the relevant WSDL.
> <complexType name="ResultAddress">
> <complexContent>
> <extension base="tns:Address">
> <sequence>
> <element name="wrappedAdditionalFields" type="tns:ArrayOfAdditionalField" minOccurs="1" maxOccurs="1" nillable="true"/>
> <element name="coordinates" type="ns1:Point" minOccurs="0" maxOccurs="1" nillable="true"/>
> </sequence>
> <attribute name="adminRegion" type="xsd:string" use="optional"/>
> <attribute name="appendix" type="xsd:string" use="optional"/>
> <attribute name="classificationDescription" type="tns:ClassificationDescription" use="required"/>
> <attribute name="countryCapital" type="xsd:string" use="optional"/>
> <attribute name="detailLevelDescription" type="tns:DetailLevelDescription" use="required"/>
> <attribute name="totalScore" type="xsd:int" use="required"/>
> </extension>
> </complexContent>
> </complexType>
> Here is the XML to be deserialized (SOAP reply).
> <env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:enc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:ns0="http://exception.core.jabba.ptvag.com" xmlns:ns1="http://common.xserver.ptvag.com" xmlns:ns2="http://xlocate.xserver.ptvag.com" xmlns:ns3="http://types.xlocate.xserver.ptvag.com">
> <env:Body>
> <ns3:findAddressResponse>
> <ns3:result errorCode="0" errorDescription="">
> <ns2:wrappedResultList>
> <ns2:ResultAddress xsi:type="ns2:ResultAddress" city="Boekel" city2="" country="NL" houseNumber="" postCode="542*" state="" street="" adminRegion="Boekel" appendix="" classificationDescription="LOW" countryCapital="Amsterdam" detailLevelDescription="CITY" totalScore="50">
> <ns2:wrappedAdditionalFields/>
> <ns2:coordinates xsi:type="ns1:Point">
> <ns1:point xsi:type="ns1:PlainPoint" x="630837.7295355089" y="6721095.391931657"/>
> </ns2:coordinates>
> </ns2:ResultAddress>
> <ns2:ResultAddress xsi:type="ns2:ResultAddress" city="Castricum" city2="Boekel" country="NL" houseNumber="" postCode="1921" state="" street="" adminRegion="Castricum" appendix="" classificationDescription="LOW" countryCapital="Amsterdam" detailLevelDescription="CITY2" totalScore="50">
> <ns2:wrappedAdditionalFields/>
> <ns2:coordinates xsi:type="ns1:Point">
> <ns1:point xsi:type="ns1:PlainPoint" x="528525.0536313169" y="6899572.692981508"/>
> </ns2:coordinates>
> </ns2:ResultAddress>
> </ns2:wrappedResultList>
> </ns3:result>
> </ns3:findAddressResponse>
> </env:Body>
> </env:Envelope>
> Here is the Axis2/C log.
> [Tue Mar 31 11:24:51 2009] [debug] phase.c(210) Invoke the handler context_handler within the phase PostDispatch
> [Tue Mar 31 11:24:51 2009] [error] ../autogen/src/adb_ResultAddress.c(698) non nillable or minOuccrs != 0 element wrappedAdditionalFields missing
> [Tue Mar 31 11:24:51 2009] [error] ../autogen/src/adb_ArrayOfResultAddress.c(186) failed in building element ResultAddress
> [Tue Mar 31 11:24:51 2009] [error] ../autogen/src/adb_ArrayOfResultAddress.c(195) failed in setting the value for ResultAddress
> [Tue Mar 31 11:24:51 2009] [error] ../autogen/src/adb_AddressResponse.c(207) failed in building adb object for element wrappedResultList
> [Tue Mar 31 11:24:51 2009] [error] ../autogen/src/adb_AddressResponse.c(217) failed in setting the value for wrappedResultList
> [Tue Mar 31 11:24:51 2009] [error] ../autogen/src/adb_findAddressResponse.c(174) failed in building adb object for element result
> [Tue Mar 31 11:24:51 2009] [error] ../autogen/src/adb_findAddressResponse.c(184) failed in setting the value for result
> [Tue Mar 31 11:24:51 2009] [error] ../autogen/src/adb_findAddressResponse15.c(209) failed in building adb object for element findAddressResponse
> [Tue Mar 31 11:24:51 2009] [error] ../autogen/src/adb_findAddressResponse15.c(219) failed in setting the value for findAddressResponse
> [Tue Mar 31 11:24:51 2009] [error] ../autogen/src/axis2_stub_XLocateWSService.c(417) NULL returnted from the findAddressResponse15_deserialize: This should be due to an invalid XML
> As I see it, the wrappedAdditionalFields element is present but empty. This is allowed by the WSDL. However deserializing causes an error for this element.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
For additional commands, e-mail: java-dev-help@axis.apache.org