52North/WPS — pull request #53 by autermann (2013-12-19 20:54:15+00:00)
Title: Pretty print responses and exception reports and choose appropriate namespace prefixes for OWS and WPS

Is it just me or does anybody else hate looking at one-line-responses?

## Before

### GetCapabilities
```xml

com.github.autermann.wps.matlab.addadden-USen-US
```

### DescribeProcess
```xml

com.github.autermann.wps.matlab.addaddadds two valuesafirst operandfirst operandbsecond operandsecond operandresultthe resultthe result of the addition
```

### ExceptionReport
```xml

Data Identifier not supported: corg.n52.wps.server.request.ExecuteRequest.initForGET:210
org.n52.wps.server.request.ExecuteRequest.<init>:146
org.n52.wps.server.handler.RequestHandler.<init>:153
org.n52.wps.server.WebProcessingService.doGet:235
javax.servlet.http.HttpServlet.service:735
org.n52.wps.server.WebProcessingService.service:345
javax.servlet.http.HttpServlet.service:848
org.eclipse.jetty.servlet.ServletHolder.handle:698
org.eclipse.jetty.servlet.ServletHandler.doHandle:519
org.eclipse.jetty.server.handler.ContextHandler.doHandle:1097
org.eclipse.jetty.servlet.ServletHandler.doScope:446
org.eclipse.jetty.server.handler.ContextHandler.doScope:1031
org.eclipse.jetty.server.handler.ScopedHandler.handle:136
org.eclipse.jetty.server.handler.HandlerWrapper.handle:97
org.eclipse.jetty.server.Server.handle:445
org.eclipse.jetty.server.HttpChannel.handle:269
org.eclipse.jetty.server.HttpConnection.onFillable:229
org.eclipse.jetty.io.AbstractConnection$ReadCallback.run:358
org.eclipse.jetty.util.thread.QueuedThreadPool.runJob:601
org.eclipse.jetty.util.thread.QueuedThreadPool$3.run:532
java.lang.Thread.run:744

```

### Execute
```xml

com.github.autermann.wps.matlab.addaddProcess successfulresultthe result1.2312324435532E12
```

## After

### GetCapabilties
```xml

com.github.autermann.wps.matlab.add
add

en-US

en-US

```

### DescribeProcess
```xml

com.github.autermann.wps.matlab.add
add
adds two values

a
first operand
first operand

b
second operand
second operand

result
the result
the result of the addition

```

### ExceptionReport
```xml

Data Identifier not supported: c

org.n52.wps.server.ExceptionReport: Data Identifier not supported: c
at org.n52.wps.server.request.ExecuteRequest.initForGET(ExecuteRequest.java:210)
at org.n52.wps.server.request.ExecuteRequest.<init>(ExecuteRequest.java:146)
at org.n52.wps.server.handler.RequestHandler.<init>(RequestHandler.java:153)
at org.n52.wps.server.WebProcessingService.doGet(WebProcessingService.java:236)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:735)
at org.n52.wps.server.WebProcessingService.service(WebProcessingService.java:346)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:848)
at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:698)
at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:519)
at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1097)
at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:446)
at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1031)
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:136)
at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97)
at org.eclipse.jetty.server.Server.handle(Server.java:445)
at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:269)
at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:229)
at org.eclipse.jetty.io.AbstractConnection$ReadCallback.run(AbstractConnection.java:358)
at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:601)
at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:532)
at java.lang.Thread.run(Thread.java:744)

```

### Execute
```xml

com.github.autermann.wps.matlab.add
add

Process successful

result
the result

1.2312324435532E12

```

btw.: is right that `ProcessDescription` and it's inner tags have no namespace?

```java
public static void main(String[] args) {
ProcessDescriptionsDocument document = ProcessDescriptionsDocument.Factory.newInstance();
document.addNewProcessDescriptions().addNewProcessDescription();
System.out.println(document.xmlText(new XmlOptions().setSavePrettyPrint()));
}
```

will result in this:
```xml

```