0
votes

I have created a soap web service using spring boot. So far it is working as intended.

Here are the properties specified in application.properties file.

server.port=443
server.address=192.168.8.100
server.servlet.context-path=/digi-ntb
cxf.path=/

And below shows the WebServiceConfig class :

@Configuration
public class WebServiceConfig {

    @Autowired
    private Bus bus;

    @Bean
    public Endpoint endpoint() {
        Endpoint endpoint = new EndpointImpl(bus, new DstManagerService());
        endpoint.publish("/dst-manager-service");
        return endpoint;
    }
}

My endpoint is published at http://192.168.8.100:443/digi-ntb/dst-manager-service

Now I do have a requirement to get a response message from the service if someone telnet to the service using ip and port number.

Ex:

telnet 19.168.8.100 443
Trying 19.168.8.100...
Connected to DST Manager Service. (Message)

With current configuration I am getting something like below as the telnet response :

HTTP/1.1 400
Content-Type: text/html;charset=utf-8
Content-Language: en
Content-Length: 435
Date: Thu, 28 Jul 2022 17:51:13 GMT
Connection: close

<!doctype html><html lang="en"><head><title>HTTP Status 400 – Bad Request</title><style type="text/css">body {font-family:Tahoma,Arial,sans-serif;} h1, h2, h3, b {color:white;background-color:#526;} h1 {font-size:22px;} h2 {font-size:16px;} h3 {font-size:14px;} p {font-size:12px;} a {color:black;} .line {height:1px;background-color:#525D76;border:none;}</style></head><body><h1>HTTP Statu00 – Bad Request</h1></body></html>