cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject svn commit: r822376 - in /cxf/trunk: common/common/src/main/java/org/apache/cxf/helpers/ rt/databinding/xmlbeans/src/main/java/org/apache/cxf/xmlbeans/ rt/databinding/xmlbeans/src/main/java/org/apache/cxf/xmlbeans/tools/ systests/databinding/ systests/...
Date Tue, 06 Oct 2009 17:54:05 GMT
Author: dkulp
Date: Tue Oct  6 17:54:05 2009
New Revision: 822376

URL: http://svn.apache.org/viewvc?rev=822376&view=rev
Log:
[CXF-2442] fixes and testcases for using xsd's in a wsdl for use with
xmlbeans

Added:
    cxf/trunk/systests/databinding/src/test/java/org/apache/cxf/systest/xmlbeans/PutLastTradePriceImpl.java
  (with props)
    cxf/trunk/systests/databinding/src/test/resources/wsdl_systest_databinding/xmlbeans/doc_lit_bare.wsdl
  (with props)
Modified:
    cxf/trunk/common/common/src/main/java/org/apache/cxf/helpers/XPathUtils.java
    cxf/trunk/rt/databinding/xmlbeans/src/main/java/org/apache/cxf/xmlbeans/XmlBeansSchemaInitializer.java
    cxf/trunk/rt/databinding/xmlbeans/src/main/java/org/apache/cxf/xmlbeans/tools/XMLBeansToolingDataBinding.java
    cxf/trunk/systests/databinding/pom.xml
    cxf/trunk/systests/databinding/src/test/java/org/apache/cxf/systest/xmlbeans/GreeterImpl.java
    cxf/trunk/systests/databinding/src/test/java/org/apache/cxf/systest/xmlbeans/Server.java
    cxf/trunk/systests/databinding/src/test/java/org/apache/cxf/systest/xmlbeans/ServerNoWsdl.java
    cxf/trunk/systests/databinding/src/test/java/org/apache/cxf/systest/xmlbeans/cxf.xml
    cxf/trunk/systests/databinding/src/test/java/org/apache/cxf/systest/xmlbeans/cxf_no_wsdl.xml

Modified: cxf/trunk/common/common/src/main/java/org/apache/cxf/helpers/XPathUtils.java
URL: http://svn.apache.org/viewvc/cxf/trunk/common/common/src/main/java/org/apache/cxf/helpers/XPathUtils.java?rev=822376&r1=822375&r2=822376&view=diff
==============================================================================
--- cxf/trunk/common/common/src/main/java/org/apache/cxf/helpers/XPathUtils.java (original)
+++ cxf/trunk/common/common/src/main/java/org/apache/cxf/helpers/XPathUtils.java Tue Oct 
6 17:54:05 2009
@@ -24,9 +24,11 @@
 import javax.xml.namespace.NamespaceContext;
 import javax.xml.namespace.QName;
 import javax.xml.xpath.XPath;
+import javax.xml.xpath.XPathConstants;
 import javax.xml.xpath.XPathFactory;
 
 import org.w3c.dom.Node;
+import org.w3c.dom.NodeList;
 
 public class XPathUtils {
     private static final XPathFactory FACTORY = XPathFactory.newInstance();
@@ -56,6 +58,15 @@
             return null;
         }
     }
+    public NodeList getValueList(String xpathExpression, Node node) {
+        return (NodeList)getValue(xpathExpression, node, XPathConstants.NODESET);
+    }
+    public String getValueString(String xpathExpression, Node node) {
+        return (String)getValue(xpathExpression, node, XPathConstants.STRING);
+    }
+    public Node getValueNode(String xpathExpression, Node node) {
+        return (Node)getValue(xpathExpression, node, XPathConstants.NODE);
+    }
 
     public boolean isExist(String xpathExpression, Node node, QName type) {
         return getValue(xpathExpression, node, type) != null;

Modified: cxf/trunk/rt/databinding/xmlbeans/src/main/java/org/apache/cxf/xmlbeans/XmlBeansSchemaInitializer.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/databinding/xmlbeans/src/main/java/org/apache/cxf/xmlbeans/XmlBeansSchemaInitializer.java?rev=822376&r1=822375&r2=822376&view=diff
==============================================================================
--- cxf/trunk/rt/databinding/xmlbeans/src/main/java/org/apache/cxf/xmlbeans/XmlBeansSchemaInitializer.java
(original)
+++ cxf/trunk/rt/databinding/xmlbeans/src/main/java/org/apache/cxf/xmlbeans/XmlBeansSchemaInitializer.java
Tue Oct  6 17:54:05 2009
@@ -25,6 +25,7 @@
 import java.math.BigDecimal;
 import java.math.BigInteger;
 import java.net.URI;
+import java.net.URISyntaxException;
 import java.util.Calendar;
 import java.util.Date;
 import java.util.HashMap;
@@ -36,15 +37,18 @@
 
 import org.w3c.dom.Document;
 import org.w3c.dom.Element;
+import org.w3c.dom.NodeList;
 
 import org.xml.sax.InputSource;
 
 
+import org.apache.cxf.common.WSDLConstants;
 import org.apache.cxf.common.logging.LogUtils;
 import org.apache.cxf.common.util.StringUtils;
 import org.apache.cxf.common.xmlschema.SchemaCollection;
 import org.apache.cxf.helpers.DOMUtils;
 import org.apache.cxf.helpers.XMLUtils;
+import org.apache.cxf.helpers.XPathUtils;
 import org.apache.cxf.service.ServiceModelVisitor;
 import org.apache.cxf.service.model.MessagePartInfo;
 import org.apache.cxf.service.model.ServiceInfo;
@@ -118,36 +122,61 @@
         }
     }
 
+    XmlSchema addSchemaElement(SchemaTypeSystem sts, Document doc, 
+                          Element elem, String file) throws URISyntaxException {
+        doc.appendChild(elem);
+        
+        elem = DOMUtils.getFirstElement(elem);
+        while (elem != null) {
+            if (elem.getLocalName().equals("import")) {
+                URI uri = new URI(file);
+                String loc = elem.getAttribute("schemaLocation");
+                if (!StringUtils.isEmpty(loc)) {
+                    URI locUri = uri.resolve(loc);
+                    String newLoc = locUri.toString();
+                    getSchema(sts, newLoc);
+                }
+            }                 
+            elem = DOMUtils.getNextElement(elem);
+        }
+        XmlSchema schema = dataBinding.addSchemaDocument(serviceInfo,
+                                                         schemas, 
+                                                         doc, 
+                                                         file);
+        doc.removeChild(doc.getDocumentElement());
+        schemaMap.put(file, schema);
+
+        return schema;
+    }
     XmlSchema getSchema(SchemaTypeSystem sts, String file) {
         if (schemaMap.containsKey(file)) {
             return schemaMap.get(file);
         }
         InputStream ins = sts.getSourceAsStream(file);
+        if (ins == null) {
+            return null;
+        }
         try {
             //temporary marker to make sure recursive imports don't blow up
             schemaMap.put(file, null);
 
             Document doc = XMLUtils.parse(ins);
-            Element elem = DOMUtils.getFirstElement(doc.getDocumentElement());
-            while (elem != null) {
-                if (elem.getLocalName().equals("import")) {
-                    URI uri = new URI(file);
-                    String loc = elem.getAttribute("schemaLocation");
-                    if (!StringUtils.isEmpty(loc)) {
-                        URI locUri = uri.resolve(loc);
-                        String newLoc = locUri.toString();
-                        getSchema(sts, newLoc);
-                    }
-                }                 
-                elem = DOMUtils.getNextElement(elem);
-            }
-                
-            XmlSchema schema = dataBinding.addSchemaDocument(serviceInfo,
-                                                             schemas, 
-                                                             doc, 
-                                                             file);
-            schemaMap.put(file, schema);
-            return schema;
+            Element elem = doc.getDocumentElement();
+            doc.removeChild(elem);
+            
+            if ("schema".equals(elem.getLocalName())
+                && "http://www.w3.org/2001/XMLSchema".equals(elem.getNamespaceURI()))
{
+                return addSchemaElement(sts, doc, elem, file);
+            }
+            Map<String, String> ns = new HashMap<String, String>();
+            ns.put("wsdl", WSDLConstants.NS_WSDL11);
+            ns.put("xsd", WSDLConstants.NS_SCHEMA_XSD);
+            XPathUtils xpath = new XPathUtils(ns);
+            NodeList list = xpath.getValueList("/wsdl:definitions/wsdl:types/xsd:schema",
elem);
+            for (int x = 0; x < list.getLength(); x++) {
+                addSchemaElement(sts, doc, (Element)list.item(x), file + "#1");
+            }
+            return null;
         } catch (Exception e) {
             throw new RuntimeException("Failed to find schema for: " + file, e);
         }
@@ -201,26 +230,40 @@
             SchemaTypeSystem sts = st.getTypeSystem();
             schemas.getXmlSchemaCollection().setSchemaResolver(new XMLSchemaResolver(sts));
             String sourceName = st.getSourceName();
-            if (sourceName.endsWith("wsdl")) {
-                return;
-            }
             XmlSchema schema = getSchema(sts, sourceName);
-
-            if (st.isDocumentType()) {
-                XmlSchemaElement sct = schema.getElementByName(st.getDocumentElementName());
-                part.setXmlSchema(sct);
-                part.setElement(true);
-                part.setElementQName(st.getDocumentElementName());
-                part.setConcreteName(st.getDocumentElementName());
-            } else if (st.getComponentType() == SchemaType.ELEMENT) {
-                XmlSchemaElement sct = schema.getElementByName(st.getName());
-                part.setXmlSchema(sct);
-                part.setElement(true);
+            if (schema != null) {
+                if (st.isDocumentType()) {
+                    XmlSchemaElement sct = schema.getElementByName(st.getDocumentElementName());
+                    part.setXmlSchema(sct);
+                    part.setElement(true);
+                    part.setElementQName(st.getDocumentElementName());
+                    part.setConcreteName(st.getDocumentElementName());
+                } else if (st.getComponentType() == SchemaType.ELEMENT) {
+                    XmlSchemaElement sct = schema.getElementByName(st.getName());
+                    part.setXmlSchema(sct);
+                    part.setElement(true);
+                } else {
+                    XmlSchemaType sct = schema.getTypeByName(st.getName());
+                    part.setTypeQName(st.getName());
+                    part.setXmlSchema(sct);
+                    part.setElement(false);
+                }
             } else {
-                XmlSchemaType sct = schema.getTypeByName(st.getName());
-                part.setTypeQName(st.getName());
-                part.setXmlSchema(sct);
-                part.setElement(false);
+                if (st.isDocumentType()) {
+                    part.setElement(true);
+                    part.setElementQName(st.getDocumentElementName());
+                    part.setConcreteName(st.getDocumentElementName());
+                    part.setXmlSchema(schemas.getElementByQName(st.getDocumentElementName()));
+                } else if (st.getComponentType() == SchemaType.ELEMENT) {
+                    part.setElement(true);
+                    part.setElementQName(st.getName());
+                    part.setConcreteName(st.getName());
+                    part.setXmlSchema(schemas.getElementByQName(st.getName()));
+                } else {
+                    part.setTypeQName(st.getName());
+                    part.setElement(false);
+                    part.setXmlSchema(schemas.getTypeByQName(st.getName()));
+                }
             }
         } catch (RuntimeException ex) {
             throw ex;

Modified: cxf/trunk/rt/databinding/xmlbeans/src/main/java/org/apache/cxf/xmlbeans/tools/XMLBeansToolingDataBinding.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/databinding/xmlbeans/src/main/java/org/apache/cxf/xmlbeans/tools/XMLBeansToolingDataBinding.java?rev=822376&r1=822375&r2=822376&view=diff
==============================================================================
--- cxf/trunk/rt/databinding/xmlbeans/src/main/java/org/apache/cxf/xmlbeans/tools/XMLBeansToolingDataBinding.java
(original)
+++ cxf/trunk/rt/databinding/xmlbeans/src/main/java/org/apache/cxf/xmlbeans/tools/XMLBeansToolingDataBinding.java
Tue Oct  6 17:54:05 2009
@@ -21,6 +21,8 @@
 
 import java.io.File;
 import java.io.IOException;
+import java.io.InputStream;
+import java.io.OutputStream;
 import java.io.Writer;
 import java.net.URI;
 import java.net.URISyntaxException;
@@ -40,6 +42,7 @@
 import org.xml.sax.EntityResolver;
 import org.xml.sax.InputSource;
 
+import org.apache.cxf.helpers.IOUtils;
 import org.apache.cxf.helpers.XMLUtils;
 import org.apache.cxf.tools.common.ToolConstants;
 import org.apache.cxf.tools.common.ToolContext;
@@ -63,6 +66,7 @@
 import org.apache.xmlbeans.impl.schema.PathResourceLoader;
 import org.apache.xmlbeans.impl.schema.SchemaTypeLoaderImpl;
 import org.apache.xmlbeans.impl.schema.SchemaTypeSystemCompiler;
+import org.apache.xmlbeans.impl.schema.SchemaTypeSystemImpl;
 import org.apache.xmlbeans.impl.schema.StscState;
 import org.apache.xmlbeans.impl.tool.CodeGenUtil;
 import org.apache.xmlbeans.impl.util.FilerImpl;
@@ -215,6 +219,20 @@
                 System.out.println(s);
             }
             */
+            for (Map.Entry<String, String> ent : sourcesToCopyMap.entrySet()) {
+                try {
+                    OutputStream out = filer.createBinaryFile("schema" 
+                                                              + SchemaTypeSystemImpl.METADATA_PACKAGE_GEN
+                                                              + "/src/" + ent.getValue());
+                    URL url = new URL(ent.getKey());
+                    InputStream in = url.openStream();
+                    IOUtils.copy(in, out);
+                    out.close();
+                    in.close();
+                } catch (Exception e) {
+                    //probably not an issue
+                }
+            }
         }
 
         if (!result) {
@@ -240,7 +258,6 @@
         if (cpResourceLoader != null) {
             cpResourceLoader.close();
         }
-
     }
 
     
@@ -269,6 +286,7 @@
             
 
             XmlObject urldoc = loader.parse(url, null, options);
+            state.addSourceUri(wsdlFile, null);
 
             if (urldoc instanceof org.apache.xmlbeans.impl.xb.substwsdl.DefinitionsDocument)
{
                 org.apache.xmlbeans.impl.xb.substwsdl.DefinitionsDocument wsdldoc = 

Modified: cxf/trunk/systests/databinding/pom.xml
URL: http://svn.apache.org/viewvc/cxf/trunk/systests/databinding/pom.xml?rev=822376&r1=822375&r2=822376&view=diff
==============================================================================
--- cxf/trunk/systests/databinding/pom.xml (original)
+++ cxf/trunk/systests/databinding/pom.xml Tue Oct  6 17:54:05 2009
@@ -82,6 +82,7 @@
                                     <includes>
                                         <include>**/*.xsb</include>
                                         <include>**/*.class</include>
+                                        <include>**/*.wsdl</include>
                                     </includes>
                                 </resource>
                             </resources>
@@ -108,6 +109,13 @@
                                         <extraarg>xmlbeans</extraarg>
                                     </extraargs>
                                 </wsdlOption>
+                                <wsdlOption>
+                                    <wsdl>${basedir}/src/test/resources/wsdl_systest_databinding/xmlbeans/doc_lit_bare.wsdl</wsdl>
+                                    <extraargs>
+                                        <extraarg>-db</extraarg>
+                                        <extraarg>xmlbeans</extraarg>
+                                    </extraargs>
+                                </wsdlOption>
                             </wsdlOptions>
                         </configuration>
                         <goals>

Modified: cxf/trunk/systests/databinding/src/test/java/org/apache/cxf/systest/xmlbeans/GreeterImpl.java
URL: http://svn.apache.org/viewvc/cxf/trunk/systests/databinding/src/test/java/org/apache/cxf/systest/xmlbeans/GreeterImpl.java?rev=822376&r1=822375&r2=822376&view=diff
==============================================================================
--- cxf/trunk/systests/databinding/src/test/java/org/apache/cxf/systest/xmlbeans/GreeterImpl.java
(original)
+++ cxf/trunk/systests/databinding/src/test/java/org/apache/cxf/systest/xmlbeans/GreeterImpl.java
Tue Oct  6 17:54:05 2009
@@ -30,7 +30,6 @@
 @javax.jws.WebService(portName = "SoapPort", serviceName = "SOAPService", 
                       targetNamespace = "http://apache.org/hello_world_soap_http/xmlbeans",

                       endpointInterface = "org.apache.hello_world_soap_http.xmlbeans.Greeter")
-                  
 public class GreeterImpl implements Greeter {
 
     private static final Logger LOG = LogUtils.getL7dLogger(GreeterImpl.class);        

Added: cxf/trunk/systests/databinding/src/test/java/org/apache/cxf/systest/xmlbeans/PutLastTradePriceImpl.java
URL: http://svn.apache.org/viewvc/cxf/trunk/systests/databinding/src/test/java/org/apache/cxf/systest/xmlbeans/PutLastTradePriceImpl.java?rev=822376&view=auto
==============================================================================
--- cxf/trunk/systests/databinding/src/test/java/org/apache/cxf/systest/xmlbeans/PutLastTradePriceImpl.java
(added)
+++ cxf/trunk/systests/databinding/src/test/java/org/apache/cxf/systest/xmlbeans/PutLastTradePriceImpl.java
Tue Oct  6 17:54:05 2009
@@ -0,0 +1,59 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.cxf.systest.xmlbeans;
+
+import javax.jws.WebService;
+import javax.xml.ws.Holder;
+
+import org.apache.cxf.xmlbeans.docLitBare.types.TradePriceData;
+import org.apache.cxf.xmlbeans.doc_lit_bare.PutLastTradedPricePortType;
+import org.apache.xmlbeans.XmlDecimal;
+import org.apache.xmlbeans.XmlString;
+
+/**
+ * 
+ */
+@WebService(targetNamespace = "http://cxf.apache.org/xmlbeans/doc_lit_bare",
+            portName = "SoapPort", serviceName = "SOAPService",
+            endpointInterface = "org.apache.cxf.xmlbeans.doc_lit_bare.PutLastTradedPricePortType"
+)
+public class PutLastTradePriceImpl implements PutLastTradedPricePortType {
+
+    /** {@inheritDoc}*/
+    public XmlString bareNoParam() {
+        return null;
+    }
+
+    /** {@inheritDoc}*/
+    public XmlString nillableParameter(XmlDecimal theRequest) {
+        return null;
+    }
+
+    /** {@inheritDoc}*/
+    public void putLastTradedPrice(TradePriceData body) {
+
+    }
+
+    /** {@inheritDoc}*/
+    public void sayHi(Holder<TradePriceData> body) {
+
+    }
+
+}

Propchange: cxf/trunk/systests/databinding/src/test/java/org/apache/cxf/systest/xmlbeans/PutLastTradePriceImpl.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: cxf/trunk/systests/databinding/src/test/java/org/apache/cxf/systest/xmlbeans/PutLastTradePriceImpl.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Modified: cxf/trunk/systests/databinding/src/test/java/org/apache/cxf/systest/xmlbeans/Server.java
URL: http://svn.apache.org/viewvc/cxf/trunk/systests/databinding/src/test/java/org/apache/cxf/systest/xmlbeans/Server.java?rev=822376&r1=822375&r2=822376&view=diff
==============================================================================
--- cxf/trunk/systests/databinding/src/test/java/org/apache/cxf/systest/xmlbeans/Server.java
(original)
+++ cxf/trunk/systests/databinding/src/test/java/org/apache/cxf/systest/xmlbeans/Server.java
Tue Oct  6 17:54:05 2009
@@ -35,9 +35,11 @@
         Bus bus = factory.createBus("org/apache/cxf/systest/xmlbeans/cxf.xml");
         BusFactory.setDefaultBus(bus);
         setBus(bus);
-        Object implementor = new GreeterImpl();
-        String address = "http://localhost:9000/SoapContext/SoapPort";
-        Endpoint.publish(address, implementor);
+        Endpoint.publish("http://localhost:9000/SoapContext/SoapPort",
+                         new GreeterImpl());
+        
+        Endpoint.publish("http://localhost:9000/SOAPDocLitBareService/SoapPort", 
+                         new PutLastTradePriceImpl());
     }
 
     public static void main(String args[]) {

Modified: cxf/trunk/systests/databinding/src/test/java/org/apache/cxf/systest/xmlbeans/ServerNoWsdl.java
URL: http://svn.apache.org/viewvc/cxf/trunk/systests/databinding/src/test/java/org/apache/cxf/systest/xmlbeans/ServerNoWsdl.java?rev=822376&r1=822375&r2=822376&view=diff
==============================================================================
--- cxf/trunk/systests/databinding/src/test/java/org/apache/cxf/systest/xmlbeans/ServerNoWsdl.java
(original)
+++ cxf/trunk/systests/databinding/src/test/java/org/apache/cxf/systest/xmlbeans/ServerNoWsdl.java
Tue Oct  6 17:54:05 2009
@@ -38,6 +38,9 @@
         Object implementor = new GreeterImpl();
         String address = "http://localhost:9010/SoapContext/SoapPort";
         Endpoint.publish(address, implementor);
+        
+        implementor = new PutLastTradePriceImpl();
+        Endpoint.publish("http://localhost:9010/SOAPDocLitBareService/SoapPort", implementor);
     }
 
     public static void main(String args[]) {

Modified: cxf/trunk/systests/databinding/src/test/java/org/apache/cxf/systest/xmlbeans/cxf.xml
URL: http://svn.apache.org/viewvc/cxf/trunk/systests/databinding/src/test/java/org/apache/cxf/systest/xmlbeans/cxf.xml?rev=822376&r1=822375&r2=822376&view=diff
==============================================================================
--- cxf/trunk/systests/databinding/src/test/java/org/apache/cxf/systest/xmlbeans/cxf.xml (original)
+++ cxf/trunk/systests/databinding/src/test/java/org/apache/cxf/systest/xmlbeans/cxf.xml Tue
Oct  6 17:54:05 2009
@@ -26,28 +26,25 @@
 http://cxf.apache.org/core http://cxf.apache.org/schemas/core.xsd
 http://cxf.apache.org/jaxws http://cxf.apache.org/schemas/jaxws.xsd">
 
-    <!-- comment this bean to disable schema validation in the client -->
 
     <jaxws:client name="{http://apache.org/hello_world_soap_http/xmlbeans}SoapPort"
         createdFromAPI="true">
         <!-- jaxws:properties>
             <entry key="schema-validation-enabled" value="true" />
         </jaxws:properties-->
-        <!-- jaxws:dataBinding>
-        	<bean class="org.apache.cxf.xmlbeans.XmlBeansDataBinding"/>
-        </jaxws:dataBinding-->
     </jaxws:client>
 
     <jaxws:endpoint name="{http://apache.org/hello_world_soap_http/xmlbeans}SoapPort"
-        wsdlLocation="wsdl_systest_databinding/xmlbeans/hello_world.wsdl"
+        wsdlLocation="classpath:wsdl_systest_databinding/xmlbeans/hello_world.wsdl"
         createdFromAPI="true">
         <jaxws:properties>
             <entry key="schema-validation-enabled" value="true" />
         </jaxws:properties>
-        <!-- jaxws:dataBinding>
-        	<bean class="org.apache.cxf.xmlbeans.XmlBeansDataBinding"/>
-        </jaxws:dataBinding-->
     </jaxws:endpoint>
-
+    
+    
+    <jaxws:endpoint name="{http://cxf.apache.org/xmlbeans/doc_lit_bare}SoapPort"
+        wsdlLocation="classpath:wsdl_systest_databinding/xmlbeans/doc_lit_bare.wsdl"
+        createdFromAPI="true"/>
 </beans>
 

Modified: cxf/trunk/systests/databinding/src/test/java/org/apache/cxf/systest/xmlbeans/cxf_no_wsdl.xml
URL: http://svn.apache.org/viewvc/cxf/trunk/systests/databinding/src/test/java/org/apache/cxf/systest/xmlbeans/cxf_no_wsdl.xml?rev=822376&r1=822375&r2=822376&view=diff
==============================================================================
--- cxf/trunk/systests/databinding/src/test/java/org/apache/cxf/systest/xmlbeans/cxf_no_wsdl.xml
(original)
+++ cxf/trunk/systests/databinding/src/test/java/org/apache/cxf/systest/xmlbeans/cxf_no_wsdl.xml
Tue Oct  6 17:54:05 2009
@@ -33,9 +33,6 @@
         <!-- jaxws:properties>
             <entry key="schema-validation-enabled" value="true" />
         </jaxws:properties-->
-        <!-- jaxws:dataBinding>
-        	<bean class="org.apache.cxf.xmlbeans.XmlBeansDataBinding"/>
-        </jaxws:dataBinding-->
     </jaxws:client>
 
     <jaxws:endpoint name="{http://apache.org/hello_world_soap_http/xmlbeans}SoapPort"
@@ -43,10 +40,10 @@
         <jaxws:properties>
             <entry key="schema-validation-enabled" value="true" />
         </jaxws:properties>
-        <!-- jaxws:dataBinding>
-        	<bean class="org.apache.cxf.xmlbeans.XmlBeansDataBinding"/>
-        </jaxws:dataBinding-->
     </jaxws:endpoint>
-
+    
+    <jaxws:endpoint name="{http://cxf.apache.org/xmlbeans/doc_lit_bare}SoapPort"
+        wsdlLocation="wsdl_systest_databinding/xmlbeans/doc_lit_bare.wsdl"
+        createdFromAPI="true"/>
 </beans>
 

Added: cxf/trunk/systests/databinding/src/test/resources/wsdl_systest_databinding/xmlbeans/doc_lit_bare.wsdl
URL: http://svn.apache.org/viewvc/cxf/trunk/systests/databinding/src/test/resources/wsdl_systest_databinding/xmlbeans/doc_lit_bare.wsdl?rev=822376&view=auto
==============================================================================
--- cxf/trunk/systests/databinding/src/test/resources/wsdl_systest_databinding/xmlbeans/doc_lit_bare.wsdl
(added)
+++ cxf/trunk/systests/databinding/src/test/resources/wsdl_systest_databinding/xmlbeans/doc_lit_bare.wsdl
Tue Oct  6 17:54:05 2009
@@ -0,0 +1,121 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one
+  or more contributor license agreements. See the NOTICE file
+  distributed with this work for additional information
+  regarding copyright ownership. The ASF licenses this file
+  to you under the Apache License, Version 2.0 (the
+  "License"); you may not use this file except in compliance
+  with the License. You may obtain a copy of the License at
+ 
+  http://www.apache.org/licenses/LICENSE-2.0
+ 
+  Unless required by applicable law or agreed to in writing,
+  software distributed under the License is distributed on an
+  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  KIND, either express or implied. See the License for the
+  specific language governing permissions and limitations
+  under the License.
+-->
+<wsdl:definitions xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
+    xmlns:tns="http://cxf.apache.org/xmlbeans/doc_lit_bare"
+     xmlns:x1="http://cxf.apache.org/xmlbeans/doc_lit_bare/types"
+    xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+    targetNamespace="http://cxf.apache.org/xmlbeans/doc_lit_bare" name="DocLitBare">
+    <wsdl:types>
+        <schema targetNamespace="http://cxf.apache.org/xmlbeans/doc_lit_bare/types" 
+            xmlns:tns="http://cxf.apache.org/xmlbeans/doc_lit_bare/types" 
+            xmlns="http://www.w3.org/2001/XMLSchema" 
+            elementFormDefault="qualified">
+            <complexType name="TradePriceData">
+                <sequence>
+                    <element name="tickerSymbol" type="xsd:string"/>
+                    <element name="tickerPrice" type="xsd:float"/>
+                </sequence>
+            </complexType>
+            <element name="in" type="tns:TradePriceData"/>
+            <element name="inout" type="tns:TradePriceData"/>
+            <element name="stringRespType" type="xsd:string"/>
+            <element name="inDecimal" nillable="true" type="xsd:decimal" />
+            <element name="outString" nillable="true" type="xsd:string" />
+        </schema>
+    </wsdl:types>
+    <message name="PutLastTradedPriceInput">
+        <part name="body" element="x1:in"/>
+    </message>
+    <message name="PutLastTradedPriceOutput"/>
+    <message name="SayHiInput">
+        <part name="body" element="x1:inout"/>
+    </message>
+    <message name="SayHiOutput">
+        <part name="body" element="x1:inout"/>
+    </message>
+    <message name="bareNoParamRequest"/>
+    <message name="bareNoParamResponse">
+        <part element="x1:stringRespType" name="theResponse"/>
+    </message>
+    <message name="nillableRequest">
+        <part name="theRequest" element="x1:inDecimal" />
+    </message>
+    <message name="nillableResponse">
+        <part name="theResponse" element="x1:outString" />
+    </message>
+    <portType name="PutLastTradedPricePortType">
+        <operation name="SayHi">
+            <input message="tns:SayHiInput"/>
+            <output message="tns:SayHiOutput"/>
+        </operation>
+        <operation name="PutLastTradedPrice">
+            <input message="tns:PutLastTradedPriceInput"/>
+            <output message="tns:PutLastTradedPriceOutput"/>
+        </operation>
+        <operation name="bareNoParam">
+            <input message="tns:bareNoParamRequest"/>
+            <output message="tns:bareNoParamResponse"/>
+        </operation>
+        <operation name="nillableParameter">
+            <input message="tns:nillableRequest" />
+            <output message="tns:nillableResponse" />
+        </operation>
+    </portType>
+    <binding name="PutLastTradedPriceSoapBinding" type="tns:PutLastTradedPricePortType">
+        <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
+        <operation name="SayHi">
+            <input>
+                <soap:body use="literal"/>
+            </input>
+            <output>
+                <soap:body use="literal"/>
+            </output>
+        </operation>
+        <operation name="PutLastTradedPrice">
+            <input>
+                <soap:body use="literal"/>
+            </input>
+            <output>
+                <soap:body use="literal"/>
+            </output>
+        </operation>
+        <operation name="bareNoParam">
+            <input>
+                <soap:body use="literal"/>
+            </input>
+            <output>
+                <soap:body use="literal"/>
+            </output>
+        </operation>
+        <operation name="nillableParameter">
+            <input>
+                <soap:body use="literal" />
+            </input>
+            <output>
+                <soap:body use="literal" />
+            </output>
+        </operation>
+    </binding>
+    <wsdl:service name="SOAPService">
+        <wsdl:port name="SoapPort" binding="tns:PutLastTradedPriceSoapBinding">
+            <soap:address location="http://localhost:9107/SOAPDocLitBareService/SoapPort"/>
+        </wsdl:port>
+    </wsdl:service>
+</wsdl:definitions>

Propchange: cxf/trunk/systests/databinding/src/test/resources/wsdl_systest_databinding/xmlbeans/doc_lit_bare.wsdl
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: cxf/trunk/systests/databinding/src/test/resources/wsdl_systest_databinding/xmlbeans/doc_lit_bare.wsdl
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Propchange: cxf/trunk/systests/databinding/src/test/resources/wsdl_systest_databinding/xmlbeans/doc_lit_bare.wsdl
------------------------------------------------------------------------------
    svn:mime-type = text/xml



Mime
View raw message