Relates :
|
|
Relates :
|
|
Relates :
|
|
Relates :
|
JAXWS implementation incorrectly processes new line and carriage-return symbols in webservice string parameters. In case of simple WS that echoes input parameter the reponse returned to the client differs from the parameter value sent in request. For example, WS can be illustrated by such implementation: @WebService(endpointInterface = "ws.HelloWorld") public class HelloWorldImpl implements HelloWorld { @Override public String getHelloWorldAsString(String name) { System.out.println("Server-side parameter value: '" + name.replaceAll("\r", "#CR") .replaceAll("\n", "#NL") + "'"); return name; } } and usage of WS: String response = hello.getHelloWorldAsString(request); After the round trip client/server communication the following values can be observed: request value:'CarrigeReturn and NewLine symbols:#CR#NL#NL#CR#CR#NL' server-side value:'CarrigeReturn and NewLine symbols:#NL#NL#NL#NL' sesponse value:'CarrigeReturn and NewLine symbols:#NL#NL#NL#NL'
|