For schemas with elementFormDefault=true, serialized instance documents are 
invalid
-----------------------------------------------------------------------------------

                 Key: TUSCANY-1478
                 URL: https://issues.apache.org/jira/browse/TUSCANY-1478
             Project: Tuscany
          Issue Type: Bug
          Components: C++ SDO
         Environment: all
            Reporter: Michael Yoder


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.




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

Reply via email to