java – Unable to receive a client-side SOAP POST request. Get the error The GET & # 39; query method is not supported

I create a client to use the SOAP request. The client sends a request using HTTP POST. Here are two requests I must consume:

Request 1:



   
   
      
         & lt; xml version = "1.0" encoding = "UTF-8"? & & gt;
& lt; Ask & gt;
& lt; Transaction ID & lt; 10000000000078804924 & lt; / Transaction ID & gt;
& lt; TransactionType & gt; BillPayment & lt; / TransactionType & gt;
         29-03-2019 11:27:26 </ TransactionDateStamp & gt;
& lt; AmountPaid & gt; 50.00 & lt; / AmountPaid & gt;
& lt; / Ask & gt;
      
   

Request 2:



   
      
         TEST
         RAHUL
         12345678
         000066654
         11.00
         78398100
      
   

I use the code below to use the application:

@Controller
Public class MessageDetailsController {

@RequestMapping (value = "/", method = {RequestMethod.POST}, consume = {"text / xml"}, product = "text / xml")
public ResponseEntity messageStub (@RequestBody String requestString)
throws the exceptions ClientProtocolException, IOException {
try {
System.out.println ("XML soap request received");
System.out.println (requestString);
}
catch (Exception e) {
e.printStackTrace ();
}
}

I've tried the above method with @Controller and @RestController. But the client is not able to use this method. I get the error below because the client is not able to press the POST method of my class.

WARN 17707 — [ebContainer : 6] o.s.web.servlet.PageNotFound: Query
method & # 39; GET & # 39; not supported

ERROR 17707 — [ebContainer : 6]
o.s.boot.web.support.ErrorPageFilter: Can not transfer to the error page for
request [/] as the answer has already been engaged. Therefore,
the answer may have the wrong status code. If your request is
running on WebSphere Application Server, you may be able to resolve
this problem by putting
com.ibm.ws.webcontainer.invokeFlushAfterService to false

I want to avoid using the Java code generated with the help of WSDL and wish to use the query in the manner indicated above, because I have to consume so many services. I have queries below:

Is this way of consuming the SOAP request correct or missing something?
The first SOAP request is coded. Will this also require other parameters for RequestMapping?