Skip to Content.
Sympa Menu

perfsonar-dev - Re: [pS-dev] failure of converting returning message (XML) to DOM

Subject: perfsonar development work

List archive

Re: [pS-dev] failure of converting returning message (XML) to DOM


Chronological Thread 
  • From: Loukik Kudarimoti <>
  • To: ulisses <>
  • Cc:
  • Subject: Re: [pS-dev] failure of converting returning message (XML) to DOM
  • Date: Wed, 23 Aug 2006 12:44:47 +0100

Ulisses,

The example below probably fails most rules specified by NMWG :) I guess this is the reason why it won't create a DOM object

- What is the purpose of the metadata element? It has no contents!
- Why do you have a data element inside another data element?
- Why do you have link element containing link meta information inside the data element? This clearly belongs under the metadata element (as it it meta information)

To understand what you are trying to achieve, I have the following questions (as I haven't followed up your email thread).

* what are you trying to achieve?
* Have you defined all possible message sequences for your service?
* Are these message sequences agreed upon by NMWG (i.e Martin and Jason)
* If the above two points are done, are you sure your service is producing xml messages which are conforming to the agreements you might have had with NMWG?

Finally, if all above are ok, what is the error message being produced (look at catalina.out if you are testing it on a deployed service)

Regards,
Loukik.

ulisses wrote:
Hi again

I managed to have a very minimum version of the XML document that fails to convert to DOM:

<nmwg:message id="localhost.localdomain.66dffd41:10d3ab5e77b:-7ffe"
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.66dffd41:10d3ab5e77b:-7fff">
<nmwgtopo3:link
id="localhost.localdomain.66dffd41:10d3ab5e77b:-8000"
xmlns:nmwgtopo3="http://ggf.org/ns/nmwg/topology/l3/3.0/";>
<nmwgtopo3:name>test</nmwgtopo3:name>
</nmwgtopo3:link>
</nmwg:data>
</nmwg:data>
</nmwg:message>

any hint? thanks

Ulisses

On 2006-08-23 12:55:12, ulisses wrote:
On 2006-08-23 12:38:14, ulisses wrote:
Hi all again

before holidays I was trying to understand why I was failing to convert XML
to DOM

now, I have noticed something I think it is not ok:

In the following sample XML document, there are two occurrencies of one
medatada element with
the same ID (marked with [1]. I yet don't know why appears the second
instance of that element.

this looks wrong, isn't it? or am I missing something?
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:

<?xml version="1.0" encoding="UTF-8"?>
<nmwg:message xmlns:nmwg="http://ggf.org/ns/nmwg/base/2.0/";
id="resultCodeMessage">
<nmwg:metadata id="resultCodeMetadata">
<nmwg:eventType>error.common.parse_error</nmwg:eventType>
</nmwg:metadata>
<nmwg:data id="resultDescriptionData_for_resultCodeMetadata"
metadataIdRef="resultCodeMetadata">
<nmwg:datum value="Cannot convert Message to DOM" />
</nmwg:data>
</nmwg:message>

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"/>
</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

regards

Ulisses

Thanks in advance

Ulisses

<nmwg:message id="msg2_resp" messageIdRef="msg2"
type="TOPSDownloadDBResponse" xmlns:nmwg="http://ggf.org/ns/nmwg/base/2.0/";> <nmwg:metadata id="TOPSDownloadDBResponseMetadata_0"/> // [1]
<nmwg:data id="TOPSDownloadDBResponse_0" metadataIdRef="TOPSDownloadDBResponseMetadata_0">
<nmwg:metadata id="TOPSDownloadDBResponseMetadata_0"/> // [1]
<nmwg:data id="localhost.localdomain.-7edd1411:10cb415db62:-7ffe">
<nmwgtopo3:link
id="localhost.localdomain.-7edd1411:10cb415db62:-7fff" xmlns:nmwgtopo3="http://ggf.org/ns/nmwg/topology/l3/3.0/";>
<nmwgtopo3:interface
id="localhost.localdomain.-7edd1411:10cb415db62:-8000" interfaceIdRef="private_index: 0, snmp_ifindex: unknown">

<nmwgtopo3:ifDescription>GE-0/0/0.20</nmwgtopo3:ifDescription>
<nmwgtopo3:type>other</nmwgtopo3:type>
<nmwgtopo3:capacity>0</nmwgtopo3:capacity>
<nmwgtopo3:netmask>62.40.98.40/29</nmwgtopo3:netmask>
<nmwgtopo3:ipAddress value="62.40.98.41"/>
</nmwgtopo3:interface>
<nmwgtopo3:name>be1.be.geant.net_62.40.98.40/29 - _</nmwgtopo3:name>
</nmwgtopo3:link>
</nmwg:data>
</nmwg:data>
</nmwg:message>




Archive powered by MHonArc 2.6.16.

Top of Page