I have written a webservice with a method which takes a String as parameter as follows.
@WebService(targetNamespace = "http://bla.com", name = "MyWebService")
@SOAPBinding(style = SOAPBinding.Style.DOCUMENT)
public interface MyWebService {
boolean submitAssessmentResult(@WebParam(name = "resultXml") String resultXml);
The parameter for my message is supposed to be an xml string. For my test I just print the string out to the console. When I test the webservice using soapui and I call the method using a plain string like "This is a test" as follows then the test gets printed out perfectly:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:bla="http://bla.co.za/">
<soapenv:Header/>
<soapenv:Body>
<shl:submitAssessmentResult>
<resultXml>This is a test</resultXml>
</shl:submitAssessmentResult>
</soapenv:Body>
</soapenv:Envelope>
but if I call the method with an xml string then I get white space on the console:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:bla="http://bla.co.za/">
<soapenv:Header/>
<soapenv:Body>
<shl:submitAssessmentResult>
<resultXml>
<AssessmentResult>bla</AssessmentResult>
</resultXml>
</shl:submitAssessmentResult>
</soapenv:Body>
</soapenv:Envelope>
Does anyone know why my webservice is not recognising an xml payload