My sys admin is out so I will try to get a look at the log tomorrow and post it…
Thanks for the offer of help.
/Minnie
From: [email protected] [mailto:[email protected]]
Sent: Thursday, August 02, 2012 11:26 AM
To: Support and info exchange list for Fedora users.
Subject: Re: [fcrepo-user] Errors using findObjects with Soap API-A
Do you have the log for the Fedora instance in question available? Can you show
what it records at that moment?
---
A. Soroka
Online Library Environment
the University of Virginia Library
On Thu, Aug 2, 2012 at 11:51 AM, Rangel, Minnie
<[email protected]<mailto:[email protected]>> wrote:
Thanks for the response,
Unfortunately I am trying to do this all via a php script on the command line,
not through a browser and while I may have to resort to creating the file one
way, saving it and feeding it to php to parse, I was hoping to avoid that.
Any other ideas?....
thanks for the help,
/Minnie
-----Original Message-----
From: Jörg Knappen
[mailto:[email protected]<mailto:[email protected]>]
Sent: Thursday, August 02, 2012 3:35 AM
To:
[email protected]<mailto:[email protected]>
Subject: Re: [fcrepo-user] Errors using findObjects with Soap API-A
You can use the buildt-in oai provider to get a list of all objects; the
following http request will give you an XML file containing all the dc metadata
including the id's:
http://your-host.name/path-to-fedora/oai?verb=ListRecords&metadataPrefix=oai_dc
The id's are found in the <identifier> elements:
<identifier>oai:yourhost.name:prefix:suffix</identifier>
and consist of prefix:suffix
Hope this helps.
--Jörg Knappen
Zitat von "Rangel, Minnie"
<[email protected]<mailto:[email protected]>>:
> Hi,
>
> I have been banging my head against my keyboard for the last couple of
> days so I am hoping someone out there has tried this and has a
> solution.
>
> Background:
>
> I have ingested a whole bunch of test/sample files into Fedora 3.6
> but now I have hundreds of things in there and need to clean it up.
> Earlier I was just using the web administrator to purge individual
> objects but that is not an adequate solution when you have hundreds of
> objects (maybe even 1000).
>
> Then I wrote a small php script that would purge objects if I fed it
> the PID...works great if you have a list of PIDs to feed it.
>
> My issue:
>
> I was hoping to use findObjects to generate such a list but haven't
> been able to make it work.
>
> Here is what I have:
>
> $options = array(
> 'login' => $usr,
> 'password' => $pwd
> ) ;
>
> $apia = @new SoapClient('http://myserver/fedora/wsdl?api=API-A',
> $options);
>
> $opts = array(
> 'resultFields' => array('pid', 'label'),
> 'maxResults' => 300,
> 'query' => 'label eq SearchTerm',
> );
>
> (line 26) $r = $apia->findObjects( $opts );
>
> foreach ( $r->result->resultList->objectFields as $o ) {
> printf("%-36s %-12s %s\n", $o->pid, $o->label);
> }
>
> I tried the query also as
> 'query' => 'SearchTerm',
> 'label' => 'SearchTerm',
>
> But all give errors
> 'label' gave a "no query" error so I gave up on that route.
>
> But the other methods give the following error
>
> PHP Fatal error: Uncaught SoapFault exception: [soap:Client]
> java.lang.NullPointerException Caused by: Uncaught exception from
> Fedora Server in /home/mrangel/fedora-php/findObjects.php:24
> Stack trace:
> #0 /home/mrangel/fedora-php/findObjects.php(24):
> SoapClient->__call('findObjects', Array)
> #1 /home/mrangel/fedora-php/findObjects.php(24):
> SoapClient->findObjects(Array)
> #2 {main}
> thrown in /home/mrangel/fedora-php/findObjects.php on line 26
>
> adding the Try/Catch loop gives (wasn't very helpful)
>
> PHP Fatal error: soap:Client, java.lang.NullPointerException Caused
> by: Uncaught exception from Fedora Server in
> /home/mrangel/fedora-php/findObjects.php on line 36
>
> Line 36 is the catch trigger_error part so it wasn't helpful that is
> why I took it out of the loop to see what it would give.
>
> Any ideas???
>
> Thanks for any help,
> Minnie
> [email protected]<mailto:[email protected]>
> Library Systems - Software Developer
>
> ----------------------------------------------------------------------
> --------
> Live Security Virtual Conference
> Exclusive live event will cover all the ways today's security and
> threat landscape has changed and how IT managers can respond.
> Discussions will include endpoint security, mobile security and the
> latest in malware threats.
> http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
> _______________________________________________
> Fedora-commons-users mailing list
> [email protected]<mailto:[email protected]>
> https://lists.sourceforge.net/lists/listinfo/fedora-commons-users
>
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and threat
landscape has changed and how IT managers can respond. Discussions will include
endpoint security, mobile security and the latest in malware threats.
http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Fedora-commons-users mailing list
[email protected]<mailto:[email protected]>
https://lists.sourceforge.net/lists/listinfo/fedora-commons-users
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Fedora-commons-users mailing list
[email protected]<mailto:[email protected]>
https://lists.sourceforge.net/lists/listinfo/fedora-commons-users
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Fedora-commons-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/fedora-commons-users