You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@juddi.apache.org by "SourceForge.net" <no...@sourceforge.net> on 2003/10/28 16:23:01 UTC
[juddi-Developers] [ juddi-Bugs-832039 ] Qualified element names in requests
Bugs item #832039, was opened at 2003-10-28 15:16
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=434422&aid=832039&group_id=42875
Category: Transport Layer
Group: Development
Status: Open
Resolution: None
Priority: 5
Submitted By: Nobody/Anonymous (nobody)
Assigned to: Alex Ceponkus (aceponkus)
Summary: Qualified element names in requests
Initial Comment:
Some JAX-RPC implementations qualify all XML elements
of the SOAP request, including the application-specific
elements in the SOAP body. For example:
<?xml version="1.0" encoding="UTF-8"?>
<env:Envelope
xmlns:env="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-
instance"
xmlns:enc="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:ns0="urn:uddi-org:api_v2">
<env:Body>
<ns0:save_business generic="2.0">
<ns0:authInfo>authToken:6F152440-08BC-
11D8-A8C0-AAB6CC2C14BD</ns0:authInfo>
<ns0:businessEntity
businessKey="">
<ns0:name>test</ns0:name>
</ns0:businessEntity>
</ns0:save_business>
</env:Body>
</env:Envelope>
The problem is that the jUDDI server expects all the
elements under the first child of <env:Body> to be
UNQUALIFIED. In the example above, for instance, the
<ns0:authInfo> element is not properly recognized by
the server, which expects <authInfo>. Note that the
first child of <env:Body> (in this case,
<ns0:save_business>), which defines the UDDI operation
to execute, is not affected by this problem since it is
not unmarshalled by the same code.
One solution is to change
XMLUtils.getChildElementsByTagName() to match only
the local portion of the element. Thus the code:
if (node.getNodeType() == Node.ELEMENT_NODE &&
node.getNodeName().equals(tagName))
result.addElement(node); // matching element
would become:
if (node.getNodeType() == Node.ELEMENT_NODE &&
node.getLocalName().equals(tagName))
result.addElement(node); // matching element
Actually, it would be a better idea to leave
XMLUtils.getChildElementsByTagName() unchanged and
to add a XMLUtils.getChildElementsByTagNameNS()
which does the above. The handlers could then be
modified to use the latter version of the method.
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=434422&aid=832039&group_id=42875