Hello,
I have a question about namespaces while using document style web service...
Say I have a method defined by the schema...
<schema
targetNamespace="http://www.domain.com/namespace"
xmlns="http://www.w3.org/2001/XMLSchema">
<element name="operation">
<complexType>
<sequence>
<element maxOccurs="1" name="text" type="xsd:string"/>
</sequence>
</complexType>
</element>
...
</schema>
It appears that the code that is generated by WSDL2Java generates a message
that would look something like this...
<operation xmlns="http://www.domain.com/namespace">
<text xmlns="">
blah
</text>
</operation>
Why does this add xmlns="" to the text element? Should this not be there so
that the top level namespace persists?
I want to know this because I am of the opinion that the namespace should
persist to the elements defined inside the element and you should be able to
check against the namespace of these elements on the server. With the
client adding xmlns="", the namespace is null and I can't check against the
namespace. Is it acceptable for the namespace to be null or the namespace
defined by targetNamespace?
Thanks for any help,
Chris