Ask Questions and Find Answers
Important:
Ask is now read-only. You can review any existing questions and answers, but not add anything new.
But - don't panic! While ask is no more, we've replaced it with discuss - the new Liferay Discussion Forum! Read more here here or just visit the site here:
discuss.liferay.com
RE: Create JAXWS/SOAP/CXF WS in latest Liferay/Wildfly bundle
I have a WSDL from a SOAP/Axis2 WS that runs in JBOSS. All I want to do is to take that WSDL and generate a JAXWS/SOAP/CXF WS in the Latest Liferay 7/Wildly bundle.
That seems like it should be doable, reasonably straight forward, and very common, but I've been working this issue for a month and I can't find a documented solution that will do the job. There are many articles that deal with various parts of the issue, but none so far that work, start to finish, and produce the desired results.Notes:
That seems like it should be doable, reasonably straight forward, and very common, but I've been working this issue for a month and I can't find a documented solution that will do the job. There are many articles that deal with various parts of the issue, but none so far that work, start to finish, and produce the desired results.Notes:
- I've made many attempts to utilize the Web Services Wizard in the Liferay Dev Studio and had some success, but no final solution
- One big concern is that the CXF runtime exists within Liferay (OSGI), and Wildfly (Jboss Modules), and can also be added to the WEB-INF/lib. So who’s in charge?
- Eclipse Web Services Wizard (Dynamic Web Project, Web Service, Client)
- Antonio Musarra's Blog (Italiano) contains info on a CXF/OSGI solution
- Apache CXF - https://cxf.apache.org/docs/developing-a-consumer.html
- Angelo’s Blog - https://angelozerr.wordpress.com/2011/08/23/jaxwscxf_step1/
- Surekha Tech - https://www.surekhatech.com/blog/jax-ws-in-liferay-dxp-7
We usually use wsdl2java. Basically an extra module which generates the java sources from the wsdl.
https://github.com/nilsmagnus/wsdl2java
Here's a build.gradle that should help.
buildscript {
repositories {
mavenLocal()
mavenCentral()
}
dependencies {
classpath 'no.nils:wsdl2java:0.10'
}
}
apply plugin: 'no.nils.wsdl2java'
apply plugin: 'maven'
wsdl2javaExt {
cxfVersion = "3.1.9"
}
wsdl2java {
wsdlsToGenerate = [
['-client',
'-autoNameResolution',
'-wsdlLocation',
'wsdl/THEWSDFILE.wsdl',
"$projectDir/src/main/resources/wsdl/THEWSDFILE.wsdl"]
]
wsdlDir = file("$projectDir/src/main/resources/wsdl")
}
dependencies {
compileOnly group: "biz.aQute.bnd", name: "biz.aQute.bndlib", version: "3.1.0"
compileOnly group: "com.liferay.portal", name: "com.liferay.portal.kernel", version: "4.0.0"
compileOnly group: "com.liferay", name: "com.liferay.portal.configuration.metatype", version: "2.0.0"
compileOnly group: "org.osgi", name: "osgi.cmpn", version: "6.0.0"
}
bnd.bnd: You need to export your package. Then you can simply access the generated library in the module that wants to access the webservice.
Export-Package: com.something.*
Import-Package: org.apache.cxf;version="3.0.0",org.apache.cxf.binding.soap;version="3.0.0",org.apache.cxf.transport.http;version="3.0.0",*
-metatype: *
https://github.com/nilsmagnus/wsdl2java
Here's a build.gradle that should help.
buildscript {
repositories {
mavenLocal()
mavenCentral()
}
dependencies {
classpath 'no.nils:wsdl2java:0.10'
}
}
apply plugin: 'no.nils.wsdl2java'
apply plugin: 'maven'
wsdl2javaExt {
cxfVersion = "3.1.9"
}
wsdl2java {
wsdlsToGenerate = [
['-client',
'-autoNameResolution',
'-wsdlLocation',
'wsdl/THEWSDFILE.wsdl',
"$projectDir/src/main/resources/wsdl/THEWSDFILE.wsdl"]
]
wsdlDir = file("$projectDir/src/main/resources/wsdl")
}
dependencies {
compileOnly group: "biz.aQute.bnd", name: "biz.aQute.bndlib", version: "3.1.0"
compileOnly group: "com.liferay.portal", name: "com.liferay.portal.kernel", version: "4.0.0"
compileOnly group: "com.liferay", name: "com.liferay.portal.configuration.metatype", version: "2.0.0"
compileOnly group: "org.osgi", name: "osgi.cmpn", version: "6.0.0"
}
bnd.bnd: You need to export your package. Then you can simply access the generated library in the module that wants to access the webservice.
Export-Package: com.something.*
Import-Package: org.apache.cxf;version="3.0.0",org.apache.cxf.binding.soap;version="3.0.0",org.apache.cxf.transport.http;version="3.0.0",*
-metatype: *
Thanks for the reply. I use Maven, not Gradle in the Liferay Dev Studio. Is the following article a good place to start for turning your build.gradle file into a project in the LDS?
https://portal.liferay.dev/docs/7-0/tutorials/-/knowledge_base/t/using-gradle-in-liferay-ide
Regards,Don Hemminger
https://portal.liferay.dev/docs/7-0/tutorials/-/knowledge_base/t/using-gradle-in-liferay-ide
Regards,Don Hemminger
BTW, I have used wsdl2java in a number of forms, including from a CXF 3.3.3 download
I used the CXF 3.3.3 wsdl2java with the attached .wsdl and .bat files. It runs successfully and creates the correct src and build.xml. I run the build.xml with ant, and it builds the .jar file. But when I attempt to deploy it, it doesn't work. It doesn't even show up in the Control Panel.
Attachments:
I was assuming that you know how to develop in Liferay in general. To add a module or library to Liferay, you need an OSGI bundle. In general that's just a normal jar file with some extra information.
Most important are the imports and the exports. It tells the osgi runtime, what your jar file needs and what it provides. So, you need to add at least an Export directive to tell the osgi runtime that your jar file exports the generated packages.
The build.gradle and bnd.bnd I showed above does that for you. You can do the same with maven, I actually have no idea if you can do it with a bat file (well, you could even write the files by hand, so it would work, but it is probably rather painful)
When you create a Liferay workspace it creates a gradle configuration for you (you can also use maven). The Liferay IDE has a menu to create a workspace and everything. So, I guess, you should start here:
https://portal.liferay.dev/docs/7-0/tutorials/-/knowledge_base/t/liferay-ide
Most important are the imports and the exports. It tells the osgi runtime, what your jar file needs and what it provides. So, you need to add at least an Export directive to tell the osgi runtime that your jar file exports the generated packages.
The build.gradle and bnd.bnd I showed above does that for you. You can do the same with maven, I actually have no idea if you can do it with a bat file (well, you could even write the files by hand, so it would work, but it is probably rather painful)
When you create a Liferay workspace it creates a gradle configuration for you (you can also use maven). The Liferay IDE has a menu to create a workspace and everything. So, I guess, you should start here:
https://portal.liferay.dev/docs/7-0/tutorials/-/knowledge_base/t/liferay-ide
Please don't dismiss me. I have an extensive understanding of the Liferay IDE and use it every day. I've already ported about 25 portlets from JBoss to Liferay/Wildfly. Web Services are a different matter. There are a lot of examples out there, but none of them do what I need from start to finish. They tend to have a lot of Class Loading issues. Porting already working JAXWS/SOAP web services seems like a pretty common requirement for anyone porting an Enterprise Web Application to Liferay Portal. As you can see from my links, I've created and tried a variety of Liferay Developer Studio projects, but in the end, the web services don't deploy correctly.
The reason I mentioned the .bat file was to demonstrate that I had gone through the entire wsdl2java process. It does pretty much the same thing as your build.gradle (e.g. runs wsdl2java with specific arguments like -autoNameResolution). I package it inside of LDS, DynamicWebProject.
If you'd like to help me, please provide a Complete gradle project and a description of the steps involved in building, deploying, and executingthe web service in Liferay 7.
Regards,Don Hemminger
The reason I mentioned the .bat file was to demonstrate that I had gone through the entire wsdl2java process. It does pretty much the same thing as your build.gradle (e.g. runs wsdl2java with specific arguments like -autoNameResolution). I package it inside of LDS, DynamicWebProject.
If you'd like to help me, please provide a Complete gradle project and a description of the steps involved in building, deploying, and executingthe web service in Liferay 7.
Regards,Don Hemminger
It is a bit hard to tell what somebody knows and I got mixed impressions from your first and your later posts.
Anyway:
The build.gradle and the bnd.bnd file snippets contain the important parts. I will reply to the other posts too, but here's my recommendation:
1) You probably already have a Liferay workspace, if not, create one. I believe, the snipped depends on a workspace to be able to resolve all dependencies.
2) Create an Activator sample project
3) Rename it, delete the sourcecode and clean the avtivator line(s) from the bnd.bnd file.
4) Add the build.gradle snippet I posted above to the build.gradle (you probably need to fix/replace the dependencies part depending on your Liferay version.
I hope, it builds then.
Anyway:
The build.gradle and the bnd.bnd file snippets contain the important parts. I will reply to the other posts too, but here's my recommendation:
1) You probably already have a Liferay workspace, if not, create one. I believe, the snipped depends on a workspace to be able to resolve all dependencies.
2) Create an Activator sample project
3) Rename it, delete the sourcecode and clean the avtivator line(s) from the bnd.bnd file.
4) Add the build.gradle snippet I posted above to the build.gradle (you probably need to fix/replace the dependencies part depending on your Liferay version.
I hope, it builds then.
ChristophI'm working with the build.gradle and bnd,bnd files that you sent. I'm getting the followinf errors:> Task :wsdl2java FAILEDFAILURE: Build failed with an exception.* What went wrong:Execution failed for task ':wsdl2java'.> Could not resolve all files for configuration ':wsdl2java'. > Cannot resolve external dependency org.apache.cxf:cxf-tools-wsdlto-databinding-jaxb:3.1.9 because no repositories are defined. Required by: project : > Cannot resolve external dependency org.apache.cxf:cxf-tools-wsdlto-frontend-jaxws:3.1.9 because no repositories are defined. Required by:I took a shot at resolving the issues but with no luck so far. I've attached my modified versions of your files.
Regards,
Don Hemminger
Regards,
Don Hemminger
Attachments:
The formatting was not great. Here's the error message and the bnd.bnd file.
> Task :wsdl2java FAILEDFAILURE: Build failed with an exception.* What went wrong:
Execution failed for task ':wsdl2java'.
> Could not resolve all files for configuration ':wsdl2java'.
> Cannot resolve external dependency org.apache.cxf:cxf-tools-wsdlto-databinding-jaxb:3.1.9 because no repositories are defined.
Required by:
project :
> Cannot resolve external dependency org.apache.cxf:cxf-tools-wsdlto-frontend-jaxws:3.1.9 because no repositories are defined.
Required by:
project :
Don
> Task :wsdl2java FAILEDFAILURE: Build failed with an exception.* What went wrong:
Execution failed for task ':wsdl2java'.
> Could not resolve all files for configuration ':wsdl2java'.
> Cannot resolve external dependency org.apache.cxf:cxf-tools-wsdlto-databinding-jaxb:3.1.9 because no repositories are defined.
Required by:
project :
> Cannot resolve external dependency org.apache.cxf:cxf-tools-wsdlto-frontend-jaxws:3.1.9 because no repositories are defined.
Required by:
project :
Don
Attachments:
The bnd.bnd file is rather irrelevant for the build.
The build.gradle is relevant, itcontains the dependencies and defines the build process. The bnd.bnd file is picked up later on and overrides the bnd file generated by the build. Problems in that file hit you at deployment or maybe later on. (Note: That's not a 100% true, since Liferay picks up things like Bundle-Name but as a rule of thumb, it's correct)
The error tells you that the gradle build doesn't know where to download the dependencies. They are usually defined in the workspace. If you don't have a workspace, you need to add your own list of repositories:
e.g.:
hth
The build.gradle is relevant, itcontains the dependencies and defines the build process. The bnd.bnd file is picked up later on and overrides the bnd file generated by the build. Problems in that file hit you at deployment or maybe later on. (Note: That's not a 100% true, since Liferay picks up things like Bundle-Name but as a rule of thumb, it's correct)
The error tells you that the gradle build doesn't know where to download the dependencies. They are usually defined in the workspace. If you don't have a workspace, you need to add your own list of repositories:
e.g.:
repositories {
mavenLocal()
mavenCentral()
}
hth
As you can see in my updated version of build.gradle, I've attempted to resolve the error condition by adding the following lines in to resolve the dependencies:
maven { url 'https://plugins.gradle.org/m2' }
maven { url 'https://repo1.maven.org/maven2' }
maven { url 'https://mvnrepository.com/artifact' }
compileOnly group: 'org.apache.cxf', name: 'cxf-tools-wsdlto-databinding-jaxb', version: '3.1.9'
compileOnly group: 'org.apache.cxf', name: 'cxf-tools-wsdlto-frontend-jaxws', version: '3.1.9'
It didn't resolve the issue. I still get the same errors when I execute a build or jar command in Gradle Tasks.
Any Suggestions? I'm using 'liferay-ce-portal-wildfly-7.1.3-ga4' and LiferayProjectSDKwithDevStudioCommunityEdition_3.6.0. Does the build.gradle work for you? If so, what versions are you using?
maven { url 'https://plugins.gradle.org/m2' }
maven { url 'https://repo1.maven.org/maven2' }
maven { url 'https://mvnrepository.com/artifact' }
compileOnly group: 'org.apache.cxf', name: 'cxf-tools-wsdlto-databinding-jaxb', version: '3.1.9'
compileOnly group: 'org.apache.cxf', name: 'cxf-tools-wsdlto-frontend-jaxws', version: '3.1.9'
It didn't resolve the issue. I still get the same errors when I execute a build or jar command in Gradle Tasks.
Any Suggestions? I'm using 'liferay-ce-portal-wildfly-7.1.3-ga4' and LiferayProjectSDKwithDevStudioCommunityEdition_3.6.0. Does the build.gradle work for you? If so, what versions are you using?
Attachments:
Ah, I was unclear.
NOT:
buildscript {
repositories {
...
}
}
BUT:
buildscript {
repositories {
...
}
}
}
--------
Could you please try that?
NOT:
buildscript {
repositories {
...
}
}
BUT:
buildscript {
repositories {
...
}
}
repositories { |
mavenLocal() |
mavenCentral() |
--------
Could you please try that?
Oops. I re-Posted before I read your earlier Post.I understand that it’s hard to determine the skill level of individuals on the forum. I just wanted you to know that I’m not a nube and I’ve put a lot of effort into solving this problem.Obviously I am not very familiar with gradle. Liferay documentation says that you can do everything in either Maven or Gradle, and the previous JBoss project used Maven so I stuck with that. I’m beginning to believe that there are some things that Gradle does better in the IDE (e.g. wsdl2java plugin), so my focus now is to create a JAXWS/SOAP/CXF Server and Client, from a WSDL (any WSDL), using gradle.Any suggestions and details are greatly appreciated.
Is this what you are suggesting?buildscript {
repositories {
maven { url 'https://plugins.gradle.org/m2' }
maven { url 'https://repo1.maven.org/maven2' }
maven { url 'https://mvnrepository.com/artifact' }
}
dependencies {
classpath 'no.nils:wsdl2java:0.10'
}
}
repositories {
mavenLocal()
mavenCentral()
}
....
I got a different error (that's progress).> Task :compileTestJava FAILED
E:\Liferay\liferay-eclipse-workspace01\crabel\src\test\java\crabel\LibraryTest.java:6: error: package org.junit does not exist
import org.junit.Test;
^
E:\Liferay\liferay-eclipse-workspace01\crabel\src\test\java\crabel\LibraryTest.java:7: error: package org.junit does not exist
import static org.junit.Assert.*;
^
E:\Liferay\liferay-eclipse-workspace01\crabel\src\test\java\crabel\LibraryTest.java:10: error: cannot find symbol
@Test public void testSomeLibraryMethod() {
^
symbol: class Test
location: class LibraryTest
E:\Liferay\liferay-eclipse-workspace01\crabel\src\test\java\crabel\LibraryTest.java:12: error: cannot find symbol
assertTrue("someLibraryMethod should return 'true'", classUnderTest.someLibraryMethod());
^
symbol: method assertTrue(String,boolean)
location: class LibraryTest
4 errors
Can I just ignore the Test Task for now?I'm also working on the Activator Sample Project.Hopefully this will get our Posts back in Sync
repositories {
maven { url 'https://plugins.gradle.org/m2' }
maven { url 'https://repo1.maven.org/maven2' }
maven { url 'https://mvnrepository.com/artifact' }
}
dependencies {
classpath 'no.nils:wsdl2java:0.10'
}
}
repositories {
mavenLocal()
mavenCentral()
}
....
I got a different error (that's progress).> Task :compileTestJava FAILED
E:\Liferay\liferay-eclipse-workspace01\crabel\src\test\java\crabel\LibraryTest.java:6: error: package org.junit does not exist
import org.junit.Test;
^
E:\Liferay\liferay-eclipse-workspace01\crabel\src\test\java\crabel\LibraryTest.java:7: error: package org.junit does not exist
import static org.junit.Assert.*;
^
E:\Liferay\liferay-eclipse-workspace01\crabel\src\test\java\crabel\LibraryTest.java:10: error: cannot find symbol
@Test public void testSomeLibraryMethod() {
^
symbol: class Test
location: class LibraryTest
E:\Liferay\liferay-eclipse-workspace01\crabel\src\test\java\crabel\LibraryTest.java:12: error: cannot find symbol
assertTrue("someLibraryMethod should return 'true'", classUnderTest.someLibraryMethod());
^
symbol: method assertTrue(String,boolean)
location: class LibraryTest
4 errors
Can I just ignore the Test Task for now?I'm also working on the Activator Sample Project.Hopefully this will get our Posts back in Sync

I am not sure where that class comes from? Is it generated? Or did you write it?
In any case, you can make it compile by adding the dependency:
dependencies {
...
compileOnly group: "junit", name: "junit", version: "4.12"
}
Whether you solve it with an activator sample or "standalone" doesn't matter. In general, for a Liferay project you just need a build.gradle, a bnd.bnd file and source code. That's all. You can write all of it by hand or use a sample and remove the stuff you don't need. For the first few projects it's probably a bit complicated but you will soon know how such a build works.
Once the module builds and deploys successfully, you can start using it.
A note about the dependencies:
compileOnly group: "com.liferay.portal", name: "com.liferay.portal.kernel", version: "4.0.0"
The major version here needs to match your Liferay version. 4.x is Liferay 7.2
https://mvnrepository.com/artifact/com.liferay.portal/com.liferay.portal.kernel
You don't need the exact version, but the major version (here 4) needs to be correct. Otherwise your module won't deploy. Come to think of it: For your generated wsdl code you probably don't even need a dependency to the kernel, so you can probably just remove the dependency. (I hope, I am not confusing you here with too much information)
In any case, you can make it compile by adding the dependency:
dependencies {
...
compileOnly group: "junit", name: "junit", version: "4.12"
}
Whether you solve it with an activator sample or "standalone" doesn't matter. In general, for a Liferay project you just need a build.gradle, a bnd.bnd file and source code. That's all. You can write all of it by hand or use a sample and remove the stuff you don't need. For the first few projects it's probably a bit complicated but you will soon know how such a build works.
Once the module builds and deploys successfully, you can start using it.
A note about the dependencies:
compileOnly group: "com.liferay.portal", name: "com.liferay.portal.kernel", version: "4.0.0"
The major version here needs to match your Liferay version. 4.x is Liferay 7.2
https://mvnrepository.com/artifact/com.liferay.portal/com.liferay.portal.kernel
You don't need the exact version, but the major version (here 4) needs to be correct. Otherwise your module won't deploy. Come to think of it: For your generated wsdl code you probably don't even need a dependency to the kernel, so you can probably just remove the dependency. (I hope, I am not confusing you here with too much information)
I added the junit dependency and it built without errors. The created jar (see crabel1.png) looks reasonable, but the MANIFEST.MF file doesn't have any of the dependency info the OSGI (or JBoss Modules) require. I will continue to work on it, but at this point I don'e think it's the solution I'm looking for.To reiterate, I'm looking for a documented Sample LDS Project, preferably Maven based, that meets the following requirements:
- Works with the latest LDS and Liferay/Wildfly bundle (or even the Liferay/Tomcat bundle)
- Requires only a simple WSDL file as input (e.g. hello_world.wsdl attached)
- Produces a complete, working JAXWS/SOAP/CXF web service (e.g. module jar file) that can be deployed in Liferay 7 Portal (both Client and Server)
- When deployed, it can be verified as working (i.e. It shows up in the Liferay Control Panel and can be accessed via URL).
Attachments:
You probably still don't have a Liferay workspace. I guess, you have created a new standalone gradle project, yes?
I am still a bit confused here about your knowledge. Your first post shows that you have quite some knowledge but the problems you face are quite, well, weird. My impression is that you have never created a Liferay 7+ project before.
About your requirements, I am not sure we are on the same page and I need to clarify a few things:
"Produces a complete, working JAXWS/SOAP/CXF web service (e.g. module jar file) that can be deployed in Liferay 7 Portal (both Client and Server)
"When deployed, it can be verified as working (i.e. It shows up in the Liferay Control Panel and can be accessed via URL)."
My example config produces a client, not a server. It generates a library which can be used to access a remote webservice. It's a quite common usecase to do that. I can help you with that and even wipe up a quick, working example if you need it.
But the server is a wholly different story!!
Usually people use tools to create the wsdl from some Java/C#/... API. I actually have never seen it the other way round, except for mocking purposes, e.g. with SoupUI, where you mock the true wsdl backend. Do you really want to do that?
I believe, it is really uncommon to do that, if you need it, fine. But I hope you understand that wsdl2java also creates only the interfaces to start the implementation of the webservice. It creates some basic types, but the result is just an empty shell. Is that clear to you and what you intend?
It can NEVER show up in the control panel, since you would need to implement the methods and configure the Liferay integration yourself.
So, do you need a client and/or a server? Is it clear to you that the server code will have to be implemented by you, that only interfaces are generated?
I am still a bit confused here about your knowledge. Your first post shows that you have quite some knowledge but the problems you face are quite, well, weird. My impression is that you have never created a Liferay 7+ project before.
About your requirements, I am not sure we are on the same page and I need to clarify a few things:
"Produces a complete, working JAXWS/SOAP/CXF web service (e.g. module jar file) that can be deployed in Liferay 7 Portal (both Client and Server)
"When deployed, it can be verified as working (i.e. It shows up in the Liferay Control Panel and can be accessed via URL)."
My example config produces a client, not a server. It generates a library which can be used to access a remote webservice. It's a quite common usecase to do that. I can help you with that and even wipe up a quick, working example if you need it.
But the server is a wholly different story!!
Usually people use tools to create the wsdl from some Java/C#/... API. I actually have never seen it the other way round, except for mocking purposes, e.g. with SoupUI, where you mock the true wsdl backend. Do you really want to do that?
I believe, it is really uncommon to do that, if you need it, fine. But I hope you understand that wsdl2java also creates only the interfaces to start the implementation of the webservice. It creates some basic types, but the result is just an empty shell. Is that clear to you and what you intend?
It can NEVER show up in the control panel, since you would need to implement the methods and configure the Liferay integration yourself.
So, do you need a client and/or a server? Is it clear to you that the server code will have to be implemented by you, that only interfaces are generated?
I'm not sure why it's so important for you to think I'm an idiot. I've built numerous Workspaces and hundreds of projects in Liferay. I have the Liferay Portal successfully working inside the Wildfly App Server. I've ported 50 Portlets from JBoss to GateIn and Liferay Portal and I've worked with a number of Web Services, Clients and Servers, of many different type. If I had all the answers I wouldn't be posting on this Forum, but I'm definitely not an idiot. But ... whatever.
- I do require both a Client and a Server implementation
- I know your build.gradle was for a Client web service.
- I understand that a WS Server is different component, but I do need to build one, for testing and mocking, as you suggested.
- If you take a look at the Apache documentation (https://cxf.apache.org/docs/wsdl-to-java.html) you'll see that wsdl2java Can build Client AND Server services.
- As to your claim that 'It can NEVER show up in the control panel', you're wrong. If you look at the following Liferay documentation (https://portal.liferay.dev/docs/7-1/tutorials/-/knowledge_base/t/jax-ws), you will see that a web service can be configured, 'with the Control Panel, OR 'Programtically'.
So I don't need a tutorial on web services. I need Liferay Expert that can explain to me how CXF works in Liferay, and how to build and deploy Client and Server web services that actually work.
So, are there any other Liferay Experts out there that can help me with this problem because so far this has been a waste of my time.
- I do require both a Client and a Server implementation
- I know your build.gradle was for a Client web service.
- I understand that a WS Server is different component, but I do need to build one, for testing and mocking, as you suggested.
- If you take a look at the Apache documentation (https://cxf.apache.org/docs/wsdl-to-java.html) you'll see that wsdl2java Can build Client AND Server services.
- As to your claim that 'It can NEVER show up in the control panel', you're wrong. If you look at the following Liferay documentation (https://portal.liferay.dev/docs/7-1/tutorials/-/knowledge_base/t/jax-ws), you will see that a web service can be configured, 'with the Control Panel, OR 'Programtically'.
So I don't need a tutorial on web services. I need Liferay Expert that can explain to me how CXF works in Liferay, and how to build and deploy Client and Server web services that actually work.
So, are there any other Liferay Experts out there that can help me with this problem because so far this has been a waste of my time.
It was never my intention to imply that you are an idiot. I am sorry that you feel that way. I also apologize if my tone felt arrogant or condescending. Since I feel that I can't help you, there is too much of a communication gap, I believe it's best if I drop out of this conversation.
One last advise:
Maybe open a new thread, people tend to ignore threads with many answers, too much to read to get up to speed.
In any case, since I obviously am unable to explain what has to be done, I have created a working client example. I have attached a workspace with a ws-client module (I took my own advise, created an activator module and changed the build.gradle & bnd.bnd). I have also added a rest example module, it is just there to show how the client is included in the build.gradle and executed.
You should be able to deploy the modules on 7.2. The rest example won't work in 7.0 (maybe it will work in 7.1, but I am doubtful), the ws-client should work in all 7.x versions.
http://localhost:8080/o/greetings
http://localhost:8080/o/greetings/callSoap
I wish you best of luck with the server part, I have never used wsdl2java to create a server, I hope somebody else has some experience with that and can help you.
One last advise:
Maybe open a new thread, people tend to ignore threads with many answers, too much to read to get up to speed.
In any case, since I obviously am unable to explain what has to be done, I have created a working client example. I have attached a workspace with a ws-client module (I took my own advise, created an activator module and changed the build.gradle & bnd.bnd). I have also added a rest example module, it is just there to show how the client is included in the build.gradle and executed.
You should be able to deploy the modules on 7.2. The rest example won't work in 7.0 (maybe it will work in 7.1, but I am doubtful), the ws-client should work in all 7.x versions.
http://localhost:8080/o/greetings
http://localhost:8080/o/greetings/callSoap
I wish you best of luck with the server part, I have never used wsdl2java to create a server, I hope somebody else has some experience with that and can help you.
Attachments:
Thank you. Your ws=client-example looks like it's what I was looking for. I'll build, deploy, and test it on 7.2, from scratch.I may not be able to get back to you right away. I'm going to be doing some travelling.Thanks again
Copyright © 2025 Liferay, Inc
• Privacy Policy
Powered by Liferay™