Description

I have developped a portlet with service builder.
In this portlet i have some remote services called via SOAP through AXIS by another portlets. This works fine.

But now this portlet has to call a remote service exposed via SOAP in an other portlet. To do this i have included in my libs the client generated by the ant target "build-client" from the portlet that contains the remote classes. And i have declared the following jars : axis.jar, jaxrpc.jar, commons-discovery.jar, wsdl4j.jar, commons-logging.jar in the section "portal-dependency-jars" of "liferay-plugin-package.properties" in my portlet.

When i build the project, all works fine but when the portlet is loaded by tomcat, the deployement crashes for the following reason :
org.apache.axis.deployment.wsdd.WSDDException: java.lang.ClassCastException: org.apache.axis.encoding.ser.BeanSerializerFactory cannot be cast to org.apache.axis.encoding.SerializerFactory

If i remove the axis.jar this error disappear but i can't call the remote service via the client because the class org.apache.axis.client.Service is not found (ClassNotFoundException)

If i remove the following line in my server-config.wsdd the first ClassCastException disappear but my remote services would not work :
<typeMapping xmlns:ns="http://dto.opmarketing.com" qname="ns:OpSoap" type="java:com.opmarketing.dto.OpSoap" serializer="org.apache.axis.encoding.ser.BeanSerializerFactory" deserializer="org.apache.axis.encoding.ser.BeanSerializerFactory" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"></typeMapping>

In conclusion, actually a portlet can not expose remote services with a typeMapping serializer org.apache.axis.encoding.ser.BeanSerializerFactory and call remote services of an other portlet via a client which necesite to include axis.jar and causes the ClassCatException.

Besides that, the second scenario is the same as the first one, according to description: portletA exposes serviceA, called remotely by portletB, and then portletB exposes serviceB called remotely by portletC o portletA. There is no reason why B->A works and A,C->B don't. Nothing is said about in what servers are deployed each portlet. I'm sure a dependency jar is missing.
If there are no security reasons and both portlets are deployed on the same server, I prefer the local service.
Thanks

Aniceto P Madrid
added a comment - 21/Mar/13 10:44 AM Patrick
Can you check if this still happens on 6.2.0m4? Here you can download bundles and sdk http://sourceforge.net/projects/lportal/files/Liferay%20Portal/6.2.0%20M4/
Besides that, the second scenario is the same as the first one, according to description: portletA exposes serviceA, called remotely by portletB, and then portletB exposes serviceB called remotely by portletC o portletA. There is no reason why B->A works and A,C->B don't. Nothing is said about in what servers are deployed each portlet. I'm sure a dependency jar is missing.
If there are no security reasons and both portlets are deployed on the same server, I prefer the local service.
Thanks