cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject svn commit: r799415 - in /cxf/trunk/rt/databinding/sdo/src: main/java/org/apache/cxf/sdo/ main/java/org/apache/cxf/sdo/tools/ test/java/org/apache/cxf/sdo/ test/resources/wsdl_sdo/
Date Thu, 30 Jul 2009 19:21:04 GMT
Author: dkulp
Date: Thu Jul 30 19:21:04 2009
New Revision: 799415

URL: http://svn.apache.org/viewvc?rev=799415&view=rev
Log:
Update SDO databinding and tools to handle wsdl and schema imports
by just using the schemas already processed in the schema collection

Added:
    cxf/trunk/rt/databinding/sdo/src/test/resources/wsdl_sdo/HelloService.wsdl
      - copied, changed from r799394, cxf/trunk/rt/databinding/sdo/src/test/resources/wsdl_sdo/HelloService_static.wsdl
Modified:
    cxf/trunk/rt/databinding/sdo/src/main/java/org/apache/cxf/sdo/SDODataBinding.java
    cxf/trunk/rt/databinding/sdo/src/main/java/org/apache/cxf/sdo/tools/SDODatabinding.java
    cxf/trunk/rt/databinding/sdo/src/test/java/org/apache/cxf/sdo/AbstractHelloWorldTest.java
    cxf/trunk/rt/databinding/sdo/src/test/resources/wsdl_sdo/HelloService_dynamic.wsdl
    cxf/trunk/rt/databinding/sdo/src/test/resources/wsdl_sdo/HelloService_static.wsdl

Modified: cxf/trunk/rt/databinding/sdo/src/main/java/org/apache/cxf/sdo/SDODataBinding.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/databinding/sdo/src/main/java/org/apache/cxf/sdo/SDODataBinding.java?rev=799415&r1=799414&r2=799415&view=diff
==============================================================================
--- cxf/trunk/rt/databinding/sdo/src/main/java/org/apache/cxf/sdo/SDODataBinding.java (original)
+++ cxf/trunk/rt/databinding/sdo/src/main/java/org/apache/cxf/sdo/SDODataBinding.java Thu
Jul 30 19:21:04 2009
@@ -19,7 +19,8 @@
 
 package org.apache.cxf.sdo;
 
-import java.io.InputStream;
+import java.io.StringReader;
+import java.io.StringWriter;
 import java.lang.reflect.Field;
 import java.lang.reflect.Method;
 import java.util.ArrayList;
@@ -33,17 +34,17 @@
 
 import org.w3c.dom.Node;
 
+import org.apache.cxf.common.xmlschema.XmlSchemaConstants;
 import org.apache.cxf.databinding.AbstractDataBinding;
 import org.apache.cxf.databinding.DataReader;
 import org.apache.cxf.databinding.DataWriter;
 import org.apache.cxf.databinding.WrapperCapableDatabinding;
 import org.apache.cxf.databinding.WrapperHelper;
 import org.apache.cxf.interceptor.Fault;
-import org.apache.cxf.resource.ExtendedURIResolver;
 import org.apache.cxf.service.Service;
-import org.apache.cxf.service.model.DescriptionInfo;
 import org.apache.cxf.service.model.ServiceInfo;
 import org.apache.tuscany.sdo.api.SDOUtil;
+import org.apache.ws.commons.schema.XmlSchema;
 
 import commonj.sdo.DataObject;
 import commonj.sdo.Type;
@@ -149,13 +150,13 @@
             }
         }
         for (ServiceInfo serviceInfo : service.getServiceInfos()) {
-            DescriptionInfo dInfo = serviceInfo.getDescription();
-            if (dInfo != null) {
-                String uri = dInfo.getBaseURI();
-                ExtendedURIResolver resolver = new ExtendedURIResolver();
-                InputStream ins = resolver.resolve(uri, "").getByteStream();
-                context.getXSDHelper().define(ins, uri);
-                resolver.close();
+            for (XmlSchema schema : serviceInfo.getXmlSchemaCollection().getXmlSchemas())
{
+                if (schema.getTargetNamespace().equals(XmlSchemaConstants.XSD_NAMESPACE_URI))
{
+                    continue;
+                }
+                StringWriter writer = new StringWriter();
+                schema.write(writer);
+                context.getXSDHelper().define(new StringReader(writer.toString()), schema.getSourceURI());
             }
         }        
     }

Modified: cxf/trunk/rt/databinding/sdo/src/main/java/org/apache/cxf/sdo/tools/SDODatabinding.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/databinding/sdo/src/main/java/org/apache/cxf/sdo/tools/SDODatabinding.java?rev=799415&r1=799414&r2=799415&view=diff
==============================================================================
--- cxf/trunk/rt/databinding/sdo/src/main/java/org/apache/cxf/sdo/tools/SDODatabinding.java
(original)
+++ cxf/trunk/rt/databinding/sdo/src/main/java/org/apache/cxf/sdo/tools/SDODatabinding.java
Thu Jul 30 19:21:04 2009
@@ -20,11 +20,10 @@
 package org.apache.cxf.sdo.tools;
 
 import java.io.File;
-import java.io.IOException;
-import java.io.InputStream;
+import java.io.StringReader;
+import java.io.StringWriter;
 import java.net.URI;
 import java.net.URISyntaxException;
-import java.net.URL;
 import java.util.ArrayList;
 import java.util.HashMap;
 import java.util.Hashtable;
@@ -34,6 +33,8 @@
 
 import javax.xml.namespace.QName;
 
+import org.apache.cxf.common.xmlschema.SchemaCollection;
+import org.apache.cxf.common.xmlschema.XmlSchemaConstants;
 import org.apache.cxf.helpers.CastUtils;
 import org.apache.cxf.tools.common.ToolConstants;
 import org.apache.cxf.tools.common.ToolContext;
@@ -41,9 +42,10 @@
 import org.apache.cxf.tools.common.model.DefaultValueWriter;
 import org.apache.cxf.tools.util.ClassCollector;
 import org.apache.cxf.tools.wsdlto.core.DataBindingProfile;
-import org.apache.tuscany.sdo.api.SDOUtil;
 import org.apache.tuscany.sdo.generate.XSD2JavaGenerator;
 import org.apache.tuscany.sdo.helper.HelperContextImpl;
+import org.apache.tuscany.sdo.helper.XSDHelperImpl;
+import org.apache.ws.commons.schema.XmlSchema;
 import org.eclipse.emf.codegen.ecore.genmodel.GenClass;
 import org.eclipse.emf.codegen.ecore.genmodel.GenModel;
 import org.eclipse.emf.codegen.ecore.genmodel.GenPackage;
@@ -71,23 +73,19 @@
     private ExtendedMetaData extendedMetaData;
     private GenModel genModel;
     private Map<EClassifier, GenClass> genClasses = new HashMap<EClassifier, GenClass>();
-
+    private SchemaCollection schemaCollection;
+    
     public void generate(ToolContext context) throws ToolException {
-        if (dynamic) {
-            // Node XSD2Java is needed for dynamic SDO
-            return;
-        }
-
         Map<String, String> ns2pkgMap = context.getNamespacePackageMap();
 
         String outputDir = (String)context.get(ToolConstants.CFG_OUTPUTDIR);
         String pkg = context.getPackageName();
 
-        String wsdl = (String)context.get(ToolConstants.CFG_WSDLLOCATION);
 
         // preparing the directories where files to be written.
         File targetDir;
         if (outputDir == null) {
+            String wsdl = (String)context.get(ToolConstants.CFG_WSDLLOCATION);
             try {
                 outputDir = new File(new URI(wsdl)).getParentFile().getAbsolutePath();
             } catch (URISyntaxException e) {
@@ -105,33 +103,60 @@
             argList.add("-javaPackage");
             argList.add(pkg);
         }
+        schemaCollection = (SchemaCollection) context.get(ToolConstants.XML_SCHEMA_COLLECTION);
 
-        // We need to copy the wsdl to a local file if it is not
-        argList.add(new File(URI.create(wsdl)).getAbsolutePath());
-
+        argList.add(""); //bogus arg
         String[] args = argList.toArray(new String[argList.size()]);
         ClassCollector classCollector = context.get(ClassCollector.class);
 
+        EPackage.Registry packageRegistry = new EPackageRegistryImpl(EPackage.Registry.INSTANCE);
+        extendedMetaData = new BasicExtendedMetaData(packageRegistry);
+        HelperContext hc = new HelperContextImpl(extendedMetaData, false);
+        xsdHelper = hc.getXSDHelper();
+        typeHelper = hc.getTypeHelper();
+
+        
         try {
             processArguments(args);
-            genModel = runXSD2Java(args, ns2pkgMap); 
             
-            List<GenPackage> packages = CastUtils.cast(genModel.getGenPackages());
-            for (Iterator<GenPackage> iter = packages.iterator(); iter.hasNext();)
{
-                // loop through the list, once to build up the eclass to genclass mapper
-                GenPackage genPackage = iter.next();
-                List<GenClass> classes = CastUtils.cast(genPackage.getGenClasses());
-                for (Iterator<GenClass> classIter = classes.iterator(); classIter.hasNext();)
{
-                    GenClass genClass = classIter.next();
-                    genClasses.put(genClass.getEcoreClass(), genClass);
-
-                    //This gets the "impl" classes, how do we get everything else?
-                    String s = genClass.getQualifiedClassName();
-                    String p = s.substring(0, s.lastIndexOf('.'));
-                    s = s.substring(s.lastIndexOf('.') + 1);
-                    classCollector.addTypesClassName(p, 
-                                                     s,
-                                                     genClass.getQualifiedClassName());
+
+            ((XSDHelperImpl)xsdHelper).setRedefineBuiltIn(generateBuiltIn);
+            
+            Map<String, PackageInfo> packageInfoTable =
+                createPackageInfoTable(schemaCollection, ns2pkgMap);
+            for (XmlSchema schema : schemaCollection.getXmlSchemas()) {
+                if (schema.getTargetNamespace().equals(XmlSchemaConstants.XSD_NAMESPACE_URI))
{
+                    continue;
+                }
+                StringWriter writer = new StringWriter();
+                schema.write(writer);
+                xsdHelper.define(new StringReader(writer.toString()), schema.getSourceURI());
+            }
+            if (!dynamic) {
+                // No XSD2Java is needed for dynamic SDO
+
+                genModel = generatePackages(packageRegistry.values(), targetDirectory,
+                                            new Hashtable<String, PackageInfo>(packageInfoTable),
+                                            genOptions, allNamespaces);
+                
+                
+                List<GenPackage> packages = CastUtils.cast(genModel.getGenPackages());
+                for (Iterator<GenPackage> iter = packages.iterator(); iter.hasNext();)
{
+                    // loop through the list, once to build up the eclass to genclass mapper
+                    GenPackage genPackage = iter.next();
+                    List<GenClass> classes = CastUtils.cast(genPackage.getGenClasses());
+                    for (Iterator<GenClass> classIter = classes.iterator(); classIter.hasNext();)
{
+                        GenClass genClass = classIter.next();
+                        genClasses.put(genClass.getEcoreClass(), genClass);
+    
+                        //This gets the "impl" classes, how do we get everything else?
+                        String s = genClass.getQualifiedClassName();
+                        String p = s.substring(0, s.lastIndexOf('.'));
+                        s = s.substring(s.lastIndexOf('.') + 1);
+                        classCollector.addTypesClassName(p, 
+                                                         s,
+                                                         genClass.getQualifiedClassName());
+                    }
                 }
             }
         } catch (Exception e) {
@@ -140,32 +165,10 @@
             return;
         }
 
-        HelperContext hc = new HelperContextImpl(extendedMetaData, false);
-        xsdHelper = hc.getXSDHelper();
-        typeHelper = hc.getTypeHelper();
     }
 
-    protected GenModel runXSD2Java(String args[], Map<String, String> ns2PkgMap) {
-        String xsdFileName = args[inputIndex];
-        EPackage.Registry packageRegistry = new EPackageRegistryImpl(EPackage.Registry.INSTANCE);
-        extendedMetaData = new BasicExtendedMetaData(packageRegistry);
-        String packageURI = getSchemaNamespace(xsdFileName);
-        Map<String, PackageInfo> packageInfoTable =
-            createPackageInfoTable(packageURI, schemaNamespace, javaPackage, prefix, ns2PkgMap);
-        return generateFromXMLSchema(xsdFileName,
-                                     packageRegistry,
-                                     extendedMetaData,
-                                     targetDirectory,
-                                     new Hashtable<String, PackageInfo>(packageInfoTable),
-                                     genOptions,
-                                     generateBuiltIn,
-                                     allNamespaces);
-    }
 
-    private static Map<String, PackageInfo> createPackageInfoTable(String packageURI,
-                                                                   String schemaNamespace,
-                                                                   String javaPackage,
-                                                                   String prefix,
+    private Map<String, PackageInfo> createPackageInfoTable(SchemaCollection schemas,
                                                                    Map<String, String>
ns2PkgMap) {
         Map<String, PackageInfo> packageInfoTable = new HashMap<String, PackageInfo>();
 
@@ -174,11 +177,9 @@
                 packageInfoTable.put(e.getKey(), new PackageInfo(e.getValue(), null, e.getKey(),
null));
             }
         } else {
-            if (schemaNamespace != null) {
-                packageInfoTable.put(schemaNamespace,
-                                     new PackageInfo(javaPackage, prefix, schemaNamespace,
null));
-            } else if (packageURI != null) {
-                packageInfoTable.put(packageURI, new PackageInfo(javaPackage, prefix, null,
null));
+            for (XmlSchema schema : schemas.getXmlSchemas()) {
+                packageInfoTable.put(schema.getTargetNamespace(),
+                                     new PackageInfo(javaPackage, prefix, schema.getTargetNamespace(),
null));
             }
         }
         return packageInfoTable;
@@ -191,24 +192,6 @@
         }
 
         generatedPackages = null;
-        String wsdl = (String)context.get(ToolConstants.CFG_WSDLLOCATION);
-
-        if (dynamic) {
-            HelperContext helperContext = SDOUtil.createHelperContext();
-            xsdHelper = helperContext.getXSDHelper();
-            URL location;
-            try {
-                location = new URL(wsdl);
-                InputStream is = location.openStream();
-                xsdHelper.define(is, wsdl);
-            } catch (IOException e) {
-                throw new ToolException(e);
-            }
-            this.typeHelper = helperContext.getTypeHelper();
-        }
-        
-
-
     }
 
     public String getType(QName qName, boolean element) {
@@ -264,6 +247,7 @@
         Property property =
             xsdHelper.getGlobalProperty(wrapperElement.getNamespaceURI(), 
                                         wrapperElement.getLocalPart(), true);
+        
         if (property != null) {
             type = property.getType();
             Property itemProp = type.getProperty(item.getLocalPart());

Modified: cxf/trunk/rt/databinding/sdo/src/test/java/org/apache/cxf/sdo/AbstractHelloWorldTest.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/databinding/sdo/src/test/java/org/apache/cxf/sdo/AbstractHelloWorldTest.java?rev=799415&r1=799414&r2=799415&view=diff
==============================================================================
--- cxf/trunk/rt/databinding/sdo/src/test/java/org/apache/cxf/sdo/AbstractHelloWorldTest.java
(original)
+++ cxf/trunk/rt/databinding/sdo/src/test/java/org/apache/cxf/sdo/AbstractHelloWorldTest.java
Thu Jul 30 19:21:04 2009
@@ -20,8 +20,13 @@
 package org.apache.cxf.sdo;
 
 
+import java.util.Collection;
+
+import org.w3c.dom.Document;
 import org.w3c.dom.Node;
 
+import junit.framework.AssertionFailedError;
+
 import org.junit.Test;
 
 
@@ -51,10 +56,17 @@
     
     @Test
     public void testWSDL() throws Exception {
-        Node doc = getWSDLDocument("TestService");
-        assertNotNull(doc);
-        assertValid("/wsdl:definitions/wsdl:types/xsd:schema"
-                    + "[@targetNamespace='http://apache.org/hello_world_soap_http/types']",

-                    doc);
+        Collection<Document> docs = getWSDLDocuments("TestService");
+        for (Document doc : docs) {
+            try {
+                assertValid("/wsdl:definitions/wsdl:types/xsd:schema"
+                            + "[@targetNamespace='http://apache.org/hello_world_soap_http/types']",

+                            doc);
+                return;
+            } catch (AssertionFailedError ex) {
+                //ignore
+            }
+        }
+        fail("Did not find schemas");
     }
 }

Copied: cxf/trunk/rt/databinding/sdo/src/test/resources/wsdl_sdo/HelloService.wsdl (from r799394,
cxf/trunk/rt/databinding/sdo/src/test/resources/wsdl_sdo/HelloService_static.wsdl)
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/databinding/sdo/src/test/resources/wsdl_sdo/HelloService.wsdl?p2=cxf/trunk/rt/databinding/sdo/src/test/resources/wsdl_sdo/HelloService.wsdl&p1=cxf/trunk/rt/databinding/sdo/src/test/resources/wsdl_sdo/HelloService_static.wsdl&r1=799394&r2=799415&rev=799415&view=diff
==============================================================================
--- cxf/trunk/rt/databinding/sdo/src/test/resources/wsdl_sdo/HelloService_static.wsdl (original)
+++ cxf/trunk/rt/databinding/sdo/src/test/resources/wsdl_sdo/HelloService.wsdl Thu Jul 30
19:21:04 2009
@@ -209,9 +209,4 @@
         </wsdl:operation>
 
     </wsdl:binding>
-    <wsdl:service name="SOAPService">
-        <wsdl:port binding="tns:Greeter_SOAPBinding" name="SoapPort">
-            <soap:address location="http://localhost:9000/SoapContext/SoapPort" />
-        </wsdl:port>
-    </wsdl:service>
 </wsdl:definitions>

Modified: cxf/trunk/rt/databinding/sdo/src/test/resources/wsdl_sdo/HelloService_dynamic.wsdl
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/databinding/sdo/src/test/resources/wsdl_sdo/HelloService_dynamic.wsdl?rev=799415&r1=799414&r2=799415&view=diff
==============================================================================
--- cxf/trunk/rt/databinding/sdo/src/test/resources/wsdl_sdo/HelloService_dynamic.wsdl (original)
+++ cxf/trunk/rt/databinding/sdo/src/test/resources/wsdl_sdo/HelloService_dynamic.wsdl Thu
Jul 30 19:21:04 2009
@@ -20,195 +20,9 @@
 <wsdl:definitions name="HelloWorld" targetNamespace="http://apache.org/hello_world_soap_http"
xmlns="http://schemas.xmlsoap.org/wsdl/"
     xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tns="http://apache.org/hello_world_soap_http"
xmlns:x1="http://apache.org/hello_world_soap_http/types"
     xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
-    <wsdl:types>
-        <schema targetNamespace="http://apache.org/hello_world_soap_http/types" xmlns="http://www.w3.org/2001/XMLSchema"
-            xmlns:tns="http://apache.org/hello_world_soap_http/types" elementFormDefault="qualified">
-            <simpleType name="MyStringType">
-                <restriction base="string">
-                    <maxLength value="30" />
-                </restriction>
-            </simpleType>
-            <complexType name="Structure">
-            	<sequence>
-            		<element name="text" type="string"/>
-            		<element name="int" type="int"/>
-            		<element name="dbl" type="double"/>
-            		<element name="texts" type="string" maxOccurs="unbounded"/>
-            	</sequence>
-            </complexType>
-            
-            <element name="echoStruct">
-                <complexType>
-                    <sequence>
-                        <element name="struct" type="tns:Structure" />
-                    </sequence>
-                </complexType>
-            </element>
-            <element name="echoStructResponse">
-                <complexType>
-                    <sequence>
-                        <element name="return" type="tns:Structure" />
-                    </sequence>
-                </complexType>
-            </element>
-            
 
-            <element name="sayHi">
-                <complexType />
-            </element>
-            <element name="sayHiResponse">
-                <complexType>
-                    <sequence>
-                        <element name="responseType" type="string" />
-                    </sequence>
-                </complexType>
-            </element>
-            <element name="greetMe">
-                <complexType>
-                    <sequence>
-                        <element name="requestType" type="tns:MyStringType" />
-                    </sequence>
-                </complexType>
-            </element>
-            <element name="greetMeResponse">
-                <complexType>
-                    <sequence>
-                        <element name="responseType" type="string" />
-                    </sequence>
-                </complexType>
-            </element>
-            <element name="greetMeOneWay">
-                <complexType>
-                    <sequence>
-                        <element name="requestType" type="string" />
-                    </sequence>
-                </complexType>
-            </element>
-            <element name="pingMe">
-                <complexType />
-            </element>
-            <element name="pingMeResponse">
-                <complexType />
-            </element>
-            <element name="faultDetail">
-                <complexType>
-                    <sequence>
-                        <element name="minor" type="short" />
-                        <element name="major" type="short" />
-                    </sequence>
-                </complexType>
-            </element>
-        </schema>
-    </wsdl:types>
-    <wsdl:message name="sayHiRequest">
-        <wsdl:part element="x1:sayHi" name="in" />
-    </wsdl:message>
-    <wsdl:message name="sayHiResponse">
-        <wsdl:part element="x1:sayHiResponse" name="out" />
-    </wsdl:message>
-    <wsdl:message name="greetMeRequest">
-        <wsdl:part element="x1:greetMe" name="in" />
-    </wsdl:message>
-    <wsdl:message name="greetMeResponse">
-        <wsdl:part element="x1:greetMeResponse" name="out" />
-    </wsdl:message>
-    <wsdl:message name="echoStructRequest">
-        <wsdl:part element="x1:echoStruct" name="in" />
-    </wsdl:message>
-    <wsdl:message name="echoStructResponse">
-        <wsdl:part element="x1:echoStructResponse" name="out" />
-    </wsdl:message>
-    <wsdl:message name="greetMeOneWayRequest">
-        <wsdl:part element="x1:greetMeOneWay" name="in" />
-    </wsdl:message>
-    <wsdl:message name="pingMeRequest">
-        <wsdl:part name="in" element="x1:pingMe" />
-    </wsdl:message>
-    <wsdl:message name="pingMeResponse">
-        <wsdl:part name="out" element="x1:pingMeResponse" />
-    </wsdl:message>
-    <wsdl:message name="pingMeFault">
-        <wsdl:part name="faultDetail" element="x1:faultDetail" />
-    </wsdl:message>
+    <wsdl:import location="HelloService.wsdl" namespace="http://apache.org/hello_world_soap_http"
/>
 
-    <wsdl:portType name="Greeter">
-        <wsdl:operation name="sayHi">
-            <wsdl:input message="tns:sayHiRequest" name="sayHiRequest" />
-            <wsdl:output message="tns:sayHiResponse" name="sayHiResponse" />
-        </wsdl:operation>
-
-        <wsdl:operation name="greetMe">
-            <wsdl:input message="tns:greetMeRequest" name="greetMeRequest" />
-            <wsdl:output message="tns:greetMeResponse" name="greetMeResponse" />
-        </wsdl:operation>
-        <wsdl:operation name="echoStruct">
-            <wsdl:input message="tns:echoStructRequest" name="echoStructRequest" />
-            <wsdl:output message="tns:echoStructResponse" name="echoStructResponse" />
-        </wsdl:operation>
-
-        <wsdl:operation name="greetMeOneWay">
-            <wsdl:input message="tns:greetMeOneWayRequest" name="greetMeOneWayRequest"
/>
-        </wsdl:operation>
-
-        <wsdl:operation name="pingMe">
-            <wsdl:input name="pingMeRequest" message="tns:pingMeRequest" />
-            <wsdl:output name="pingMeResponse" message="tns:pingMeResponse" />
-            <wsdl:fault name="pingMeFault" message="tns:pingMeFault" />
-        </wsdl:operation>
-    </wsdl:portType>
-    <wsdl:binding name="Greeter_SOAPBinding" type="tns:Greeter">
-        <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"
/>
-
-        <wsdl:operation name="sayHi">
-            <soap:operation soapAction="" style="document" />
-            <wsdl:input name="sayHiRequest">
-                <soap:body use="literal" />
-            </wsdl:input>
-            <wsdl:output name="sayHiResponse">
-                <soap:body use="literal" />
-            </wsdl:output>
-        </wsdl:operation>
-
-        <wsdl:operation name="greetMe">
-            <soap:operation soapAction="" style="document" />
-            <wsdl:input name="greetMeRequest">
-                <soap:body use="literal" />
-            </wsdl:input>
-            <wsdl:output name="greetMeResponse">
-                <soap:body use="literal" />
-            </wsdl:output>
-        </wsdl:operation>
-        <wsdl:operation name="echoStruct">
-            <soap:operation soapAction="" style="document" />
-            <wsdl:input name="echoStructRequest">
-                <soap:body use="literal" />
-            </wsdl:input>
-            <wsdl:output name="echoStructResponse">
-                <soap:body use="literal" />
-            </wsdl:output>
-        </wsdl:operation>
-
-        <wsdl:operation name="greetMeOneWay">
-            <soap:operation soapAction="" style="document" />
-            <wsdl:input name="greetMeOneWayRequest">
-                <soap:body use="literal" />
-            </wsdl:input>
-        </wsdl:operation>
-
-        <wsdl:operation name="pingMe">
-            <soap:operation style="document" />
-            <wsdl:input>
-                <soap:body use="literal" />
-            </wsdl:input>
-            <wsdl:output>
-                <soap:body use="literal" />
-            </wsdl:output>
-            <wsdl:fault name="pingMeFault">
-                <soap:fault name="pingMeFault" use="literal" />
-            </wsdl:fault>
-        </wsdl:operation>
-
-    </wsdl:binding>
     <wsdl:service name="SOAPService">
         <wsdl:port binding="tns:Greeter_SOAPBinding" name="SoapPort">
             <soap:address location="http://localhost:9000/SoapContext/SoapPort" />

Modified: cxf/trunk/rt/databinding/sdo/src/test/resources/wsdl_sdo/HelloService_static.wsdl
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/databinding/sdo/src/test/resources/wsdl_sdo/HelloService_static.wsdl?rev=799415&r1=799414&r2=799415&view=diff
==============================================================================
--- cxf/trunk/rt/databinding/sdo/src/test/resources/wsdl_sdo/HelloService_static.wsdl (original)
+++ cxf/trunk/rt/databinding/sdo/src/test/resources/wsdl_sdo/HelloService_static.wsdl Thu
Jul 30 19:21:04 2009
@@ -20,195 +20,9 @@
 <wsdl:definitions name="HelloWorld" targetNamespace="http://apache.org/hello_world_soap_http"
xmlns="http://schemas.xmlsoap.org/wsdl/"
     xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tns="http://apache.org/hello_world_soap_http"
xmlns:x1="http://apache.org/hello_world_soap_http/types"
     xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
-    <wsdl:types>
-        <schema targetNamespace="http://apache.org/hello_world_soap_http/types" xmlns="http://www.w3.org/2001/XMLSchema"
-            xmlns:tns="http://apache.org/hello_world_soap_http/types" elementFormDefault="qualified">
-            <simpleType name="MyStringType">
-                <restriction base="string">
-                    <maxLength value="30" />
-                </restriction>
-            </simpleType>
-            <complexType name="Structure">
-            	<sequence>
-            		<element name="text" type="string"/>
-            		<element name="int" type="int"/>
-            		<element name="dbl" type="double"/>
-            		<element name="texts" type="string" maxOccurs="unbounded"/>
-            	</sequence>
-            </complexType>
-            
-            <element name="echoStruct">
-                <complexType>
-                    <sequence>
-                        <element name="struct" type="tns:Structure" />
-                    </sequence>
-                </complexType>
-            </element>
-            <element name="echoStructResponse">
-                <complexType>
-                    <sequence>
-                        <element name="return" type="tns:Structure" />
-                    </sequence>
-                </complexType>
-            </element>
-            
 
-            <element name="sayHi">
-                <complexType />
-            </element>
-            <element name="sayHiResponse">
-                <complexType>
-                    <sequence>
-                        <element name="responseType" type="string" />
-                    </sequence>
-                </complexType>
-            </element>
-            <element name="greetMe">
-                <complexType>
-                    <sequence>
-                        <element name="requestType" type="tns:MyStringType" />
-                    </sequence>
-                </complexType>
-            </element>
-            <element name="greetMeResponse">
-                <complexType>
-                    <sequence>
-                        <element name="responseType" type="string" />
-                    </sequence>
-                </complexType>
-            </element>
-            <element name="greetMeOneWay">
-                <complexType>
-                    <sequence>
-                        <element name="requestType" type="string" />
-                    </sequence>
-                </complexType>
-            </element>
-            <element name="pingMe">
-                <complexType />
-            </element>
-            <element name="pingMeResponse">
-                <complexType />
-            </element>
-            <element name="faultDetail">
-                <complexType>
-                    <sequence>
-                        <element name="minor" type="short" />
-                        <element name="major" type="short" />
-                    </sequence>
-                </complexType>
-            </element>
-        </schema>
-    </wsdl:types>
-    <wsdl:message name="sayHiRequest">
-        <wsdl:part element="x1:sayHi" name="in" />
-    </wsdl:message>
-    <wsdl:message name="sayHiResponse">
-        <wsdl:part element="x1:sayHiResponse" name="out" />
-    </wsdl:message>
-    <wsdl:message name="greetMeRequest">
-        <wsdl:part element="x1:greetMe" name="in" />
-    </wsdl:message>
-    <wsdl:message name="greetMeResponse">
-        <wsdl:part element="x1:greetMeResponse" name="out" />
-    </wsdl:message>
-    <wsdl:message name="echoStructRequest">
-        <wsdl:part element="x1:echoStruct" name="in" />
-    </wsdl:message>
-    <wsdl:message name="echoStructResponse">
-        <wsdl:part element="x1:echoStructResponse" name="out" />
-    </wsdl:message>
-    <wsdl:message name="greetMeOneWayRequest">
-        <wsdl:part element="x1:greetMeOneWay" name="in" />
-    </wsdl:message>
-    <wsdl:message name="pingMeRequest">
-        <wsdl:part name="in" element="x1:pingMe" />
-    </wsdl:message>
-    <wsdl:message name="pingMeResponse">
-        <wsdl:part name="out" element="x1:pingMeResponse" />
-    </wsdl:message>
-    <wsdl:message name="pingMeFault">
-        <wsdl:part name="faultDetail" element="x1:faultDetail" />
-    </wsdl:message>
+    <wsdl:import location="HelloService.wsdl" namespace="http://apache.org/hello_world_soap_http"
/>
 
-    <wsdl:portType name="Greeter">
-        <wsdl:operation name="sayHi">
-            <wsdl:input message="tns:sayHiRequest" name="sayHiRequest" />
-            <wsdl:output message="tns:sayHiResponse" name="sayHiResponse" />
-        </wsdl:operation>
-
-        <wsdl:operation name="greetMe">
-            <wsdl:input message="tns:greetMeRequest" name="greetMeRequest" />
-            <wsdl:output message="tns:greetMeResponse" name="greetMeResponse" />
-        </wsdl:operation>
-        <wsdl:operation name="echoStruct">
-            <wsdl:input message="tns:echoStructRequest" name="echoStructRequest" />
-            <wsdl:output message="tns:echoStructResponse" name="echoStructResponse" />
-        </wsdl:operation>
-
-        <wsdl:operation name="greetMeOneWay">
-            <wsdl:input message="tns:greetMeOneWayRequest" name="greetMeOneWayRequest"
/>
-        </wsdl:operation>
-
-        <wsdl:operation name="pingMe">
-            <wsdl:input name="pingMeRequest" message="tns:pingMeRequest" />
-            <wsdl:output name="pingMeResponse" message="tns:pingMeResponse" />
-            <wsdl:fault name="pingMeFault" message="tns:pingMeFault" />
-        </wsdl:operation>
-    </wsdl:portType>
-    <wsdl:binding name="Greeter_SOAPBinding" type="tns:Greeter">
-        <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"
/>
-
-        <wsdl:operation name="sayHi">
-            <soap:operation soapAction="" style="document" />
-            <wsdl:input name="sayHiRequest">
-                <soap:body use="literal" />
-            </wsdl:input>
-            <wsdl:output name="sayHiResponse">
-                <soap:body use="literal" />
-            </wsdl:output>
-        </wsdl:operation>
-
-        <wsdl:operation name="greetMe">
-            <soap:operation soapAction="" style="document" />
-            <wsdl:input name="greetMeRequest">
-                <soap:body use="literal" />
-            </wsdl:input>
-            <wsdl:output name="greetMeResponse">
-                <soap:body use="literal" />
-            </wsdl:output>
-        </wsdl:operation>
-        <wsdl:operation name="echoStruct">
-            <soap:operation soapAction="" style="document" />
-            <wsdl:input name="echoStructRequest">
-                <soap:body use="literal" />
-            </wsdl:input>
-            <wsdl:output name="echoStructResponse">
-                <soap:body use="literal" />
-            </wsdl:output>
-        </wsdl:operation>
-
-        <wsdl:operation name="greetMeOneWay">
-            <soap:operation soapAction="" style="document" />
-            <wsdl:input name="greetMeOneWayRequest">
-                <soap:body use="literal" />
-            </wsdl:input>
-        </wsdl:operation>
-
-        <wsdl:operation name="pingMe">
-            <soap:operation style="document" />
-            <wsdl:input>
-                <soap:body use="literal" />
-            </wsdl:input>
-            <wsdl:output>
-                <soap:body use="literal" />
-            </wsdl:output>
-            <wsdl:fault name="pingMeFault">
-                <soap:fault name="pingMeFault" use="literal" />
-            </wsdl:fault>
-        </wsdl:operation>
-
-    </wsdl:binding>
     <wsdl:service name="SOAPService">
         <wsdl:port binding="tns:Greeter_SOAPBinding" name="SoapPort">
             <soap:address location="http://localhost:9000/SoapContext/SoapPort" />



Mime
View raw message