response in the portlet

4416405, modified 15 Years ago. New Member Posts: 9 Join Date: 1/5/10 Recent Posts
Hi!

I finally managed to call an Alfresco webscript and show the response in a Liferay portlet, but not with the result I expected.

Instead of the beautiful output of Alfresco, I get all the portlet in text.

I tried to change the mime-type support in the portlet.xml and changed it to "aplication/xml" instead of "text/html", but now I can't drop the portlet!Even the icon of loading doesn't appear.Liferay apparently do nothing, and there is no errors or aditional info in the log

This is the response I get:
<!--?xml version="1.0" encoding="UTF-8"?-->
<feed xmlns="http://www.w3.org/2005/Atom" xmlns:app="http://www.w3.org/2007/app" xmlns:cmisra="http://docs.oasis-open.org/ns/cmis/restatom/200908/" xmlns:cmis="http://docs.oasis-open.org/ns/cmis/core/200908/" xmlns:alf="http://www.alfresco.org" xmlns:opensearch="http://a9.com/-/spec/opensearch/1.1/">
<author><name>admin</name></author>
<generator version="3.3.0 (2765)">Alfresco (Community)</generator>
<icon>http://localhost:8083/alfresco/images/logo/AlfrescoLogo16.ico</icon>
<id>urn:uuid:checkedout</id>
<link rel="service" href="http://localhost:8083/alfresco/service/cmis">
<link rel="self" href="http://localhost:8083/alfresco/service/cmis/checkedout?alf_ticket=TICKET_4a43e961dfa7b3ae3d4e5ffceb3859f53cadc67f">
<link rel="first" href="http://localhost:8083/alfresco/service/cmis/checkedout?alf_ticket=TICKET_4a43e961dfa7b3ae3d4e5ffceb3859f53cadc67f&amp;pageNo=1&amp;pageSize=-1&amp;guest=" type="application/atom+xml;type=feed">
<link rel="last" href="http://localhost:8083/alfresco/service/cmis/checkedout?alf_ticket=TICKET_4a43e961dfa7b3ae3d4e5ffceb3859f53cadc67f&amp;pageNo=1&amp;pageSize=-1&amp;guest=" type="application/atom+xml;type=feed">
<title>Checked out Documents</title>
<updated>2010-07-06T13:18:26.048+02:00</updated>
<entry>
<author><name>admin</name></author>
<content type="application/octet-stream" src="http://localhost:8083/alfresco/service/cmis/s/workspace:SpacesStore/i/e7738f65-93ab-46c6-8f0e-a79ae8f27260/content.0" /><id>urn:uuid:e7738f65-93ab-46c6-8f0e-a79ae8f27260</id>
<link rel="self" href="http://localhost:8083/alfresco/service/cmis/pwc/s/workspace:SpacesStore/i/e7738f65-93ab-46c6-8f0e-a79ae8f27260">
<link rel="enclosure" href="http://localhost:8083/alfresco/service/cmis/s/workspace:SpacesStore/i/e7738f65-93ab-46c6-8f0e-a79ae8f27260/content.0" type="application/octet-stream">
<link rel="edit" href="http://localhost:8083/alfresco/service/cmis/s/workspace:SpacesStore/i/e7738f65-93ab-46c6-8f0e-a79ae8f27260">
<link rel="edit-media" href="http://localhost:8083/alfresco/service/cmis/s/workspace:SpacesStore/i/e7738f65-93ab-46c6-8f0e-a79ae8f27260/content.0" type="application/octet-stream">
<link rel="http://docs.oasis-open.org/ns/cmis/link/200908/allowableactions" href="http://localhost:8083/alfresco/service/cmis/s/workspace:SpacesStore/i/e7738f65-93ab-46c6-8f0e-a79ae8f27260/allowableactions">
<link rel="http://docs.oasis-open.org/ns/cmis/link/200908/relationships" href="http://localhost:8083/alfresco/service/cmis/s/workspace:SpacesStore/i/e7738f65-93ab-46c6-8f0e-a79ae8f27260/rels">
<link rel="http://docs.oasis-open.org/ns/cmis/link/200908/policies" href="http://localhost:8083/alfresco/service/cmis/s/workspace:SpacesStore/i/e7738f65-93ab-46c6-8f0e-a79ae8f27260/pols">
<link rel="http://docs.oasis-open.org/ns/cmis/link/200908/acl" href="http://localhost:8083/alfresco/service/cmis/s/workspace:SpacesStore/i/e7738f65-93ab-46c6-8f0e-a79ae8f27260/acl">
<link rel="up" href="http://localhost:8083/alfresco/service/cmis/s/workspace:SpacesStore/i/e7738f65-93ab-46c6-8f0e-a79ae8f27260/parents" type="application/atom+xml;type=feed">
<link rel="version-history" href="http://localhost:8083/alfresco/service/cmis/s/workspace:SpacesStore/i/e7738f65-93ab-46c6-8f0e-a79ae8f27260/versions">
<link rel="via" href="http://localhost:8083/alfresco/service/cmis/s/workspace:SpacesStore/i/a264c365-da45-45a4-82bb-9c9189e0cab5">
<link rel="describedby" href="http://localhost:8083/alfresco/service/cmis/type/cmis:document">
<link rel="service" href="http://localhost:8083/alfresco/service/cmis">
<published>2010-07-06T11:48:20.975+02:00</published>
<summary>1 (Working Copy).0</summary>
<title>1 (Working Copy).0</title>
<updated>2010-07-06T11:48:21.537+02:00</updated>
<app:edited>2010-07-06T11:48:21.537+02:00</app:edited>
<alf:icon>http://localhost:8083/alfresco/images/filetypes/_default.gif</alf:icon>
<cmisra:object>
<cmis:properties>
<cmis:propertyboolean propertydefinitionid="cmis:isLatestMajorVersion" displayname="Is Latest Major Version" queryname="cmis:isLatestMajorVersion"><cmis:value>false</cmis:value></cmis:propertyboolean>
<cmis:propertyid propertydefinitionid="cmis:contentStreamId" displayname="Content Stream Id" queryname="cmis:contentStreamId"><cmis:value>store://2010/6/4/9/35/395186cf-601c-4680-b30f-fe2c10f03996.bin</cmis:value></cmis:propertyid>
<cmis:propertyinteger propertydefinitionid="cmis:contentStreamLength" displayname="Content Stream Length" queryname="cmis:contentStreamLength"><cmis:value>2555</cmis:value></cmis:propertyinteger>
<cmis:propertystring propertydefinitionid="cmis:versionSeriesCheckedOutBy" displayname="Version Series Checked Out By" queryname="cmis:versionSeriesCheckedOutBy"><cmis:value>admin</cmis:value></cmis:propertystring>
<cmis:propertyid propertydefinitionid="cmis:objectTypeId" displayname="Object Type Id" queryname="cmis:objectTypeId"><cmis:value>cmis:document</cmis:value></cmis:propertyid>
<cmis:propertyid propertydefinitionid="cmis:versionSeriesCheckedOutId" displayname="Version Series Checked Out Id" queryname="cmis:versionSeriesCheckedOutId"><cmis:value>workspace://SpacesStore/e7738f65-93ab-46c6-8f0e-a79ae8f27260</cmis:value></cmis:propertyid>
<cmis:propertystring propertydefinitionid="cmis:name" displayname="Name" queryname="cmis:name"><cmis:value>1 (Working Copy).0</cmis:value></cmis:propertystring>
<cmis:propertystring propertydefinitionid="cmis:contentStreamMimeType" displayname="Content Stream MIME Type" queryname="cmis:contentStreamMimeType"><cmis:value>application/octet-stream</cmis:value></cmis:propertystring>
<cmis:propertyid propertydefinitionid="cmis:versionSeriesId" displayname="Version series id" queryname="cmis:versionSeriesId"><cmis:value>workspace://SpacesStore/a264c365-da45-45a4-82bb-9c9189e0cab5</cmis:value></cmis:propertyid>
<cmis:propertydatetime propertydefinitionid="cmis:creationDate" displayname="Creation Date" queryname="cmis:creationDate"><cmis:value>2010-07-06T11:48:20.975+02:00</cmis:value></cmis:propertydatetime>
<cmis:propertystring propertyDefinitionId="cmis:changeToken" displayName="Change token" queryName="cmis:changeToken" />
<cmis:propertyboolean propertydefinitionid="cmis:isLatestVersion" displayname="Is Latest Version" queryname="cmis:isLatestVersion"><cmis:value>true</cmis:value></cmis:propertyboolean>
<cmis:propertystring propertydefinitionid="cmis:versionLabel" displayname="Version Label" queryname="cmis:versionLabel"><cmis:value>pwc</cmis:value></cmis:propertystring>
<cmis:propertyboolean propertydefinitionid="cmis:isVersionSeriesCheckedOut" displayname="Is Version Series Checked Out" queryname="cmis:isVersionSeriesCheckedOut"><cmis:value>true</cmis:value></cmis:propertyboolean>
<cmis:propertystring propertydefinitionid="cmis:lastModifiedBy" displayname="Last Modified By" queryname="cmis:lastModifiedBy"><cmis:value>admin</cmis:value></cmis:propertystring>
<cmis:propertystring propertydefinitionid="cmis:createdBy" displayname="Created by" queryname="cmis:createdBy"><cmis:value>admin</cmis:value></cmis:propertystring>
<cmis:propertystring propertyDefinitionId="cmis:checkinComment" displayName="Checkin Comment" queryName="cmis:checkinComment" />
<cmis:propertyid propertydefinitionid="cmis:objectId" displayname="Object Id" queryname="cmis:objectId"><cmis:value>workspace://SpacesStore/e7738f65-93ab-46c6-8f0e-a79ae8f27260</cmis:value></cmis:propertyid>
<cmis:propertyboolean propertydefinitionid="cmis:isImmutable" displayname="Is Immutable" queryname="cmis:isImmutable"><cmis:value>false</cmis:value></cmis:propertyboolean>
<cmis:propertyboolean propertydefinitionid="cmis:isMajorVersion" displayname="Is Major Version" queryname="cmis:isMajorVersion"><cmis:value>false</cmis:value></cmis:propertyboolean>
<cmis:propertyid propertydefinitionid="cmis:baseTypeId" displayname="Base Type Id" queryname="cmis:baseTypeId"><cmis:value>cmis:document</cmis:value></cmis:propertyid>
<cmis:propertystring propertydefinitionid="cmis:contentStreamFileName" displayname="Content Stream Filename" queryname="cmis:contentStreamFileName"><cmis:value>1 (Working Copy).0</cmis:value></cmis:propertystring>
<cmis:propertydatetime propertydefinitionid="cmis:lastModificationDate" displayname="Last Modified Date" queryname="cmis:lastModificationDate"><cmis:value>2010-07-06T11:48:21.537+02:00</cmis:value></cmis:propertydatetime>
<alf:aspects>
<alf:appliedaspects>P:cm:lockable</alf:appliedaspects>
<alf:appliedaspects>P:cm:copiedfrom</alf:appliedaspects>
<alf:appliedaspects>P:cm:workingcopy</alf:appliedaspects>
<alf:properties>
<cmis:propertyboolean propertyDefinitionId="cm:lockIsDeep" displayName="Deep Lock" queryName="cm:lockIsDeep" />
<cmis:propertystring propertyDefinitionId="cm:lockType" displayName="Lock Type" queryName="cm:lockType" />
<cmis:propertydatetime propertyDefinitionId="cm:expiryDate" displayName="Expiry Date" queryName="cm:expiryDate" />
<cmis:propertystring propertyDefinitionId="cm:lockOwner" displayName="Lock Owner" queryName="cm:lockOwner" />
<cmis:propertyid propertydefinitionid="cm:source" displayname="Source" queryname="cm:source"><cmis:value>Node Type: {http://www.alfresco.org/model/content/1.0}content Node Ref: workspace://SpacesStore/a264c365-da45-45a4-82bb-9c9189e0cab5</cmis:value></cmis:propertyid>
<cmis:propertystring propertydefinitionid="cm:workingCopyOwner" displayname="Working Copy Owner" queryname="cm:workingCopyOwner"><cmis:value>admin</cmis:value></cmis:propertystring>
<cmis:propertystring propertyDefinitionId="cm:workingCopyMode" displayName="cm:workingCopyMode" queryName="cm:workingCopyMode" />
</alf:properties>
</alf:aspects>
</cmis:properties>
</cmisra:object>
<cmisra:pathsegment>1 (Working Copy).0</cmisra:pathsegment>
</entry>
<entry>
<author><name>admin</name></author>
<content type="application/pdf" src="http://localhost:8083/alfresco/service/cmis/s/workspace:SpacesStore/i/4d264649-e2fe-4518-a910-d6f3cbc1c8cf/content.pdf" /><id>urn:u...</id></entry></feed>




I attach the view in Alfresco and the view of the portlet.

What I have to do to give the portlet the same look as the webscript in Alfresco???