cancel
Showing results for 
Search instead for 
Did you mean: 

Best practices for exposing repository services via SOAP

charlie_k
Champ in-the-making
Champ in-the-making
Hello,

I am developing an application which uses Alfresco 5.0.a as an information repository.
Based on my requirements I need to expose my own repository service (with some custom logic) via SOAP web service (using CXF for example).
I couldn't find any information on what Alfresco team members are suggesting in this situation (for a SOAP based extension point).
A WebScript would work just fine except for the requirement to use SOAP.

What I am thinking is creating a separate web application just for my SOAP web services and deploy it in the same application server as alfresco repository. It could then connect to Alfresco repository via CMIS or Java API/SDK (if possible), but I think this approach will have some overhead (communication, authentication…) for both application execution and code.
Another option would be to extend /alfresco/cmis (in a sense that you can do the same with REST API and WebScripts).

Am I on the right path here? Or is there another option, that I am not seeing?

4 REPLIES 4

mrogers
Star Contributor
Star Contributor
You can use the cmis soap end-points.    Or drop your own web services into the alfresco war file ( even the old deprecated and removed api) which then  uses the  Java api

sandeepreddy
Champ in-the-making
Champ in-the-making
E:\Zip Files alfresco\Alfresco-aar\pdi-ce-4.3.0-stable\data-integration>Kitchen.
bat /rep:"AAAR_Kettle" /job:"Report all" /dir:Alfresco /user:admin /pass:admin /
level:Basic
DEBUG: Using PENTAHO_JAVA_HOME
DEBUG: _PENTAHO_JAVA_HOME=E:\Pentaho\java
DEBUG: _PENTAHO_JAVA=E:\Pentaho\java\bin\java.exe
INFO  07-04 11:02:06,096 - Kitchen - Logging is at level : Basic logging
INFO  07-04 11:02:06,098 - Kitchen - Start of run.
INFO  07-04 11:02:06,121 - RepositoriesMeta - Reading repositories XML file: C:\
Users\sandyapc\.kettle\repositories.xml
INFO  07-04 11:02:07,828 - Report all - Start of job execution
INFO  07-04 11:02:07,833 - Report all - Starting entry [Get all id]
INFO  07-04 11:02:09,287 - Get all report id - Dispatching started for transform
ation [Get all report id]
INFO  07-04 11:02:09,362 - Ids - Finished reading query, closing connection.
INFO  07-04 11:02:09,365 - Ids - Finished processing (I=11, O=0, R=0, W=11, U=0,
E=0)
INFO  07-04 11:02:09,368 - Copy rows to result - Finished processing (I=0, O=0,
R=11, W=11, U=0, E=0)
INFO  07-04 11:02:09,372 - Report all - Starting entry [Create and upload report
]
INFO  07-04 11:02:10,658 - Report - Starting entry [Create report]
INFO  07-04 11:02:12,033 - Create report - Dispatching started for transformatio
n [Create report]
INFO  07-04 11:02:12,150 - Informations - Finished reading query, closing connec
tion.
INFO  07-04 11:02:12,152 - Informations - Finished processing (I=1, O=0, R=0, W=
1, U=0, E=0)
INFO  07-04 11:02:12,156 - Switch / Case - Finished processing (I=0, O=0, R=1, W
=1, U=0, E=0)
INFO  07-04 11:02:12,334 - LibBase 1.2.4.15526 started.
INFO  07-04 11:02:12,493 - LibLoader 1.2.5.15526 started.
INFO  07-04 11:02:12,496 - LibFonts 1.2.5.15526 started.
INFO  07-04 11:02:12,540 - LibSerializer 1.2.4.15526 started.
INFO  07-04 11:02:12,542 - LibFormula 1.2.5.15526 started.
INFO  07-04 11:02:12,543 - LibFormat 1.2.6.15526 started.
INFO  07-04 11:02:12,646 - LibXML 1.2.4.15526 started.
INFO  07-04 11:02:12,647 - LibRepository 1.2.5.15526 started.
INFO  07-04 11:02:12,648 - LibDocBundle 1.2.5.15526 started.
WARN  07-04 11:02:13,672 - No configuration found. Configuring ehcache from ehca
che-failsafe.xml  found in the classpath: jar:file:/E:/Zip%20Files%20alfresco/Al
fresco-aar/pdi-ce-4.3.0-stable/data-integration/launcher/../libext/reporting/ehc
ache-core-2.0.1.jar!/ehcache-failsafe.xml
INFO  07-04 11:02:14,612 - New update(s) found: 2.4.7 [http://www.terracotta.org
/confluence/display/release/Release+Notes+Ehcache+Core+2.4]. Please check http:/
/ehcache.org for the latest version.
INFO  07-04 11:02:16,043 - Completed font registration.
INFO  07-04 11:02:16,077 - Completed font registration.
INFO  07-04 11:02:16,083 - Completed font registration.
INFO  07-04 11:02:18,901 - Pentaho Reporting Engine Classic 3.9.0-GA.15546 start
ed.
ERROR 07-04 11:02:18,911 - Pentaho Reporting for pdf - Unexpected error
ERROR 07-04 11:02:18,912 - Pentaho Reporting for pdf - org.pentaho.di.core.excep
tion.KettleException:
There was an unexpected error processing report 'audit_login.prpt' to produce fi
le 'audit_login.pdf' with processor: PDF.
Failed to open URL connection

        at org.pentaho.di.trans.steps.pentahoreporting.PentahoReportingOutput.pr
ocessReport(PentahoReportingOutput.java:246)
        at org.pentaho.di.trans.steps.pentahoreporting.PentahoReportingOutput.pr
ocessRow(PentahoReportingOutput.java:115)
        at org.pentaho.di.trans.step.RunThread.run(RunThread.java:50)
        at java.lang.Thread.run(Unknown Source)
Caused by: org.pentaho.reporting.libraries.resourceloader.ResourceLoadingExcepti
on: Failed to open URL connection
        at org.pentaho.reporting.libraries.resourceloader.loader.URLResourceData
.getResourceAsStream(URLResourceData.java:128)
        at org.pentaho.reporting.libraries.resourceloader.loader.AbstractResourc
eData.getResource(AbstractResourceData.java:101)
        at org.pentaho.reporting.libraries.docbundle.bundleloader.ZipResourceBun
dleLoader.loadBundle(ZipResourceBundleLoader.java:81)
        at org.pentaho.reporting.libraries.resourceloader.DefaultResourceManager
Backend.loadResourceBundle(DefaultResourceManagerBackend.java:389)
        at org.pentaho.reporting.libraries.resourceloader.ResourceManager.loadRe
sourceBundle(ResourceManager.java:262)
        at org.pentaho.reporting.libraries.resourceloader.ResourceManager.load(R
esourceManager.java:284)
        at org.pentaho.reporting.libraries.resourceloader.ResourceManager.create
(ResourceManager.java:405)
        at org.pentaho.reporting.libraries.resourceloader.ResourceManager.create
(ResourceManager.java:370)
        at org.pentaho.reporting.libraries.resourceloader.ResourceManager.create
Directly(ResourceManager.java:207)
        at org.pentaho.di.trans.steps.pentahoreporting.PentahoReportingOutput.lo
adMasterReport(PentahoReportingOutput.java:151)
        at org.pentaho.di.trans.steps.pentahoreporting.PentahoReportingOutput.pr
ocessReport(PentahoReportingOutput.java:167)
        … 3 more

INFO  07-04 11:02:18,914 - Pentaho Reporting for pdf - Finished processing (I=0,
O=0, R=1, W=0, U=0, E=1)
ERROR 07-04 11:02:18,915 - Create report - Errors detected!
ERROR 07-04 11:02:18,915 - Create report - Errors detected!
INFO  07-04 11:02:18,915 - Create report - Create report
INFO  07-04 11:02:18,916 - Create report - Create report
INFO  07-04 11:02:19,098 - Report - Finished job entry [Create report] (result=[
false])
INFO  07-04 11:02:19,101 - Report all - Finished job entry [Create and upload re
port] (result=[false])
INFO  07-04 11:02:19,101 - Report all - Finished job entry [Get all id] (result=
[false])
INFO  07-04 11:02:19,102 - Report all - Job execution finished
INFO  07-04 11:02:19,108 - Kitchen - Finished!
ERROR 07-04 11:02:19,109 - Kitchen - Finished with errors
INFO  07-04 11:02:19,109 - Kitchen - Start=2015/04/07 11:02:06.098, Stop=2015/04
/07 11:02:19.109
INFO  07-04 11:02:19,109 - Kitchen - Processing ended after 13 seconds.

E:\Zip Files alfresco\Alfresco-aar\pdi-ce-4.3.0-stable\data-integration>Kitchen.
bat /rep:"AAAR_Kettle" /job:"Report all" /E:\Alfrescoenterprise50 /user:admin /p
ass:admin /level:Basic
DEBUG: Using PENTAHO_JAVA_HOME
DEBUG: _PENTAHO_JAVA_HOME=E:\Pentaho\java
DEBUG: _PENTAHO_JAVA=E:\Pentaho\java\bin\java.exe
INFO  07-04 11:12:41,771 - Kitchen - Logging is at level : Basic logging
INFO  07-04 11:12:41,789 - Kitchen - Start of run.
INFO  07-04 11:12:41,828 - RepositoriesMeta - Reading repositories XML file: C:\
Users\sandyapc\.kettle\repositories.xml
Processing stopped because of an error:
An error occurred reading job [Report all] from the repository

Can't find job : Report all


ERROR: Kitchen can't continue because the job couldn't be loaded.

E:\Zip Files alfresco\Alfresco-aar\pdi-ce-4.3.0-stable\data-integration>



why kitchen.bat can't load the job.., help me please

Kindly reply please

charlie_k
Champ in-the-making
Champ in-the-making
Hi mrogers,
Thank you for your reply.

I am using CMIS end-points where it is possible. I think this part is great.

What I am missing is some guidelines on how to properly plug my own web services into alfresco war and use Java API. Could you please provide some links where I could find this information (at least where I could find that old deprecated soap API, so I can get a better understanding of what I really need to do)?

I am using maven AMP projects (both repository and share) for developing Alfresco extensions. Does that change anything? Can I incorporate new web services into these projects?