You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@servicemix.apache.org by jb...@apache.org on 2009/08/20 17:02:01 UTC
svn commit: r806201 -
/servicemix/components/engines/servicemix-exec/trunk/src/main/java/org/apache/servicemix/exec/marshaler/DefaultExecMarshaler.java
Author: jbonofre
Date: Thu Aug 20 15:02:01 2009
New Revision: 806201
URL: http://svn.apache.org/viewvc?rev=806201&view=rev
Log:
Add debug log messages in the default marshaler. Remove in message content display to avoid NPE.
Modified:
servicemix/components/engines/servicemix-exec/trunk/src/main/java/org/apache/servicemix/exec/marshaler/DefaultExecMarshaler.java
Modified: servicemix/components/engines/servicemix-exec/trunk/src/main/java/org/apache/servicemix/exec/marshaler/DefaultExecMarshaler.java
URL: http://svn.apache.org/viewvc/servicemix/components/engines/servicemix-exec/trunk/src/main/java/org/apache/servicemix/exec/marshaler/DefaultExecMarshaler.java?rev=806201&r1=806200&r2=806201&view=diff
==============================================================================
--- servicemix/components/engines/servicemix-exec/trunk/src/main/java/org/apache/servicemix/exec/marshaler/DefaultExecMarshaler.java (original)
+++ servicemix/components/engines/servicemix-exec/trunk/src/main/java/org/apache/servicemix/exec/marshaler/DefaultExecMarshaler.java Thu Aug 20 15:02:01 2009
@@ -46,7 +46,7 @@
public ExecRequest unmarshal(NormalizedMessage in) throws Exception {
// create a JAXB context for the exec request
- LOG.debug("Create a JAXB context.");
+ LOG.debug("Create a JAXB context with ExecRequest class.");
JAXBContext jaxbContext = JAXBContext.newInstance(ExecRequest.class);
// create a unmarshaller
@@ -54,8 +54,7 @@
Unmarshaller unmarshaller = jaxbContext.createUnmarshaller();
// unmarshal the in message content
- SourceTransformer transformer = new SourceTransformer();
- LOG.debug("In message: " + transformer.contentToString(in));
+ LOG.debug("Unmarshal the in message context.");
return (ExecRequest)unmarshaller.unmarshal(in.getContent());
}
@@ -66,17 +65,21 @@
public void marshal(ExecResponse execResponse, NormalizedMessage out) throws Exception {
// create a JAXB context for the exec response
+ LOG.debug("Create a JAXB context with ExecResponse class.");
JAXBContext jaxbContext = JAXBContext.newInstance(ExecResponse.class);
// create a marshaller
+ LOG.debug("Create the JAXB marshaller.");
Marshaller marshaller = jaxbContext.createMarshaller();
// marshal into the out message node
+ LOG.debug("Marshal the ExecResponse into a DOM node.");
SourceTransformer transformer = new SourceTransformer();
Document document = transformer.createDocument();
marshaller.marshal(execResponse, document);
// populate the out message content
+ LOG.debug("Populate the out message content using the DOM node.");
out.setContent(new DOMSource(document));
}