[kepler-users] Extracting XML Attributes
Trina Myers
t.myers at bigpond.net.au
Sun Oct 19 19:52:05 PDT 2008
Hi Jon and Dan,
Could I possibly get a copy of your workflow that Dan modified with the new
XPath actor. I am trying to do something similar and an example would be
wonderful..
Cheers
Trina
>
> Hi Jon,
>
> I've updated the XPath actor with a new port that outputs
> attribute or text() data. Attached is a modified version
> of your workflow that uses this functionality.
>
> Let me know if you have questions,
>
> --dan
>
>
> Jon Goodall wrote:
>
>> Hello,
>>
>> I'm trying to extract XML attributes from a web service in Kepler and
>> could use some help. I've tried doing this a couple different ways.
>> First, I tried the following xpath query:
>> /timeSeriesResponse/timeSeries/values/value/@dateTime and the
>> exception is ...
>>
>> ptolemy.kernel.util.IllegalActionException: XPath: node selected with
>> XPath isn't an element.
>> at org.sdm.spa.XPath.fire(XPath.java:167)
>> at ptolemy.actor.AtomicActor.iterate(AtomicActor.java:398)
>> at
>>
ptolemy.actor.sched.StaticSchedulingDirector.fire(StaticSchedulingDirector.j
ava:170)
>> at ptolemy.actor.CompositeActor.fire(CompositeActor.java:400)
>> at ptolemy.actor.Manager.iterate(Manager.java:688)
>> at ptolemy.actor.Manager.execute(Manager.java:332)
>> at ptolemy.actor.Manager.run(Manager.java:1071)
>> at ptolemy.actor.Manager$3.run(Manager.java:1112)
>>
>> The xpath query /timeSeriesResponse/timeSeries/values/value works fine
>> and gives this response ..
>>
>> send to channel 0: {<value dateTime="2000-01-01T00:00:00"
>> qualifiers="A">483</value>, <value dateTime="2000-01-02T00:00:00"
>> qualifiers="A">464</value> ...
>>
>> I've also tried using an XMLDisassembler actor to access the dateTime
>> attributes, but no luck. I was able to get the values, but unable to
>> get the dateTimes (I tried setting the port name to @dateTime and to
>> dateTime). See attached workflow for details.
>>
>> One other thing to note is that this service I'm using can return
>> either simple or complex types. Right now, I'm working with the
>> simple type, which is a XML string. I tried using the complex web
>> service actor, but still was unable to get at the dateTime attributes.
>> If you want to try this yourself, the service is
>> http://river.sdsc.edu/wateroneflow/NWIS/DailyValues.asmx?WSDL. The
>> method GetValues returns the XML string, the method GetValuesObject
>> returns a complex type.
>>
>> The workflow is attached if you want to take a look. The goal is
>> simply to create a chart of the streamflow time series. I would
>> appreciate any help on this. Thanks in advance!
>>
>> Jon
>>
>> Jonathan Goodall
>> Civil and Environmental Engineering
>> University of South Carolina
>> ------------------------------------------------------------------------
>>
>> _______________________________________________
>> Kepler-users mailing list
>> Kepler-users at ecoinformatics.org
>>
http://mercury.nceas.ucsb.edu/ecoinformatics/mailman/listinfo/kepler-users
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
<http://mercury.nceas.ucsb.edu/ecoinformatics/pipermail/kepler-users/attachm
ents/20081015/05284ce5/attachment-0001.html>
------------------------------
Message: 2
Date: Wed, 15 Oct 2008 09:59:42 -0700
From: Daniel Crawl <crawl at sdsc.edu>
Subject: Re: [kepler-users] Extracting XML Attributes
To: Jon Goodall <goodall at engr.sc.edu>
Cc: kepler-users at ecoinformatics.org
Message-ID: <48F6217E.6090804 at sdsc.edu>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Hi Jon,
The nightly build is temporarily not being generated, so you
will have to download and compile the source. The instructions
for this can be found here:
https://dev.kepler-project.org/developers/reference/downloading-and-building
-the-kepler-source-code/
Please let us know if you have any problems,
--dan
Jon Goodall wrote:
> Hi Dan,
>
> Do I need to use the nightly build of Kepler to get the updated XPath
> actor? I'm having trouble running the attached workflow with the 1.0
> Kepler version.
>
> Thanks,
> Jon
>
> On Tue, Oct 14, 2008 at 6:41 PM, Daniel Crawl <crawl at sdsc.edu
> <mailto:crawl at sdsc.edu>> wrote:
>
>
> Hi Jon,
>
> I've updated the XPath actor with a new port that outputs
> attribute or text() data. Attached is a modified version
> of your workflow that uses this functionality.
>
> Let me know if you have questions,
>
> --dan
>
>
> Jon Goodall wrote:
>
> Hello,
>
> I'm trying to extract XML attributes from a web service in
> Kepler and
> could use some help. I've tried doing this a couple different
> ways.
> First, I tried the following xpath query:
> /timeSeriesResponse/timeSeries/values/value/@dateTime and the
> exception is ...
>
> ptolemy.kernel.util.IllegalActionException: XPath: node
> selected with
> XPath isn't an element.
> at org.sdm.spa.XPath.fire(XPath.java:167)
> at ptolemy.actor.AtomicActor.iterate(AtomicActor.java:398)
> at
>
ptolemy.actor.sched.StaticSchedulingDirector.fire(StaticSchedulingDirector.j
ava:170)
> at
> ptolemy.actor.CompositeActor.fire(CompositeActor.java:400)
> at ptolemy.actor.Manager.iterate(Manager.java:688)
> at ptolemy.actor.Manager.execute(Manager.java:332)
> at ptolemy.actor.Manager.run(Manager.java:1071)
> at ptolemy.actor.Manager$3.run(Manager.java:1112)
>
> The xpath query /timeSeriesResponse/timeSeries/values/value
> works fine
> and gives this response ..
>
> send to channel 0: {<value dateTime="2000-01-01T00:00:00"
> qualifiers="A">483</value>, <value dateTime="2000-01-02T00:00:00"
> qualifiers="A">464</value> ...
>
> I've also tried using an XMLDisassembler actor to access the
> dateTime
> attributes, but no luck. I was able to get the values, but
> unable to
> get the dateTimes (I tried setting the port name to @dateTime
> and to
> dateTime). See attached workflow for details.
>
> One other thing to note is that this service I'm using can return
> either simple or complex types. Right now, I'm working with the
> simple type, which is a XML string. I tried using the complex web
> service actor, but still was unable to get at the dateTime
> attributes.
> If you want to try this yourself, the service is
> http://river.sdsc.edu/wateroneflow/NWIS/DailyValues.asmx?WSDL.
> The
> method GetValues returns the XML string, the method
> GetValuesObject
> returns a complex type.
>
> The workflow is attached if you want to take a look. The goal is
> simply to create a chart of the streamflow time series. I would
> appreciate any help on this. Thanks in advance!
>
> Jon
>
> Jonathan Goodall
> Civil and Environmental Engineering
> University of South Carolina
>
------------------------------------------------------------------------
>
> _______________________________________________
> Kepler-users mailing list
> Kepler-users at ecoinformatics.org
> <mailto:Kepler-users at ecoinformatics.org>
>
http://mercury.nceas.ucsb.edu/ecoinformatics/mailman/listinfo/kepler-users
>
>
>
------------------------------
Message: 3
Date: Wed, 15 Oct 2008 18:16:13 +0200
From: "Josep Maria Campanera Alsina" <campaxic at gmail.com>
Subject: [kepler-users] Executing Kepler from the Command Line with
parameters and -nogui option!
To: kepler-users at ecoinformatics.org
Message-ID:
<c7da99030810150916o17596c31k2075d15abd43a278 at mail.gmail.com>
Content-Type: text/plain; charset=ISO-8859-1
Dear All,
I have to execute kepler in the command line with the -nogui option,
but when I want to specify parameters it doesn't work. Is there any
workaround for that?
If followed the tutorial in:
https://dev.kepler-project.org/developers/reference/executing-kepler-from-th
e-command-line
So, for instance!
(A) kepler -runwf workflow.xml -x 4 -y "foo"; It gets the parameters:
(B) kepler -runwf -nogui -nocache workflow.xml -x 4 -y "foo"; Does not
get the parameters:
Why is that? How can I solve the problem?
Thanks a lot,
Josep Maria,
--------------------------------------------
Josep Maria Campanera Alsina
Juan de la Cierva Researcher
Departament de Fisicoqu?mica
Facultat de Farm?cia
Avgda Joan XXIII, s/n
08028 Barcelona ? Catalonia ? Spain
Tel: +34 93 4035988
Fax: +34 93 4035987
campanera at ub.edu
--------------------------------------------
------------------------------
Message: 4
Date: Wed, 15 Oct 2008 09:20:32 -0800
From: "Matt Jones" <jones at nceas.ucsb.edu>
Subject: Re: [kepler-users] Extracting XML Attributes
To: "Daniel Crawl" <crawl at sdsc.edu>
Cc: kepler-users at ecoinformatics.org
Message-ID:
<fa9a3c5e0810151020if1c0641t5d26f78cbb1ab8fc at mail.gmail.com>
Content-Type: text/plain; charset="iso-8859-1"
As an alternative, if compiling the source isn't something you want to
undertake, maybe Dan could package up a KAR file for you to import into your
installed version of Kepler. Dan, do you think this would be feasible?
Matt
On Wed, Oct 15, 2008 at 8:59 AM, Daniel Crawl <crawl at sdsc.edu> wrote:
>
>
> Hi Jon,
>
> The nightly build is temporarily not being generated, so you
> will have to download and compile the source. The instructions
> for this can be found here:
>
>
>
https://dev.kepler-project.org/developers/reference/downloading-and-building
-the-kepler-source-code/
>
> Please let us know if you have any problems,
>
> --dan
>
>
> Jon Goodall wrote:
>
>> Hi Dan,
>>
>> Do I need to use the nightly build of Kepler to get the updated XPath
>> actor? I'm having trouble running the attached workflow with the 1.0
Kepler
>> version.
>> Thanks,
>> Jon
>>
>> On Tue, Oct 14, 2008 at 6:41 PM, Daniel Crawl <crawl at sdsc.edu <mailto:
>> crawl at sdsc.edu>> wrote:
>>
>>
>> Hi Jon,
>>
>> I've updated the XPath actor with a new port that outputs
>> attribute or text() data. Attached is a modified version
>> of your workflow that uses this functionality.
>>
>> Let me know if you have questions,
>>
>> --dan
>>
>>
>> Jon Goodall wrote:
>>
>> Hello,
>>
>> I'm trying to extract XML attributes from a web service in
>> Kepler and
>> could use some help. I've tried doing this a couple different
>> ways.
>> First, I tried the following xpath query:
>> /timeSeriesResponse/timeSeries/values/value/@dateTime and the
>> exception is ...
>>
>> ptolemy.kernel.util.IllegalActionException: XPath: node
>> selected with
>> XPath isn't an element.
>> at org.sdm.spa.XPath.fire(XPath.java:167)
>> at ptolemy.actor.AtomicActor.iterate(AtomicActor.java:398)
>> at
>>
>>
ptolemy.actor.sched.StaticSchedulingDirector.fire(StaticSchedulingDirector.j
ava:170)
>> at
>> ptolemy.actor.CompositeActor.fire(CompositeActor.java:400)
>> at ptolemy.actor.Manager.iterate(Manager.java:688)
>> at ptolemy.actor.Manager.execute(Manager.java:332)
>> at ptolemy.actor.Manager.run(Manager.java:1071)
>> at ptolemy.actor.Manager$3.run(Manager.java:1112)
>>
>> The xpath query /timeSeriesResponse/timeSeries/values/value
>> works fine
>> and gives this response ..
>>
>> send to channel 0: {<value dateTime="2000-01-01T00:00:00"
>> qualifiers="A">483</value>, <value dateTime="2000-01-02T00:00:00"
>> qualifiers="A">464</value> ...
>>
>> I've also tried using an XMLDisassembler actor to access the
>> dateTime
>> attributes, but no luck. I was able to get the values, but
>> unable to
>> get the dateTimes (I tried setting the port name to @dateTime
>> and to
>> dateTime). See attached workflow for details.
>>
>> One other thing to note is that this service I'm using can return
>> either simple or complex types. Right now, I'm working with the
>> simple type, which is a XML string. I tried using the complex web
>> service actor, but still was unable to get at the dateTime
>> attributes.
>> If you want to try this yourself, the service is
>> http://river.sdsc.edu/wateroneflow/NWIS/DailyValues.asmx?WSDL.
>> The
>> method GetValues returns the XML string, the method
>> GetValuesObject
>> returns a complex type.
>>
>> The workflow is attached if you want to take a look. The goal is
>> simply to create a chart of the streamflow time series. I would
>> appreciate any help on this. Thanks in advance!
>>
>> Jon
>>
>> Jonathan Goodall
>> Civil and Environmental Engineering
>> University of South Carolina
>>
>> ------------------------------------------------------------------------
>>
>> _______________________________________________
>> Kepler-users mailing list
>> Kepler-users at ecoinformatics.org
>> <mailto:Kepler-users at ecoinformatics.org>
>>
>>
http://mercury.nceas.ucsb.edu/ecoinformatics/mailman/listinfo/kepler-users
>>
>>
>>
>>
> _______________________________________________
> Kepler-users mailing list
> Kepler-users at ecoinformatics.org
> http://mercury.nceas.ucsb.edu/ecoinformatics/mailman/listinfo/kepler-users
>
--
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Matthew B. Jones
Director of Informatics Research and Development
National Center for Ecological Analysis and Synthesis (NCEAS)
UC Santa Barbara
jones at nceas.ucsb.edu Ph: 1-907-523-1960
http://www.nceas.ucsb.edu/ecoinfo
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
<http://mercury.nceas.ucsb.edu/ecoinformatics/pipermail/kepler-users/attachm
ents/20081015/74e61369/attachment.html>
------------------------------
_______________________________________________
Kepler-users mailing list
Kepler-users at ecoinformatics.org
http://mercury.nceas.ucsb.edu/ecoinformatics/mailman/listinfo/kepler-users
End of Kepler-users Digest, Vol 41, Issue 10
********************************************
More information about the Kepler-users
mailing list