You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-dev@axis.apache.org by Franz Fehringer <fe...@isogmbh.de> on 2006/06/26 09:55:33 UTC

getChardataAs dysfunctional

Hello,

I work currently in the realm of deserializing xsd:extension based data 
types.
After noticing, that getChardataAs does not work as expected, i had a 
closer look at it.
It is defined (in SoapDeserializer.cpp) as
void
SoapDeSerializer::getChardataAs(void* pValue,
                                 XSDTYPE type)
and contains
pValue = pSimpleType->getValue();
Since call by value is done here, this has no effect on the caller side 
(it is a local copy which is assigned to).
Furthermore in the generated sources, calls like
pIWSDZ->getChardataAs((void*)&(param->t_SellRate_value), XSD_DECIMAL);
show up.
Taking the address with an ampersand does not lead to a modifyable 
lvalue, so some repair has to be done here too.
With string (char*) datatypes there is an additional problem:
pIWSDZ->getChardataAs((void*)&(param->t_RequiredRoom2_value), XSD_STRING);
This is pointer to pointer, where only pointer was intended (no 
ampersand should be applied for xsd__string and xsd__nmtoken; i made a 
(resolved already) JIRA entry for a similar problem in the serializing 
code).

I resolved these problems temporarily in the following way

Pass the void* as a reference
void
SoapDeSerializer::getChardataAs(void*& pValue,
                                 XSDTYPE type)
This means changes in SoapDeSerializer.cpp, SoapDeSerializer.h and 
IWrapperSoapDeSerializer.hpp.

Replace

pIWSDZ->getChardataAs((void*)&(param->t_SellRate_value), XSD_DECIMAL);
with
void* pValue3;
pIWSDZ->getChardataAs(pValue3, XSD_DECIMAL);
param->t_SellRate_value = *((xsd__decimal*) pValue3);
and
pIWSDZ->getChardataAs((void*)&(param->t_RequiredRoom2_value), XSD_STRING);
with
void* pValue6;
pIWSDZ->getChardataAs(pValue6, XSD_STRING);
param->t_RequiredRoom2_value = (xsd__string) pValue6;

Any ideas, how to make this better?
Any kind soul (Adrian, John, ...) to integrate this (or an alternative 
approach) into stub generation?

Greetings

Franz



Re: getChardataAs dysfunctional

Posted by Franz Fehringer <fe...@isogmbh.de>.
Michael Xiong says, he has a fix for this:

<citation>
This problem is completely the same with AXISCPP-972 & AXISCPP-973(for 
1.6beta) which I've already reported on JIRA.

http://issues.apache.org/jira/browse/AXISCPP-972
http://issues.apache.org/jira/browse/AXISCPP-973

And it was indeed an old problem AXISCPP-884 for 1.5final
http://issues.apache.org/jira/browse/AXISCPP-884

which I've already reported some months ago.

When I reporting bug on JIRA, I always wrote my solution to resolve the bug in descriptions.
</citation>

Greetings

Franz

Nadir Amra schrieb:
> I will be looking into this....just trying to clean up some other things 
> first.  I will also be looking at other jira issues and seeing what I can 
> fix.  But all this takes time so please be patient.
>
> Nadir K. Amra
>
>
> Franz Fehringer <fe...@isogmbh.de> wrote on 06/26/2006 02:55:33 AM:
>
>   
>> Hello,
>>
>> I work currently in the realm of deserializing xsd:extension based data 
>> types.
>> After noticing, that getChardataAs does not work as expected, i had a 
>> closer look at it.
>> It is defined (in SoapDeserializer.cpp) as
>> void
>> SoapDeSerializer::getChardataAs(void* pValue,
>>                                  XSDTYPE type)
>> and contains
>> pValue = pSimpleType->getValue();
>> Since call by value is done here, this has no effect on the caller side 
>> (it is a local copy which is assigned to).
>> Furthermore in the generated sources, calls like
>> pIWSDZ->getChardataAs((void*)&(param->t_SellRate_value), XSD_DECIMAL);
>> show up.
>> Taking the address with an ampersand does not lead to a modifyable 
>> lvalue, so some repair has to be done here too.
>> With string (char*) datatypes there is an additional problem:
>> pIWSDZ->getChardataAs((void*)&(param->t_RequiredRoom2_value), 
>>     
> XSD_STRING);
>   
>> This is pointer to pointer, where only pointer was intended (no 
>> ampersand should be applied for xsd__string and xsd__nmtoken; i made a 
>> (resolved already) JIRA entry for a similar problem in the serializing 
>> code).
>>
>> I resolved these problems temporarily in the following way
>>
>> Pass the void* as a reference
>> void
>> SoapDeSerializer::getChardataAs(void*& pValue,
>>                                  XSDTYPE type)
>> This means changes in SoapDeSerializer.cpp, SoapDeSerializer.h and 
>> IWrapperSoapDeSerializer.hpp.
>>
>> Replace
>>
>> pIWSDZ->getChardataAs((void*)&(param->t_SellRate_value), XSD_DECIMAL);
>> with
>> void* pValue3;
>> pIWSDZ->getChardataAs(pValue3, XSD_DECIMAL);
>> param->t_SellRate_value = *((xsd__decimal*) pValue3);
>> and
>> pIWSDZ->getChardataAs((void*)&(param->t_RequiredRoom2_value), 
>>     
> XSD_STRING);
>   
>> with
>> void* pValue6;
>> pIWSDZ->getChardataAs(pValue6, XSD_STRING);
>> param->t_RequiredRoom2_value = (xsd__string) pValue6;
>>
>> Any ideas, how to make this better?
>> Any kind soul (Adrian, John, ...) to integrate this (or an alternative 
>> approach) into stub generation?
>>
>> Greetings
>>
>> Franz
>>
>>
>> [attachment "feh.vcf" deleted by Nadir Amra/Rochester/IBM] 
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: axis-c-dev-unsubscribe@ws.apache.org
>> For additional commands, e-mail: axis-c-dev-help@ws.apache.org
>>     
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-c-dev-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-c-dev-help@ws.apache.org
>
>   


Re: getChardataAs dysfunctional

Posted by Franz Fehringer <fe...@isogmbh.de>.
A glimpse at AXISCPP-716 would be most welcome.

Greetings

Franz

Nadir Amra schrieb:
> I will be looking into this....just trying to clean up some other things 
> first.  I will also be looking at other jira issues and seeing what I can 
> fix.  But all this takes time so please be patient.
>
> Nadir K. Amra
>
>
> Franz Fehringer <fe...@isogmbh.de> wrote on 06/26/2006 02:55:33 AM:
>
>   
>> Hello,
>>
>> I work currently in the realm of deserializing xsd:extension based data 
>> types.
>> After noticing, that getChardataAs does not work as expected, i had a 
>> closer look at it.
>> It is defined (in SoapDeserializer.cpp) as
>> void
>> SoapDeSerializer::getChardataAs(void* pValue,
>>                                  XSDTYPE type)
>> and contains
>> pValue = pSimpleType->getValue();
>> Since call by value is done here, this has no effect on the caller side 
>> (it is a local copy which is assigned to).
>> Furthermore in the generated sources, calls like
>> pIWSDZ->getChardataAs((void*)&(param->t_SellRate_value), XSD_DECIMAL);
>> show up.
>> Taking the address with an ampersand does not lead to a modifyable 
>> lvalue, so some repair has to be done here too.
>> With string (char*) datatypes there is an additional problem:
>> pIWSDZ->getChardataAs((void*)&(param->t_RequiredRoom2_value), 
>>     
> XSD_STRING);
>   
>> This is pointer to pointer, where only pointer was intended (no 
>> ampersand should be applied for xsd__string and xsd__nmtoken; i made a 
>> (resolved already) JIRA entry for a similar problem in the serializing 
>> code).
>>
>> I resolved these problems temporarily in the following way
>>
>> Pass the void* as a reference
>> void
>> SoapDeSerializer::getChardataAs(void*& pValue,
>>                                  XSDTYPE type)
>> This means changes in SoapDeSerializer.cpp, SoapDeSerializer.h and 
>> IWrapperSoapDeSerializer.hpp.
>>
>> Replace
>>
>> pIWSDZ->getChardataAs((void*)&(param->t_SellRate_value), XSD_DECIMAL);
>> with
>> void* pValue3;
>> pIWSDZ->getChardataAs(pValue3, XSD_DECIMAL);
>> param->t_SellRate_value = *((xsd__decimal*) pValue3);
>> and
>> pIWSDZ->getChardataAs((void*)&(param->t_RequiredRoom2_value), 
>>     
> XSD_STRING);
>   
>> with
>> void* pValue6;
>> pIWSDZ->getChardataAs(pValue6, XSD_STRING);
>> param->t_RequiredRoom2_value = (xsd__string) pValue6;
>>
>> Any ideas, how to make this better?
>> Any kind soul (Adrian, John, ...) to integrate this (or an alternative 
>> approach) into stub generation?
>>
>> Greetings
>>
>> Franz
>>
>>
>> [attachment "feh.vcf" deleted by Nadir Amra/Rochester/IBM] 
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: axis-c-dev-unsubscribe@ws.apache.org
>> For additional commands, e-mail: axis-c-dev-help@ws.apache.org
>>     
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-c-dev-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-c-dev-help@ws.apache.org
>
>   


Re: getChardataAs dysfunctional

Posted by Franz Fehringer <fe...@isogmbh.de>.
It would be really nice, if someone could take care of the remaining 
open problems.
But for me the foremost killer is presently described in my mail with 
subject
XML parsing problem (array or attribute related?)
I will open a JIRA issue for it.

HELP HELP HELP

Franz

Nadir Amra schrieb:
> I will be looking into this....just trying to clean up some other things 
> first.  I will also be looking at other jira issues and seeing what I can 
> fix.  But all this takes time so please be patient.
>
> Nadir K. Amra
>
>
> Franz Fehringer <fe...@isogmbh.de> wrote on 06/26/2006 02:55:33 AM:
>
>   
>> Hello,
>>
>> I work currently in the realm of deserializing xsd:extension based data 
>> types.
>> After noticing, that getChardataAs does not work as expected, i had a 
>> closer look at it.
>> It is defined (in SoapDeserializer.cpp) as
>> void
>> SoapDeSerializer::getChardataAs(void* pValue,
>>                                  XSDTYPE type)
>> and contains
>> pValue = pSimpleType->getValue();
>> Since call by value is done here, this has no effect on the caller side 
>> (it is a local copy which is assigned to).
>> Furthermore in the generated sources, calls like
>> pIWSDZ->getChardataAs((void*)&(param->t_SellRate_value), XSD_DECIMAL);
>> show up.
>> Taking the address with an ampersand does not lead to a modifyable 
>> lvalue, so some repair has to be done here too.
>> With string (char*) datatypes there is an additional problem:
>> pIWSDZ->getChardataAs((void*)&(param->t_RequiredRoom2_value), 
>>     
> XSD_STRING);
>   
>> This is pointer to pointer, where only pointer was intended (no 
>> ampersand should be applied for xsd__string and xsd__nmtoken; i made a 
>> (resolved already) JIRA entry for a similar problem in the serializing 
>> code).
>>
>> I resolved these problems temporarily in the following way
>>
>> Pass the void* as a reference
>> void
>> SoapDeSerializer::getChardataAs(void*& pValue,
>>                                  XSDTYPE type)
>> This means changes in SoapDeSerializer.cpp, SoapDeSerializer.h and 
>> IWrapperSoapDeSerializer.hpp.
>>
>> Replace
>>
>> pIWSDZ->getChardataAs((void*)&(param->t_SellRate_value), XSD_DECIMAL);
>> with
>> void* pValue3;
>> pIWSDZ->getChardataAs(pValue3, XSD_DECIMAL);
>> param->t_SellRate_value = *((xsd__decimal*) pValue3);
>> and
>> pIWSDZ->getChardataAs((void*)&(param->t_RequiredRoom2_value), 
>>     
> XSD_STRING);
>   
>> with
>> void* pValue6;
>> pIWSDZ->getChardataAs(pValue6, XSD_STRING);
>> param->t_RequiredRoom2_value = (xsd__string) pValue6;
>>
>> Any ideas, how to make this better?
>> Any kind soul (Adrian, John, ...) to integrate this (or an alternative 
>> approach) into stub generation?
>>
>> Greetings
>>
>> Franz
>>
>>
>> [attachment "feh.vcf" deleted by Nadir Amra/Rochester/IBM] 
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: axis-c-dev-unsubscribe@ws.apache.org
>> For additional commands, e-mail: axis-c-dev-help@ws.apache.org
>>     
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-c-dev-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-c-dev-help@ws.apache.org
>
>   


Re: getChardataAs dysfunctional

Posted by Nadir Amra <am...@us.ibm.com>.
I will be looking into this....just trying to clean up some other things 
first.  I will also be looking at other jira issues and seeing what I can 
fix.  But all this takes time so please be patient.

Nadir K. Amra


Franz Fehringer <fe...@isogmbh.de> wrote on 06/26/2006 02:55:33 AM:

> Hello,
> 
> I work currently in the realm of deserializing xsd:extension based data 
> types.
> After noticing, that getChardataAs does not work as expected, i had a 
> closer look at it.
> It is defined (in SoapDeserializer.cpp) as
> void
> SoapDeSerializer::getChardataAs(void* pValue,
>                                  XSDTYPE type)
> and contains
> pValue = pSimpleType->getValue();
> Since call by value is done here, this has no effect on the caller side 
> (it is a local copy which is assigned to).
> Furthermore in the generated sources, calls like
> pIWSDZ->getChardataAs((void*)&(param->t_SellRate_value), XSD_DECIMAL);
> show up.
> Taking the address with an ampersand does not lead to a modifyable 
> lvalue, so some repair has to be done here too.
> With string (char*) datatypes there is an additional problem:
> pIWSDZ->getChardataAs((void*)&(param->t_RequiredRoom2_value), 
XSD_STRING);
> This is pointer to pointer, where only pointer was intended (no 
> ampersand should be applied for xsd__string and xsd__nmtoken; i made a 
> (resolved already) JIRA entry for a similar problem in the serializing 
> code).
> 
> I resolved these problems temporarily in the following way
> 
> Pass the void* as a reference
> void
> SoapDeSerializer::getChardataAs(void*& pValue,
>                                  XSDTYPE type)
> This means changes in SoapDeSerializer.cpp, SoapDeSerializer.h and 
> IWrapperSoapDeSerializer.hpp.
> 
> Replace
> 
> pIWSDZ->getChardataAs((void*)&(param->t_SellRate_value), XSD_DECIMAL);
> with
> void* pValue3;
> pIWSDZ->getChardataAs(pValue3, XSD_DECIMAL);
> param->t_SellRate_value = *((xsd__decimal*) pValue3);
> and
> pIWSDZ->getChardataAs((void*)&(param->t_RequiredRoom2_value), 
XSD_STRING);
> with
> void* pValue6;
> pIWSDZ->getChardataAs(pValue6, XSD_STRING);
> param->t_RequiredRoom2_value = (xsd__string) pValue6;
> 
> Any ideas, how to make this better?
> Any kind soul (Adrian, John, ...) to integrate this (or an alternative 
> approach) into stub generation?
> 
> Greetings
> 
> Franz
> 
> 
> [attachment "feh.vcf" deleted by Nadir Amra/Rochester/IBM] 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-c-dev-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-c-dev-help@ws.apache.org

---------------------------------------------------------------------
To unsubscribe, e-mail: axis-c-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-c-dev-help@ws.apache.org


RE: getChardataAs dysfunctional

Posted by "Xiong, Michael" <mi...@chn.fujixerox.com>.
Hello Franz and all,

This problem is completely the same with AXISCPP-972 & AXISCPP-973(for 1.6beta) which I've already reported on JIRA.
http://issues.apache.org/jira/browse/AXISCPP-972
http://issues.apache.org/jira/browse/AXISCPP-973

And it was indeed an old problem AXISCPP-884 for 1.5final
http://issues.apache.org/jira/browse/AXISCPP-884

which I've already reported some months ago.

When I reporting bug on JIRA, I always wrote my solution to resolve the bug in descriptions.

Thanks.
Michael Xiong

-----Original Message-----
From: Franz Fehringer [mailto:feh@isogmbh.de] 
Sent: 2006年6月26日 15:56
To: Apache AXIS C Developers List
Subject: getChardataAs dysfunctional

Hello,

I work currently in the realm of deserializing xsd:extension based data types.
After noticing, that getChardataAs does not work as expected, i had a closer look at it.
It is defined (in SoapDeserializer.cpp) as void
SoapDeSerializer::getChardataAs(void* pValue,
                                 XSDTYPE type) and contains pValue = pSimpleType->getValue(); Since call by value is done here, this has no effect on the caller side (it is a local copy which is assigned to).
Furthermore in the generated sources, calls like
pIWSDZ->getChardataAs((void*)&(param->t_SellRate_value), XSD_DECIMAL);
show up.
Taking the address with an ampersand does not lead to a modifyable lvalue, so some repair has to be done here too.
With string (char*) datatypes there is an additional problem:
pIWSDZ->getChardataAs((void*)&(param->t_RequiredRoom2_value), 
pIWSDZ->XSD_STRING);
This is pointer to pointer, where only pointer was intended (no ampersand should be applied for xsd__string and xsd__nmtoken; i made a (resolved already) JIRA entry for a similar problem in the serializing code).

I resolved these problems temporarily in the following way

Pass the void* as a reference
void
SoapDeSerializer::getChardataAs(void*& pValue,
                                 XSDTYPE type) This means changes in SoapDeSerializer.cpp, SoapDeSerializer.h and IWrapperSoapDeSerializer.hpp.

Replace

pIWSDZ->getChardataAs((void*)&(param->t_SellRate_value), XSD_DECIMAL);
with
void* pValue3;
pIWSDZ->getChardataAs(pValue3, XSD_DECIMAL);
param->t_SellRate_value = *((xsd__decimal*) pValue3);
and
pIWSDZ->getChardataAs((void*)&(param->t_RequiredRoom2_value), 
pIWSDZ->XSD_STRING);
with
void* pValue6;
pIWSDZ->getChardataAs(pValue6, XSD_STRING);
param->t_RequiredRoom2_value = (xsd__string) pValue6;

Any ideas, how to make this better?
Any kind soul (Adrian, John, ...) to integrate this (or an alternative
approach) into stub generation?

Greetings

Franz