Author: dkulp
Date: Tue Feb 5 18:06:35 2008
New Revision: 618854
URL: http://svn.apache.org/viewvc?rev=618854&view=rev
Log:
Merged revisions 614696 via svnmerge from
https://svn.apache.org/repos/asf/incubator/cxf/trunk
........
r614696 | dkulp | 2008-01-23 16:53:17 -0500 (Wed, 23 Jan 2008) | 6 lines
Fix a bunch of warnings in eclipse that now show up with the latest eclipse
checkstyle plugin. :-(
Fix some wsdl that were invalid
Fix some aegis cases that were generating invalid wsdls
Fix some issues with validation where schemas were not found (more work to do
here)
Fix issue of stack traces on every request (instead of just once) if it fails
to process the schema
........
Modified:
incubator/cxf/branches/2.0.x-fixes/ (props changed)
incubator/cxf/branches/2.0.x-fixes/api/src/main/java/org/apache/cxf/service/model/AbstractPropertiesHolder.java
incubator/cxf/branches/2.0.x-fixes/api/src/main/java/org/apache/cxf/tools/common/ToolConstants.java
incubator/cxf/branches/2.0.x-fixes/api/src/main/java/org/apache/cxf/wsdl/EndpointReferenceUtils.java
incubator/cxf/branches/2.0.x-fixes/common/common/src/main/java/org/apache/cxf/common/xmlschema/XmlSchemaConstants.java
incubator/cxf/branches/2.0.x-fixes/common/common/src/main/java/org/apache/cxf/jaxb/JAXBToStringStyle.java
incubator/cxf/branches/2.0.x-fixes/rt/bindings/http/src/main/java/org/apache/cxf/binding/http/HttpConstants.java
incubator/cxf/branches/2.0.x-fixes/rt/bindings/jbi/src/main/java/org/apache/cxf/binding/jbi/JBIConstants.java
incubator/cxf/branches/2.0.x-fixes/rt/bindings/xml/src/main/java/org/apache/cxf/binding/xml/XMLConstants.java
incubator/cxf/branches/2.0.x-fixes/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/databinding/AegisDatabinding.java
incubator/cxf/branches/2.0.x-fixes/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/TypeUtil.java
incubator/cxf/branches/2.0.x-fixes/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/basic/ArrayType.java
incubator/cxf/branches/2.0.x-fixes/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/basic/BeanType.java
incubator/cxf/branches/2.0.x-fixes/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/collection/MapType.java
incubator/cxf/branches/2.0.x-fixes/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/JAXBDataBinding.java
incubator/cxf/branches/2.0.x-fixes/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSConstants.java
incubator/cxf/branches/2.0.x-fixes/rt/ws/policy/src/main/java/org/apache/cxf/ws/policy/mtom/MetadataConstants.java
incubator/cxf/branches/2.0.x-fixes/systests/src/test/java/org/apache/cxf/systest/coloc/HeaderTesterUtil.java
incubator/cxf/branches/2.0.x-fixes/systests/src/test/java/org/apache/cxf/systest/servlet/test_import.xsd
incubator/cxf/branches/2.0.x-fixes/systests/src/test/java/org/apache/cxf/systest/type_test/I18NStrings.java
incubator/cxf/branches/2.0.x-fixes/testutils/src/main/resources/wsdl/inherit.wsdl
incubator/cxf/branches/2.0.x-fixes/testutils/src/main/resources/wsdl/jaxb_element_test.wsdl
incubator/cxf/branches/2.0.x-fixes/tools/javato/ws/src/main/java/org/apache/cxf/tools/java2ws/JavaToWS.java
Propchange: incubator/cxf/branches/2.0.x-fixes/
------------------------------------------------------------------------------
Binary property 'svnmerge-integrated' - no diff available.
Modified:
incubator/cxf/branches/2.0.x-fixes/api/src/main/java/org/apache/cxf/service/model/AbstractPropertiesHolder.java
URL:
http://svn.apache.org/viewvc/incubator/cxf/branches/2.0.x-fixes/api/src/main/java/org/apache/cxf/service/model/AbstractPropertiesHolder.java?rev=618854&r1=618853&r2=618854&view=diff
==============================================================================
---
incubator/cxf/branches/2.0.x-fixes/api/src/main/java/org/apache/cxf/service/model/AbstractPropertiesHolder.java
(original)
+++
incubator/cxf/branches/2.0.x-fixes/api/src/main/java/org/apache/cxf/service/model/AbstractPropertiesHolder.java
Tue Feb 5 18:06:35 2008
@@ -43,6 +43,13 @@
public <T> T getProperty(String name, Class<T> cls) {
return cls.cast(getProperty(name));
}
+ public boolean hasProperty(String name) {
+ Map<String, Object> map = propertyMap.get();
+ if (map != null) {
+ return map.containsKey(name);
+ }
+ return false;
+ }
public void setProperty(String name, Object v) {
if (null == propertyMap.get()) {
Modified:
incubator/cxf/branches/2.0.x-fixes/api/src/main/java/org/apache/cxf/tools/common/ToolConstants.java
URL:
http://svn.apache.org/viewvc/incubator/cxf/branches/2.0.x-fixes/api/src/main/java/org/apache/cxf/tools/common/ToolConstants.java?rev=618854&r1=618853&r2=618854&view=diff
==============================================================================
---
incubator/cxf/branches/2.0.x-fixes/api/src/main/java/org/apache/cxf/tools/common/ToolConstants.java
(original)
+++
incubator/cxf/branches/2.0.x-fixes/api/src/main/java/org/apache/cxf/tools/common/ToolConstants.java
Tue Feb 5 18:06:35 2008
@@ -224,4 +224,8 @@
public static final String IMPL_CLASS = "implClass";
public static final String SERVICE_NAME = "serviceName";
public static final String PORT_NAME = "portName";
+
+ private ToolConstants() {
+ //utility class
+ }
}
Modified:
incubator/cxf/branches/2.0.x-fixes/api/src/main/java/org/apache/cxf/wsdl/EndpointReferenceUtils.java
URL:
http://svn.apache.org/viewvc/incubator/cxf/branches/2.0.x-fixes/api/src/main/java/org/apache/cxf/wsdl/EndpointReferenceUtils.java?rev=618854&r1=618853&r2=618854&view=diff
==============================================================================
---
incubator/cxf/branches/2.0.x-fixes/api/src/main/java/org/apache/cxf/wsdl/EndpointReferenceUtils.java
(original)
+++
incubator/cxf/branches/2.0.x-fixes/api/src/main/java/org/apache/cxf/wsdl/EndpointReferenceUtils.java
Tue Feb 5 18:06:35 2008
@@ -55,6 +55,7 @@
import org.w3c.dom.ls.LSInput;
import org.w3c.dom.ls.LSResourceResolver;
+import org.xml.sax.InputSource;
import org.xml.sax.SAXException;
import org.apache.cxf.Bus;
@@ -65,6 +66,8 @@
import org.apache.cxf.endpoint.Server;
import org.apache.cxf.endpoint.ServerRegistry;
import org.apache.cxf.helpers.LoadingByteArrayOutputStream;
+import org.apache.cxf.helpers.XMLUtils;
+import org.apache.cxf.resource.ExtendedURIResolver;
import org.apache.cxf.service.model.SchemaInfo;
import org.apache.cxf.service.model.ServiceInfo;
import org.apache.cxf.transport.Destination;
@@ -94,7 +97,7 @@
*/
private static final class SchemaLSResourceResolver implements
LSResourceResolver {
private final ServiceInfo si;
-
+ private final ExtendedURIResolver resolver = new ExtendedURIResolver();
private SchemaLSResourceResolver(ServiceInfo serviceInfo) {
this.si = serviceInfo;
}
@@ -142,6 +145,21 @@
return impl;
}
}
+ //REVIST - we need to get catalogs in here somehow :-(
+ if (systemId == null) {
+ systemId = publicId;
+ }
+ if (systemId != null) {
+ InputSource source = resolver.resolve(systemId, baseURI);
+ if (source != null) {
+ LSInputImpl impl = new LSInputImpl();
+ impl.setByteStream(source.getByteStream());
+ impl.setSystemId(source.getSystemId());
+ impl.setPublicId(source.getPublicId());
+ return impl;
+ }
+ }
+ LOG.warning("Could not resolve Schema for " + systemId);
return null;
}
}
@@ -512,7 +530,7 @@
return null;
}
Schema schema = serviceInfo.getProperty(Schema.class.getName(),
Schema.class);
- if (schema == null) {
+ if (schema == null &&
!serviceInfo.hasProperty(Schema.class.getName())) {
SchemaFactory factory = SchemaFactory.newInstance(
XMLConstants.W3C_XML_SCHEMA_NS_URI);
List<Source> schemaSources = new ArrayList<Source>();
@@ -529,15 +547,15 @@
try {
factory.setResourceResolver(new
SchemaLSResourceResolver(serviceInfo));
schema = factory.newSchema(schemaSources.toArray(new
Source[schemaSources.size()]));
- if (schema != null) {
- serviceInfo.setProperty(Schema.class.getName(), schema);
- LOG.log(Level.FINE, "Obtained schema from ServiceInfo");
- }
} catch (SAXException ex) {
// Something not right with the schema from the wsdl.
LOG.log(Level.WARNING, "SAXException for newSchema() on ", ex);
+ for (SchemaInfo schemaInfo : serviceInfo.getSchemas()) {
+ String s = XMLUtils.toString(schemaInfo.getElement(), 4);
+ LOG.log(Level.WARNING, "Schema for: " +
schemaInfo.getNamespaceURI() + "\n" + s);
+ }
}
-
+ serviceInfo.setProperty(Schema.class.getName(), schema);
}
return schema;
}
Modified:
incubator/cxf/branches/2.0.x-fixes/common/common/src/main/java/org/apache/cxf/common/xmlschema/XmlSchemaConstants.java
URL:
http://svn.apache.org/viewvc/incubator/cxf/branches/2.0.x-fixes/common/common/src/main/java/org/apache/cxf/common/xmlschema/XmlSchemaConstants.java?rev=618854&r1=618853&r2=618854&view=diff
==============================================================================
---
incubator/cxf/branches/2.0.x-fixes/common/common/src/main/java/org/apache/cxf/common/xmlschema/XmlSchemaConstants.java
(original)
+++
incubator/cxf/branches/2.0.x-fixes/common/common/src/main/java/org/apache/cxf/common/xmlschema/XmlSchemaConstants.java
Tue Feb 5 18:06:35 2008
@@ -74,4 +74,8 @@
public static final QName UNSIGNEDLONG_QNAME = new
QName(XSD_NAMESPACE_URI, "unsignedLong");
public static final QName UNSIGNEDSHORT_QNAME = new
QName(XSD_NAMESPACE_URI, "unsignedShort");
+ private XmlSchemaConstants() {
+ //utility class
+ }
+
}
Modified:
incubator/cxf/branches/2.0.x-fixes/common/common/src/main/java/org/apache/cxf/jaxb/JAXBToStringStyle.java
URL:
http://svn.apache.org/viewvc/incubator/cxf/branches/2.0.x-fixes/common/common/src/main/java/org/apache/cxf/jaxb/JAXBToStringStyle.java?rev=618854&r1=618853&r2=618854&view=diff
==============================================================================
---
incubator/cxf/branches/2.0.x-fixes/common/common/src/main/java/org/apache/cxf/jaxb/JAXBToStringStyle.java
(original)
+++
incubator/cxf/branches/2.0.x-fixes/common/common/src/main/java/org/apache/cxf/jaxb/JAXBToStringStyle.java
Tue Feb 5 18:06:35 2008
@@ -28,7 +28,7 @@
/*
* Override default styles to recognise JAXBElement as needing introspection
*/
-public class JAXBToStringStyle {
+public final class JAXBToStringStyle {
public static final ToStringStyle MULTI_LINE_STYLE =
new JAXBToStringStyleImpl(true);
@@ -39,6 +39,9 @@
public static final ToStringStyle DEFAULT_STYLE =
new JAXBToStringStyleImpl();
+ private JAXBToStringStyle() {
+ //utility class
+ }
}
class JAXBToStringStyleImpl extends ToStringStyle {
Modified:
incubator/cxf/branches/2.0.x-fixes/rt/bindings/http/src/main/java/org/apache/cxf/binding/http/HttpConstants.java
URL:
http://svn.apache.org/viewvc/incubator/cxf/branches/2.0.x-fixes/rt/bindings/http/src/main/java/org/apache/cxf/binding/http/HttpConstants.java?rev=618854&r1=618853&r2=618854&view=diff
==============================================================================
---
incubator/cxf/branches/2.0.x-fixes/rt/bindings/http/src/main/java/org/apache/cxf/binding/http/HttpConstants.java
(original)
+++
incubator/cxf/branches/2.0.x-fixes/rt/bindings/http/src/main/java/org/apache/cxf/binding/http/HttpConstants.java
Tue Feb 5 18:06:35 2008
@@ -18,11 +18,15 @@
*/
package org.apache.cxf.binding.http;
-public class HttpConstants {
+public final class HttpConstants {
public static final String CONTENT_TYPE = "Content-Type";
public static final String POST = "POST";
public static final String PUT = "PUT";
public static final String DELETE = "DELETE";
public static final String GET = "GET";
+
+ private HttpConstants() {
+ //utility class
+ }
}
Modified:
incubator/cxf/branches/2.0.x-fixes/rt/bindings/jbi/src/main/java/org/apache/cxf/binding/jbi/JBIConstants.java
URL:
http://svn.apache.org/viewvc/incubator/cxf/branches/2.0.x-fixes/rt/bindings/jbi/src/main/java/org/apache/cxf/binding/jbi/JBIConstants.java?rev=618854&r1=618853&r2=618854&view=diff
==============================================================================
---
incubator/cxf/branches/2.0.x-fixes/rt/bindings/jbi/src/main/java/org/apache/cxf/binding/jbi/JBIConstants.java
(original)
+++
incubator/cxf/branches/2.0.x-fixes/rt/bindings/jbi/src/main/java/org/apache/cxf/binding/jbi/JBIConstants.java
Tue Feb 5 18:06:35 2008
@@ -31,4 +31,7 @@
public static final QName JBI_WRAPPER_PART = new QName(NS_JBI_WRAPPER,
"part");
+ private JBIConstants() {
+ //utility class
+ }
}
Modified:
incubator/cxf/branches/2.0.x-fixes/rt/bindings/xml/src/main/java/org/apache/cxf/binding/xml/XMLConstants.java
URL:
http://svn.apache.org/viewvc/incubator/cxf/branches/2.0.x-fixes/rt/bindings/xml/src/main/java/org/apache/cxf/binding/xml/XMLConstants.java?rev=618854&r1=618853&r2=618854&view=diff
==============================================================================
---
incubator/cxf/branches/2.0.x-fixes/rt/bindings/xml/src/main/java/org/apache/cxf/binding/xml/XMLConstants.java
(original)
+++
incubator/cxf/branches/2.0.x-fixes/rt/bindings/xml/src/main/java/org/apache/cxf/binding/xml/XMLConstants.java
Tue Feb 5 18:06:35 2008
@@ -23,4 +23,7 @@
public final class XMLConstants {
public static final String NS_XML_FORMAT =
"http://cxf.apache.org/bindings/xformat";
+ private XMLConstants() {
+ //utility class
+ }
}
Modified:
incubator/cxf/branches/2.0.x-fixes/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/databinding/AegisDatabinding.java
URL:
http://svn.apache.org/viewvc/incubator/cxf/branches/2.0.x-fixes/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/databinding/AegisDatabinding.java?rev=618854&r1=618853&r2=618854&view=diff
==============================================================================
---
incubator/cxf/branches/2.0.x-fixes/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/databinding/AegisDatabinding.java
(original)
+++
incubator/cxf/branches/2.0.x-fixes/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/databinding/AegisDatabinding.java
Tue Feb 5 18:06:35 2008
@@ -165,6 +165,7 @@
if (!deps.contains(t)) {
deps.add(t);
}
+ addDependencies(deps, t);
}
}
Modified:
incubator/cxf/branches/2.0.x-fixes/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/TypeUtil.java
URL:
http://svn.apache.org/viewvc/incubator/cxf/branches/2.0.x-fixes/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/TypeUtil.java?rev=618854&r1=618853&r2=618854&view=diff
==============================================================================
---
incubator/cxf/branches/2.0.x-fixes/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/TypeUtil.java
(original)
+++
incubator/cxf/branches/2.0.x-fixes/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/TypeUtil.java
Tue Feb 5 18:06:35 2008
@@ -26,6 +26,10 @@
import org.apache.cxf.aegis.Context;
import org.apache.cxf.aegis.util.NamespaceHelper;
import org.apache.cxf.aegis.util.XmlConstants;
+import org.apache.cxf.helpers.CastUtils;
+import org.jdom.Attribute;
+import org.jdom.Element;
+import org.jdom.Namespace;
/**
* Static methods/constants for Aegis.
@@ -69,6 +73,28 @@
}
}
return type;
+ }
+
+ public static Attribute createTypeAttribute(String prefix, Type type,
Element root) {
+ String ns = type.getSchemaType().getNamespaceURI();
+ if (!ns.equals(root.getAttributeValue("targetNamespace"))
+ && !ns.equals(XmlConstants.XSD)) {
+ //find import statement
+ List<Element> l = CastUtils.cast(root.getChildren("import",
+
Namespace.getNamespace(XmlConstants.XSD)));
+ boolean found = false;
+ for (Element e : l) {
+ if (ns.equals(e.getAttributeValue("namespace"))) {
+ found = true;
+ }
+ }
+ if (!found) {
+ Element element = new Element("import",
XmlConstants.XSD_PREFIX, XmlConstants.XSD);
+ root.addContent(0, element);
+ element.setAttribute("namespace", ns);
+ }
+ }
+ return new Attribute("type", prefix + ':' +
type.getSchemaType().getLocalPart());
}
}
Modified:
incubator/cxf/branches/2.0.x-fixes/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/basic/ArrayType.java
URL:
http://svn.apache.org/viewvc/incubator/cxf/branches/2.0.x-fixes/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/basic/ArrayType.java?rev=618854&r1=618853&r2=618854&view=diff
==============================================================================
---
incubator/cxf/branches/2.0.x-fixes/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/basic/ArrayType.java
(original)
+++
incubator/cxf/branches/2.0.x-fixes/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/basic/ArrayType.java
Tue Feb 5 18:06:35 2008
@@ -292,7 +292,7 @@
.getNamespaceURI());
element.setAttribute(new Attribute("name",
componentType.getSchemaType().getLocalPart()));
- element.setAttribute(BeanType.createTypeAttribute(prefix,
componentType, root));
+ element.setAttribute(TypeUtil.createTypeAttribute(prefix,
componentType, root));
if (componentType.isNillable()) {
element.setAttribute(new Attribute("nillable", "true"));
Modified:
incubator/cxf/branches/2.0.x-fixes/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/basic/BeanType.java
URL:
http://svn.apache.org/viewvc/incubator/cxf/branches/2.0.x-fixes/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/basic/BeanType.java?rev=618854&r1=618853&r2=618854&view=diff
==============================================================================
---
incubator/cxf/branches/2.0.x-fixes/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/basic/BeanType.java
(original)
+++
incubator/cxf/branches/2.0.x-fixes/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/basic/BeanType.java
Tue Feb 5 18:06:35 2008
@@ -506,7 +506,7 @@
String prefix = NamespaceHelper.getUniquePrefix(root,
type.getSchemaType().getNamespaceURI());
element.setAttribute(new Attribute("name", nameWithPrefix));
- element.setAttribute(createTypeAttribute(prefix, type, root));
+ element.setAttribute(TypeUtil.createTypeAttribute(prefix, type,
root));
}
/**
@@ -538,6 +538,7 @@
}
return new Attribute("type", prefix + ':' +
type.getSchemaType().getLocalPart());
}
+
private String getNameWithPrefix(Element root, String nameNS, String
localName) {
if (!nameNS.equals(getSchemaType().getNamespaceURI())) {
String prefix =
NamespaceHelper.getUniquePrefix((Element)root.getParent(), nameNS);
@@ -577,10 +578,10 @@
Element root) {
if (type.isAbstract()) {
element.setAttribute(new Attribute("name", nameWithPrefix));
- element.setAttribute(createTypeAttribute(prefix, type, root));
+ element.setAttribute(TypeUtil.createTypeAttribute(prefix, type,
root));
int minOccurs = getTypeInfo().getMinOccurs(name);
- if (minOccurs != 1) {
+ if (minOccurs == 0) {
element.setAttribute(new Attribute("minOccurs",
Integer.valueOf(minOccurs).toString()));
}
Modified:
incubator/cxf/branches/2.0.x-fixes/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/collection/MapType.java
URL:
http://svn.apache.org/viewvc/incubator/cxf/branches/2.0.x-fixes/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/collection/MapType.java?rev=618854&r1=618853&r2=618854&view=diff
==============================================================================
---
incubator/cxf/branches/2.0.x-fixes/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/collection/MapType.java
(original)
+++
incubator/cxf/branches/2.0.x-fixes/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/collection/MapType.java
Tue Feb 5 18:06:35 2008
@@ -212,10 +212,9 @@
String prefix = NamespaceHelper.getUniquePrefix((Element)root,
type.getSchemaType()
.getNamespaceURI());
- String typeName = prefix + ":" + type.getSchemaType().getLocalPart();
element.setAttribute(new Attribute("name", name.getLocalPart()));
- element.setAttribute(new Attribute("type", typeName));
+ element.setAttribute(TypeUtil.createTypeAttribute(prefix, type, root));
element.setAttribute(new Attribute("minOccurs", "0"));
element.setAttribute(new Attribute("maxOccurs", "1"));
Modified:
incubator/cxf/branches/2.0.x-fixes/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/JAXBDataBinding.java
URL:
http://svn.apache.org/viewvc/incubator/cxf/branches/2.0.x-fixes/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/JAXBDataBinding.java?rev=618854&r1=618853&r2=618854&view=diff
==============================================================================
---
incubator/cxf/branches/2.0.x-fixes/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/JAXBDataBinding.java
(original)
+++
incubator/cxf/branches/2.0.x-fixes/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/JAXBDataBinding.java
Tue Feb 5 18:06:35 2008
@@ -304,14 +304,27 @@
final List<DOMResult> results = new ArrayList<DOMResult>();
context.generateSchema(new SchemaOutputResolver() {
+ private Map<String, String> builtIns = new HashMap<String,
String>();
+ {
+ 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");
+ }
+
@Override
public Result createOutput(String ns, String file) throws
IOException {
DOMResult result = new DOMResult();
- result.setSystemId(file);
- // Don't include WS-Addressing bits
- if ("http://www.w3.org/2005/02/addressing/wsdl".equals(ns)) {
+
+ if (builtIns.containsKey(ns)) {
+ result.setSystemId(builtIns.get(ns));
return result;
}
+ result.setSystemId(file);
results.add(result);
return result;
}
Modified:
incubator/cxf/branches/2.0.x-fixes/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSConstants.java
URL:
http://svn.apache.org/viewvc/incubator/cxf/branches/2.0.x-fixes/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSConstants.java?rev=618854&r1=618853&r2=618854&view=diff
==============================================================================
---
incubator/cxf/branches/2.0.x-fixes/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSConstants.java
(original)
+++
incubator/cxf/branches/2.0.x-fixes/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSConstants.java
Tue Feb 5 18:06:35 2008
@@ -55,4 +55,9 @@
public static final String JMS_REBASED_REPLY_TO =
"org.apache.cxf.jms.server.replyto";
+
+ private JMSConstants() {
+ //utility class
+ }
+
}
Modified:
incubator/cxf/branches/2.0.x-fixes/rt/ws/policy/src/main/java/org/apache/cxf/ws/policy/mtom/MetadataConstants.java
URL:
http://svn.apache.org/viewvc/incubator/cxf/branches/2.0.x-fixes/rt/ws/policy/src/main/java/org/apache/cxf/ws/policy/mtom/MetadataConstants.java?rev=618854&r1=618853&r2=618854&view=diff
==============================================================================
---
incubator/cxf/branches/2.0.x-fixes/rt/ws/policy/src/main/java/org/apache/cxf/ws/policy/mtom/MetadataConstants.java
(original)
+++
incubator/cxf/branches/2.0.x-fixes/rt/ws/policy/src/main/java/org/apache/cxf/ws/policy/mtom/MetadataConstants.java
Tue Feb 5 18:06:35 2008
@@ -21,8 +21,13 @@
import javax.xml.namespace.QName;
-public class MetadataConstants {
+public final class MetadataConstants {
public static final QName MTOM_ASSERTION_QNAME =
new
QName("http://schemas.xmlsoap.org/ws/2004/09/policy/optimizedmimeserialization",
"OptimizedMimeSerialization");
+
+
+ private MetadataConstants() {
+ //utility class
+ }
}
Modified:
incubator/cxf/branches/2.0.x-fixes/systests/src/test/java/org/apache/cxf/systest/coloc/HeaderTesterUtil.java
URL:
http://svn.apache.org/viewvc/incubator/cxf/branches/2.0.x-fixes/systests/src/test/java/org/apache/cxf/systest/coloc/HeaderTesterUtil.java?rev=618854&r1=618853&r2=618854&view=diff
==============================================================================
---
incubator/cxf/branches/2.0.x-fixes/systests/src/test/java/org/apache/cxf/systest/coloc/HeaderTesterUtil.java
(original)
+++
incubator/cxf/branches/2.0.x-fixes/systests/src/test/java/org/apache/cxf/systest/coloc/HeaderTesterUtil.java
Tue Feb 5 18:06:35 2008
@@ -38,4 +38,9 @@
public static final String INOUT_REQUEST_TYPE_IN = "inout request type in";
public static final String INOUT_REQUEST_TYPE_OUT = "inout request type
out";
static final String EX_STRING = "CXF RUNTIME EXCEPTION";
+
+
+ private HeaderTesterUtil() {
+ //utility class
+ }
}
Modified:
incubator/cxf/branches/2.0.x-fixes/systests/src/test/java/org/apache/cxf/systest/servlet/test_import.xsd
URL:
http://svn.apache.org/viewvc/incubator/cxf/branches/2.0.x-fixes/systests/src/test/java/org/apache/cxf/systest/servlet/test_import.xsd?rev=618854&r1=618853&r2=618854&view=diff
==============================================================================
---
incubator/cxf/branches/2.0.x-fixes/systests/src/test/java/org/apache/cxf/systest/servlet/test_import.xsd
(original)
+++
incubator/cxf/branches/2.0.x-fixes/systests/src/test/java/org/apache/cxf/systest/servlet/test_import.xsd
Tue Feb 5 18:06:35 2008
@@ -18,11 +18,11 @@
under the License.
-->
<schema targetNamespace="http://apache.org/hello_world_soap_http_import"
-xmlns="http://www.w3.org/2001/XMLSchema"
- xmlns:tns="http://schemas.iona.com/tests/schema_parser_import"
+ xmlns="http://www.w3.org/2001/XMLSchema"
+ xmlns:tns="http://apache.org/hello_world_soap_http_import"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
-xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
+ xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
<complexType name="SimpleStruct">
<sequence>
Modified:
incubator/cxf/branches/2.0.x-fixes/systests/src/test/java/org/apache/cxf/systest/type_test/I18NStrings.java
URL:
http://svn.apache.org/viewvc/incubator/cxf/branches/2.0.x-fixes/systests/src/test/java/org/apache/cxf/systest/type_test/I18NStrings.java?rev=618854&r1=618853&r2=618854&view=diff
==============================================================================
---
incubator/cxf/branches/2.0.x-fixes/systests/src/test/java/org/apache/cxf/systest/type_test/I18NStrings.java
(original)
+++
incubator/cxf/branches/2.0.x-fixes/systests/src/test/java/org/apache/cxf/systest/type_test/I18NStrings.java
Tue Feb 5 18:06:35 2008
@@ -18,7 +18,7 @@
*/
package org.apache.cxf.systest.type_test;
-public class I18NStrings {
+public final class I18NStrings {
public static final String JAP_SIMPLE_STRING;
public static final String CHINESE_COMPLEX_STRING;
@@ -174,5 +174,8 @@
CHINESE_COMPLEX_STRING = tmp;
}
+ private I18NStrings() {
+ //utility class
+ }
}
Modified:
incubator/cxf/branches/2.0.x-fixes/testutils/src/main/resources/wsdl/inherit.wsdl
URL:
http://svn.apache.org/viewvc/incubator/cxf/branches/2.0.x-fixes/testutils/src/main/resources/wsdl/inherit.wsdl?rev=618854&r1=618853&r2=618854&view=diff
==============================================================================
---
incubator/cxf/branches/2.0.x-fixes/testutils/src/main/resources/wsdl/inherit.wsdl
(original)
+++
incubator/cxf/branches/2.0.x-fixes/testutils/src/main/resources/wsdl/inherit.wsdl
Tue Feb 5 18:06:35 2008
@@ -58,6 +58,7 @@
xmlns:x1="http://apache.org/cxf/tests/inherit/types"
xmlns:x2="http://apache.org/cxf/tests/inherit/objects"
elementFormDefault="qualified">
+ <import namespace="http://apache.org/cxf/tests/inherit/objects"/>
<complexType name="ObjectInfo">
<sequence>
<element name="baseObject" type="x2:BaseType"/>
Modified:
incubator/cxf/branches/2.0.x-fixes/testutils/src/main/resources/wsdl/jaxb_element_test.wsdl
URL:
http://svn.apache.org/viewvc/incubator/cxf/branches/2.0.x-fixes/testutils/src/main/resources/wsdl/jaxb_element_test.wsdl?rev=618854&r1=618853&r2=618854&view=diff
==============================================================================
---
incubator/cxf/branches/2.0.x-fixes/testutils/src/main/resources/wsdl/jaxb_element_test.wsdl
(original)
+++
incubator/cxf/branches/2.0.x-fixes/testutils/src/main/resources/wsdl/jaxb_element_test.wsdl
Tue Feb 5 18:06:35 2008
@@ -23,14 +23,14 @@
targetNamespace="http://cxf.apache.org/jaxb_element_test/">
<wsdl:types>
<xsd:schema targetNamespace="http://cxf.apache.org/jaxb_element_test/">
- <xsd:element name="NewOperationResponse" type="xsd:string">
+ <xsd:element name="NewOperationResponse">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="out" minOccurs="0" nillable="true"
type="xsd:string" />
</xsd:sequence>
</xsd:complexType>
</xsd:element>
- <xsd:element name="NewOperation" type="xsd:string">
+ <xsd:element name="NewOperation">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="in" minOccurs="0" nillable="true"
type="xsd:string" />
Modified:
incubator/cxf/branches/2.0.x-fixes/tools/javato/ws/src/main/java/org/apache/cxf/tools/java2ws/JavaToWS.java
URL:
http://svn.apache.org/viewvc/incubator/cxf/branches/2.0.x-fixes/tools/javato/ws/src/main/java/org/apache/cxf/tools/java2ws/JavaToWS.java?rev=618854&r1=618853&r2=618854&view=diff
==============================================================================
---
incubator/cxf/branches/2.0.x-fixes/tools/javato/ws/src/main/java/org/apache/cxf/tools/java2ws/JavaToWS.java
(original)
+++
incubator/cxf/branches/2.0.x-fixes/tools/javato/ws/src/main/java/org/apache/cxf/tools/java2ws/JavaToWS.java
Tue Feb 5 18:06:35 2008
@@ -52,7 +52,7 @@
}
}
- private boolean isVerbose() {
+ public boolean isVerbose() {
return isSet(new String[] {"-V", "-verbose"});
}