I am having issues with the implementation of JAXWS for expose the endpoint that will consume the soap message in the same port that API rest or default spring boot port.
I am using this :
Plugin for generated code from wsdl : org.codehaus.mojo>jaxws-maven-plugin-2.6
Java 11 + Spring boot 2.7.13 + jakarta.xml.ws-api-4.0.1
package net.gencat.salut.sivec.external.cases.config;
import jakarta.xml.ws.Endpoint;
import lombok.extern.slf4j.Slf4j;
import net.gencat.salut.sivec.external.cases.argo.CarregaImpl;
import net.gencat.salut.sivec.external.cases.notification.NotificationSoapImpl;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.reactive.function.client.WebClient;
@Configuration
@Slf4j
public class WebServiceConfig {
@Bean
public CarregaImpl carregaImpl() {
return new CarregaImpl();
}
@Bean
public Endpoint publishEndpoint(final SoapProperties soapProperties,CarregaImpl carregaImpl)
{
log.info("Endpoint argo published: {}",soapProperties.getUri());
return Endpoint.publish(soapProperties.getUri(), carregaImpl);
}
}
The value of getURi is this: http://localhost:8989/ws/
This is my log:
Solution 1 what I want
I want to know how i can to configure JAXWS Endpoint for use the same port than Spring boot if with the solution or implementation what I did , I can't use the same port because spring boot shows in runtime "port in use"
Solution 2: If I configure two different ports, how I have configured the endpoint to http://localhost:8989 when I deploy this microservice in Openshift and see all the port on listen
For the port 8989, it shows "localhost:8989" instead of ":::8989" what is how is shown the default spring boot port, then I have a redirect issue because unable to resolve localhost:8989 in cloud
Someone can help me?. Please any recomendation is welcome but one example would be appreciated


I have an app running both rest and SOAP server on the same port. I'm using a different plugin though:
in my static folder, I have my xsd files.
After that, my configuration class is a bit different:
This is Kotlin code but the concept is the same in Java.
Then, the endpoint looks like:
I hope this helps.
UPDATE1: Adding the NoRequestSuffixWsdl11Definition: