cancel
Showing results for 
Search instead for 
Did you mean: 

Apache CXf 2.2.6 and Alfresco 3.3g compatibility

nikes
Champ on-the-rise
Champ on-the-rise
Hi All,

I was using Alfresco 3.2r2 community and Apache CXF 2.2.6 generated stub classes for CMIS application.

I am connecting to Alfresco to 3.3g, but current CMIS application throws exception for marshaling/unmarshaling elements.


org.apache.cxf.interceptor.Fault: Unmarshalling Error: unexpected element (uri:"http://docs.oasis-open.org/ns/cmis/core/200908/", local:"supportedPermissions"). Expected elements are <{http://docs.oasis-open.org/ns/cmis/core/200908/}propagation>,<{http://docs.oasis-open.org/ns/cmis/core/200908/}mapping>,<{http://docs.oasis-open.org/ns/cmis/core/200908/}permissions>

Also When I generate stub classes using Apache CXF wsdl2java for Alfresco 3.3g CMIS wsdl, method definition
asks for JAXBElement<Boolean> instead of Boolean data type.

Do I have to generate stub classes every time we migrate from one version of alfresco to another?

Please guide how can I generate stub classes without JAXBElement wrapper.

Thanks for any help.
2 REPLIES 2

openpj
Elite Collaborator
Elite Collaborator
Do I have to generate stub classes every time we migrate from one version of alfresco to another?
Yes, Alfresco could have different CMIS server implementation for each version. You have to consider that CMIS is a new standard and Alfresco contribute to provide an updated server implementation for each new version.

Anyway whenever you have to use a new version of a product that exposes Web Services interface, you have to check if this interface is changed or not. Because usually you need to re-generate the client stub to perform operations using a new version of the product.

In this specific case you can  see that it is changed the qualified name of an element in the signature.

Hope this helps.

nikes
Champ on-the-rise
Champ on-the-rise
That means if I generate stubs for Alfresco CMIS, write my application code, and tomorrow if I try to
connect to SharePoint or Documentum, it will fail?

To avoid JAXBElement<Boolen> to be generated by CXF what can we modify? WSDL? XSD? or
CXF version?

Thanks for any help.
Nikesh