You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cxf.apache.org by da...@apache.org on 2007/01/22 14:40:12 UTC
svn commit: r498614 - in /incubator/cxf/trunk:
api/src/main/java/org/apache/cxf/service/model/
rt/core/src/main/java/org/apache/cxf/wsdl11/
rt/core/src/test/java/org/apache/cxf/wsdl11/
rt/frontend/jaxws/src/main/resources/schemas/ rt/frontend/simple/sr...
Author: dandiep
Date: Mon Jan 22 05:40:11 2007
New Revision: 498614
URL: http://svn.apache.org/viewvc?view=rev&rev=498614
Log:
Set XmlSchemaCollection on the ServiceInfo so its easy to do global lookups of schema types.
Removed:
incubator/cxf/trunk/rt/frontend/jaxws/src/main/resources/schemas/
Modified:
incubator/cxf/trunk/api/src/main/java/org/apache/cxf/service/model/ServiceInfo.java
incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/wsdl11/WSDLServiceBuilder.java
incubator/cxf/trunk/rt/core/src/test/java/org/apache/cxf/wsdl11/WSDLServiceBuilderTest.java
incubator/cxf/trunk/rt/frontend/simple/src/main/java/org/apache/cxf/service/factory/ReflectionServiceFactoryBean.java
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?view=diff&rev=498614&r1=498613&r2=498614
==============================================================================
--- 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 Jan 22 05:40:11 2007
@@ -28,6 +28,8 @@
import javax.xml.namespace.QName;
+import org.apache.ws.commons.schema.XmlSchemaCollection;
+
public class ServiceInfo extends AbstractPropertiesHolder {
QName name;
String targetNamespace;
@@ -36,6 +38,7 @@
Map<QName, EndpointInfo> endpoints = new ConcurrentHashMap<QName, EndpointInfo>(2);
Map<QName, MessageInfo> messages;
List<SchemaInfo> schemas = new ArrayList<SchemaInfo>(4);
+ private XmlSchemaCollection xmlSchemaCollection;
public ServiceInfo() {
}
@@ -121,5 +124,13 @@
public Collection<SchemaInfo> getSchemas() {
return Collections.unmodifiableCollection(schemas);
+ }
+
+ public void setXmlSchemaCollection(XmlSchemaCollection col) {
+ this.xmlSchemaCollection = col;
+ }
+
+ public XmlSchemaCollection getXmlSchemaCollection() {
+ return xmlSchemaCollection;
}
}
Modified: incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/wsdl11/WSDLServiceBuilder.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/wsdl11/WSDLServiceBuilder.java?view=diff&rev=498614&r1=498613&r2=498614
==============================================================================
--- incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/wsdl11/WSDLServiceBuilder.java (original)
+++ incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/wsdl11/WSDLServiceBuilder.java Mon Jan 22 05:40:11 2007
@@ -157,6 +157,8 @@
private XmlSchemaCollection getSchemas(Definition def, ServiceInfo serviceInfo) {
XmlSchemaCollection schemaCol = new XmlSchemaCollection();
+ serviceInfo.setXmlSchemaCollection(schemaCol);
+
List<Definition> defList = new ArrayList<Definition>();
parseImports(def, defList);
extractSchema(def, schemaCol, serviceInfo);
Modified: incubator/cxf/trunk/rt/core/src/test/java/org/apache/cxf/wsdl11/WSDLServiceBuilderTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/core/src/test/java/org/apache/cxf/wsdl11/WSDLServiceBuilderTest.java?view=diff&rev=498614&r1=498613&r2=498614
==============================================================================
--- incubator/cxf/trunk/rt/core/src/test/java/org/apache/cxf/wsdl11/WSDLServiceBuilderTest.java (original)
+++ incubator/cxf/trunk/rt/core/src/test/java/org/apache/cxf/wsdl11/WSDLServiceBuilderTest.java Mon Jan 22 05:40:11 2007
@@ -352,6 +352,8 @@
assertNotNull(greetMe);
assertEquals("greetMe OperationInfo name error", greetMe.getName(), name);
assertFalse("greetMe should be a Unwrapped operation ", greetMe.isUnwrappedCapable());
+
+ assertNotNull(serviceInfo.getXmlSchemaCollection());
}
public void testImport() throws Exception {
Modified: incubator/cxf/trunk/rt/frontend/simple/src/main/java/org/apache/cxf/service/factory/ReflectionServiceFactoryBean.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/frontend/simple/src/main/java/org/apache/cxf/service/factory/ReflectionServiceFactoryBean.java?view=diff&rev=498614&r1=498613&r2=498614
==============================================================================
--- incubator/cxf/trunk/rt/frontend/simple/src/main/java/org/apache/cxf/service/factory/ReflectionServiceFactoryBean.java (original)
+++ incubator/cxf/trunk/rt/frontend/simple/src/main/java/org/apache/cxf/service/factory/ReflectionServiceFactoryBean.java Mon Jan 22 05:40:11 2007
@@ -342,6 +342,7 @@
XmlSchemaCollection col = new XmlSchemaCollection();
XmlSchema schema = new XmlSchema(getServiceNamespace(), col);
schema.setElementFormDefault(new XmlSchemaForm(XmlSchemaForm.QUALIFIED));
+ serviceInfo.setXmlSchemaCollection(col);
NamespaceMap nsMap = new NamespaceMap();
nsMap.add("xsd", "http://www.w3.org/2001/XMLSchema");