From: Adam R. <ad...@ex...> - 2011-04-09 10:53:40
|
Indeed, but you would need to use http, so the httpclient module as opposed to the create-collection of the xmldb module which uses the xmldb protocol for remoting. On 9 April 2011 12:51, Satinder Singh <sat...@gm...> wrote: > i think you can use PUT call here.... > bu default PUT call creates collection and put the resource (file) on server > in exists... > Satinder Singh > > > On Sat, Apr 9, 2011 at 4:00 PM, srinivasan krishnamoorthy > <sri...@gm...> wrote: >> >> hi friends, >> >> am using existdb for my project...am try to create one collection from one >> existdb to another >> >> query executed from exist-db-main( localhost:8080 ) and collection created >> in exist-db-substitute( localhost:8080 ) : >> >> am using following query >> >> xquery version "1.0"; >> declare namespace exist ="http://exist.sourceforge.net/NS/exist"; >> declare namespace xmldb="http://exist-db.org/xquery/xmldb"; >> declare namespace util="http://exist-db.org/xquery/util"; >> declare namespace request="http://exist-db.org/xquery/request"; >> declare namespace xhtml="http://www.w3.org/1999/xhtml"; >> declare namespace fn="http://www.w3.org/2005/xpath-functions"; >> declare option exist:serialize "method=xml media-type=text/xml >> indent=yes"; >> >> let $login := >> xmldb:login('http://localhost:8081/exist/rest//db','admin','') >> let $create-yearcollection := >> xmldb:create-collection('http://localhost:8081/exist/rest//db/vserve/data/logs/','logreport') >> >> return $login >> >> when i execute thi query i got following error.... >> >> HTTP ERROR: 500 >> >> An error occurred: An error occurred: Invalid URI: xmldb URI scheme does >> not start with xmldb:: http://localhost:8081/exist/rest//db >> >> RequestURI=/exist/rest//db/vserve/createcollection.xq >> >> Powered by Jetty:// >> >> >> -- >> - yours >> >> Srinivasan Krishnamoorthy >> >> >> >> ------------------------------------------------------------------------------ >> Xperia(TM) PLAY >> It's a major breakthrough. An authentic gaming >> smartphone on the nation's most reliable network. >> And it wants your games. >> http://p.sf.net/sfu/verizon-sfdev >> _______________________________________________ >> Exist-open mailing list >> Exi...@li... >> https://lists.sourceforge.net/lists/listinfo/exist-open >> > > > ------------------------------------------------------------------------------ > Xperia(TM) PLAY > It's a major breakthrough. An authentic gaming > smartphone on the nation's most reliable network. > And it wants your games. > http://p.sf.net/sfu/verizon-sfdev > _______________________________________________ > Exist-open mailing list > Exi...@li... > https://lists.sourceforge.net/lists/listinfo/exist-open > > -- Adam Retter eXist Developer { United Kingdom } ad...@ex... irc://irc.freenode.net/existdb |