Andrea, the problem you ran into (as well as the problem I fixed the other day) is exactly same as the bug 6467808 reported on sun's website. I.e., a following xml will cause org.w3c.dom.DOMException: NAMESPACE_ERR.
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"> <soapenv:Body xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/> </soapenv:Body> </soapenv:Envelope> A workaround is to avoid duplicate namespace declaration. However this may not be feasible in the cases, for example, we can not stop users write a soap message like below, note ns5 has been declared twice. <soap:Body> <ns1:sendReceiveData xmlns:ns1="http://apache.org/hello_world_rpclit"> <ns5:in xmlns:ns5="http://apache.org/hello_world_rpclit/types"> <ns5:elem1 xmlns:ns5="http://apache.org/hello_world_rpclit/types">this is element 1</ns5:elem1> </ns5:in> </ns1:sendReceiveData> </soap:Body> I think our best bet is to watch out the status of bug 6467808. I found this bug has been marked as fixed and closed. If the fix will be available in next jdk, we can put a known issue section in our release to document this specific issue with JDK 1.5.0_08,09. Cheers, Jervis > -----Original Message----- > From: Andrea Smyth [mailto:[EMAIL PROTECTED] > Sent: Wednesday, November 08, 2006 1:58 AM > To: [email protected] > Cc: Liu, Jervis > Subject: Re: SequenceTest failing with NAMESPACE_ERR: An > attempt is made > to create or change ... > > > Andrea Smyth wrote: > > > It looks like this is a bug in the JDK - same or similar to > > http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6467808 > - I have a > > very simple test case which fails when run with JDK 1.5.0_09 but > > passes with JDK 1.5.0_06. > > Actually the same workaround applies here, i.e. make sure that no > namespace declaration is ever overwritten (by the same > namespace), e.g. > using this message: > <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"> > <soap:Header> > <wsa:MessageID > xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing">u > rn:uuid:32dd41e4-fe14-4603-9cee-e918f8d8a346</wsa:MessageID> > <wsa:To > xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing">h ttp://localhost:9020/SoapContext/GreeterPort> </wsa:To> > <wsa:ReplyTo > xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing"> > > <wsa:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/ > none</wsa:Address> > </wsa:ReplyTo> > <wsa:Action > xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing">G > reetMeOneWay</wsa:Action> > <wsrm:Sequence > xmlns:wsrm="http://schemas.xmlsoap.org/ws/2005/02/rm"> > > <wsrm:Identifier>urn:uuid:b17e5276-32b1-4c18-bc07-bdea1771b951 > </wsrm:Identifier> > <wsrm:MessageNumber>3</wsrm:MessageNumber> > </wsrm:Sequence> > </soap:Header> > <soap:Body> > <greetMeOneWay > xmlns:ns2="http://www.w3.org/2005/08/addressing/wsdl" > xmlns="http://cxf.apache.org/greeter_control/types"><requestTy > pe>thrice</requestType></greetMeOneWay> > </soap:Body> > </soap:Envelope> > > Not sure yet how feasible this is ... > Andrea. >
