users@glassfish.java.net

Re: SOAP from glassfish is okay?

From: <glassfish_at_javadesktop.org>
Date: Sat, 15 Mar 2008 13:00:38 PST

Thank you,

If I understand you right You want to say that last two cases use qualified element names And the first ones unqualified.
By default schema requires unqualified names for local elements.
This is why
 
<logon xmlns="http://my.test/">
<user>user</user>
<passwd>xxx</passwd>
</logon>

is incorrect. Is it incorrect to use default namespace with locally declared elements. Is it?

Second up. You tell me that.
Quote:"user" is namespace "http://my.test/" in the last two examples where as in the first two examples it is in no namespace.

From xsd Its easy to see that "user" & "passwd" are local declarations coming from "http://my.test/" namespace.

<xs:schema version="1.0" targetNamespace="http://my.test/" ...
<xs:complexType name="logon">
<xs:sequence>
        <xs:element name="user" type="xs:string" minOccurs="0"/>
        <xs:element name="passwd" type="xs:string" minOccurs="0"/>
</xs:sequence>
</xs:complexType>

Is an XML with default namespace

<logon xmlns="http://my.test/">
<user>user</user>
<passwd>xxx</passwd>
</logon>

equals to an XML with qualified element names

<x:logon xmlns:x="http://my.test/">
<x:user>user</x:user>
<x:passwd>xxx</x:passwd>
</x:logon>

Both use qualified elements names? Is it an error to use defaulting with xsd from glassfish that requires unqualified names? Defaulting an element sounds like as all children become qualified?

My test tells me that Its an error. Or there's an error in glassfish. Any way defaulting doesnt work.

Alexandre
[Message sent by forum member 'aefremov' (aefremov)]

http://forums.java.net/jive/thread.jspa?messageID=264230