Daniel,
  no the two xml representations are different.   In the first,  the root
_element_ is signalled as being in the namespace "http://abc.com/Sample";,
and therefore the type of the element is implied by the known type
associated with the element, as defined in the global element for Input in
the schema.  In the second,  the root element is not described anywhere,  we
don't have an implicit type,  and therefore we must explicitly state the
_type_ as coming from the namespace "http://abc.com/Sample"; using the
xsi:type device.

I believe what you want is the first form,  and I suspect what have been are
getting is the second,  but when you alter your code to give a non null
namespace you then start getting the first (and the bonus is you will never
hit the concurrency issue, because all metadata is defined before you use
it).

Kelvin.

On 15/02/2008, Daniel Peter <[EMAIL PROTECTED]> wrote:
>
> Hi Kelvin,
>
> Yes, the root element varies as you described.
> Btw: from the XML point of view, both variations are
> equivalent, right?
>
> Is there a dynamic way to get the targetnamespace of
> the schama that was used to generate the sdo?
>
>
> Regards, Daniel
>
> --- kelvin goodson <[EMAIL PROTECTED]>
> schrieb:
>
>
> > I'm kind of surprised that the root element of the
> > serialised document is in
> > the target namespace of the Type,  if you provide
> > null as the input URI.  So
> > to check,  the root element looks something like
> >
> > <tns:Input xmlns:tns="http://abc.com/Sample";>
> >
> > as opposed to
> >
> > <Input xmlns:tns="http://abc.com/Sample";
> > xsi:type="tns:InputType">
> >
> >  .... yes?
> >
> > It's clear from the code path indicated by the
> > exception you reported,  that
> > the metadata created during code generation due to
> > the global elements in
> > your schema are not being found at document creation
> > time.  I believe you
> > should be supplying the namespace string to the
> > CreateDocument call,  and
> > all will be well.
> >
> > Kelvin.
>
>
>
>       Lesen Sie Ihre E-Mails jetzt einfach von unterwegs.
> www.yahoo.de/go
>
>
> ---------------------------------------------------------------------
>
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

Reply via email to