DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT <http://nagoya.apache.org/bugzilla/show_bug.cgi?id=17746>. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE.
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=17746 xmlns="" appened to subsequent element when no namepsace prefix ------- Additional Comments From [EMAIL PROTECTED] 2003-04-12 18:32 ------- Please find below the patch for the solution to my issue. Could someone (Tom, perhaps?) please commit it. The main problem is in BeanSerializer.java - see item (2). (1) I tracked back one of my issues to my wsdd and the operation declaration. The echo sample's wsdd has many operations defined similarly as such: <operation name="echoNonNegativeInteger" qname="operNS:echoNonNegativeInteger" xmlns:operNS="http://soapinterop.org/" returnQName="return" returnType="rtns:nonNegativeInteger" xmlns:rtns="http://www.w3.org/2001/XMLSchema" > Note that returnQName="return" does not have a namespace... that was the first problem that I had, and that ensured that, when using the literal style at least, I would get <return xmlns="">. Having added the same namespace as the operation (and my beans) to my returnQName, I then got <return> - hurray! *** Perhaps the sample wsdds should have a namespace??? *** However, this then led to the real problem - which better aligned me with the problem that Darren had: (2) After fixing my wsdd, each immediate child under the <return> element had <xxx xmlns=""> - the same behaviour as Darren (I think). Here is the patch/diff against the current (13 April 2003) cvs version: org\apache\axis\encoding\ser\BeanSerializer.java 191c191,195 < qname = new QName("", propName); --- > // The default qname should inherit the namespace of a > // parent. Setting this namespace to "" causes interop > // issues when the "literal" style is used - > // most of the elements will be serialised with xmlns="" > qname = new QName(name.getNamespaceURI(), propName); *** Please commit this!!!! (I really need it in 1.1 final) Note that this solution is completely aligned with the approach outlined in the Additional Comments From Tom Jordahl 2003-03-07 15:15. "Shouldn't you create the element with the same namespace as its parent ... and then expect no xmlns attribute [to appear in the serialisation] ?" Since this is the approach that axis.encoding.SerializationContextImpl seems to have taken, BeanSerializer should be consistent. *** Now, when I say "better aligned me with the problem Darren had", my solution will not solve his issue - which is solved by coding approach as per Tom's comments 2003-03-07. (3) Other things I stumbled upon as I was debugging - similar issue about the namespace being set to "" and not being inherited: org\apache\axis\providers\java\RPCProvider.java 345c345 < returnQName = new QName("", methodName + "Return"); --- > returnQName = new QName(body.getNamespaceURI(), methodName + "Return"); org\apache\axis\message\RPCElement.java 135c135 < addParam(new RPCParam(name, args[i])); --- > addParam(new RPCParam(namespace, name, args[i])); And for consistency with the rest of the code: org\apache\axis\message\RPCElement.java 378c378 < context.startElement(new QName(namespaceURI,name), attributes); --- > context.startElement(new QName(getNamespaceURI(), name), attributes); 383c383 < if (!hasOperationElement && encodingStyle.equals("")) { --- > if (!hasOperationElement && encodingStyle != null && encodingStyle.equals("")) { Please commit these fixes!! thank-you.
