Uploaded image for project: 'Tuscany'
  1. Tuscany
  2. TUSCANY-1478

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

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • None
    • C++ SDO
    • 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.

      Attachments

        1. TUSCANY-1478.txt
          3 kB
          Michael Yoder

        Activity

          People

            Unassigned Unassigned
            michaelbyoder Michael Yoder
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: