From: David H. <dav...@ut...> - 2006-07-11 01:44:33
|
If I fetch the document specified in the URL http://<our host>:8080/ fedora/get/dragon:11/FezMD, (as specified in line ~659: $filename = APP_FEDORA_GET_URL."/". $pid."/".$dsID;) I get <FezMD xmlns:xsi="http://www.w3.org/2001/XMLSchema"> <xdis_id>11</xdis_id> <sta_id>1</sta_id> <ret_id>1</ret_id> <child_xdis_id_option>9</child_xdis_id_option> <keyword>dave</keyword> </FezMD> ----------------------------------------------------------- David Herbert Senior Computer Systems Officer School of Computing University of Tasmania Private Bag 100, Tasmania, Australia 7001 Ph: +61 3 62262917 Fax: +61 3 62261824 On 11/07/2006, at 11:41 AM, David Herbert wrote: > xml string: > > <?xml version="1.0" encoding="UTF-8"?> > <pidList xmlns:xsd="http://www.w3.org/2001/XMLSchema" > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" > xsi:schemaLocation="http://www.fedora.info/definitions/1/0/ > management/ http://dragon.comp.utas.edu.au:8080/getNextPIDInfo.xsd"> > <pid>dragon:11</pid> > </pidList> > > > > <b>Warning</b>: DOMDocument::loadXML() [<a > href='function.DOMDocument-loadXML'>function.DOMDocument-loadXML</ > a>]: Opening and ending tag mismatch: img line 9 and td in Entity, > line: 9 in <b>/Users/admin/Sites/fez/include/class.fedora_api.php</b> > on line <b>663</b><br /> > <br /> > > etc.. > > <b>Fatal error</b>: Uncaught exception 'DOMException' with message > 'DOMXPath::__construct() expects parameter 1 to be DOMDocument, > boolean given' in /Users/admin/Sites/fez/include/class.fedora_api.php: > 664 > Stack trace: > #0 /Users/admin/Sites/fez/include/class.fedora_api.php(664): DOMXPath- > >__construct(false) > #1 /Users/admin/Sites/fez/include/class.record.php(1238): Fedora_API- > >callGetDatastreamContentsField('dragon:11', 'FezMD', Array) > #2 /Users/admin/Sites/fez/include/class.record.php(820): > RecordGeneral->getXmlDisplayId() > #3 /Users/admin/Sites/fez/include/class.record.php(1168): Record- > >setIndexMatchingFields('dragon:11') > #4 /Users/admin/Sites/fez/include/class.record.php(1806): Record- > >insertXML('dragon:11', Array, true) > #5 /Users/admin/Sites/fez/include/class.record.php(278): RecordObject- > >fedoraInsertUpdate() > #6 /Users/admin/Sites/fez/workflow/enter_metadata.php(95): > Record::insert() > #7 {main} > thrown in <b>/Users/admin/Sites/fez/include/class.fedora_api.php</ > b> on line <b>664</b><br /> > > -David > ----------------------------------------------------------- > David Herbert > Senior Computer Systems Officer > School of Computing > University of Tasmania > Private Bag 100, Tasmania, Australia 7001 > Ph: +61 3 62262917 > Fax: +61 3 62261824 > > > On 11/07/2006, at 11:32 AM, Christiaan Kortekaas wrote: > >> Well now you are getting back the PID XML so that is very good >> news. Now >> it is just a problem with the XML that is being returned - it is >> messy or something perhaps. >> >> Can you 'View Source' on that returned page and send me the exact >> XML that comes back? >> The browser will hide the XML thats why it only shows 'dragon:8' >> for the pid. >> >> You could run Tidy over the XML to clean it up for the DOM Document >> like this: >> >> $config = array( >> 'indent' => true, >> 'input-xml' => true, >> 'output-xml' => true, >> 'wrap' => 200); >> >> $tidy = new tidy; >> $tidy->parseString($xml, $config, 'utf8'); >> $tidy->cleanRepair(); >> $xml = $tidy; >> >> Although I would be interested to see the XML it is coming back to >> see why DOM Document thinks >> it has mismatched tags (and is 'unclean' xml). >> >> Cheers, >> Christiaan >> >> David Herbert wrote: >>> sigh.. >>> >>> ok, seems to have progressed, but still no go: >>> >>> HERE IS THE getString->http://...:...@...:8080/fedora/mgmt/ >>> getNextPID? >>> xml=true >>> HERE IS THE xml string-> dragon:8 <- >>> >>> Warning: DOMDocument::loadXML() [function.DOMDocument-loadXML]: >>> Opening and ending tag mismatch: img line 9 and td in Entity, >>> line: 9 >>> in /Users/admin/Sites/fez/include/class.fedora_api.php on line 63 >>> >>> >>> I tried creating a community, >>> name: dave, >>> XSD Display Document Types: Fedorfa Collection Display Version 1.0 >>> Description: dave >>> Keywords: dave >>> >>> -David >>> ----------------------------------------------------------- >>> David Herbert >>> Senior Computer Systems Officer >>> School of Computing >>> University of Tasmania >>> Private Bag 100, Tasmania, Australia 7001 >>> Ph: +61 3 62262917 >>> Fax: +61 3 62261824 >>> >>> >>> On 11/07/2006, at 10:51 AM, Christiaan Kortekaas wrote: >>> >>>> Another thing you could try is changing the value of $getString >>>> from: >>>> >>>> $getString = APP_BASE_FEDORA_APIM_DOMAIN."/mgmt/getNextPID? >>>> xml=true"; >>>> >>>> to: >>>> >>>> $getString = APP_BASE_FEDORA_APIM_DOMAIN."/management/getNextPID? >>>> xml=true"; >>>> >>>> Perhaps this is the redirection that takes place and breaks the >>>> HTTP_Request (changes it to a redirect) >>>> >>>> I think "management" is the new url value these days. >>>> >>>> Christiaan >>>> >>>> David Herbert wrote: >>>>> Further to that, does seem like redirection (location header >>>>> below): >>>>> >>>>> foreach ($http_req->getResponseHeader() as $name => $value) >>>>> { >>>>> echo $name." = ".$value."\n"; >>>>> } >>>>> >>>>> produces: >>>>> >>>>> pragma = No-cache >>>>> cache-control = no-cache >>>>> expires = Thu, 01 Jan 1970 11:00:00 EST >>>>> location = https://<hostname>:8443/fedora/mgmt/getNextPID?xml=true >>>>> content-length = 0 date = Tue, 11 Jul 2006 00:42:32 GMT >>>>> server = Apache-Coyote/1.1 >>>>> connection = close >>>>> >>>>> -David >>>>> ----------------------------------------------------------- >>>>> David Herbert >>>>> Senior Computer Systems Officer >>>>> School of Computing >>>>> University of Tasmania >>>>> Private Bag 100, Tasmania, Australia 7001 >>>>> Ph: +61 3 62262917 >>>>> Fax: +61 3 62261824 >>>>> >>>>> >>>>> On 11/07/2006, at 10:40 AM, David Herbert wrote: >>>>> >>>>>> Yeah, I was just testing that - I added a check for the http >>>>>> reply - >>>>>> the response to the request below >>>>>> >>>>>> $http_req->setBasicAuth(APP_FEDORA_USERNAME, APP_FEDORA_PWD); >>>>>> $http_req->setMethod("GET"); >>>>>> $http_req->sendRequest(); >>>>>> >>>>>> >>>>>> $code = $http_req->getResponseCode(); >>>>>> echo "CODE:".$code; >>>>>> >>>>>> is 302 >>>>>> >>>>>> "The requested resource resides temporarily under a different >>>>>> URI" >>>>>> >>>>>> I think this might be due to the redirection of the http request >>>>>> to a >>>>>> https request? I was using SSL-ALL.. >>>>>> >>>>>> >>>>>> (I don't really know :-P) >>>>>> -David >>>>>> ----------------------------------------------------------- >>>>>> David Herbert >>>>>> Senior Computer Systems Officer >>>>>> School of Computing >>>>>> University of Tasmania >>>>>> Private Bag 100, Tasmania, Australia 7001 >>>>>> Ph: +61 3 62262917 >>>>>> Fax: +61 3 62261824 >>>>>> >>>>>> >>>>>> On 11/07/2006, at 10:34 AM, Christiaan Kortekaas wrote: >>>>>> >>>>>>> Hi David >>>>>>> >>>>>>> It seems likely that the PHP Pear HTTP_Request module is not >>>>>>> working >>>>>>> properly for you as it is not getting back any value (Maybe an >>>>>>> OSX/ >>>>>>> Apache issue). I'll rewrite that function >>>>>>> using CURL instead (like most of the other functions), test it >>>>>>> and >>>>>>> send it along to you shortly. >>>>>>> >>>>>>> Cheers, >>>>>>> Christiaan >>>>>>> >>>>>>> David Herbert wrote: >>>>>>>> Hi Christiaan. Yup, it's an empty string. Trying to get the >>>>>>>> PID >>>>>>>> directly (from the value of $getString , I'm prompted for a >>>>>>>> username >>>>>>>> and password, which, after I enter them I get something like: >>>>>>>> >>>>>>>> <hostname>:1, and then the next time, <hostname>:2 etc. >>>>>>>> >>>>>>>> The response I get to creating a new community is thus: >>>>>>>> (I've replaced username, password and hostname below) >>>>>>>> >>>>>>>> Here is value of getString->http:// >>>>>>>> <username>:<password>@<hostname>: >>>>>>>> 8080/fedora/mgmt/getNextPID?xml=true<- >>>>>>>> HERE IS THE XML PID FROM FEDORA -><- >>>>>>>> Warning: DOMDocument::loadXML() [function.DOMDocument-loadXML]: >>>>>>>> Empty >>>>>>>> string supplied as input in /Users/admin/Sites/fez/include/ >>>>>>>> class.fedora_api.php on line 119 >>>>>>>> >>>>>>>> (line 119 is actually 117 due to me inserting two echos) >>>>>>>> >>>>>>>> >>>>>>>> So I'm still getting an error.. >>>>>>>> >>>>>>>> >>>>>>>> -David >>>>>>>> >>>>>>>> ----------------------------------------------------------- >>>>>>>> David Herbert >>>>>>>> Senior Computer Systems Officer >>>>>>>> School of Computing >>>>>>>> University of Tasmania >>>>>>>> Private Bag 100, Tasmania, Australia 7001 >>>>>>>> Ph: +61 3 62262917 >>>>>>>> Fax: +61 3 62261824 >>>>>>>> >>>>>>>> >>>>>>>> On 10/07/2006, at 4:22 PM, Christiaan Kortekaas wrote: >>>>>>>> >>>>>>>>> Hi David >>>>>>>>> >>>>>>>>> Line 117 of class.fedora_api.php is the function getNextPID >>>>>>>>> which >>>>>>>>> calls the getNextPID Fedora webservice. The DOMDocument >>>>>>>>> appears to be getting an empty string back from the call to >>>>>>>>> the >>>>>>>>> Fedora web service. This could be due >>>>>>>>> to a misconfigured variable or an access denied problem. >>>>>>>>> >>>>>>>>> Before the line "$dom->loadXML($xml);" could you insert: >>>>>>>>> >>>>>>>>> 'echo "HERE IS THE XML PID FROM FEDORA ->".$xml."<-";' >>>>>>>>> >>>>>>>>> Then if you try to create a community see what the value >>>>>>>>> is. It >>>>>>>>> will probably be empty, in which case can you >>>>>>>>> check your config.inc.php file and make sure your >>>>>>>>> APP_FEDORA_USERNAME and APP_FEDORA_PWD are the >>>>>>>>> same that are in your Fedora fedora.fcfg file for the Fedora >>>>>>>>> administrator username and password. >>>>>>>>> >>>>>>>>> You could try echoing out the $getString variable ('echo >>>>>>>>> "getString >>>>>>>>> = ".$getString;') and putting the URL >>>>>>>>> it gives into your browser and seeing if the webservice >>>>>>>>> call to >>>>>>>>> Fedora works for you. Perhaps your APP_BASE_FEDORA_APIM_DOMAIN >>>>>>>>> is incorrect? You could try changing the /mgmt/ string on line >>>>>>>>> 106 >>>>>>>>> to /management/ as perhaps this Fedora API directory >>>>>>>>> is different for OSX. >>>>>>>>> >>>>>>>>> Have you disabled the Fedora XACML engine? Do this by editing >>>>>>>>> fedora.fcfg and setting ENFORCE-MODE to 'permit-all-requests'. >>>>>>>>> >>>>>>>>> David Herbert wrote: >>>>>>>>>> Hello, I am testing a new install of fez 1.2.0 under MacOS >>>>>>>>>> 10.4.7. >>>>>>>>>> All the PHP requirements etc are installed via compilation of >>>>>>>>>> PHP5. >>>>>>>>>> >>>>>>>>>> When I try to create a new community in fez I get: >>>>>>>>>> >>>>>>>>>> Warning: DOMDocument::loadXML()[function.DOMDocument- >>>>>>>>>> loadXML]:Empty >>>>>>>>>> string supplied as input in ...../class.fedora_api.php on >>>>>>>>>> line 117 >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> When trying to create the community, in the "XSD Display >>>>>>>>>> Document >>>>>>>>>> Types" section, all I have is "Fedora Collection Display >>>>>>>>>> Version >>>>>>>>>> 1.0" >>>>>>>>>> listed. >>>>>>>>>> Is this right? >>>>>>>>> Yes that is the only type of object you can create under a >>>>>>>>> community at the moment (a collection). >>>>>>>>> You can create any of the other document types under a >>>>>>>>> collection >>>>>>>>> (eg Journal Artice etc). >>>>>>>>> >>>>>>>>> Cheers, >>>>>>>>> Christiaan >>>>>>>>> >>>>>>>>> -- >>>>>>>>> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ >>>>>>>>> Christiaan Kortekaas >>>>>>>>> Senior Library Systems Programmer >>>>>>>>> Library Technology Service >>>>>>>>> The University of Queensland, Australia QLD 4072 >>>>>>>>> Telephone : (+61 7) 3346 4337 >>>>>>>>> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ >>>>>>>>> >>>>>>>>> >>>>>>>>> -------------------------------------------------------------- >>>>>>>>> - >>>>>>>>> -- >>>>>>>>> -- >>>>>>>>> - >>>>>>>>> -- >>>>>>>>> --- >>>>>>>>> Using Tomcat but need to do more? Need to support web >>>>>>>>> services, >>>>>>>>> security? >>>>>>>>> Get stuff done quickly with pre-integrated technology to make >>>>>>>>> your >>>>>>>>> job easier >>>>>>>>> Download IBM WebSphere Application Server v.1.0.1 based on >>>>>>>>> Apache >>>>>>>>> Geronimo >>>>>>>>> http://sel.as-us.falkag.net/sel? >>>>>>>>> cmd=lnk&kid=120709&bid=263057&dat=121642 >>>>>>>>> _______________________________________________ >>>>>>>>> Fez-users mailing list >>>>>>>>> Fez...@li... >>>>>>>>> https://lists.sourceforge.net/lists/listinfo/fez-users >>>>>>>>> >>>>>>>> >>>>>>>> --------------------------------------------------------------- >>>>>>>> - >>>>>>>> -- >>>>>>>> -- >>>>>>>> - >>>>>>>> ---- >>>>>>>> Using Tomcat but need to do more? Need to support web services, >>>>>>>> security? >>>>>>>> Get stuff done quickly with pre-integrated technology to make >>>>>>>> your >>>>>>>> job easier >>>>>>>> Download IBM WebSphere Application Server v.1.0.1 based on >>>>>>>> Apache >>>>>>>> Geronimo >>>>>>>> http://sel.as-us.falkag.net/sel? >>>>>>>> cmd=lnk&kid=120709&bid=263057&dat=121642 >>>>>>>> _______________________________________________ >>>>>>>> Fez-users mailing list >>>>>>>> Fez...@li... >>>>>>>> https://lists.sourceforge.net/lists/listinfo/fez-users >>>>>>> -- >>>>>>> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ >>>>>>> Christiaan Kortekaas >>>>>>> Senior Library Systems Programmer >>>>>>> Library Technology Service >>>>>>> The University of Queensland, Australia QLD 4072 >>>>>>> Telephone : (+61 7) 3346 4337 >>>>>>> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ >>>>>>> >>>>>>> >>>>>>> ---------------------------------------------------------------- >>>>>>> - >>>>>>> -- >>>>>>> -- >>>>>>> - >>>>>>> --- >>>>>>> Using Tomcat but need to do more? Need to support web services, >>>>>>> security? >>>>>>> Get stuff done quickly with pre-integrated technology to make >>>>>>> your >>>>>>> job easier >>>>>>> Download IBM WebSphere Application Server v.1.0.1 based on >>>>>>> Apache >>>>>>> Geronimo >>>>>>> http://sel.as-us.falkag.net/sel? >>>>>>> cmd=lnk&kid=120709&bid=263057&dat=121642 >>>>>>> _______________________________________________ >>>>>>> Fez-users mailing list >>>>>>> Fez...@li... >>>>>>> https://lists.sourceforge.net/lists/listinfo/fez-users >>>>>>> >>>>>> >>>>>> ----------------------------------------------------------------- >>>>>> - >>>>>> -- >>>>>> -- >>>>>> --- >>>>>> Using Tomcat but need to do more? Need to support web services, >>>>>> security? >>>>>> Get stuff done quickly with pre-integrated technology to make >>>>>> your >>>>>> job easier >>>>>> Download IBM WebSphere Application Server v.1.0.1 based on Apache >>>>>> Geronimo >>>>>> http://sel.as-us.falkag.net/sel? >>>>>> cmd=lnk&kid=120709&bid=263057&dat=121642 >>>>>> _______________________________________________ >>>>>> Fez-users mailing list >>>>>> Fez...@li... >>>>>> https://lists.sourceforge.net/lists/listinfo/fez-users >>>>>> >>>>> >>>>> >>>>> ------------------------------------------------------------------ >>>>> - >>>>> -- >>>>> ---- >>>>> Using Tomcat but need to do more? Need to support web services, >>>>> security? >>>>> Get stuff done quickly with pre-integrated technology to make your >>>>> job easier >>>>> Download IBM WebSphere Application Server v.1.0.1 based on Apache >>>>> Geronimo >>>>> http://sel.as-us.falkag.net/sel? >>>>> cmd=lnk&kid=120709&bid=263057&dat=121642 >>>>> _______________________________________________ >>>>> Fez-users mailing list >>>>> Fez...@li... >>>>> https://lists.sourceforge.net/lists/listinfo/fez-users >>>> >>>> -- >>>> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ >>>> Christiaan Kortekaas >>>> Senior Library Systems Programmer >>>> Library Technology Service >>>> The University of Queensland, Australia QLD 4072 >>>> Telephone : (+61 7) 3346 4337 >>>> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ >>>> >>>> >>>> ------------------------------------------------------------------- >>>> - >>>> -- >>>> --- >>>> Using Tomcat but need to do more? Need to support web services, >>>> security? >>>> Get stuff done quickly with pre-integrated technology to make your >>>> job easier >>>> Download IBM WebSphere Application Server v.1.0.1 based on Apache >>>> Geronimo >>>> http://sel.as-us.falkag.net/sel? >>>> cmd=lnk&kid=120709&bid=263057&dat=121642 >>>> _______________________________________________ >>>> Fez-users mailing list >>>> Fez...@li... >>>> https://lists.sourceforge.net/lists/listinfo/fez-users >>>> >>> >>> >>> >>> -------------------------------------------------------------------- >>> - >>> ---- >>> Using Tomcat but need to do more? Need to support web services, >>> security? >>> Get stuff done quickly with pre-integrated technology to make your >>> job easier >>> Download IBM WebSphere Application Server v.1.0.1 based on Apache >>> Geronimo >>> http://sel.as-us.falkag.net/sel? >>> cmd=lnk&kid=120709&bid=263057&dat=121642 >>> _______________________________________________ >>> Fez-users mailing list >>> Fez...@li... >>> https://lists.sourceforge.net/lists/listinfo/fez-users >> >> >> -- >> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ >> Christiaan Kortekaas >> Senior Library Systems Programmer >> Library Technology Service >> The University of Queensland, Australia QLD 4072 >> Telephone : (+61 7) 3346 4337 >> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ >> >> >> --------------------------------------------------------------------- >> - >> --- >> Using Tomcat but need to do more? Need to support web services, >> security? >> Get stuff done quickly with pre-integrated technology to make your >> job easier >> Download IBM WebSphere Application Server v.1.0.1 based on Apache >> Geronimo >> http://sel.as-us.falkag.net/sel? >> cmd=lnk&kid=120709&bid=263057&dat=121642 >> _______________________________________________ >> Fez-users mailing list >> Fez...@li... >> https://lists.sourceforge.net/lists/listinfo/fez-users >> > > > > ---------------------------------------------------------------------- > --- > Using Tomcat but need to do more? Need to support web services, > security? > Get stuff done quickly with pre-integrated technology to make your > job easier > Download IBM WebSphere Application Server v.1.0.1 based on Apache > Geronimo > http://sel.as-us.falkag.net/sel? > cmd=lnk&kid=120709&bid=263057&dat=121642 > _______________________________________________ > Fez-users mailing list > Fez...@li... > https://lists.sourceforge.net/lists/listinfo/fez-users > |