[ http://issues.apache.org/jira/browse/AXISCPP-403?page=history ]
     
Adrian Dick resolved AXISCPP-403:
---------------------------------

     Resolution: Fixed
    Fix Version: current (nightly)

Made modifications as described in original submission.
Have also introduced a new test  NilValuesTest to detect any future regressions 
in this area.

> Namespace prefix omitted when object is nil
> -------------------------------------------
>
>          Key: AXISCPP-403
>          URL: http://issues.apache.org/jira/browse/AXISCPP-403
>      Project: Axis-C++
>         Type: Bug
>   Components: Serialization/Deserialization
>     Versions: current (nightly)
>     Reporter: Adrian Dick
>     Assignee: Adrian Dick
>      Fix For: current (nightly)

>
> When a simple type is serialized as an element, and is nil, the namespace 
> prefix is omitted from the opening XML tag.
> Using an extract from the ComplexTypeAll test, which highlighted this issue:
> The text element field1 should be represented as:
>   <ns1:field1 xsi:nil="true"></ns1:field1>
> But is actually being represented as:
>   <field1 xsi:nil="true"></ns1:field1>
> Currently, in BasicTypeSerializer::serializeAsElement()for XSD_STRING, 
> XSD_ANYURI, XSD_QNAME and XSD_NOTATION there is a check for a NULL value, 
> into this the lines marked + in the following need to be inserted:
>  pStr = *((char**)(pValue));
>  if (!pStr)
>  {
>    /*
>     * It is a null value not an empty value.
>     */
>    m_sSZ = "<";
> +   if (NULL != pPrefix)
> +   { 
> +     m_sSZ += pPrefix;
> +     m_sSZ += ":";
> +   }
>    m_sSZ += pName;
>    m_sSZ += " xsi:nil=\"true\">";
>  }

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

Reply via email to