You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by Rolando Pablos Sánchez <rp...@tid.es> on 2003/01/14 16:14:36 UTC

xmlns attribute

I am working with a document style service. Originally it was a rpc service, where I couldn't see this xmlns attribute in the params.
I get the java stubs from wsdl file, and when I test it I get this:

[...]
<soapenv:Body>
  <SubmitReq xmlns="urn:test">
   <Recipients xmlns="">
    <To>
     <RFC2822Address>john@smith.moon</RFC2822Address>
    </To>
   </Recipients>
   <ChannelList xmlns="">
   [...]
  </SubmitReq>
</soapenv:Body>

I get the correct xmlns in the operation name, but what is the problem with the subelements? the ones that hang on the operation tag have the attribute (but empty), the others (the descendants) haven´t.
In fact, I don´t want the xmlns in the subelements. How can I do it?

Thanks in advance.

Re: xmlns attribute

Posted by Jeff Greif <jg...@alumni.princeton.edu>.
In the schema for urn:test, is the element form qualified or unqualified?
If unqualified, the generated stuff is probably correct.

Look in the root of the schema for elementFormDefault=.  The elements are
only namespace-qualified if this attribute is present and has the value
"qualified", or if the individual elements have
form="qualified" in their declarations.  If the elements are unqualified,
then global elements (children of the root <schema> element) are in the
targetNamespace and local elements (declared inside some complexType) are in
NO namespace.  xmlns="" specifies this.
Jeff
----- Original Message -----
From: Rolando Pablos Sánchez
To: axis-user
Sent: Tuesday, January 14, 2003 7:14 AM
Subject: xmlns attribute


I am working with a document style service. Originally it was a rpc service,
where I couldn't see this xmlns attribute in the params.
I get the java stubs from wsdl file, and when I test it I get this:

[...]
<soapenv:Body>
  <SubmitReq xmlns="urn:test">
   <Recipients xmlns="">
    <To>
     <RFC2822Address>john@smith.moon</RFC2822Address>
    </To>
   </Recipients>
   <ChannelList xmlns="">
   [...]
  </SubmitReq>
</soapenv:Body>

I get the correct xmlns in the operation name, but what is the problem with
the subelements? the ones that hang on the operation tag have the attribute
(but empty), the others (the descendants) haven´t.
In fact, I don´t want the xmlns in the subelements. How can I do it?

Thanks in advance.