How to handle SOAP message response like below?
<S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/" xmlns:new="http://foo/bar"> <S:Header/> <S:Body>OK</S:Body> </S:Envelope>
here are my definitions in WSDL:
<wsdl:operation name="MyRequest">
<wsdl:input message="tns:MyRequest" name="MyRequest">
</wsdl:input>
<wsdl:output message="tns:MyRequestResponse" name="MyRequestResponse">
</wsdl:output>
</wsdl:operation>
<xs:element name="MyRequestResponse" type="xs:string"/>
Service:
@WebMethod(operationName = "MyRequest")
@WebResult(name = "MyRequestResponse", targetNamespace = "http://foo/bar", partName = "parameters")
@SOAPBinding(parameterStyle = SOAPBinding.ParameterStyle.BARE)
public String MyRequest(
@WebParam(name = "MyRequest", targetNamespace = "http://foo/bar", partName = "parameters")
MyRequest parameters);
I did tried to use interceptor and wrap the response 'OK' with nodes. But, wondering if there is any cleaner way of doing it by handling in JAXB/WSDL layer itself.