axis-c-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Adrian Dick (JIRA)" <axis-c-...@ws.apache.org>
Subject [jira] Closed: (AXISCPP-403) Namespace prefix omitted when object is nil
Date Fri, 04 Mar 2005 15:41:53 GMT
     [ http://issues.apache.org/jira/browse/AXISCPP-403?page=history ]
     
Adrian Dick closed AXISCPP-403:
-------------------------------


> 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
>     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


Mime
View raw message