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

    • Similar Issues:
      Show 5 results 

      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.

      1. server-config.wsdd
        3 kB
        patrick dos santos
      2. stacktrace.txt
        17 kB
        patrick dos santos

        Activity

        Hide
        Jonas Yuan added a comment -

        same issue could be reproduced in 6.1.

        Show
        Jonas Yuan added a comment - same issue could be reproduced in 6.1.
        Hide
        Aniceto P Madrid added a comment -

        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

        Show
        Aniceto P Madrid added a comment - 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
        Hide
        Aniceto P Madrid added a comment -

        This issue is not reproducible and the submitter has not responded within 10 days.  This issue can be closed

        Show
        Aniceto P Madrid added a comment - This issue is not reproducible and the submitter has not responded within 10 days.  This issue can be closed

          People

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

            Dates

            • Created:
              Updated:
              Resolved:
              Days since last comment:
              2 years, 17 weeks, 5 days ago

              Development

                Structure Helper Panel