axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 13057] New: - RPCElement serialization doesn't use prefixes
Date Fri, 27 Sep 2002 00:26:28 GMT
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=13057>.
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=13057

RPCElement serialization doesn't use prefixes

           Summary: RPCElement serialization doesn't use prefixes
           Product: Axis
           Version: 1.0-rc1
          Platform: Other
        OS/Version: Other
            Status: NEW
          Severity: Normal
          Priority: Other
         Component: Serialization/Deserialization
        AssignedTo: axis-dev@xml.apache.org
        ReportedBy: wollsch@us.ibm.com


The code in RPCElement.outputImpl creates a default namespace when using RPC/literal encoding.
This means that all elements in message parts that have previously ment to unqualified are
now in that default namespace. 

I suggest to avoid that
a) the user can set a prefix on RPCElement with setPrefix
b) the outputImpl code is change to not add a default namespace when this prefix is set. E.g.
the code will be change to this:

       if (isRPC || noParams) {
            // Set default namespace if appropriate (to avoid prefix mappings
            // in literal style).  Do this only if there is no encodingStyle.
            if (encodingStyle != null && encodingStyle.equals("") && getPrefix()==null)
{
                context.registerPrefixForURI("", getNamespaceURI());
            }
            context.startElement(new QName(namespaceURI,name), attributes);
        }

        for (int i = 0; i < params.size(); i++) {
            RPCParam param = (RPCParam)params.elementAt(i);
            if (!isRPC && encodingStyle.equals("") && getPrefix()==null) {
                context.registerPrefixForURI("", param.getQName().getNamespaceURI());
            }
            param.serialize(context);
        }

Mime
View raw message