[ https://issues.apache.org/jira/browse/AXIS2C-834?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Bill Mitchell resolved AXIS2C-834. ---------------------------------- Resolution: Fixed Fix Version/s: Current (Nightly) This fix has been incorporated in svn rev 617651. > guththila_xml_writer has problems with default namespace > -------------------------------------------------------- > > Key: AXIS2C-834 > URL: https://issues.apache.org/jira/browse/AXIS2C-834 > Project: Axis2-C > Issue Type: Bug > Components: guththila, xml/parser > Affects Versions: Current (Nightly) > Environment: Windows XP, Visual Studio 2005, guththila parser, > libcurl transport > Reporter: Bill Mitchell > Fix For: Current (Nightly) > > Attachments: guththila_xml_writer_diff, > guththila_xml_writer_wrapper_diff > > > The guththila xml writer appears to have several problems related to the > default namespace. These appear when attempting to use the ADB stubs for the > elements in the SOAP request messages, as the Axis data bindings fill in the > default namespace from the WSDL. > (1) In guththila_xml_writer_wrapper, guththila_xml_writer_wrap_namespace() > has a comment indicating that the prefix is null on the default namespace. > Yet it goes ahead and calls guththila_write_namespace() which requires both a > prefix and a namespace URI. > (2) In guththila_xml_wrapper.c, the routine > guththila_write_start_element_with_namespace() does not understand the > default namespace. It searches the table of namespaces to determine the > prefix that goes with this namespace. If the namespace is not found, no XML > is generated, so no element is started although the outer code assumes it is. > This results in malformed XML as below: > <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"> > <soapenv:Header></soapenv:Header> > <soapenv:Body name="customer" exemplarHandle="master" > xmlns="http://frameware.xcentrisity.com/services/"></soapenv:Body> > </soapenv:Envelope></ > Yes, the trailing </ is not a typo. When the XML writer tries to close off 3 > elements in the stack without having started one of the elements, this is the > outcome. > (3) After fixing the above problems, I discovered that the generated XML for > the element inside the SOAP Body incorrectly had the URI of the namespace as > the name of the element, rather than the name itself. I.e., the message > contained a structure like: > <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"> > <soapenv:Header></soapenv:Header> > <soapenv:Body> > <http://frameware.xcentrisity.com/services/ name="customer" > exemplarHandle="master" > xmlns="http://frameware.xcentrisity.com/services/"></http://frameware.xcentrisity.com/services/> > </soapenv:Body> > </soapenv:Envelope> > The problem is that > guththila_xml_writer_wrapper_start_element_with_namespace() is not flipping > the order of the parameters as is correctly done in > guththila_xml_writer_wrapper_start_element_with_namespace_prefix(). -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]