Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
None
-
None
-
None
-
all
Description
This appears to be a regression in XML serialization. The SCA CppBigBank example is currently failing to get a response from the StockQuote service due to sending an invalid request.
Using the XML Schema embedded in "StockQuoteService.wsdl", the following code:
DataFactoryPtr mdg = DataFactory::getDataFactory();
XSDHelperPtr xsh = HelperProvider::getXSDHelper(mdg);
xsh->defineFile("StockQuoteService.wsdl");
DataObjectPtr doObj = mdg->create("http://swanandmokashi.com",
"GetQuotes");
doObj->setCString("QuoteTicker", "IBM");
XMLHelperPtr xmlHelper = HelperProvider::getXMLHelper(mdg);
XMLDocumentPtr doc =
xmlHelper->createDocument(doObj,
"http://swanandmokashi.com",
"GetQuotes");
xmlHelper->save(doc, "out.xml");
Will produce the invalid instance document:
<?xml version="1.0" encoding="UTF-8"?>
<tns:GetQuotes xmlns:tns="http://swanandmokashi.com" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><QuoteTicker>IBM</QuoteTicker></tns:GetQuotes>
The element "QuoteTicker" should be namespace qualified.