Uploaded image for project: 'PUBLIC - Liferay Portal Community Edition'
  1. PUBLIC - Liferay Portal Community Edition
  2. LPS-24261

a portlet exposing remote services via SOAP and use a client webservice dont start

    Details

      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.

        Attachments

          Activity

            People

            • Votes:
              2 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Days since last comment:
                4 years, 16 weeks, 5 days ago