perfsonar-dev - Re: [pS-dev] failure of converting returning message (XML) to DOM
Subject: perfsonar development work
List archive
- From: Jason Zurawski <>
- To: ulisses <>
- Cc:
- Subject: Re: [pS-dev] failure of converting returning message (XML) to DOM
- Date: Sun, 27 Aug 2006 21:23:45 -0400
ulisses;
I will try to answer all of your questions in order, forgive me if I re-state the obvious or something that someone else has already pointed out.
well, I have found the problem of why there was being inserted two metadata
elements with the
same ID, and I now generate a more nice looking xml, in any case I don't
figure out why it cannot be converted to DOM:
The XML file is
<nmwg:message id="localhost.localdomain.-5ae93b59:10d3a9f2382:-7e75"
type="TOPSDownloadDBResponse"
xmlns:nmwg="http://ggf.org/ns/nmwg/base/2.0/">
<nmwg:metadata id="TOPSDownloadDBResponseMetadata"/>
<nmwg:data id="TOPSDownloadDBResponse"
metadataIdRef="TOPSDownloadDBResponseMetadata">
<nmwg:data id="localhost.localdomain.-5ae93b59:10d3a9f2382:-7e76">
<nmwgtopo3:node
id="localhost.localdomain.-5ae93b59:10d3a9f2382:-7f41"
xmlns:nmwgtopo3="http://ggf.org/ns/nmwg/topology/base/3.0/">
<nmwgtopo3:hostName>landas-gw.uninett.no</nmwgtopo3:hostName>
<nmwgtopo3:name>landas-gw.uninett.no</nmwgtopo3:name>
</nmwgtopo3:node>
<nmwgtopo3:node
id="localhost.localdomain.-5ae93b59:10d3a9f2382:-7f71"
xmlns:nmwgtopo3="http://ggf.org/ns/nmwg/topology/base/3.0/">
<nmwgtopo3:hostName>svalbard-gw.uninett.no</nmwgtopo3:hostName>
<nmwgtopo3:name>svalbard-gw.uninett.no</nmwgtopo3:name>
</nmwgtopo3:node>
</nmwg:data>
<nmwg:data id="localhost.localdomain.-5ae93b59:10d3a9f2382:-7f9a">
<nmwgtopo3:link
id="localhost.localdomain.-5ae93b59:10d3a9f2382:-7fc3"
xmlns:nmwgtopo3="http://ggf.org/ns/nmwg/topology/l3/3.0/">
<nmwgtopo3:interface
id="localhost.localdomain.-5ae93b59:10d3a9f2382:-7fc4"
interfaceIdRef="private_index: 0, snmp_ifindex: unknown">
<nmwgtopo3:ifDescription>NULLGE-0/2/0.30</nmwgtopo3:ifDescription>
<nmwgtopo3:type>other</nmwgtopo3:type>
<nmwgtopo3:capacity>0</nmwgtopo3:capacity>
<nmwgtopo3:netmask>62.40.100.144/28</nmwgtopo3:netmask>
<nmwgtopo3:ipAddress value="62.40.100.145"/>
The address element is wrong, it needs a type attribute so it should be either
<nmwgtopo3:ipAddress value="62.40.100.145" type="ipv4"/>
or
<nmwgtopo3:ipAddress type="ipv4">62.40.100.145</nmwgtopo3:ipAddress>
This is the least of the problems here though, there will be many more changes to make.
</nmwgtopo3:interface>
<nmwgtopo3:name>hr1.hr.geant.net_62.40.100.144/28 -
_</nmwgtopo3:name>
</nmwgtopo3:link>
<nmwgtopo3:link
id="localhost.localdomain.-5ae93b59:10d3a9f2382:-7faf"
xmlns:nmwgtopo3="http://ggf.org/ns/nmwg/topology/l3/3.0/">
<nmwgtopo3:interface
id="localhost.localdomain.-5ae93b59:10d3a9f2382:-7fb0"
interfaceIdRef="private_index: 0, snmp_ifindex: unknown">
<nmwgtopo3:ifDescription>SO-1/2/0</nmwgtopo3:ifDescription>
<nmwgtopo3:type>other</nmwgtopo3:type>
<nmwgtopo3:capacity>0</nmwgtopo3:capacity>
<nmwgtopo3:netmask>62.40.103.100/30</nmwgtopo3:netmask>
<nmwgtopo3:ipAddress value="62.40.103.101"/>
</nmwgtopo3:interface>
<nmwgtopo3:name>nl1.nl.geant.net_62.40.103.100/30 -
_</nmwgtopo3:name>
</nmwgtopo3:link>
</nmwg:data>
</nmwg:data>
</nmwg:message>
any hint on how hunt this problem will be greatly appreciated
This XML looks a little strange, is there a reason why you are wrapping data items inside of more data? Is there also a reason as to why the first metadata is blank? I believe that when we designed the schema we envisioned the nodes/links/interfaces as being more of a metadata item that could be wrapped in data, something like this:
<nmwg:metadata id="somemetadataid">
<!-- original request metadata -->
</nmwg:metadata>
<nmwg:data id="somedataid" metadataIdRef="somemetadataid">
<nmwg:metadata id="TOPSDownloadDBResponseMetadata1">
<nmwg:subject id="somesubid1"> <nmwgtopo3:node id="localhost.localdomain.-5ae93b59:10d3a9f2382:-7f41"
xmlns:nmwgtopo3="http://ggf.org/ns/nmwg/topology/base/3.0/">
<nmwgtopo3:hostName>landas-gw.uninett.no</nmwgtopo3:hostName>
<nmwgtopo3:name>landas-gw.uninett.no</nmwgtopo3:name>
</nmwgtopo3:node>
</nmwg:subject>
</nmwg:metadata>
<nmwg:metadata id="TOPSDownloadDBResponseMetadata2">
<nmwg:subject id="somesubid2">
<nmwgtopo3:link id="localhost.localdomain.-5ae93b59:10d3a9f2382:-7fc3"
xmlns:nmwgtopo3="http://ggf.org/ns/nmwg/topology/l3/3.0/">
<nmwgtopo3:interface id="localhost.localdomain.-5ae93b59:10d3a9f2382:-7fc4"
interfaceIdRef="private_index: 0, snmp_ifindex: unknown">
<nmwgtopo3:ifDescription>NULLGE-0/2/0.30</nmwgtopo3:ifDescription>
<nmwgtopo3:type>other</nmwgtopo3:type>
<nmwgtopo3:capacity>0</nmwgtopo3:capacity>
<nmwgtopo3:netmask>62.40.100.144/28</nmwgtopo3:netmask>
<nmwgtopo3:ipAddress value="62.40.100.145"/>
</nmwgtopo3:interface>
<nmwgtopo3:name>hr1.hr.geant.net_62.40.100.144/28 - _</nmwgtopo3:name>
</nmwgtopo3:link> </nmwg:subject>
</nmwg:metadata> <!-- more response metadata ... -->
</nmwg:data>
It would also be possible to wrap the node/interface/link elements in 'datum' elements, so it would look something like this:
<nmwg:datum>
<nmwgtopo3:node id="localhost.localdomain.-5ae93b59:10d3a9f2382:-7f41"
xmlns:nmwgtopo3="http://ggf.org/ns/nmwg/topology/base/3.0/">
<nmwgtopo3:hostName>landas-gw.uninett.no</nmwgtopo3:hostName>
<nmwgtopo3:name>landas-gw.uninett.no</nmwgtopo3:name>
</nmwgtopo3:node>
<!-- more topology elements -->
</nmwg:datum>
You may have given me the reasons as to why you have chosen this design before (I realize that this is more or less just the results from a database query), but for my sake (and anyone else who has the time to help you) could you please re-state what you are trying to accomplish?
-jason
- Re: [pS-dev] failure of converting returning message (XML) to DOM, (continued)
- Re: [pS-dev] failure of converting returning message (XML) to DOM, Loukik Kudarimoti, 08/25/2006
- Re: [pS-dev] failure of converting returning message (XML) to DOM, Jason Zurawski, 08/27/2006
- Re: [pS-dev] failure of converting returning message (XML) to DOM, Jason Zurawski, 08/27/2006
- Re: [pS-dev] failure of converting returning message (XML) to DOM, ulisses, 08/28/2006
- Re: [pS-dev] failure of converting returning message (XML) to DOM, Jason Zurawski, 08/28/2006
- Re: [pS-dev] failure of converting returning message (XML) to DOM, ulisses, 08/28/2006
- Re: [pS-dev] failure of converting returning message (XML) to DOM, Jason Zurawski, 08/28/2006
- Re: [pS-dev] failure of converting returning message (XML) to DOM, ulisses, 08/28/2006
- Re: [pS-dev] failure of converting returning message (XML) to DOM, ulisses, 08/28/2006
- Re: [pS-dev] failure of converting returning message (XML) to DOM, Jason Zurawski, 08/28/2006
- defining xml output, ulisses, 08/28/2006
- Re: defining xml output, Jason Zurawski, 08/28/2006
- Re: [pS-dev] Re: defining xml output, Jeff W. Boote, 08/28/2006
- Re: defining xml output, Jason Zurawski, 08/28/2006
Archive powered by MHonArc 2.6.16.