<!-- 
RSS generated by JIRA (8.1.3#801003-sha1:6b6f07cffadda9a0d6efe24639daed8ce94dcdd6) at Sat Feb 10 05:46:00 GMT 2024

It is possible to restrict the fields that are returned in this document by specifying the 'field' parameter in your request.
For example, to request only the issue key and summary append 'field=key&field=summary' to the URL of your request.
-->
<rss version="0.92" >
<channel>
    <title>Rivet Logic Corporation JIRA </title>
    <link>https://issues.rivetlogic.com</link>
    <description>This file is an XML representation of an issue</description>
    <language>en-us</language>    <build-info>
        <version>8.1.3</version>
        <build-number>801003</build-number>
        <build-date>13-09-2019</build-date>
    </build-info>


<item>
            <title>[AWPR-4] AWPr is dispalying  junk characters(binary data)in aportlet  instead of image for alfresco webscript returning binary data</title>
                <link>https://issues.rivetlogic.com/browse/AWPR-4</link>
                <project id="10074" key="AWPR">Alfresco Web script Portlet rivet</project>
                    <description>AWPr is dispalying  junk characters(binary data)in aportlet  instead of image for alfresco webscript returning binary data&lt;br/&gt;
Scrpit executed is alfresco webscript for Content Retrival(getContent)&lt;br/&gt;
Content Retrieval (getContent) GET /alfresco/service/api/node/content{property}/{store_type}/{store_id}/{id}?a={attach?} &lt;br/&gt;
GET /alfresco/service/api/path/content{property}/{store_type}/{store_id}/{id}?a={attach?} &lt;br/&gt;
GET /alfresco/service/api/avmpath/content{property}/{store_id}/{id}?a={attach?} &lt;br/&gt;
GET /alfresco/service/api/node/{store_type}/{store_id}/{id}/content{property}?a={attach?} &lt;br/&gt;
GET /alfresco/service/api/path/{store_type}/{store_id}/{id}/content{property}?a={attach?} &lt;br/&gt;
Notes:&lt;br/&gt;
&lt;br/&gt;
Some CMIS protocol bindings MAY choose not to explicitly implement a &amp;quot;getContentStream&amp;quot; method, in cases where the protocol itself provides built-in mechanisms for retrieving byte streams. (E.g. in the ATOM/REST binding, content streams may be retrieved via standard HTTP gets on an &amp;quot;edit-media&amp;quot; URL, rather than a CMIS-specific &amp;quot;getContentStream&amp;quot; URL). See Part II of the CMIS specification for additional details.&lt;br/&gt;
when we open bmp and jpeg conent from alfresco it explorer displays image properly but in awpr it displays junk character&lt;br/&gt;
&lt;br/&gt;
We tried setting the mime type response on servlet  but still we get binary junk charcters since a it is enclosed by div tag&lt;br/&gt;
&lt;br/&gt;
&lt;br/&gt;
&lt;br/&gt;
&amp;nbsp;</description>
                <environment>Alfresco labs 3.0 Lifreray portal 5.2.3 Star 1.3 </environment>
        <key id="15815">AWPR-4</key>
            <summary>AWPr is dispalying  junk characters(binary data)in aportlet  instead of image for alfresco webscript returning binary data</summary>
                <type id="1" iconUrl="https://issues.rivetlogic.com/secure/viewavatar?size=xsmall&amp;avatarId=11083&amp;avatarType=issuetype">Bug</type>
                                            <priority id="3" iconUrl="https://issues.rivetlogic.com/images/icons/priorities/major.svg">Major</priority>
                        <status id="5" iconUrl="https://issues.rivetlogic.com/images/icons/statuses/resolved.png" description="A resolution has been taken, and it is awaiting verification by reporter. From here issues are either reopened, or are closed.">Resolved</status>
                    <statusCategory id="3" key="done" colorName="green"/>
                                    <resolution id="7">Not a Bug</resolution>
                                        <assignee username="aelnattar">Al El-Nattar</assignee>
                                    <reporter username="nilendra">nilendra</reporter>
                        <labels>
                    </labels>
                <created>Fri, 17 Jul 2009 07:32:12 -0400</created>
                <updated>Wed, 22 Jul 2009 03:01:57 -0400</updated>
                            <resolved>Tue, 21 Jul 2009 06:10:07 -0400</resolved>
                                    <version>1.3.0</version>
                                                    <component>awpr-liferay-portal</component>
                        <due></due>
                            <votes>0</votes>
                                    <watches>0</watches>
                                                                <comments>
                            <comment id="24614" author="nilendra" created="Fri, 17 Jul 2009 07:38:59 -0400"  >I have attached both webscript opened in IE and webscript opened through awpr </comment>
                            <comment id="24615" author="aelnattar" created="Fri, 17 Jul 2009 07:52:55 -0400"  >Hi,&lt;br/&gt;
&lt;br/&gt;
AWPr 1.3.0 doesn&amp;#39;t support resource URLs. Please try to upgrade to the latest AWPr version 1.5.0 and let us know how that goes.&lt;br/&gt;
&lt;br/&gt;
Thanks.</comment>
                            <comment id="24649" author="nilendra" created="Mon, 20 Jul 2009 06:46:25 -0400"  >Thanks Alaaedin, &lt;br/&gt;
I still get  junk character for Content Retrieval (getContent) GET /alfresco/service/api/node/content{property}/{store_type}/{store_id}/{id}?a={attach?}  using AWPr 1.5&lt;br/&gt;
&lt;br/&gt;
I tried modifying doView of JSPPortlet with following COde&lt;br/&gt;
public void doView(RenderRequest req, RenderResponse res) throws IOException, PortletException {&lt;br/&gt;
		WebscriptPreferences wsprefs = (WebscriptPreferences) req.getPortletSession().getAttribute(&lt;br/&gt;
				Constants.SESSION_ATTRIBUTE_WSPREFS);&lt;br/&gt;
		if (wsprefs == null) {&lt;br/&gt;
			wsprefs = new WebscriptPreferences();&lt;br/&gt;
			wsprefs.readPortletPreferences(req);&lt;br/&gt;
&lt;br/&gt;
			req.getPortletSession().setAttribute(Constants.SESSION_ATTRIBUTE_WSPREFS, wsprefs);&lt;br/&gt;
		}&lt;br/&gt;
&lt;br/&gt;
		if (&amp;quot;&amp;quot;.equals(wsprefs.getAlfrescoHost()) || &amp;quot;&amp;quot;.equals(wsprefs.getWebscriptUrl())&lt;br/&gt;
				|| wsprefs.getAlfrescoHost() == null || wsprefs.getWebscriptUrl() == null) {&lt;br/&gt;
			include(viewJSP, req, res);&lt;br/&gt;
		} else {&lt;br/&gt;
			// Get Alfresco ticket for the user&lt;br/&gt;
			String alfTicket = getAlfrescoTicket(req, wsprefs);&lt;br/&gt;
			System.out.println(&amp;quot;Alfresco Ticket Generated: &amp;quot; + alfTicket);&lt;br/&gt;
			System.out.println(&amp;quot;wsPrefs WebScriptURL sent: : &amp;quot; + wsprefs.getWebscriptUrl());&lt;br/&gt;
			// Execute script&lt;br/&gt;
			byte[] image=executeScript(req, res, wsprefs, alfTicket);&lt;br/&gt;
			//byte[] image=(byte[])req.getAttribute(&amp;quot;webscript-content&amp;quot;);&lt;br/&gt;
			&lt;br/&gt;
			HttpServletResponse httpResponse = PortalUtil.getHttpServletResponse(res);&lt;br/&gt;
			httpResponse.setContentType(&amp;quot;image/gif&amp;quot;);&lt;br/&gt;
			&lt;br/&gt;
			javax.servlet.ServletOutputStream outputStream = httpResponse.getOutputStream();&lt;br/&gt;
			outputStream.write(image, 0, (int)image.length);&lt;br/&gt;
			outputStream.flush();&lt;br/&gt;
			//include(webscriptJSP, req, res);&lt;br/&gt;
		}&lt;br/&gt;
Even though I set httpResponse contenttype to image/gif I still get Junk characters on portlet. When i did view source I found that the content is wrapped by div tag so I am not able to set the contenttype</comment>
                            <comment id="24650" author="aelnattar" created="Mon, 20 Jul 2009 07:13:43 -0400"  >Please attach your webscript code so I can take a look at it.&lt;br/&gt;
&lt;br/&gt;
Thanks.</comment>
                            <comment id="24659" author="nilendra" created="Mon, 20 Jul 2009 08:27:17 -0400"  >Webscript is alfreco out of box implementation  for get contentContent Retrieval (getContent) in alfresco labs 3.0&lt;br/&gt;
&lt;br/&gt;
&amp;lt;webscript&amp;gt;&lt;br/&gt;
&amp;nbsp;&amp;nbsp;&amp;lt;shortname&amp;gt;Content Retrieval (getContent)&amp;lt;/shortname&amp;gt;&lt;br/&gt;
&amp;nbsp;&amp;nbsp;&amp;lt;description&amp;gt;&lt;br/&gt;
&amp;lt;![CDATA[&lt;br/&gt;
The service returns the content-stream for a document.  This is the only service that returns content-stream.&amp;lt;br&amp;gt;&lt;br/&gt;
&amp;lt;br&amp;gt;&lt;br/&gt;
Inputs:&amp;lt;br&amp;gt;&lt;br/&gt;
&amp;lt;br&amp;gt;&lt;br/&gt;
ID documentId: Document to return the content-stream&amp;lt;br&amp;gt;&lt;br/&gt;
(Optional) Integer offset:&amp;lt;br&amp;gt;&lt;br/&gt;
(Optional) Integer length:&amp;lt;br&amp;gt;&lt;br/&gt;
&amp;lt;br&amp;gt;&lt;br/&gt;
Outputs:&amp;lt;br&amp;gt;&lt;br/&gt;
&amp;lt;br&amp;gt;&lt;br/&gt;
Byte[] stream&amp;lt;br&amp;gt;&lt;br/&gt;
&amp;lt;br&amp;gt;&lt;br/&gt;
Notes:&amp;lt;br&amp;gt;&lt;br/&gt;
&amp;lt;br&amp;gt;&lt;br/&gt;
Some CMIS protocol bindings MAY choose not to explicitly implement a &amp;#xE2;&#8364;&#339;getContentStream&amp;#xE2;&#8364;? method, in cases where the protocol itself provides built-in mechanisms for retrieving byte streams. (E.g. in the ATOM/REST binding, content streams may be retrieved via standard HTTP gets on an &amp;#xE2;&#8364;&#339;edit-media&amp;#xE2;&#8364;? URL, rather than a CMIS-specific &amp;#xE2;&#8364;&#339;getContentStream&amp;#xE2;&#8364;? URL). See Part II of the CMIS specification for additional details.&amp;lt;br&amp;gt;&lt;br/&gt;
Each CMIS protocol binding will provide a way for fetching a  sub-range within a content stream, in a manner appropriate to that protocol.&amp;lt;br&amp;gt; &lt;br/&gt;
]]&amp;gt;&lt;br/&gt;
&amp;nbsp;&amp;nbsp;&amp;lt;/description&amp;gt;&lt;br/&gt;
&amp;nbsp;&amp;nbsp;&amp;lt;url&amp;gt;/api/node/content{property}/{store_type}/{store_id}/{id}?a={attach?}&amp;lt;/url&amp;gt;&lt;br/&gt;
&amp;nbsp;&amp;nbsp;&amp;lt;url&amp;gt;/api/path/content{property}/{store_type}/{store_id}/{id}?a={attach?}&amp;lt;/url&amp;gt;&lt;br/&gt;
&amp;nbsp;&amp;nbsp;&amp;lt;url&amp;gt;/api/avmpath/content{property}/{store_id}/{id}?a={attach?}&amp;lt;/url&amp;gt;&lt;br/&gt;
&amp;nbsp;&amp;nbsp;&amp;lt;url&amp;gt;/api/node/{store_type}/{store_id}/{id}/content{property}?a={attach?}&amp;lt;/url&amp;gt;&lt;br/&gt;
&amp;nbsp;&amp;nbsp;&amp;lt;url&amp;gt;/api/path/{store_type}/{store_id}/{id}/content{property}?a={attach?}&amp;lt;/url&amp;gt;&lt;br/&gt;
&amp;nbsp;&amp;nbsp;&amp;lt;authentication&amp;gt;guest&amp;lt;/authentication&amp;gt;&lt;br/&gt;
&amp;nbsp;&amp;nbsp;&amp;lt;format default=&amp;quot;&amp;quot;&amp;gt;argument&amp;lt;/format&amp;gt;&lt;br/&gt;
&amp;nbsp;&amp;nbsp;&amp;lt;family&amp;gt;CMIS&amp;lt;/family&amp;gt;&lt;br/&gt;
&amp;nbsp;&amp;nbsp;&amp;lt;lifecycle&amp;gt;public_api&amp;lt;/lifecycle&amp;gt;&lt;br/&gt;
&amp;lt;/webscript&amp;gt;</comment>
                            <comment id="24679" author="aelnattar" created="Mon, 20 Jul 2009 17:51:38 -0400"  >What I meant to say is how are you calling the content retreival Web script from your code?</comment>
                            <comment id="24683" author="nilendra" created="Tue, 21 Jul 2009 04:43:38 -0400"  >I set following link in alfresco preference&lt;br/&gt;
&lt;a href=&quot;http://3.209.35.66:8081/alfresco/service/api/node/content/workspace/SpacesStore/1a4d715b-316b-4a92-9b31-8b6163e26742/ORG-CHART.gif&quot;&gt;http://3.209.35.66:8081/alfresco/service/api/node/content/workspace/SpacesStore/1a4d715b-316b-4a92-9b31-8b6163e26742/ORG-CHART.gif&lt;/a&gt;&lt;br/&gt;
I set Alfresco Host: &lt;a href=&quot;http://3.209.35.66:8081&quot;&gt;http://3.209.35.66:8081&lt;/a&gt;&lt;br/&gt;
Alfresco Context Path :/alfresco&lt;br/&gt;
and Script Url:/api/node/content/workspace/SpacesStore/1a4d715b-316b-4a92-9b31-8b6163e26742/ORG-CHART.gif&lt;br/&gt;
and then click on save and then return to full page&lt;br/&gt;
&amp;nbsp;</comment>
                            <comment id="24689" author="aelnattar" created="Tue, 21 Jul 2009 06:10:07 -0400"  >I see what the problem is now. This is not a bug. AWPr is not meant to be used this way. Content streaming Web scripts are special since they stream binary content that must be handled differently. For binary content we must use Portlet 2.0 resource URLs and thus to achieve what you want you must do the following:&lt;br/&gt;
&lt;br/&gt;
- Create a new Web script in your Alfresco repository and add the following line in your FTL:&lt;br/&gt;
&lt;br/&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;img src=&amp;quot;${url.serviceContext}/api/node/content/workspace/SpacesStore/1a4d715b-316b-4a92-9b31-8b6163e26742/ORG-CHART.gif/&amp;gt;&lt;br/&gt;
&lt;br/&gt;
Note: It would be advisable to generalize the image information (storeType, storeId, Id, FileName) by getting it through Web script arguments that can be passed from AWPr using the &amp;quot;Constant Script Parameters&amp;quot; preference. &lt;br/&gt;
&lt;br/&gt;
- Next add a new AWPr portlet to your page and use your new Web script&amp;#39;s URL ( you can call it image_viewer or something :) ).&lt;br/&gt;
&lt;br/&gt;
That should do it. Hope this helps.</comment>
                            <comment id="24714" author="nilendra" created="Wed, 22 Jul 2009 03:01:57 -0400"  >Thanks &lt;br/&gt;
Now we are able to view images by creating new script</comment>
                    </comments>
                    <attachments>
                            <attachment id="13761" name="awprimage.bmp" size="2359350" author="nilendra" created="Fri, 17 Jul 2009 07:38:59 -0400"/>
                            <attachment id="13760" name="exporer.bmp" size="2359350" author="nilendra" created="Fri, 17 Jul 2009 07:38:59 -0400"/>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                                                                        <customfield id="customfield_11470" key="com.atlassian.jira.plugins.jira-development-integration-plugin:devsummary">
                        <customfieldname>Development</customfieldname>
                        <customfieldvalues>
                            
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                            <customfield id="customfield_11170" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>0|i00e1b:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10070" key="com.pyxis.greenhopper.jira:gh-global-rank">
                        <customfieldname>Rank (Obsolete)</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2275</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                        <customfield id="customfield_10021" key="com.atlassian.jira.plugin.system.customfieldtypes:datepicker">
                        <customfieldname>Resolution Date</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Mon, 20 Jul 2009 00:00:00 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                            </customfields>
    </item>
</channel>
</rss>