If you need a Alfresco Share - Maven pom with support for java code (ex.
BaseEvaluators) ... You need this workaround for Alfresco Enterprise
4.2.0 in your <dependencies>:
<dependencies>
<dependency>
<groupId>${alfresco.groupId}</groupId>
<artifactId>alfresco-share</artifactId>
<version>${alfresco.version}</version>
<scope>provided</scope>
<exclusions>
<exclusion>
<groupId>${alfresco.groupId}</groupId>
<artifactId>alfresco-web-framework-commons</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<!-- work around for error in POM, should be fixed in 4.2.1
https://issues.alfresco.com/jira/browse/MNT-10118 -->
<groupId>${alfresco.groupId}</groupId>
<artifactId>alfresco-web-framework-commons</artifactId>
<version>${alfresco.version}</version>
<scope>system</scope>
<systemPath>${tomcat.home}/webapps/share/WEB-INF/lib/alfresco-web-framework-commons-${alfresco.version}.jar</systemPath>
</dependency>
...
</dependencies>
and now you can start coding!
Friday, January 10, 2014
Tuesday, October 15, 2013
Mule - piggybacking SOAP calls in flows
I needed to handle session Cookie between connection calls and later data calls all in SOAP. I did this by using the same global HTTP connector with cookie enabled and using it on all the endpoints.
The connection call was in the first flow which then called the next ... that solves the Session handling without any coding, but i got mimetype/transformer exception on the 'return' / response path.
Errors like:
Could not find a transformer to transform "SimpleDataType{type=org.apache.cxf.staxutils.DepthXMLStreamReader, mimeType='text/xml'}" to "SimpleDataType{type=java.io.InputStream, mimeType='*/*'}".
The easy solution turned out to be saving the first SOAP response, calling the data flows with their own SOAP, and after the flow call, restoring the SOAP response.
...
<set-variable variableName="connectionUpPayload" value="#[message.payload]" doc:name="save response"/>
<flow-ref name="GetAllProperties" doc:name="GetAllProperties"/>
<set-payload value="#[flowVars['connectionUpPayload']]" doc:name="Set Payload"/>
...
The connection call was in the first flow which then called the next ... that solves the Session handling without any coding, but i got mimetype/transformer exception on the 'return' / response path.
Errors like:
Could not find a transformer to transform "SimpleDataType{type=org.apache.cxf.staxutils.DepthXMLStreamReader, mimeType='text/xml'}" to "SimpleDataType{type=java.io.InputStream, mimeType='*/*'}".
The easy solution turned out to be saving the first SOAP response, calling the data flows with their own SOAP, and after the flow call, restoring the SOAP response.
...
<set-variable variableName="connectionUpPayload" value="#[message.payload]" doc:name="save response"/>
<flow-ref name="GetAllProperties" doc:name="GetAllProperties"/>
<set-payload value="#[flowVars['connectionUpPayload']]" doc:name="Set Payload"/>
...
Wednesday, October 9, 2013
Mule - Sharepoint Connector
I have been working a little with Mule ESB - Enterprise Edition. I needed to get a Sharepoint (duh - Imperial Star Battlecruisers), so I was happy to see the Mule Sharepoint Connector. The Connector implementents NTLMv2, so it can talk to newer Sharepoint versions. After getting past the first small gotchas (remember slash af URL, URL without the '_vti_bin' stuff, ListName is the list name & view name is the GUID) - the list was received as an SOAP Java object - GetListItemsResult.
Now that was perfect except the M$ SOAP service limits the result to 100 rows, if you do not specify a rowlimit, and i could not get that to work on the Sharepoint Connector component, so i 'just' made a java component from trial and error reverse engineering the component using the Java classes:
import org.mule.modules.sharepoint.SharepointConnector;
import org.mule.modules.sharepoint.microsoft.lists.GetListItems;
import org.mule.modules.sharepoint.microsoft.lists.GetListItemsResponse.GetListItemsResult;
....
SharepointConnector sc = new org.mule.modules.sharepoint.SharepointConnector();
sc.connect("DOMAIN\\USERNAME", "PASSWORD", "URL_W_SLASH");
org.mule.modules.sharepoint.microsoft.lists.GetListItems request =
new org.mule.modules.sharepoint.microsoft.lists.GetListItems();
request.setListName("LISTNAME");
request.setRowLimit("" + 0);
request.setViewName("VIEW_GUID");
GetListItemsResult result = sc.listGetListItems(request);
Replace UPPERCASE names with real values. You can use the GetListAndView to get the GUIDs
Other ways of getting this to work is http://dmdaa.wordpress.com/2012/10/10/ntlm-v2-support-for-java-web-service-clients-wsimport-or-axis2-stubs-for-sharepoint-server/
However I did not succeed with that approach.
Now that was perfect except the M$ SOAP service limits the result to 100 rows, if you do not specify a rowlimit, and i could not get that to work on the Sharepoint Connector component, so i 'just' made a java component from trial and error reverse engineering the component using the Java classes:
import org.mule.modules.sharepoint.SharepointConnector;
import org.mule.modules.sharepoint.microsoft.lists.GetListItems;
import org.mule.modules.sharepoint.microsoft.lists.GetListItemsResponse.GetListItemsResult;
....
SharepointConnector sc = new org.mule.modules.sharepoint.SharepointConnector();
sc.connect("DOMAIN\\USERNAME", "PASSWORD", "URL_W_SLASH");
org.mule.modules.sharepoint.microsoft.lists.GetListItems request =
new org.mule.modules.sharepoint.microsoft.lists.GetListItems();
request.setListName("LISTNAME");
request.setRowLimit("" + 0);
request.setViewName("VIEW_GUID");
GetListItemsResult result = sc.listGetListItems(request);
Replace UPPERCASE names with real values. You can use the GetListAndView to get the GUIDs
Other ways of getting this to work is http://dmdaa.wordpress.com/2012/10/10/ntlm-v2-support-for-java-web-service-clients-wsimport-or-axis2-stubs-for-sharepoint-server/
However I did not succeed with that approach.
Thursday, September 12, 2013
Upgraded to Alfresco 4.2.d and lost your application menu bar ...
It might be because of an share-config override like:
<config evaluator="string-compare" condition="WebFramework" replace="true">
Try removing replace="true" and if you need to replace, your should look up surf.xml to add all the new definitions.
<config evaluator="string-compare" condition="WebFramework" replace="true">
Try removing replace="true" and if you need to replace, your should look up surf.xml to add all the new definitions.
Wednesday, September 4, 2013
Preview, index, thumbnail SVG in Alfresco
In modern browsers SVG is directly supported, so previewing is a smaller task. Ne add-on for Alfresco with enhanced SVG support for previewing, thumbnailing and indexing (search)
See more:
https://addons.alfresco.com/addons/enhanced-svg-support
http://code.google.com/p/alfresco-svg/
See more:
https://addons.alfresco.com/addons/enhanced-svg-support
http://code.google.com/p/alfresco-svg/
Wednesday, August 28, 2013
Alfresco Presence in Share
I made a new Alfresco Add-on which has to modes of presence:
- MS Lync via local MS client (using activeX)
- Alfreco local presence for presence (Share in browser)
Alfresco add-on page: http://addons.alfresco.com/addons/presence
Code page: http://code.google.com/p/alfresco-presence/
- MS Lync via local MS client (using activeX)
- Alfreco local presence for presence (Share in browser)
Alfresco add-on page: http://addons.alfresco.com/addons/presence
Code page: http://code.google.com/p/alfresco-presence/
Thursday, June 6, 2013
Removing sharepoint / VTI lock - aspect cm:lockable
Install JavascriptConsole or run this as a script (might need a modification adding a search statement)
Use script (replacing <your username> with the real one) on document-node by invoking the doclib action for javascriptconsole:
//remove cm:lockable
document.properties["cm:lockOwner"]="<your username>";
document.removeAspect("cm:lockable");
//residual values
delete document.properties["webdav:opaquelocktoken"];
delete document.properties["webdav:lockScope"];
delete document.properties["webdav:lockDepth"];
document.save();
Use script (replacing <your username> with the real one) on document-node by invoking the doclib action for javascriptconsole:
//remove cm:lockable
document.properties["cm:lockOwner"]="<your username>";
document.removeAspect("cm:lockable");
//residual values
delete document.properties["webdav:opaquelocktoken"];
delete document.properties["webdav:lockScope"];
delete document.properties["webdav:lockDepth"];
document.save();
Subscribe to:
Posts (Atom)

