<?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 Absolute url is localhost if ws called through share proxy in Alfresco Archive</title>
    <link>https://connect.hyland.com/t5/alfresco-archive/absolute-url-is-localhost-if-ws-called-through-share-proxy/m-p/249728#M202858</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hello, I created a simple webscript that find a node based on the nodeRef provided as argument and display its download url.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Javascript:&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;var node = search.findNode(args.nodeRef);&lt;BR /&gt;model.downloadUrl = url.context + node.url;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;SPAN&gt;In order to get the absolute url, I used within the template the following code:&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;${absurl(downloadUrl)}&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;SPAN&gt;Now if I call my webscript using the alfresco context (&lt;/SPAN&gt;&lt;A href="http://myserver:8080/alfresco/service/myws?nodeRef=" rel="nofollow noopener noreferrer"&gt;http://myserver:8080/alfresco/service/myws?nodeRef=&lt;/A&gt;&lt;SPAN&gt;…) the download url is correct (&lt;/SPAN&gt;&lt;A href="http://myserver:8080/alfresco/d/d/" rel="nofollow noopener noreferrer"&gt;http://myserver:8080/alfresco/d/d/&lt;/A&gt;&lt;SPAN&gt;…).&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;While if the websscript is called using the share proxy (&lt;/SPAN&gt;&lt;A href="http://myserver:8080/share/proxy/alfresco/myws?nodeRef=" rel="nofollow noopener noreferrer"&gt;http://myserver:8080/share/proxy/alfresco/myws?nodeRef=&lt;/A&gt;&lt;SPAN&gt;…)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&lt;SPAN&gt;the download url is uncorrect (&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://" rel="nofollow noopener noreferrer"&gt;http://&lt;/A&gt;&lt;/SPAN&gt;&lt;STRONG&gt;localhost&lt;/STRONG&gt;&lt;SPAN&gt;:8080/alfresco/d/d/…).&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I would like to use the share proxy based url since the webscript is a share custom document library action.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 06 Apr 2011 14:20:53 GMT</pubDate>
    <dc:creator>alarocca</dc:creator>
    <dc:date>2011-04-06T14:20:53Z</dc:date>
    <item>
      <title>Absolute url is localhost if ws called through share proxy</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/absolute-url-is-localhost-if-ws-called-through-share-proxy/m-p/249728#M202858</link>
      <description>Hello, I created a simple webscript that find a node based on the nodeRef provided as argument and display its download url.Javascript:var node = search.findNode(args.nodeRef);model.downloadUrl = url.context + node.url;‍‍In order to get the absolute url, I used within the template the following code</description>
      <pubDate>Wed, 06 Apr 2011 14:20:53 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/absolute-url-is-localhost-if-ws-called-through-share-proxy/m-p/249728#M202858</guid>
      <dc:creator>alarocca</dc:creator>
      <dc:date>2011-04-06T14:20:53Z</dc:date>
    </item>
    <item>
      <title>Re: Absolute url is localhost if ws called through share proxy</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/absolute-url-is-localhost-if-ws-called-through-share-proxy/m-p/249729#M202859</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Then you need to build the front part of the URL in the Share tier rather than on the Repository (or pass the Share part of the URL in as an argument).&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;As there can be multiple Share instances for each Repository instance, it's impossible for the Repository to calculate the Share URL you're looking for in every case.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Mike&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 Apr 2011 14:46:31 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/absolute-url-is-localhost-if-ws-called-through-share-proxy/m-p/249729#M202859</guid>
      <dc:creator>mikeh</dc:creator>
      <dc:date>2011-04-06T14:46:31Z</dc:date>
    </item>
  </channel>
</rss>

