|
From: <jbo...@li...> - 2006-07-05 12:17:12
|
Author: hei...@jb...
Date: 2006-07-05 08:17:07 -0400 (Wed, 05 Jul 2006)
New Revision: 564
Modified:
branches/jbossws-1.0/src/main/java/org/jboss/ws/jaxrpc/encoding/JAXBDeserializer.java
branches/jbossws-1.0/src/main/java/org/jboss/ws/jaxrpc/encoding/JAXBSerializer.java
Log:
cleanup
Modified: branches/jbossws-1.0/src/main/java/org/jboss/ws/jaxrpc/encoding/JAXBDeserializer.java
===================================================================
--- branches/jbossws-1.0/src/main/java/org/jboss/ws/jaxrpc/encoding/JAXBDeserializer.java 2006-07-05 11:52:43 UTC (rev 563)
+++ branches/jbossws-1.0/src/main/java/org/jboss/ws/jaxrpc/encoding/JAXBDeserializer.java 2006-07-05 12:17:07 UTC (rev 564)
@@ -46,12 +46,12 @@
// provide logging
private static final Logger log = Logger.getLogger(JAXBDeserializer.class);
- private JAXBUnmarshaller jaxbUnmarshaller;
+ private JAXBUnmarshaller unmarshaller;
public JAXBDeserializer() throws BindingException
{
// Get the JAXB marshaller for complex objects
- jaxbUnmarshaller = new JBossXBUnmarshallerImpl();
+ unmarshaller = new JBossXBUnmarshallerImpl();
}
/**
@@ -83,13 +83,13 @@
// Get the jaxrpc-mapping.xml meta data
JavaWsdlMapping jaxrpcMapping = serContext.getJavaWsdlMapping();
- jaxbUnmarshaller.setProperty(JAXBConstants.JAXB_XS_MODEL, model);
- jaxbUnmarshaller.setProperty(JAXBConstants.JAXB_ROOT_QNAME, xmlName);
- jaxbUnmarshaller.setProperty(JAXBConstants.JAXB_TYPE_QNAME, xmlType);
- jaxbUnmarshaller.setProperty(JAXBConstants.JAXB_JAVA_MAPPING, jaxrpcMapping);
+ unmarshaller.setProperty(JAXBConstants.JAXB_XS_MODEL, model);
+ unmarshaller.setProperty(JAXBConstants.JAXB_ROOT_QNAME, xmlName);
+ unmarshaller.setProperty(JAXBConstants.JAXB_TYPE_QNAME, xmlType);
+ unmarshaller.setProperty(JAXBConstants.JAXB_JAVA_MAPPING, jaxrpcMapping);
ByteArrayInputStream ins = new ByteArrayInputStream(val.getBytes("UTF-8"));
- value = jaxbUnmarshaller.unmarshal(ins);
+ value = unmarshaller.unmarshal(ins);
}
catch (RuntimeException e)
{
Modified: branches/jbossws-1.0/src/main/java/org/jboss/ws/jaxrpc/encoding/JAXBSerializer.java
===================================================================
--- branches/jbossws-1.0/src/main/java/org/jboss/ws/jaxrpc/encoding/JAXBSerializer.java 2006-07-05 11:52:43 UTC (rev 563)
+++ branches/jbossws-1.0/src/main/java/org/jboss/ws/jaxrpc/encoding/JAXBSerializer.java 2006-07-05 12:17:07 UTC (rev 564)
@@ -23,19 +23,18 @@
// $Id$
-import java.io.StringWriter;
-
-import javax.xml.namespace.QName;
-
import org.apache.xerces.xs.XSModel;
import org.jboss.logging.Logger;
import org.jboss.ws.binding.BindingException;
import org.jboss.ws.jaxb.JAXBConstants;
-import org.jboss.ws.jaxb.JBossXBMarshallerImpl;
import org.jboss.ws.jaxb.JAXBMarshaller;
+import org.jboss.ws.jaxb.JBossXBMarshallerImpl;
import org.jboss.ws.metadata.jaxrpcmapping.JavaWsdlMapping;
import org.w3c.dom.NamedNodeMap;
+import javax.xml.namespace.QName;
+import java.io.StringWriter;
+
/**
* A Serializer that can handle complex types by delegating to JAXB.
*
@@ -47,12 +46,12 @@
// provide logging
private static final Logger log = Logger.getLogger(JAXBSerializer.class);
- private JAXBMarshaller JAXBMarshaller;
+ private JAXBMarshaller marshaller;
public JAXBSerializer() throws BindingException
{
// Get the JAXB marshaller for complex objects
- JAXBMarshaller = new JBossXBMarshallerImpl();
+ marshaller = new JBossXBMarshallerImpl();
}
/**
@@ -79,22 +78,22 @@
String xmlFragment = null;
- // Get the parsed model
- XSModel model = serContext.getXsModel();
+ // Get the parsed model
+ XSModel model = serContext.getXsModel();
- // Get the jaxrpc-mapping.xml object graph
- JavaWsdlMapping jaxrpcMapping = serContext.getJavaWsdlMapping();
+ // Get the jaxrpc-mapping.xml object graph
+ JavaWsdlMapping jaxrpcMapping = serContext.getJavaWsdlMapping();
- JAXBMarshaller.setProperty(JAXBConstants.JAXB_XS_MODEL, model);
- JAXBMarshaller.setProperty(JAXBConstants.JAXB_TYPE_QNAME, xmlType);
- JAXBMarshaller.setProperty(JAXBConstants.JAXB_ROOT_QNAME, xmlName);
- JAXBMarshaller.setProperty(JAXBConstants.JAXB_JAVA_MAPPING, jaxrpcMapping);
+ marshaller.setProperty(JAXBConstants.JAXB_XS_MODEL, model);
+ marshaller.setProperty(JAXBConstants.JAXB_TYPE_QNAME, xmlType);
+ marshaller.setProperty(JAXBConstants.JAXB_ROOT_QNAME, xmlName);
+ marshaller.setProperty(JAXBConstants.JAXB_JAVA_MAPPING, jaxrpcMapping);
- StringWriter strwr = new StringWriter();
- JAXBMarshaller.marshal(value, strwr);
- xmlFragment = strwr.toString();
+ StringWriter strwr = new StringWriter();
+ marshaller.marshal(value, strwr);
+ xmlFragment = strwr.toString();
- log.debug("serialized: " + xmlFragment);
+ log.debug("serialized: " + xmlFragment);
return xmlFragment;
}
|