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 "nadir amra (JIRA)" <ax...@ws.apache.org> on 2007/01/18 04:04:30 UTC

[jira] Closed: (AXISCPP-1011) faultactor is facultative in SoapFaults

     [ https://issues.apache.org/jira/browse/AXISCPP-1011?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

nadir amra closed AXISCPP-1011.
-------------------------------

       Resolution: Fixed
    Fix Version/s: current (nightly)

There were several problems in this area.  I added test cases for:

both soap actor and detail
soap detail but not actor 
soap actor but not detail
neither soap actor nor detail

The code that checked whether the detail was complex was revamped since it was not correct.  I created a new method, processFaultDetail(), in the deserializer that will handle the determination whether fault detail is complex, and if not, will perform deserialization.  Basically the logic:
if character data whitespace
   perform a peek() 
   if (start-element tag)  fault detail is a complex structure
   else deserialize a null string. 
else
   derserialize character data as string



> faultactor is facultative in SoapFaults
> ---------------------------------------
>
>                 Key: AXISCPP-1011
>                 URL: https://issues.apache.org/jira/browse/AXISCPP-1011
>             Project: Axis-C++
>          Issue Type: Bug
>          Components: SOAP
>    Affects Versions: current (nightly)
>         Environment: WIN2KSP4 VC6SP6 JDK1.5.0_07
>            Reporter: Franz Fehringer
>         Assigned To: nadir amra
>             Fix For: current (nightly)
>
>
> In handling SoapFaults, faultactor is retrieved unconditionally (next()) where it should (being facultative) be checked for presence first (peek()).
> $ pwd
> /cd/d/Quellen/SVN/axis/c/src/soap
> Index: SoapDeSerializer.cpp
> ===================================================================
> --- SoapDeSerializer.cpp        (Revision 480584)
> +++ SoapDeSerializer.cpp        (Arbeitskopie)
> @@ -401,7 +401,8 @@
>      char *pcDetail;
>      char *pcFaultCode;
>      char *pcFaultstring;
> -    char *pcFaultactor;
> +    char *pcFaultactor = "";
> +    char* pcName;
>      if (0 == strcmp ("Fault", pName))
>      {
>          if (0 != strcmp (m_pNode->m_pchNameOrValue, pName))
> @@ -431,10 +432,14 @@
>          if ( pcFaultstring )
>              delete [] pcFaultstring;
>       
> -        pcFaultactor = getElementAsString ("faultactor", 0);
> -        pFault->setFaultactor (pcFaultactor == NULL ? "" : pcFaultactor);
> -        if ( pcFaultactor )
> -            delete [] pcFaultactor;
> +        pName = peekNextElementName();
> +       if (strcmp(pName, "faultactor") == 0)
> +       {
> +            pcFaultactor = getElementAsString ("faultactor", 0);
> +            pFault->setFaultactor (pcFaultactor == NULL ? "" : pcFaultactor);
> +            if ( pcFaultactor )
> +                delete [] pcFaultactor;
> +       }
>      
>          // FJP Changed the namespace from null to a single space (an impossible
>          //     value) to help method know 

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

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


Re: [jira] Closed: (AXISCPP-1011) faultactor is facultative in SoapFaults

Posted by Nadir Amra <am...@us.ibm.com>.
Franz,

Will be looking at AXISCPP-1010 and a few other things. Please open a jira 
for decimal problem. 

As far as releasing 1.6, I will give it a go in a month. 

Nadir K. Amra


Franz Fehringer <fe...@isogmbh.de> wrote on 01/18/2007 02:28:16 AM:

> Hello Nadir,
> 
> Very nice achievement!
> Now if AXISCPP-1010 could be resolved also, i would be able to 
> abandon all my local changes and then give the current repository code a 
shot.
> 
> I want to point out one additional problem (i do not know whether 
> there is a JIRA for it) regarding xsd:decimal.
> I have a datatype, which is a restriction of xsd:decimal with 
restrictions
> 
> <xsd:maxExclusive value="100000"/>
>  <xsd:fractionDigits value="2"/>
>  <xsd:minInclusive value="0"/>
> 
> There is Java Code (in the generator) for reading/interpreting these
> restrictions and there is C++ Code (in the axis library code) for 
> handling these restrictions.
> But what is completely missing is the intermediate layer, i.e. Java 
> code which generates C++ code for correct initialization of the 
> pertaining struct members.
> Therefore in sending xsd:decimals the fractionDigits are always six,
> which is not suited for e.g. monetary values.
> I hacked around this with replacing (in the XSD) xsd:decimal by xsd:
> double (for xsd:double %g is used instead of %f).
> Another hack would be to directly replace (in the library code) %f by 
%g.
> What do you think, is it much work to fill this gap?
> Should i file a JIRA?
> 
> My last question is, given the steady improvements you made, what is
> the currently planned timeline for a 1.6 release?
> 
> Cheers
> 
> Franz
> 
> 
> nadir amra (JIRA) schrieb: 
>      [ https://issues.apache.org/jira/browse/AXISCPP-1011?page=com.
> atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
> 
> nadir amra closed AXISCPP-1011.
> -------------------------------
> 
>        Resolution: Fixed
>     Fix Version/s: current (nightly)
> 
> There were several problems in this area.  I added test cases for:
> 
> both soap actor and detail
> soap detail but not actor 
> soap actor but not detail
> neither soap actor nor detail
> 
> The code that checked whether the detail was complex was revamped 
> since it was not correct.  I created a new method, 
> processFaultDetail(), in the deserializer that will handle the 
> determination whether fault detail is complex, and if not, will 
> perform deserialization.  Basically the logic:
> if character data whitespace
>    perform a peek() 
>    if (start-element tag)  fault detail is a complex structure
>    else deserialize a null string. 
> else
>    derserialize character data as string
> 
> 
> 
> 
> faultactor is facultative in SoapFaults
> ---------------------------------------
> 
>                 Key: AXISCPP-1011
>                 URL: https://issues.apache.org/jira/browse/AXISCPP-1011
>             Project: Axis-C++
>          Issue Type: Bug
>          Components: SOAP
>    Affects Versions: current (nightly)
>         Environment: WIN2KSP4 VC6SP6 JDK1.5.0_07
>            Reporter: Franz Fehringer
>         Assigned To: nadir amra
>             Fix For: current (nightly)
> 
> 
> In handling SoapFaults, faultactor is retrieved unconditionally 
> (next()) where it should (being facultative) be checked for presence
> first (peek()).
> $ pwd
> /cd/d/Quellen/SVN/axis/c/src/soap
> Index: SoapDeSerializer.cpp
> ===================================================================
> --- SoapDeSerializer.cpp        (Revision 480584)
> +++ SoapDeSerializer.cpp        (Arbeitskopie)
> @@ -401,7 +401,8 @@
>      char *pcDetail;
>      char *pcFaultCode;
>      char *pcFaultstring;
> -    char *pcFaultactor;
> +    char *pcFaultactor = "";
> +    char* pcName;
>      if (0 == strcmp ("Fault", pName))
>      {
>          if (0 != strcmp (m_pNode->m_pchNameOrValue, pName))
> @@ -431,10 +432,14 @@
>          if ( pcFaultstring )
>              delete [] pcFaultstring;
> 
> -        pcFaultactor = getElementAsString ("faultactor", 0);
> -        pFault->setFaultactor (pcFaultactor == NULL ? "" : 
pcFaultactor);
> -        if ( pcFaultactor )
> -            delete [] pcFaultactor;
> +        pName = peekNextElementName();
> +       if (strcmp(pName, "faultactor") == 0)
> +       {
> +            pcFaultactor = getElementAsString ("faultactor", 0);
> +            pFault->setFaultactor (pcFaultactor == NULL ? "" : 
pcFaultactor);
> +            if ( pcFaultactor )
> +                delete [] pcFaultactor;
> +       }
> 
>          // FJP Changed the namespace from null to a single space 
> (an impossible
>          //     value) to help method know 
> 
> 
> 
> [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: [jira] Closed: (AXISCPP-1011) faultactor is facultative in SoapFaults

Posted by Franz Fehringer <fe...@isogmbh.de>.
Hello Nadir,

Very nice achievement!
Now if AXISCPP-1010 could be resolved also, i would be able to abandon 
all my local changes and then give the current repository code a shot.

I want to point out one additional problem (i do not know whether there 
is a JIRA for it) regarding xsd:decimal.
I have a datatype, which is a restriction of xsd:decimal with restrictions

<xsd:maxExclusive value="100000"/>
 <xsd:fractionDigits value="2"/>
 <xsd:minInclusive value="0"/>

There is Java Code (in the generator) for reading/interpreting these 
restrictions and there is C++ Code (in the axis library code) for 
handling these restrictions.
But what is completely missing is the intermediate layer, i.e. Java code 
which generates C++ code for correct initialization of the pertaining 
struct members.
Therefore in sending xsd:decimals the fractionDigits are always six, 
which is not suited for e.g. monetary values.
I hacked around this with replacing (in the XSD) xsd:decimal by 
xsd:double (for xsd:double %g is used instead of %f).
Another hack would be to directly replace (in the library code) %f by %g.
What do you think, is it much work to fill this gap?
Should i file a JIRA?

My last question is, given the steady improvements you made, what is the 
currently planned timeline for a 1.6 release?

Cheers

Franz


nadir amra (JIRA) schrieb:
>      [ https://issues.apache.org/jira/browse/AXISCPP-1011?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
>
> nadir amra closed AXISCPP-1011.
> -------------------------------
>
>        Resolution: Fixed
>     Fix Version/s: current (nightly)
>
> There were several problems in this area.  I added test cases for:
>
> both soap actor and detail
> soap detail but not actor 
> soap actor but not detail
> neither soap actor nor detail
>
> The code that checked whether the detail was complex was revamped since it was not correct.  I created a new method, processFaultDetail(), in the deserializer that will handle the determination whether fault detail is complex, and if not, will perform deserialization.  Basically the logic:
> if character data whitespace
>    perform a peek() 
>    if (start-element tag)  fault detail is a complex structure
>    else deserialize a null string. 
> else
>    derserialize character data as string
>
>
>
>   
>> faultactor is facultative in SoapFaults
>> ---------------------------------------
>>
>>                 Key: AXISCPP-1011
>>                 URL: https://issues.apache.org/jira/browse/AXISCPP-1011
>>             Project: Axis-C++
>>          Issue Type: Bug
>>          Components: SOAP
>>    Affects Versions: current (nightly)
>>         Environment: WIN2KSP4 VC6SP6 JDK1.5.0_07
>>            Reporter: Franz Fehringer
>>         Assigned To: nadir amra
>>             Fix For: current (nightly)
>>
>>
>> In handling SoapFaults, faultactor is retrieved unconditionally (next()) where it should (being facultative) be checked for presence first (peek()).
>> $ pwd
>> /cd/d/Quellen/SVN/axis/c/src/soap
>> Index: SoapDeSerializer.cpp
>> ===================================================================
>> --- SoapDeSerializer.cpp        (Revision 480584)
>> +++ SoapDeSerializer.cpp        (Arbeitskopie)
>> @@ -401,7 +401,8 @@
>>      char *pcDetail;
>>      char *pcFaultCode;
>>      char *pcFaultstring;
>> -    char *pcFaultactor;
>> +    char *pcFaultactor = "";
>> +    char* pcName;
>>      if (0 == strcmp ("Fault", pName))
>>      {
>>          if (0 != strcmp (m_pNode->m_pchNameOrValue, pName))
>> @@ -431,10 +432,14 @@
>>          if ( pcFaultstring )
>>              delete [] pcFaultstring;
>>       
>> -        pcFaultactor = getElementAsString ("faultactor", 0);
>> -        pFault->setFaultactor (pcFaultactor == NULL ? "" : pcFaultactor);
>> -        if ( pcFaultactor )
>> -            delete [] pcFaultactor;
>> +        pName = peekNextElementName();
>> +       if (strcmp(pName, "faultactor") == 0)
>> +       {
>> +            pcFaultactor = getElementAsString ("faultactor", 0);
>> +            pFault->setFaultactor (pcFaultactor == NULL ? "" : pcFaultactor);
>> +            if ( pcFaultactor )
>> +                delete [] pcFaultactor;
>> +       }
>>      
>>          // FJP Changed the namespace from null to a single space (an impossible
>>          //     value) to help method know 
>>     
>
>