You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the Issue
The tutorial indicates using jaxb2-maven-plugin to generate the models for a SOAP endpoint. But the objects generated by this plugin aren't imported. The existing Endpoint class imports client objects generated off a WSDL file by a different plugin, maven-jaxb-plugin, for the SOAP Client article.
On the current Spring 3 version of the repository, all that needs to be corrected is changing the import path.
Endpoint imports from maven-jaxb2-plugin generation:
Spring 2 Issues On Older Versions
For reference in case it helps anyone, prior versions of the spring-soap repo, from the time of the Java 17 upgrade until the repo was upgraded to Spring 3, used pom dependencies that result in Jakarta XML annotations on the generated classes. This is masked by the issue explained above, so the generated classes aren't even used. But if you import the XSD generated models instead, and try to use them in an Endpoint class as detailed by the tutorial, the test request in the tutorial will get an error response that says: No adapter for endpoint ... Does your endpoint implement a supported interface like MessageHandler or PayloadEndpoint?
If you're trying to get a SOAP Endpoint to work with Spring 2 and run into the issue above, you can fix this by removing the jakarta.xml.bind and org.glassfish.jaxb dependencies, and then changing the jaxb2-maven-plugin version to 2.5.0.
To Reproduce
Steps to reproduce the behavior:
Follow link above. Note that the import path includes .client.
Expected Behavior
Remove .client from import path, to use XSD generated models instead of WSDL generated models.
Environment (please complete the following information):
OS: macOS Sonoma 14.4.1
Additional Context
The "No adapter for endpoint" error listed seems commonly associated on Stack Overflow with not generating an @XmlRootElement annotation. However, I see this annotation in the generated classes. The actual issue pre-Spring-3 was the generated classes using Jakarta vs JavaX imports.
The text was updated successfully, but these errors were encountered:
Article and Module Links
https://www.baeldung.com/spring-boot-soap-web-service
https://github.com/eugenp/tutorials/tree/master/spring-soap
Describe the Issue
The tutorial indicates using jaxb2-maven-plugin to generate the models for a SOAP endpoint. But the objects generated by this plugin aren't imported. The existing Endpoint class imports client objects generated off a WSDL file by a different plugin, maven-jaxb-plugin, for the SOAP Client article.
On the current Spring 3 version of the repository, all that needs to be corrected is changing the import path.
Endpoint imports from maven-jaxb2-plugin generation:
tutorials/spring-soap/src/main/java/com/baeldung/springsoap/CountryEndpoint.java
Line 9 in db90613
Spring 2 Issues On Older Versions
For reference in case it helps anyone, prior versions of the spring-soap repo, from the time of the Java 17 upgrade until the repo was upgraded to Spring 3, used pom dependencies that result in Jakarta XML annotations on the generated classes. This is masked by the issue explained above, so the generated classes aren't even used. But if you import the XSD generated models instead, and try to use them in an Endpoint class as detailed by the tutorial, the test request in the tutorial will get an error response that says:
No adapter for endpoint ... Does your endpoint implement a supported interface like MessageHandler or PayloadEndpoint?
If you're trying to get a SOAP Endpoint to work with Spring 2 and run into the issue above, you can fix this by removing the
jakarta.xml.bind
andorg.glassfish.jaxb
dependencies, and then changing thejaxb2-maven-plugin
version to2.5.0
.To Reproduce
Steps to reproduce the behavior:
.client
.Expected Behavior
Remove
.client
from import path, to use XSD generated models instead of WSDL generated models.Environment (please complete the following information):
Additional Context
The "No adapter for endpoint" error listed seems commonly associated on Stack Overflow with not generating an
@XmlRootElement
annotation. However, I see this annotation in the generated classes. The actual issue pre-Spring-3 was the generated classes using Jakarta vs JavaX imports.The text was updated successfully, but these errors were encountered: