On 12/12/06, Jean-Sebastien Delfino <[EMAIL PROTECTED]> wrote:

Pete Robbins wrote:
> On 11/12/06, Jean-Sebastien Delfino <[EMAIL PROTECTED]> wrote:
>>
>> With the SDO head (r485883) the XML response from the
AccountDataService
>> in the HttpdBigBank scenario is incorrect (and breaks the scenario):
>>
>> <getStockAccountResponse xmlns="http://tempuri.org";
>> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
>> xmlns:tns="http://tempuri.org";
>> xmlns:tns2="http://www.bigbank.com/AccountService";><tns2:return
>>
>>
xsi:type="StockAccount"><accountNumber>1234_STA12345</accountNumber><symbol>IBM</symbol><quantity>100</quantity><balance></balance></tns2:return></getStockAccountResponse>
>>
>>
>> - xsi:type="StockAccount" is missing the tns2 namespace prefix.
>> - return is not from the tns2 namespace and should not be prefixed by
>> tns2.
>>
>>
>> Going back to an older revision of SDOXMLWriter.cpp (r480964) I am
>> getting the correct XML:
>>
>> <getStockAccountResponse xmlns="http://tempuri.org";
>> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
>> xmlns:tns="http://tempuri.org";
>> xmlns:tns2="http://www.bigbank.com/AccountService";><return
>>
>>
xsi:type="tns2:StockAccount"><accountNumber>1234_STA12345</accountNumber><symbol>IBM</symbol><quantity>100</quantity><balance></balance></return></getStockAccountResponse>
>>
>>
>> I have stepped through the SDO runtime code and I'm not sure yet why
>> this is happening, but this is caused by some of the recent changes to
>> SDOXMLWriter.cpp. Any idea?
>>
>> --
>> Jean-Sebastien
>
>
> What namespace is the element <return> supposed to be in? In the first
> it is
> in "tns2" and in the second the default namespace http://tempuri.org.
> What
> Types/Properties are defined in the DataFactory?
>
> I'll take a look at this. There have been a number of "fixes" in this
> area
> and each change breaks something else!
>
> Cheers,
>
Pete,

In my example, checkingAccountResponse is open content so the <return>
element is not defined by a schema, but the instance of StockAccount is
from tns2.

--
Jean-Sebastien



OK. I know how to fix this. Sebastien, you put some code in to check for an
open content property and not write the element uri. This caused a failure
that Caroline saw so we backed out that change.

The problem is actually that your check at the top of the writeDO method was
using the *element* name and not the *property* name. The name of the
element to be written is passed into writeDO, not the name of the property
that is being processed. These are often the same, but are not the same in
cases where substitutions, aliases or sdo:name annotations are used.

I'm on the case and hope to have a fix in the next couple of hours.

Cheers,

--
Pete

Reply via email to