In our project we have the following jax-ws application client (there are many more methods so I just added the one we're having issues with):
@WebService(
name = "SMEVMessageExchangePortType",
targetNamespace = "urn://x-artefacts-smev-gov-ru/services/message-exchange/1.1"
)
@SOAPBinding(
parameterStyle = ParameterStyle.BARE
)
public interface SMEVMessageExchangePortType {
@WebResult(
name = "GetRequestResponse",
targetNamespace = "urn://x-artefacts-smev-gov-ru/services/message-exchange/types/1.1",
partName = "parameters"
)
@Produces
GetRequestResponse getRequest(@WebParam(name = "GetRequestRequest",targetNamespace = "urn://x-artefacts-smev-gov-ru/services/message-exchange/types/1.1",partName = "parameters") GetRequestRequest var1) throws InvalidContentException, SMEVFailureException, SenderIsNotRegisteredException, SignatureVerificationFaultException, UnknownMessageTypeException;
}
It worked fine untill recently we started getting responses as text/plain
not as text/xml
It led to the following exception:
com.sun.xml.internal.ws.server.UnsupportedMediaException: Unsupported Content-Type: text/plain;charset=utf-8 Supported ones are: [text/xml]
My question is whether it's possible to modify the code to treat any given text/plain
response as text/xml
Ideally to have something similar to @Produces
and @Consumes
just like in JAX-RS
If not, maybe we could use a third-party SOAP library which implements that behaviour?