Apache CXF, generating web services from WSDL file

25,076

Solution 1

Apache CXF Example Projects cover most of the scenarios. For generating java codes, refer to WSDL to Java. Another approach is wsimport that comes with JDK. Both of them are very simple and straightforward.

Hope this helps.

Solution 2

this is a good starting point:

http://cxf.apache.org/docs/maven-cxf-codegen-plugin-wsdl-to-java.html

I suggest using maven plugins for these kind of things.

Solution 3

I too was looking for something similar. According to my requirements, I need to generate web services from dynamically loaded WSDL files. This is not practical with wsdl2java since it generates classes mapped to WSDL, which result in piling up classes for different WSDL files loaded at runtime.

So after going through Apache CXF API and after experimenting with it for some time, I was able to come up with a POC on how to achieve my requirement.

The sample code is at my Github: https://github.com/amalhub/cxf-test

Share:
25,076
Rohit
Author by

Rohit

Updated on July 09, 2022

Comments

  • Rohit
    Rohit almost 2 years

    I am new to SOAP services. I want to write a SOAP service using apache CXF from scratch. I have a WSDL file http://sms.pswin.com/SOAP/SMS.asmx?WSDL.

    I was able to generate the template classes from WSDL file using wsdl2java tool which comes with CXF package but I am not sure how to proceed further. Can you please suggest a good starting tutorial/book to help me start with CXF SOAP services. Or anything that can help me build upon it. I am using JBOSS-AS7 as my web server.