You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-user@axis.apache.org by Sudhin Bengeri <sb...@opnet.com> on 2004/03/26 01:49:50 UTC
Bug in the SoapSerializer::SerializeAsAttribute function
Hi,
In the C++ code generated by WSDL2WS, for the function Axis_Serialize_*Type
if the "param" parameter is passed as "NULL" then the function calls the
following line of code:
pSZ->SerializeAsAttribute("nil",
"http://www.w3.org/2001/XMLSchema-instance", (void*)&(xsd_boolean_true),
XSD_BOOLEAN);
The requirement here being that the namespace parameter
("http://www.w3.org/2001/XMLSchema-instance") being passed will result in
"nil" being prefixed by "xsi:" (the namespace prefix).
However, when function SoapSerializer::SerializeAsAttribute calls
GetNamespacePrefix, this namespace does not exist in "m_NsStack" (for a
simple reason that that namespace is never added). Hence "nil" is prefixed
by "ns<n>:" and further "ns<n>" is not bound a namespace which leads to a
XML parse error at the server.
Probable solution: add the standard namespaces in function
SoapSerializer::setSoapVersion, where currently addStandardNamespaceDecl is
being called.
Regards,
- Sudhin.
--
Sudhindra S. Bengeri
Modeling Engineer
OPNET Technologies Inc.,
(240) 497-3000 x2414
====================================================
Register for OPNET's Online Technology Workshops
http//www.opnet.com/TechWorkshops/
====================================================
Register for OPNETWORK 2004 (Aug 30 - Sept 3, Washington DC)
http://www.opnet.com/opnetwork2004/
====================================================