0

I am creating SOAP web service using Spring Boot SOAP Webservice project. If I use following code dynamically generated WSDL shows Operations.

@PayloadRoot(namespace = NAMESPACE_URI, localPart = "getCountryRequest")
@ResponsePayload
public GetCountryResponse getCountry(@RequestPayload GetCountryRequest request) {

This generates the wsdl:

...
<soapenv:Body>
  <gs:getCountryRequest>
     <gs:name>Something</gs:name>
  </gs:getCountryRequest>
...

But I need request element to change like this (without suffix)

@PayloadRoot(namespace = NAMESPACE_URI, localPart = "getCountry")
@ResponsePayload
public GetCountryResponse getCountry(@RequestPayload GetCountry request) {

I need this because I'm replicating a legacy wsdl, this doesn't have any suffix in the request.

Actually I don't need the object to be GetCountry, but I need the wsdl the request to be:

...
<soapenv:Body>
  <gs:getCountry>
     <gs:name>Something</gs:name>
  </gs:getCountry>
...

I learnt on this link SpringBoot SOAP webservice Dynamic WSDL generation not working If remove Request suffix from RequestPayload element how to change the Request suffix:

wsdl11Definition.setRequestSuffix("RQ");
wsdl11Definition.setResponseSuffix("RS");

But I need to remove the suffix entirely. Perhaps, It exists some Interceptor for change the wsdl.

Br.

I tried to change the name of the request in the xsd.

roanbaga
  • 81
  • 1
  • 3
  • I found on this link the answer: [Invalidad wsdl generated by spring-ws when the request element doesn't end with 'Request'](https://stackoverflow.com/questions/34525587/invalid-wsdl-generated-by-spring-ws-when-the-request-element-doesnt-end-with-r?answertab=scoredesc#tab-top) – roanbaga Apr 29 '23 at 06:31
  • Does this answer your question? [Invalid wsdl generated by spring-ws when the request element doesn't end with 'Request'](https://stackoverflow.com/questions/34525587/invalid-wsdl-generated-by-spring-ws-when-the-request-element-doesnt-end-with-r) – sbolel Apr 29 '23 at 07:01

0 Answers0