<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Search for a file inside the avm store in Alfresco Archive</title>
    <link>https://connect.hyland.com/t5/alfresco-archive/search-for-a-file-inside-the-avm-store/m-p/145417#M101616</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;If you're accessing the web script via /alfresco/service you can use HTTP basic authentication - this doesn't encrypt the username / password by itself, but used in combination with SSL (ie. https) it's pretty secure.&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt;How do I call the web script via SSL (https) from PHP code?&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I am able to access the web scripts from the browser using https. But not able to call them through the PHP code.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 23 Jan 2008 02:00:15 GMT</pubDate>
    <dc:creator>garima</dc:creator>
    <dc:date>2008-01-23T02:00:15Z</dc:date>
    <item>
      <title>Search for a file inside the avm store</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/search-for-a-file-inside-the-avm-store/m-p/145409#M101608</link>
      <description>I have to search a file placed inside the avm store.Using the inbuilt webscript I can traverse through the avm store and am able to see my file.But I want to write and use a web script inside a php file wherein i can specify the name of the file to be searched in the avm store. It should give back t</description>
      <pubDate>Wed, 16 Jan 2008 22:18:12 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/search-for-a-file-inside-the-avm-store/m-p/145409#M101608</guid>
      <dc:creator>garima</dc:creator>
      <dc:date>2008-01-16T22:18:12Z</dc:date>
    </item>
    <item>
      <title>Re: Search for a file inside the avm store</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/search-for-a-file-inside-the-avm-store/m-p/145410#M101609</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Are you trying to find all files with a given name (eg. "web.xml"), or trying to retrieve a specific file directly from an AVM store using its path and filename as a key (eg. "/ROOT/WEB-INF/web.xml")?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Either way, you'll need to implement a custom web script that receives the filename (whether fully qualified or not), finds the file in the repository (see below for more details on this step) and then streams back the contents of the file, if it exists (return a 404 HTTP status if no files were found).&amp;nbsp; If you're attempting to find all files with a given name, you'd also have to figure out what to return if multiple files exist with the same name (ie. in different folders).&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I can think of at least two ways to find files in an AVM store:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;1. (recommended if you're looking for fully qualified files) traverse the folder tree in the AVM store until you find matching file(s) - the built in /api/path/content web script does this for the DM repository already and it's probably a good source of ideas on how to do this&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;2. configure indexing of files stored in the AVM (&lt;/SPAN&gt;&lt;A href="http://wiki.alfresco.com/wiki/Metadata_Extraction#XML_Metadata_Extractor_Configuration_for_WCM" rel="nofollow noopener noreferrer"&gt;http://wiki.alfresco.com/wiki/Metadata_Extraction#XML_Metadata_Extractor_Configuration_for_WCM&lt;/A&gt;&lt;SPAN&gt; provides a starting point for how this might be done), and then have the web script issue a Lucene query to find all files with the given name&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Arguably all files in the AVM should have their "system" metadata (filename etc.) indexed into Lucene automatically, but doing so requires virtualisation of the Lucene indexes (so that searches work as expected within each sandbox), and that's quite complex.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 17 Jan 2008 00:09:01 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/search-for-a-file-inside-the-avm-store/m-p/145410#M101609</guid>
      <dc:creator>pmonks</dc:creator>
      <dc:date>2008-01-17T00:09:01Z</dc:date>
    </item>
    <item>
      <title>Re: Search for a file inside the avm store</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/search-for-a-file-inside-the-avm-store/m-p/145411#M101610</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thanks for the quick response.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I am trying to retrieve a specific file directly from an AVM store using its path and filename as a key.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The built in /api/path/content web script is unclear to me as I am not able to run it through a browser.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;GET /alfresco/service/api/node/content{;property}/{store_type}/{store_id}/{node_id}?a={attach?}&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;GET /alfresco/service/api/path/content{;property}/{store_type}/{store_id}/{path}?a={attach?}&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;According to me: &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;property = '&amp;lt;name/title/creator.. etc&amp;gt;'&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;store_type = 'avm'&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;store_id = '&amp;lt;domain name&amp;gt;' which we enter while creating the web project.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;But what is node_id. From where do I get this?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Also, how do I see the code for this web script for writing a customized web script.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 17 Jan 2008 00:25:49 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/search-for-a-file-inside-the-avm-store/m-p/145411#M101610</guid>
      <dc:creator>garima</dc:creator>
      <dc:date>2008-01-17T00:25:49Z</dc:date>
    </item>
    <item>
      <title>Re: Search for a file inside the avm store</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/search-for-a-file-inside-the-avm-store/m-p/145412#M101611</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Yeah it's going to require a custom web script - unfortunately the /api/path/content web script doesn't seem to be able to retrieve content from an AVM store (bug report &lt;/SPAN&gt;&lt;A href="http://issues.alfresco.com/browse/AR-1977" rel="nofollow noopener noreferrer"&gt;http://issues.alfresco.com/browse/AR-1977&lt;/A&gt;&lt;SPAN&gt; has been filed for this issue).&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The source code for the web scripts is in one of two places (depending on whether it was implemented in Javascript or Java):&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;1. the source code for the built-in Javascript web scripts is located within the Alfresco WAR file at WEB-INF/classes/alfresco/templates, which (if you're running Alfresco on Tomcat) gets exploded to ${TOMCAT_HOME}/webapps/alfresco/WEB-INF/classes/alfresco/templates&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;2. the source code for the built-in Java webscripts is located within the web client project in the Alfresco source code, which can be obtained from our public Subversion server (more details at &lt;/SPAN&gt;&lt;A href="http://wiki.alfresco.com/wiki/Alfresco_SVN_Development_Environment" rel="nofollow noopener noreferrer"&gt;http://wiki.alfresco.com/wiki/Alfresco_SVN_Development_Environment&lt;/A&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 17 Jan 2008 00:32:43 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/search-for-a-file-inside-the-avm-store/m-p/145412#M101611</guid>
      <dc:creator>pmonks</dc:creator>
      <dc:date>2008-01-17T00:32:43Z</dc:date>
    </item>
    <item>
      <title>Re: Search for a file inside the avm store</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/search-for-a-file-inside-the-avm-store/m-p/145413#M101612</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Just to follow up, if you do implement a custom web script that does this, would you mind posting the code back here?&amp;nbsp; This is probably a reasonably common requirement, and while we work on fixing AR-1977 others will find it useful to have a workaround readily available.&amp;nbsp; Thanks in advance!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 17 Jan 2008 00:41:05 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/search-for-a-file-inside-the-avm-store/m-p/145413#M101612</guid>
      <dc:creator>pmonks</dc:creator>
      <dc:date>2008-01-17T00:41:05Z</dc:date>
    </item>
    <item>
      <title>Re: Search for a file inside the avm store</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/search-for-a-file-inside-the-avm-store/m-p/145414#M101613</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I searched both the places (Javascript and java Implementation Places) but there is only the description xml file present. There is neither .js file nor .ftl file.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Where do I look for the code?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Or If you can guide me in writing the .ftl file that would be great.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;And surely, I can post the code back!!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 17 Jan 2008 01:00:23 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/search-for-a-file-inside-the-avm-store/m-p/145414#M101613</guid>
      <dc:creator>garima</dc:creator>
      <dc:date>2008-01-17T01:00:23Z</dc:date>
    </item>
    <item>
      <title>Re: Search for a file inside the avm store</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/search-for-a-file-inside-the-avm-store/m-p/145415#M101614</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Here is the code. It works!!&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Firstly, I used the inbuilt web script to get the login ticket.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I then used the ticket for invoking customized web script by sending two parameters: {storeid} and {filename}. i.e. the id of the store in which the given filename has to be searched.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The code for customized web script is:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;Desc XML file&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;lt;webscript&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; &amp;lt;shortname&amp;gt;AVM Stores LookUp&amp;lt;/shortname&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; &amp;lt;description&amp;gt;Returning the specified XML file&amp;lt;/description&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; &amp;lt;url&amp;gt;/sample/avm/store/file?store={storeid}&amp;amp;amp;file={filename}&amp;lt;/url&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; &amp;lt;format default="text"/&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; &amp;lt;authentication&amp;gt;admin&amp;lt;/authentication&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; &amp;lt;transaction&amp;gt;required&amp;lt;/transaction&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;lt;/webscript&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;FTL File&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;lt;#assign stagingURL = avm.assetUrl("${args.store}","${args.file}")&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;${stagingURL}&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;This gives back the staging URL which can be used to get back the desired file.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I basically aim at getting the xml file and parsing it inside my php file.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;There is a small query:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Instead of passing the username and password as a plain text in the login web script can I use the encrypted username and password?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 19 Jan 2008 00:59:43 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/search-for-a-file-inside-the-avm-store/m-p/145415#M101614</guid>
      <dc:creator>garima</dc:creator>
      <dc:date>2008-01-19T00:59:43Z</dc:date>
    </item>
    <item>
      <title>Re: Search for a file inside the avm store</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/search-for-a-file-inside-the-avm-store/m-p/145416#M101615</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Instead of passing the username and password as a plain text in the login web script can I use the encrypted username and password?&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt;If you're accessing the web script via /alfresco/service you can use HTTP basic authentication - this doesn't encrypt the username / password by itself, but used in combination with SSL (ie. https) it's pretty secure.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;You can also access web scripts via /alfresco/wcservice, in which case it's authenticated using whatever authentication mechanism has been configured for the web client (which may or may not encrypt usernames / passwords, depending on which authentication mechanism you've configured).&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 19 Jan 2008 02:12:16 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/search-for-a-file-inside-the-avm-store/m-p/145416#M101615</guid>
      <dc:creator>pmonks</dc:creator>
      <dc:date>2008-01-19T02:12:16Z</dc:date>
    </item>
    <item>
      <title>Re: Search for a file inside the avm store</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/search-for-a-file-inside-the-avm-store/m-p/145417#M101616</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;If you're accessing the web script via /alfresco/service you can use HTTP basic authentication - this doesn't encrypt the username / password by itself, but used in combination with SSL (ie. https) it's pretty secure.&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt;How do I call the web script via SSL (https) from PHP code?&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I am able to access the web scripts from the browser using https. But not able to call them through the PHP code.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 Jan 2008 02:00:15 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/search-for-a-file-inside-the-avm-store/m-p/145417#M101616</guid>
      <dc:creator>garima</dc:creator>
      <dc:date>2008-01-23T02:00:15Z</dc:date>
    </item>
    <item>
      <title>Re: Search for a file inside the avm store</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/search-for-a-file-inside-the-avm-store/m-p/145418#M101617</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I'm not a PHP guy, but a quick google for "PHP HTTPS" turned up a bunch of hits:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;A href="http://www.google.com/search?q=PHP+HTTPS" rel="nofollow noopener noreferrer"&gt;http://www.google.com/search?q=PHP+HTTPS&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;It looks like PHP has had native support for HTTP over SSL since version 4.3.0, and there are some libraries that provide easy ways to do HTTP authentication (basic, digest and NTLM).&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 Jan 2008 04:59:12 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/search-for-a-file-inside-the-avm-store/m-p/145418#M101617</guid>
      <dc:creator>pmonks</dc:creator>
      <dc:date>2008-01-23T04:59:12Z</dc:date>
    </item>
  </channel>
</rss>

