perfsonar-dev - Re: [pS-dev] Java Package issues
Subject: perfsonar development work
List archive
- From: Jason Zurawski <>
- To: Stijn Melis <>
- Cc: "" <>
- Subject: Re: [pS-dev] Java Package issues
- Date: Thu, 01 Feb 2007 10:01:51 -0500
Stijn;
Hi,
I am using the java packages to create a SetupDataRequest and a MetadataKeyRequest for testing purposes. I need to have a perfsonar:subject element, that contains an nmwgt:endPointPair.
I tried using org.ggf.ns.nmwg.tools.org.perfsonar.v1_0.Subject, but that doesn't seem to support an EndPointPair object as its child (Error: see below).
The perfsonar subject is defined to contain service descriptions or interfaces currently (see https://svn.internet2.edu/svn/perfsonar/trunk/perfsonar/schema/sonar.rnc). Is there a particular reason why you need to use a perfsonar:subject in this case?
As a workaround, I now create a nmwg:subject element (package org.ggf.ns.nmwg.base.v2_0) and then use String operations afterwards to change it to perfsonar:subject.
This does not sound very efficient, we can talk about adding what you need to the element instead of trying to work around the problem in this manner.
Likewise for the EndPointPair, I use the EndPointPair from the package org.ggf.ns.nmwg.topology.v2_0 and that doesn't result in nmwgt:endPointPair, but generates nmwgtopo:endPointPair instead. Again I use String operations afterwards to convert that to nmwgt:endPointPair.
The prefix (nmwgt or nmwgtopo) is really just a shortcut that maps to a namespace. The actual prefix doesnt matter, as long as it maps to the same namespace. So we could have:
xmlns:foo="http://ggf.org/ns/nmwg/topology/2.0/"
xmlns:bar="http://ggf.org/ns/nmwg/topology/2.0/"
xmlns:nmwgt="http://ggf.org/ns/nmwg/topology/2.0/"
In the same document, and all prefixes would really mean the same thing. Again, using string operations to coerce what you want is unecessary here. So you are using the proper classes.
As far as I am concerned, I am ok with using String operations, but I don't think that's the point of having these packages and classes. Is this a fault in the classes, or am I using them the wrong way?
Regards,
Stijn
The error I get if I use a org.ggf.ns.nmwg.tools.org.perfsonar.service.v1_0.Subject instead of a org.ggf.ns.nmwg.base.v2_0.Subject:
The service:subject is a little different than the perfsonar:subject, which do you think you should be using? Do you have an example instance document I can see?
Error: org/ggf/ns/nmwg/tools/org/perfsonar/service/v1_0/Subject.java addChild(Element) unrecognized child: org/ggf/ns/nmwg/topology/v2_0/EndPointPair.java: ---> org/ggf/ns/nmwg/topology/v2_0/Src.java: ---> 192.168.217.129 type:ipv4 port: dst:org/ggf/ns/nmwg/topology/v2_0/Dst.java: ---> 192.168.217.130 type:ipv4 port:
-jason
- Java Package issues, Stijn Melis, 02/01/2007
- Re: [pS-dev] Java Package issues, Jason Zurawski, 02/01/2007
- Re: [pS-dev] Java Package issues, Stijn Melis, 02/01/2007
- Message not available
- Re: [pS-dev] Java Package issues, Stijn Melis, 02/01/2007
- Re: [pS-dev] Java Package issues, Verena Venus, 02/01/2007
- Re: [pS-dev] Java Package issues, Stijn Melis, 02/01/2007
- Re: [pS-dev] Java Package issues, Jason Zurawski, 02/01/2007
- Message not available
- Re: [pS-dev] Java Package issues, Stijn Melis, 02/01/2007
- Re: [pS-dev] Java Package issues, Jason Zurawski, 02/01/2007
Archive powered by MHonArc 2.6.16.