JAXBContext jaxbContext = JAXBContext.newInstance(Subscribe.class);
Source src = exchange.getMessage("in").getContent();
Object input = jaxbContext.createUnmarshaller().unmarshal(src);
if (input instanceof Subscribe) {
subscription = (Subscribe) input;
SubscribeResponse response = new SubscribeResponse();
String wsaAddress = getService().getNamespaceURI() + "/" + getService().getLocalPart() + "/" + subscriptionEndpoint;
response.setSubscriptionReference(AbstractWSAClient.createWSA(wsaAddress));
StringWriter writer = new StringWriter();
jaxbContext.createMarshaller().marshal(response, writer);
NormalizedMessage out = exchange.createMessage();
out.setContent(new StringSource(writer.toString()));
exchange.setMessage(out, "out");