I think I now know what the source of Dimuthu's problem was/is -- I've generated a doc/lit service in Axis and the schema that Axis generates for a given service indicates that the elementFormDefault is qualified, ie:
<types> <schema xmlns="http://www.w3.org/2001/XMLSchema" targetNamespace="http://test.xml.travelnow.com" elementFormDefault="qualified"> <complexType name="Person"> <sequence> <element name="age" type="xsd:int"/> <element name="lastName" nillable="true" type="xsd:string"/> <element name="firstName" nillable="true" type="xsd:string"/> </sequence> </complexType> <element name="process"> <complexType> <sequence> <element name="person" type="tns1:Person"/> </sequence> </complexType> </element> <element name="processResponse"> <complexType> <sequence> <element name="processReturn" type="xsd:string"/> </sequence> </complexType> </element> </schema> </types> As a response to this service, Axis generates the following (and IMHO, wrong) response: <?xml version="1.0" encoding="UTF-8"?> <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <soapenv:Body> <processResponse xmlns="http://test.xml.travelnow.com"> <processReturn xmlns="">CORY</processReturn> </processResponse> </soapenv:Body> </soapenv:Envelope> Since elementFormDefault is "qualified" -- then one could safely assume that since Axis generated this wsdl, it should also be serializing local elements in the appropriate namespace...NOT adding xmlns="". One would also assume that client tools parsing this WSDL would expect to see "processReturn" serialized in the "http://test.xml.travelnow.com" namespace. Thanks again! Cory Wilkerson -----Original Message----- From: Anne Thomas Manes [mailto:[EMAIL PROTECTED] Sent: Tuesday, September 02, 2003 8:40 AM To: [EMAIL PROTECTED] Subject: Re: xmlns=" " in the doc\literal SOAP message Dimuthu, Yes. It's okay for empty namespace definitions to go across the wire. In fact, it some cases it might be required. In your SOAP request, the <query> element defines a default namespace (xmlns="blah" as opposed to xmlns:foo="blah"), which then applies to all subelements of the <query> element, unless it is overridden by another default namespace definition. If the <description> and <ItemId> elements are local elements to <query>, then they should not be namespace qualified, and in that case, you should specify an empty default namspace definition in each of these subelements to override the active default namespace. Now, if the <description> and <ItemId> are global elements, then this message would be in error. So whether or not this message is correct depends on the schema definition for the message. Anne At 02:20 AM 9/1/2003 -0700, you wrote: >Hi all, > >I'm trying to write a doc\literal web service and my soap message appears >as below......... > ><query xmlns="urn:HistorySriLanka"> > <description xmlns="">Wood carving of an Elephant</description> > <ItemId xmlns="">ER234</ItemId> ></query> > >Has anybody else has come across a situation like this? Is it ok for empty >xmlns="" tags to go in the wire? Any help is greatly appreciated. > >Thank you, >Dimuthu > > >Do you Yahoo!? ><http://us.rd.yahoo.com/evt=10469/*http://sitebuilder.yahoo.com>Yahoo! >SiteBuilder - Free, easy-to-use web site design software