WSDD builder for remote Services in Liferay 7.1

thumbnail
Hamidul Islam, modified 6 Years ago. Regular Member Posts: 111 Join Date: 5/22/08 Recent Posts
Hi All,
I have dummy entity (the name of the entity is Foo) in the service.xml and also remote-service="true". Below is the content of FooServiceImpl.java
public class FooServiceImpl extends FooServiceBaseImpl {

    /*
     * NOTE FOR DEVELOPERS:
     *
&nbsp;&nbsp; &nbsp; * Never reference this class directly. Always use <code>foo.service.FooServiceUtil</code> to access the foo remote service.
&nbsp;&nbsp; &nbsp; */
&nbsp;&nbsp; &nbsp;
&nbsp;&nbsp; &nbsp;public String getFooMessage(String msg) {
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;return "Hello "+msg;
&nbsp;&nbsp; &nbsp;}
}
After building the service I am able to locate my JSON webservice using http://localhost:8080/api/jsonws which is working as expected. Now I want to generate WSDD for the SOAP based web service. I have configured the wsdd builder maven plugin in my pom.xml like below
<plugin>
&nbsp;&nbsp; &nbsp;<groupid>com.liferay</groupid>
&nbsp;&nbsp; &nbsp;<artifactid>com.liferay.portal.tools.wsdd.builder</artifactid>
&nbsp;&nbsp; &nbsp;<version>1.0.10</version>
&nbsp;&nbsp; &nbsp;<configuration>
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;<inputfilename>service.xml</inputfilename>
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;<outputdirname>src/main/java</outputdirname>
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;<serverconfigfilename>src/main/resources/server-config.wsdd</serverconfigfilename>
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;<classpath>target/classes</classpath>
&nbsp;&nbsp; &nbsp;</configuration>
</plugin>
To generate the WSDD and other files I have executed  
mvn wsdd-builder:build
// Its successful

The above command generates server-config.wsdd and other necessary files under foo-service module. Please refer the below screenshot


After deployment of both the API and service module I should be able to access my SOAP web service hitting the bellow URL

localhost:8080/o/foo-service/api/axis

But it doesn’t return anything. Also there is no error in the deployment. As per documentation as in

https://portal.liferay.dev/docs/7-0/tutorials/-/knowledge_base/t/creating-remote-services

I should get separate jar for wsdd and it should look like *-service-wsdd-[version].jar. But in my case it’s not generating any separate jar for WSDD. Can anyone please help me? My environment is

Liferay DXP 7.1
Tomcat
Maven

Thanks & Regards
​​​​​​​
Hamidul Islam
Emanuele Righetto, modified 6 Years ago. New Member Posts: 11 Join Date: 10/5/10 Recent Posts
Same issue for me, no solution found around...
The buildWSDD task complete successfully, but no -wsdd-jar is generated, so i don't know how to deploy the service.
Any try to call http://localhost:8080/o/pim-service/api/axis/Pim_PimEntryService?wsdl results in a redirect to the home page.Same environment of above.Thanks
Dan Inglis, modified 6 Years ago. New Member Posts: 2 Join Date: 1/13/14 Recent Posts
Had the same issue.  *-service-wsdd-[version].ja will never be generated.  If you're using Tomcat these steps may help, these are adapted from a Liferay support response.
  1. Deploy the *-api and *-service jar files to /lib/ext in the Tomcat directory
  2. Navigate to the built server-config.wsdd and copy the <service> tag. Paste it into tomcat/webapps/ROOT/WEB-INF/server-config.wsdd between any two other services. Make sure the name exactly matches as [service-namespace]_[entity]Service.
  3. Restart the server, type in the URL http://localhost:8080/api/axis and search for the created remote service, which should now be present in the list.
Emanuele Righetto, modified 6 Years ago. New Member Posts: 11 Join Date: 10/5/10 Recent Posts
Hi!
Thanks for your reply. 
I don't think this sound like a good "osgi" solution, because any update of the service will end up in a restart of the portal, but i will give it a change.
Meanwhile i've managed to generate the -wsdd.jar file, using the configuration within the settings.gradle (before i was using settings inside the build.gradle file inside the -service project).I've installed it using gogo shell: install /path/to/jar, and the module seems to be loaded, but i'm not able to see it in the list of the soap services.
Dan Inglis, modified 6 Years ago. New Member Posts: 2 Join Date: 1/13/14 Recent Posts
Did you have any luck?