Author: dkulp
Date: Mon Mar 31 08:12:52 2008
New Revision: 643021
URL: http://svn.apache.org/viewvc?rev=643021&view=rev
Log:
Update JAXB data binding to cache the schema DOMs (with major help from Benson)
Modified:
incubator/cxf/trunk/api/src/main/java/org/apache/cxf/databinding/AbstractDataBinding.java
incubator/cxf/trunk/api/src/main/java/org/apache/cxf/service/model/ServiceInfo.java
incubator/cxf/trunk/common/common/src/main/java/org/apache/cxf/staxutils/StaxUtils.java
incubator/cxf/trunk/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/JAXBDataBinding.java
incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/WrapperClassGenerator.java
Modified:
incubator/cxf/trunk/api/src/main/java/org/apache/cxf/databinding/AbstractDataBinding.java
URL:
http://svn.apache.org/viewvc/incubator/cxf/trunk/api/src/main/java/org/apache/cxf/databinding/AbstractDataBinding.java?rev=643021&r1=643020&r2=643021&view=diff
==============================================================================
---
incubator/cxf/trunk/api/src/main/java/org/apache/cxf/databinding/AbstractDataBinding.java
(original)
+++
incubator/cxf/trunk/api/src/main/java/org/apache/cxf/databinding/AbstractDataBinding.java
Mon Mar 31 08:12:52 2008
@@ -24,6 +24,9 @@
import java.util.HashSet;
import java.util.Map;
import java.util.Set;
+
+import javax.xml.parsers.ParserConfigurationException;
+import javax.xml.stream.XMLStreamException;
import javax.xml.transform.dom.DOMSource;
import org.w3c.dom.Document;
@@ -35,6 +38,7 @@
import org.apache.cxf.common.xmlschema.SchemaCollection;
import org.apache.cxf.service.model.SchemaInfo;
import org.apache.cxf.service.model.ServiceInfo;
+import org.apache.cxf.staxutils.StaxUtils;
import org.apache.ws.commons.schema.XmlSchema;
/**
@@ -65,6 +69,9 @@
String systemId) {
String ns = d.getDocumentElement().getAttribute("targetNamespace");
if (StringUtils.isEmpty(ns)) {
+ //create a copy of the dom so we
+ //can modify it.
+ d = copy(d);
ns = serviceInfo.getInterface().getName().getNamespaceURI();
d.getDocumentElement().setAttribute("targetNamespace", ns);
}
@@ -87,7 +94,17 @@
serviceInfo.addSchema(schema);
return xmlSchema;
}
-
+ private Document copy(Document doc) {
+ try {
+ return StaxUtils.copy(doc);
+ } catch (XMLStreamException e) {
+ //ignore
+ } catch (ParserConfigurationException e) {
+ //ignore
+ }
+ return doc;
+ }
+
protected void updateSchemaLocation(Element e) {
String ns = e.getAttribute("namespace");
String newLoc = BUILTIN_SCHEMA_LOCS.get(ns);
Modified:
incubator/cxf/trunk/api/src/main/java/org/apache/cxf/service/model/ServiceInfo.java
URL:
http://svn.apache.org/viewvc/incubator/cxf/trunk/api/src/main/java/org/apache/cxf/service/model/ServiceInfo.java?rev=643021&r1=643020&r2=643021&view=diff
==============================================================================
---
incubator/cxf/trunk/api/src/main/java/org/apache/cxf/service/model/ServiceInfo.java
(original)
+++
incubator/cxf/trunk/api/src/main/java/org/apache/cxf/service/model/ServiceInfo.java
Mon Mar 31 08:12:52 2008
@@ -177,4 +177,10 @@
xmlSchemaCollection = serviceSchemaInfo.getSchemaCollection();
schemas = serviceSchemaInfo.getSchemaInfoList();
}
+
+ public void setSchemas(SchemaCollection cachedXmlSchemaCollection,
+ List<SchemaInfo> cachedSchemas) {
+ xmlSchemaCollection = cachedXmlSchemaCollection;
+ schemas = cachedSchemas;
+ }
}
Modified:
incubator/cxf/trunk/common/common/src/main/java/org/apache/cxf/staxutils/StaxUtils.java
URL:
http://svn.apache.org/viewvc/incubator/cxf/trunk/common/common/src/main/java/org/apache/cxf/staxutils/StaxUtils.java?rev=643021&r1=643020&r2=643021&view=diff
==============================================================================
---
incubator/cxf/trunk/common/common/src/main/java/org/apache/cxf/staxutils/StaxUtils.java
(original)
+++
incubator/cxf/trunk/common/common/src/main/java/org/apache/cxf/staxutils/StaxUtils.java
Mon Mar 31 08:12:52 2008
@@ -30,6 +30,7 @@
import javax.xml.namespace.NamespaceContext;
import javax.xml.namespace.QName;
import javax.xml.parsers.DocumentBuilder;
+import javax.xml.parsers.ParserConfigurationException;
import javax.xml.stream.StreamFilter;
import javax.xml.stream.XMLInputFactory;
import javax.xml.stream.XMLOutputFactory;
@@ -255,6 +256,16 @@
return false;
}
+ public static Document copy(Document doc)
+ throws XMLStreamException, ParserConfigurationException {
+
+ XMLStreamReader reader = createXMLStreamReader(doc);
+ W3CDOMStreamWriter writer = new W3CDOMStreamWriter();
+ copy(reader, writer);
+ Document d = writer.getDocument();
+ d.setDocumentURI(doc.getDocumentURI());
+ return d;
+ }
public static void copy(Document doc, XMLStreamWriter writer) throws
XMLStreamException {
XMLStreamReader reader = createXMLStreamReader(doc);
copy(reader, writer);
Modified:
incubator/cxf/trunk/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/JAXBDataBinding.java
URL:
http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/JAXBDataBinding.java?rev=643021&r1=643020&r2=643021&view=diff
==============================================================================
---
incubator/cxf/trunk/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/JAXBDataBinding.java
(original)
+++
incubator/cxf/trunk/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/JAXBDataBinding.java
Mon Mar 31 08:12:52 2008
@@ -76,13 +76,12 @@
public final class JAXBDataBinding extends AbstractDataBinding {
public static final String SCHEMA_RESOURCE = "SCHEMRESOURCE";
public static final String MTOM_THRESHOLD =
"org.apache.cxf.jaxb.mtomThreshold";
-
+
public static final String UNWRAP_JAXB_ELEMENT = "unwrap.jaxb.element";
-
+
public static final String USE_JAXB_BRIDGE = "use.jaxb.bridge";
-
- private static final Logger LOG =
LogUtils.getLogger(JAXBDataBinding.class);
+ private static final Logger LOG =
LogUtils.getLogger(JAXBDataBinding.class);
private static final Class<?> SUPPORTED_READER_FORMATS[] = new Class<?>[]
{Node.class,
XMLEventReader.class,
@@ -91,12 +90,34 @@
Node.class,
XMLEventWriter.class,
XMLStreamWriter.class};
-
- private static final Map<Set<Class<?>>, JAXBContext> JAXBCONTEXT_CACHE =
- new CacheMap<Set<Class<?>>, JAXBContext>();
+
+ private static final class CachedContextAndSchemas {
+ private JAXBContext context;
+ private Collection<DOMSource> schemas;
+
+ CachedContextAndSchemas(JAXBContext context) {
+ this.context = context;
+ }
+
+ public JAXBContext getContext() {
+ return context;
+ }
+
+ public Collection<DOMSource> getSchemas() {
+ return schemas;
+ }
+
+ public void setSchemas(Collection<DOMSource> schemas) {
+ this.schemas = schemas;
+ }
+
+ }
+
+ private static final Map<Set<Class<?>>, CachedContextAndSchemas>
JAXBCONTEXT_CACHE
+ = new CacheMap<Set<Class<?>>, CachedContextAndSchemas>();
Class[] extraClass;
-
+
JAXBContext context;
Set<Class<?>> contextClasses;
@@ -107,15 +128,15 @@
private boolean qualifiedSchemas;
private Service service;
-
+
public JAXBDataBinding() {
}
public JAXBDataBinding(boolean q) {
this.qualifiedSchemas = q;
}
-
- public JAXBDataBinding(Class<?>...classes) throws JAXBException {
+
+ public JAXBDataBinding(Class<?>... classes) throws JAXBException {
contextClasses = new LinkedHashSet<Class<?>>();
contextClasses.addAll(Arrays.asList(classes));
setContext(createJAXBContext(contextClasses));
@@ -132,16 +153,16 @@
public void setContext(JAXBContext ctx) {
context = ctx;
- }
-
+ }
+
private NamespacePrefixMapper getNamespacePrefixMapper() {
Map<String, String> mappings = getDeclaredNamespaceMappings();
if (mappings == null) {
mappings = Collections.emptyMap();
}
-
+
final Map<String, String> closedMappings = mappings;
-
+
NamespacePrefixMapper mapper = new NamespacePrefixMapper() {
@Override
public String getPreferredPrefix(String namespaceUri, String
suggestion, boolean requirePrefix) {
@@ -150,12 +171,11 @@
return prefix;
}
return suggestion;
- }
+ }
};
return mapper;
}
-
@SuppressWarnings("unchecked")
public <T> DataWriter<T> createWriter(Class<T> c) {
Map<String, Object> currentMarshallerProperties = new HashMap<String,
Object>();
@@ -163,29 +183,34 @@
currentMarshallerProperties.put("com.sun.xml.bind.namespacePrefixMapper",
getNamespacePrefixMapper());
}
-
+
Integer mtomThresholdInt = new Integer(getMtomThreshold());
if (c == XMLStreamWriter.class) {
- DataWriterImpl<XMLStreamWriter> r =
- new DataWriterImpl<XMLStreamWriter>(context,
currentMarshallerProperties, contextClasses);
+ DataWriterImpl<XMLStreamWriter> r
+ = new DataWriterImpl<XMLStreamWriter>(
+ context,
+ currentMarshallerProperties,
+ contextClasses);
r.setMtomThreshold(mtomThresholdInt);
return (DataWriter<T>)r;
} else if (c == OutputStream.class) {
- DataWriterImpl<OutputStream> r =
- new DataWriterImpl<OutputStream>(context,
currentMarshallerProperties, contextClasses);
+ DataWriterImpl<OutputStream> r = new
DataWriterImpl<OutputStream>(context,
+
currentMarshallerProperties,
+
contextClasses);
r.setMtomThreshold(mtomThresholdInt);
- return (DataWriter<T>)r;
+ return (DataWriter<T>)r;
} else if (c == XMLEventWriter.class) {
- DataWriterImpl<XMLEventWriter> r = new
DataWriterImpl<XMLEventWriter>(context,
- currentMarshallerProperties, contextClasses);
+ DataWriterImpl<XMLEventWriter> r = new
DataWriterImpl<XMLEventWriter>(
+
context,
+
currentMarshallerProperties,
+
contextClasses);
r.setMtomThreshold(mtomThresholdInt);
- return (DataWriter<T>)r;
+ return (DataWriter<T>)r;
} else if (c == Node.class) {
- DataWriterImpl<Node> r = new DataWriterImpl<Node>(context,
- currentMarshallerProperties,
- contextClasses);
+ DataWriterImpl<Node> r = new DataWriterImpl<Node>(context,
currentMarshallerProperties,
+ contextClasses);
r.setMtomThreshold(mtomThresholdInt);
- return (DataWriter<T>)r;
+ return (DataWriter<T>)r;
}
return null;
}
@@ -204,67 +229,70 @@
} else if (c == Node.class) {
dr = (DataReader<T>)new DataReaderImpl<Node>(context,
contextClasses);
}
-
+
return dr;
}
public Class<?>[] getSupportedReaderFormats() {
return SUPPORTED_READER_FORMATS;
}
-
+
@SuppressWarnings("unchecked")
public void initialize(Service aservice) {
this.service = aservice;
- //context is already set, don't redo it
+ // context is already set, don't redo it
if (context != null) {
return;
}
-
+
+ CachedContextAndSchemas cachedContextAndSchemas = null;
+
contextClasses = new LinkedHashSet<Class<?>>();
for (ServiceInfo serviceInfo : service.getServiceInfos()) {
- JAXBContextInitializer initializer =
- new JAXBContextInitializer(serviceInfo, contextClasses);
+ JAXBContextInitializer initializer = new
JAXBContextInitializer(serviceInfo, contextClasses);
initializer.walk();
if (serviceInfo.getProperty("extra.class") != null) {
Set<Class<?>> exClasses =
serviceInfo.getProperty("extra.class", Set.class);
contextClasses.addAll(exClasses);
}
-
+
}
-
- String tns = service.getName().getNamespaceURI();
+
+ String tns = service.getName().getNamespaceURI();
JAXBContext ctx = null;
- try {
+ try {
if (service.getServiceInfos().size() > 0) {
tns =
service.getServiceInfos().get(0).getInterface().getName().getNamespaceURI();
}
ctx = createJAXBContext(contextClasses, tns);
+ cachedContextAndSchemas = JAXBCONTEXT_CACHE.get(contextClasses);
} catch (JAXBException e1) {
- //load jaxb needed class and try to create jaxb context for more
times
- boolean added = addJaxbObjectFactory(e1);
+ // load jaxb needed class and try to create jaxb context for more
+ // times
+ boolean added = addJaxbObjectFactory(e1);
while (ctx == null && added) {
try {
- synchronized (JAXBCONTEXT_CACHE) {
- ctx =
JAXBContext.newInstance(contextClasses.toArray(new Class[contextClasses.size()])
- , null);
- JAXBCONTEXT_CACHE.put(contextClasses, ctx);
- }
+ synchronized (JAXBCONTEXT_CACHE) {
+ ctx = JAXBContext.newInstance(contextClasses
+ .toArray(new Class[contextClasses.size()]), null);
+ cachedContextAndSchemas = new
CachedContextAndSchemas(ctx);
+ JAXBCONTEXT_CACHE.put(contextClasses,
cachedContextAndSchemas);
+ }
} catch (JAXBException e) {
e1 = e;
- added = addJaxbObjectFactory(e1);
+ added = addJaxbObjectFactory(e1);
}
}
if (ctx == null) {
throw new ServiceConstructionException(e1);
}
}
-
+
if (LOG.isLoggable(Level.FINE)) {
LOG.log(Level.FINE, "CREATED_JAXB_CONTEXT", new Object[] {ctx,
contextClasses});
}
setContext(ctx);
-
-
+
for (ServiceInfo serviceInfo : service.getServiceInfos()) {
SchemaCollection col = serviceInfo.getXmlSchemaCollection();
@@ -272,50 +300,55 @@
// someone has already filled in the types
continue;
}
-
- Collection<DOMSource> schemas = getSchemas();
- if (schemas != null) {
- for (DOMSource r : schemas) {
- addSchemaDocument(serviceInfo, col,
- (Document)r.getNode(), r.getSystemId());
- }
- } else {
+
+ boolean schemasFromCache = false;
+ Collection<DOMSource> schemas =
cachedContextAndSchemas.getSchemas();
+ if (schemas == null) {
+ schemas = getSchemas();
+ }
+ if (schemas == null) {
+ schemas = new HashSet<DOMSource>();
try {
for (DOMResult r : generateJaxbSchemas()) {
- addSchemaDocument(serviceInfo, col,
- (Document)r.getNode(),
r.getSystemId());
+ schemas.add(new DOMSource(r.getNode()));
}
} catch (IOException e) {
throw new ServiceConstructionException(new
Message("SCHEMA_GEN_EXC", LOG), e);
}
}
-
+ for (DOMSource r : schemas) {
+ addSchemaDocument(serviceInfo,
+ col,
+ (Document)r.getNode(),
+ r.getSystemId());
+ }
+
JAXBContextImpl riContext;
if (context instanceof JAXBContextImpl) {
- riContext = (JAXBContextImpl) context;
+ riContext = (JAXBContextImpl)context;
} else {
// fall back if we're using another jaxb implementation
try {
- riContext = (JAXBContextImpl)
- ContextFactory.createContext(
- contextClasses.toArray(new
Class[contextClasses.size()]), null);
+ riContext =
(JAXBContextImpl)ContextFactory.createContext(contextClasses
+ .toArray(new Class[contextClasses.size()]), null);
} catch (JAXBException e) {
throw new ServiceConstructionException(e);
}
}
-
- JAXBSchemaInitializer schemaInit = new
JAXBSchemaInitializer(serviceInfo,
- col,
-
riContext,
+
+ JAXBSchemaInitializer schemaInit = new
JAXBSchemaInitializer(serviceInfo, col, riContext,
this.qualifiedSchemas);
schemaInit.walk();
+ if (cachedContextAndSchemas != null && !schemasFromCache) {
+ cachedContextAndSchemas.setSchemas(schemas);
+ }
}
}
-
+
public void setExtraClass(Class[] userExtraClass) {
extraClass = userExtraClass;
}
-
+
public Class[] getExtraClass() {
return extraClass;
}
@@ -328,18 +361,15 @@
{
builtIns.put("http://www.w3.org/2005/02/addressing/wsdl",
"classpath:/schemas/wsdl/ws-addr-wsdl.xsd");
- builtIns.put("http://www.w3.org/2005/08/addressing",
- "classpath:/schemas/wsdl/ws-addr.xsd");
- builtIns.put("http://schemas.xmlsoap.org/ws/2005/02/rm",
- "classpath:/schemas/wsdl/wsrm.xsd");
- builtIns.put("http://www.w3.org/2005/05/xmlmime",
- "classpath:/schemas/wsdl/ws-addr.xsd");
+ builtIns.put("http://www.w3.org/2005/08/addressing",
"classpath:/schemas/wsdl/ws-addr.xsd");
+ builtIns.put("http://schemas.xmlsoap.org/ws/2005/02/rm",
"classpath:/schemas/wsdl/wsrm.xsd");
+ builtIns.put("http://www.w3.org/2005/05/xmlmime",
"classpath:/schemas/wsdl/ws-addr.xsd");
}
-
+
@Override
public Result createOutput(String ns, String file) throws
IOException {
DOMResult result = new DOMResult();
-
+
if (builtIns.containsKey(ns)) {
result.setSystemId(builtIns.get(ns));
return result;
@@ -352,14 +382,12 @@
return results;
}
-
public JAXBContext createJAXBContext(Set<Class<?>> classes) throws
JAXBException {
return createJAXBContext(classes, null);
}
-
- public JAXBContext createJAXBContext(Set<Class<?>> classes,
- String defaultNs) throws
JAXBException {
+
+ public JAXBContext createJAXBContext(Set<Class<?>> classes, String
defaultNs) throws JAXBException {
Iterator it = classes.iterator();
String className = "";
Object remoteExceptionObject = null;
@@ -376,24 +404,26 @@
classes.add(clz);
}
}
-
- //try and read any jaxb.index files that are with the other classes.
This should
- //allow loading of extra classes (such as subclasses for inheritance
reasons)
- //that are in the same package. Also check for ObjectFactory classes
+
+ // try and read any jaxb.index files that are with the other classes.
+ // This should
+ // allow loading of extra classes (such as subclasses for inheritance
+ // reasons)
+ // that are in the same package. Also check for ObjectFactory classes
Map<String, InputStream> packages = new HashMap<String, InputStream>();
Map<String, ClassLoader> packageLoaders = new HashMap<String,
ClassLoader>();
Set<Class<?>> objectFactories = new HashSet<Class<?>>();
for (Class<?> jcls : classes) {
- String pkgName = PackageUtils.getPackageName(jcls);
+ String pkgName = PackageUtils.getPackageName(jcls);
if (!packages.containsKey(pkgName)) {
packages.put(pkgName, jcls.getResourceAsStream("jaxb.index"));
packageLoaders.put(pkgName, jcls.getClassLoader());
try {
- Class<?> ofactory = Class.forName(pkgName + "." +
"ObjectFactory",
- false, jcls.getClassLoader());
+ Class<?> ofactory = Class.forName(pkgName + "." +
"ObjectFactory", false, jcls
+ .getClassLoader());
objectFactories.add(ofactory);
} catch (ClassNotFoundException e) {
- //ignore
+ // ignore
}
}
}
@@ -407,7 +437,7 @@
if (!StringUtils.isEmpty(pkg)) {
pkg += ".";
}
-
+
String line = reader.readLine();
while (line != null) {
line = line.trim();
@@ -419,18 +449,18 @@
Class<?> ncls = Class.forName(pkg + line,
false, loader);
classes.add(ncls);
} catch (Exception e) {
- //ignore
+ // ignore
}
}
line = reader.readLine();
}
} catch (Exception e) {
- //ignore
+ // ignore
} finally {
try {
entry.getValue().close();
} catch (Exception e) {
- //ignore
+ // ignore
}
}
}
@@ -440,29 +470,33 @@
for (Class<?> clz : classes) {
if (clz.getName().endsWith("ObjectFactory")) {
- //kind of a hack, but ObjectFactories may be created with
empty namespaces
+ // kind of a hack, but ObjectFactories may be created with
empty
+ // namespaces
defaultNs = null;
}
}
-
+
Map<String, Object> map = new HashMap<String, Object>();
if (defaultNs != null) {
map.put("com.sun.xml.bind.defaultNamespaceRemap", defaultNs);
}
-
+
if (contextProperties != null) {
- //add any specified context properties into the properties map
+ // add any specified context properties into the properties map
map.putAll(contextProperties);
- }
-
+ }
+
+ CachedContextAndSchemas cachedContextAndSchemas = null;
synchronized (JAXBCONTEXT_CACHE) {
if (!JAXBCONTEXT_CACHE.containsKey(classes)) {
JAXBContext ctx = JAXBContext.newInstance(classes.toArray(new
Class[classes.size()]), map);
- JAXBCONTEXT_CACHE.put(classes, ctx);
+ cachedContextAndSchemas = new CachedContextAndSchemas(ctx);
+ JAXBCONTEXT_CACHE.put(classes, cachedContextAndSchemas);
}
}
- return JAXBCONTEXT_CACHE.get(classes);
+ cachedContextAndSchemas = JAXBCONTEXT_CACHE.get(classes);
+ return cachedContextAndSchemas.getContext();
}
private void addWsAddressingTypes(Set<Class<?>> classes) {
@@ -476,36 +510,36 @@
// REVISIT - ignorable if WS-ADDRESSING not available?
// maybe add a way to allow interceptors to add stuff to the
// context?
- }
+ }
}
}
-
-
- //Now we can not add all the classes that Jaxb needed into JaxbContext,
especially when
- //an ObjectFactory is pointed to by an jaxb @XmlElementDecl annotation
- //added this workaround method to load the jaxb needed ObjectFactory class
+
+ // Now we can not add all the classes that Jaxb needed into JaxbContext,
+ // especially when
+ // an ObjectFactory is pointed to by an jaxb @XmlElementDecl annotation
+ // added this workaround method to load the jaxb needed ObjectFactory class
public boolean addJaxbObjectFactory(JAXBException e1) {
boolean added = false;
java.io.ByteArrayOutputStream bout = new
java.io.ByteArrayOutputStream();
java.io.PrintStream pout = new java.io.PrintStream(bout);
e1.printStackTrace(pout);
String str = new String(bout.toByteArray());
- Pattern pattern =
Pattern.compile("(?<=There's\\sno\\sObjectFactory\\swith\\san\\s"
+ Pattern pattern =
Pattern.compile("(?<=There's\\sno\\sObjectFactory\\swith\\san\\s"
+
"@XmlElementDecl\\sfor\\sthe\\selement\\s\\{)\\S*(?=\\})");
- java.util.regex.Matcher matcher = pattern.matcher(str);
- while (matcher.find()) {
+ java.util.regex.Matcher matcher = pattern.matcher(str);
+ while (matcher.find()) {
String pkgName = JAXBUtils.namespaceURIToPackage(matcher.group());
try {
- Class clz = getClass().getClassLoader().loadClass(pkgName +
"." + "ObjectFactory");
-
+ Class clz = getClass().getClassLoader().loadClass(pkgName +
"." + "ObjectFactory");
+
if (!contextClasses.contains(clz)) {
contextClasses.add(clz);
added = true;
}
} catch (ClassNotFoundException e) {
- //do nothing
+ // do nothing
}
-
+
}
return added;
}
@@ -513,6 +547,7 @@
/**
* Return a map of properties. These properties are passed to
* JAXBContext.newInstance when this object creates a context.
+ *
* @return the map of JAXB context properties.
*/
public Map<String, Object> getContextProperties() {
@@ -520,20 +555,22 @@
}
/**
- * Set a map of JAXB context properties. These properties are passed
- * to JAXBContext.newInstance when this object creates a context.
- * Note that if you create a JAXB context elsewhere, you will
- * not respect these properties unless you handle it manually.
+ * Set a map of JAXB context properties. These properties are passed to
+ * JAXBContext.newInstance when this object creates a context. Note that if
+ * you create a JAXB context elsewhere, you will not respect these
+ * properties unless you handle it manually.
*
* @param contextProperties map of properties.
*/
public void setContextProperties(Map<String, Object> contextProperties) {
this.contextProperties = contextProperties;
}
-
+
/**
- * Return a map of properties. These properties are set into the JAXB
Marshaller
- * (via Marshaller.setProperty(...) when the marshaller is created.
+ * Return a map of properties. These properties are set into the JAXB
+ * Marshaller (via Marshaller.setProperty(...) when the marshaller is
+ * created.
+ *
* @return the map of JAXB marshaller properties.
*/
public Map<String, Object> getMarshallerProperties() {
@@ -541,8 +578,9 @@
}
/**
- * Set a map of JAXB marshaller properties. These properties are set into
the JAXB Marshaller
- * (via Marshaller.setProperty(...) when the marshaller is created.
+ * Set a map of JAXB marshaller properties. These properties are set into
+ * the JAXB Marshaller (via Marshaller.setProperty(...) when the marshaller
+ * is created.
*
* @param marshallerProperties map of properties.
*/
Modified:
incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/WrapperClassGenerator.java
URL:
http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/WrapperClassGenerator.java?rev=643021&r1=643020&r2=643021&view=diff
==============================================================================
---
incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/WrapperClassGenerator.java
(original)
+++
incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/WrapperClassGenerator.java
Mon Mar 31 08:12:52 2008
@@ -161,12 +161,12 @@
QName wrapperElement = messageInfo.getName();
ClassWriter cw = createClassWriter();
- String className = getPackageName(method) + ".jaxws."
+ String className = getPackageName(method) + ".jaxws_asm."
+ StringUtils.capitalize(op.getName().getLocalPart());
if (!isRequest) {
className = className + "Response";
}
- String pname = getPackageName(method) + ".jaxws.package-info";
+ String pname = getPackageName(method) + ".jaxws_asm.package-info";
Class<?> def = findClass(pname, method.getDeclaringClass());
if (def == null) {
generatePackageInfo(pname, wrapperElement.getNamespaceURI(),