Skip to content

ercansormaz/jaxws-spring-jakarta

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

JAX-WS Spring Jakarta

Maven Central

Jakarta-compatible SOAP library for Java 17+ and Spring Boot 4, designed for bottom-up development: generate WSDL from Java classes.


💡 Features

  • Bottom-up SOAP service support
  • Java 17+ compatible
  • Spring Boot 4 compatible
  • Jakarta namespace (jakarta.xml.ws) support
  • Maven Central ready

📦 Maven Usage

Add the dependency to your pom.xml:

<dependency>
    <groupId>dev.ercan</groupId>
    <artifactId>jaxws-spring-jakarta</artifactId>
    <version>4.0.6</version>
</dependency>

🔧 Example Usage

import jakarta.jws.WebService;

@WebService
public class TestService {

  @WebResult(name = "response")
  public String sayHello(@WebParam(name = "request") String name) {
    return "Hello " + name;
  }
}
import dev.ercan.jaxws.spring.binding.SoapServiceBinding;
import dev.ercan.jaxws.spring.factory.SoapServiceFactory;
import dev.ercan.jaxws.spring.servlet.SoapServiceServlet;
import org.springframework.boot.web.servlet.ServletRegistrationBean;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
public class SoapServiceConfig {

  @Bean
  public ServletRegistrationBean<SoapServiceServlet> SoapServiceServlet() {
    SoapServiceServlet soapWsServlet = new SoapServiceServlet();
    ServletRegistrationBean<SoapServiceServlet> bean = new ServletRegistrationBean<>(soapWsServlet);
    bean.setLoadOnStartup(1);
    return bean;
  }

  @Bean
  public TestService testService(){
    return new TestService();
  }

  @Bean
  public SoapServiceBinding testServiceBinding(TestService testService) throws Exception {
    SoapServiceFactory springService = new SoapServiceFactory();
    springService.setBean(testService);

    SoapServiceBinding springBinding = new SoapServiceBinding();
    springBinding.setUrl("/SOAP/TestService");
    springBinding.setService(springService.getObject());

    return springBinding;
  }
}

Access the WSDL at: http://localhost:8080/SOAP/TestService?wsdl


🤝 Contributing

Contributions are welcome! Feel free to fork the repo, submit pull requests or open issues.


📄 License

This project is licensed under the MIT License.

About

Jakarta-compatible SOAP library for Java 17+, Spring Boot 3 & 4, designed for bottom-up development.

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages