cancel
Showing results for 
Search instead for 
Did you mean: 

Web Service and Axis-1.6.2

acarpine
Champ in-the-making
Champ in-the-making
Dear Community,
i'm using Axis2 (1.6.2) to develop a web service that acts as a wrapper toward the Alfresco Web Service.

In my env I'm using Axis 1.6.2 with rampart and MTOM modules. My problem is that to use the Alfresco WS I need to add some jars to my classpath, for ex:
activation.jar
axis-1.4.jar
bcprov-jdk15-137.jar
commons-discovery-0.2.jar
commons-logging-1.1.jar
jaxrpc.jar
mail.jar
opensaml-1.0.1.jar
saaj.jar
wsdl4j-1.5.1.jar
wss4j.jar
xalan.jar
xercesImpl-2.8.0.jar
xmlsec-1.4.1.jar
alfresco-web-service-client.jar

and I believe there is a conflict between several libraries. I'd like to use Axis-1.6.2 because embeds several improvements respect to previous version but I don't know how to do it.

Should I regenerate a new client from the Alfresco WSDL with wsdl2java (1.6.2) and use that client instead of that provided out-of-the-box by Alfresco?

thanks,
–ac
6 REPLIES 6

abarisone
Star Contributor
Star Contributor
Hi,
as WS framework I'm using Apache CXF, which relies on Spring and makes it very compatible with Alfresco.
They can work well together on version 3.3.g and 4.0.x.
You can find it here http://cxf.apache.org/

Regards,
Andrea

acarpine
Champ in-the-making
Champ in-the-making
Many thanks Andrea for your help.
Have you tried to use Axis2 before Apache CXF? In case…have you experienced a similar problem?

thanks

abarisone
Star Contributor
Star Contributor
No,
I didn't use Axis2 at all, but having a Maven based building environment and building an AMP file with all my customizations, I had to play with dependencies (libraries)inclusion/exclusions since, for example, Spring jars are already shipped within alfresco.war.
Moreover, every time I upgrade the version of a component I have to check if all its dependencies may cause a conflict, and this can be done using the Eclipse built-in pom editor.
Most of conflicts are resolved by Eclipse, which omits troubling libraries, but I a few cases I had to figure out the problem by myself.

Regards,
ndrea

acarpine
Champ in-the-making
Champ in-the-making
Unfortunately in my case I believe I have to use Axis2 so I generated the client from WSDLs by myself (with Axis2).
For example generating the client from http://[host]:[port]/alfresco/api/AccessControlService?WSDL I was able to generate 2 files:
- AccessControlFaultException.java
- AccessControlServiceStub.java
for the package org.alfresco.webservice.accesscontrol but looking in the out-of-the-box ws client the package org.alfresco.webservice.accesscontrol has more the 10 classes…

what's wrong?

acarpine
Champ in-the-making
Champ in-the-making
Looking into the generated java classes I believe the described behavior is just a different way of packaging things. Anyway because Alfresco defines several WSDLs running the wsdl2java tool for each WSDL generate the same util class multiple times (and no util package as for the Alfresco out-of-the-box ws client).

Is there any way to avoid this issue and to avoid to duplicate classes during classes generation. I know this is maybe a more wsdl2java/web service related problem, but would be interesting to know if someone already try this solution.

many tks
–ac

lpascual
Champ in-the-making
Champ in-the-making
I have the same problem. Did you get finally solve it? How did you do?