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

Update server-config.wsdd in tunnnel-web to expose "document" style web services, will give Liferay JAX-WS support

    Details

    • Type: Feature Request
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 5.2.0
    • Fix Version/s: None
    • Component/s: Core Infrastructure
    • Labels:
      None
    • Environment:
      All

      Description

      The current web services exposed by Liferay are "rpc/encoded" style. This seems old fashioned, and new web services clients do not support this style.
      For example, I think the JAX-WS specification only support document style web services.

      If I try to use Apache CXF 2.1.3 to generate some test web service client for a Liferay web service, I get the following output :
      "
      apache-cxf-2.1.3/bin$ ./wsdl2java -impl -client -ant http://localhost:8080/tunnel-web/axis/Portal_CompanyService?wsdl

      WSDLToJava Error: Rpc/encoded wsdls are not supported in JAXWS 2.0
      "

      Axis 1.4 is used to implement / serve the web services in Liferay. The good news is that Axis 1.4 supports "document" style web services.

      The testing I have done, seems to suggest that it is just a matter of some simple changes in the server-config.wsdd file. Then the Liferay web services should be consumable by new java clients, and also web services from other languages.

      By changing from :
      "
      <service name="Portal_CompanyService" provider="java:RPC" style="rpc" use="encoded">
      "
      to
      "
      <service name="Portal_CompanyService" style="document">
      <beanMapping xmlns:rtns="urn:http.service.portal.liferay.com"
      qname="rtns:ClassNameSoap"
      type="java:com.liferay.portal.model.ClassNameSoap"
      encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
      "

      the "Portal_CompanyService" web service is exposed as "document" style, and not "rpc" style.

      When I now run
      "
      apache-cxf-2.1.3/bin$ ./wsdl2java -impl -client -ant http://localhost:8080/tunnel-web/axis/Portal_CompanyService?wsdl
      "
      I get an error :
      "
      WSDLToJava Error: java.lang.IllegalArgumentException: An operation with name [

      {urn:http.service.portal.liferay.com}

      updateCompany] already exists in this service
      "

      I will look more into that error. But I am raising this bug, since I have tested it on my own web services, and then it was working fine to change from rpc to document, and new web service clients could connect and consume.

      I get a test client implemented in JAX-WS 2.0, which is able to connect and retrieve data from Liferay.

      This case is related to LEP-2006. But I am not asking you to upgrade Axis on Liferay, I am just asking that you change the config files.

      You can find more info at : http://ws.apache.org/axis/java/user-guide.html#ServiceStylesRPCDocumentWrappedAndMessage

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              support-lep@liferay.com SE Support
              Reporter:
              alf.hogemark Alf H√łgemark (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Packages

                  Version Package