cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ff...@apache.org
Subject svn commit: r513622 - in /incubator/cxf/trunk: common/common/src/main/java/org/apache/cxf/common/util/ parent/ rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/ systests/src/test/java/org/apache/cxf/systest/jaxws/ testutils/ testutils/src/main/jav...
Date Fri, 02 Mar 2007 05:12:47 GMT
Author: ffang
Date: Thu Mar  1 21:12:45 2007
New Revision: 513622

URL: http://svn.apache.org/viewvc?view=rev&rev=513622
Log:
[CXF-443] Enable LocaterClientServerTest
                        

Modified:
    incubator/cxf/trunk/common/common/src/main/java/org/apache/cxf/common/util/PackageUtils.java
    incubator/cxf/trunk/parent/pom.xml
    incubator/cxf/trunk/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/JAXBSchemaInitializer.java
    incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jaxws/LocatorClientServerTest.java
    incubator/cxf/trunk/testutils/pom.xml
    incubator/cxf/trunk/testutils/src/main/java/org/apache/locator_test/LocatorServiceImpl.java
    incubator/cxf/trunk/tools/common/src/main/java/org/apache/cxf/tools/util/ProcessorUtil.java
    incubator/cxf/trunk/tools/wsdl2java/src/main/java/org/apache/cxf/tools/wsdl2java/processor/internal/OperationProcessor.java

Modified: incubator/cxf/trunk/common/common/src/main/java/org/apache/cxf/common/util/PackageUtils.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/common/common/src/main/java/org/apache/cxf/common/util/PackageUtils.java?view=diff&rev=513622&r1=513621&r2=513622
==============================================================================
--- incubator/cxf/trunk/common/common/src/main/java/org/apache/cxf/common/util/PackageUtils.java
(original)
+++ incubator/cxf/trunk/common/common/src/main/java/org/apache/cxf/common/util/PackageUtils.java
Thu Mar  1 21:12:45 2007
@@ -54,6 +54,9 @@
     
     public static String getPackageName(Class<?> clazz) {
         String className = clazz.getName();
+        if (className.startsWith("[L")) {
+            className = className.substring(2);
+        }
         return getPackageName(className);
     }
     

Modified: incubator/cxf/trunk/parent/pom.xml
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/parent/pom.xml?view=diff&rev=513622&r1=513621&r2=513622
==============================================================================
--- incubator/cxf/trunk/parent/pom.xml (original)
+++ incubator/cxf/trunk/parent/pom.xml Thu Mar  1 21:12:45 2007
@@ -189,7 +189,6 @@
                         <!-- do not exclude **/Abstract*Test.java **/Abstract*TestCase.java
-->
                         <excludes>
                             <exclude>**/*$*</exclude>
-                            <exclude>**/LocatorClientServerTest.java</exclude>
                             <exclude>**/AbstractServletTest.java</exclude>
                         </excludes>
                         <reportFormat>${surefire.format}</reportFormat>

Modified: incubator/cxf/trunk/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/JAXBSchemaInitializer.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/JAXBSchemaInitializer.java?view=diff&rev=513622&r1=513621&r2=513622
==============================================================================
--- incubator/cxf/trunk/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/JAXBSchemaInitializer.java
(original)
+++ incubator/cxf/trunk/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/JAXBSchemaInitializer.java
Thu Mar  1 21:12:45 2007
@@ -30,6 +30,7 @@
 import org.apache.cxf.service.model.MessagePartInfo;
 import org.apache.cxf.service.model.ServiceInfo;
 import org.apache.ws.commons.schema.XmlSchemaCollection;
+import org.apache.ws.commons.schema.XmlSchemaElement;
 
 /**
  * Walks the service model and sets up the element/type names.
@@ -64,8 +65,18 @@
         if (isElement) {
             QName name = new QName(beanInfo.getElementNamespaceURI(null), 
                                    beanInfo.getElementLocalName(null));
-            part.setElementQName(name);
-            part.setXmlSchema(schemas.getElementByQName(name));
+            XmlSchemaElement el = schemas.getElementByQName(name);
+            if (el != null && el.getRefName() != null) {
+                part.setTypeQName(el.getRefName());
+            } else {
+                part.setElementQName(name);
+            }
+            part.setXmlSchema(el);
+            
+            /*else if (el.getRefName() != null) {
+                MessagePartInfo mpi = wrapper.addMessagePart(el.getRefName());
+                mpi.setTypeQName(el.getRefName());
+                mpi.setXmlSchema(el);*/
         } else {
             Iterator<QName> itr = beanInfo.getTypeNames().iterator();
             if (!itr.hasNext()) {
@@ -73,7 +84,6 @@
             }
             
             QName typeName = itr.next();
-
             part.setTypeQName(typeName);
             part.setXmlSchema(schemas.getTypeByQName(typeName));
         }

Modified: incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jaxws/LocatorClientServerTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jaxws/LocatorClientServerTest.java?view=diff&rev=513622&r1=513621&r2=513622
==============================================================================
--- incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jaxws/LocatorClientServerTest.java
(original)
+++ incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jaxws/LocatorClientServerTest.java
Thu Mar  1 21:12:45 2007
@@ -36,10 +36,11 @@
 import org.apache.cxf.systest.common.ClientServerTestBase;
 import org.apache.cxf.systest.common.TestServerBase;
 
-import org.apache.cxf.testutils.locator.LocatorService;
-import org.apache.cxf.testutils.locator.LocatorService_Service;
-import org.apache.cxf.testutils.locator.QuerySelectType;
 
+
+import org.apache.locator.LocatorService;
+import org.apache.locator.LocatorService_Service;
+import org.apache.locator.query.QuerySelectType;
 import org.apache.locator_test.LocatorServiceImpl;
 
 public class LocatorClientServerTest extends ClientServerTestBase {

Modified: incubator/cxf/trunk/testutils/pom.xml
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/testutils/pom.xml?view=diff&rev=513622&r1=513621&r2=513622
==============================================================================
--- incubator/cxf/trunk/testutils/pom.xml (original)
+++ incubator/cxf/trunk/testutils/pom.xml Thu Mar  1 21:12:45 2007
@@ -244,10 +244,10 @@
                                 </wsdlOption>
                                 <wsdlOption>
                                     <wsdl>${basedir}/src/main/resources/wsdl/locator.wsdl</wsdl>
-                                    <extraargs>
+                                    <!--extraargs>
                                         <extraarg>-p</extraarg>
                                         <extraarg>org.apache.cxf.testutils.locator</extraarg>
-                                    </extraargs>
+                                    </extraargs-->
                                 </wsdlOption>
 
                                 <wsdlOption>

Modified: incubator/cxf/trunk/testutils/src/main/java/org/apache/locator_test/LocatorServiceImpl.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/testutils/src/main/java/org/apache/locator_test/LocatorServiceImpl.java?view=diff&rev=513622&r1=513621&r2=513622
==============================================================================
--- incubator/cxf/trunk/testutils/src/main/java/org/apache/locator_test/LocatorServiceImpl.java
(original)
+++ incubator/cxf/trunk/testutils/src/main/java/org/apache/locator_test/LocatorServiceImpl.java
Thu Mar  1 21:12:45 2007
@@ -24,9 +24,15 @@
 
 package org.apache.locator_test;
 
+import java.util.List;
 import java.util.logging.Logger;
-import org.apache.cxf.testutils.locator.EndpointNotExistFault;
-import org.apache.cxf.testutils.locator.LocatorService;
+
+import org.apache.locator.EndpointNotExistFault;
+import org.apache.locator.LocatorService;
+import org.apache.locator.query.QuerySelectType;
+import org.apache.locator.types.EndpointIdentity;
+import org.apache.locator.types.ListEndpointsResponse.Endpoint;
+
 
 /**
  * This class was generated by the CXF 2.0-incubator-M1-SNAPSHOT Thu Nov 02
@@ -37,7 +43,7 @@
                       serviceName = "LocatorService", 
                       portName = "LocatorServicePort", 
                       targetNamespace = "http://apache.org/locator", 
-                      endpointInterface = "org.apache.cxf.testutils.locator.LocatorService")
+                      endpointInterface = "org.apache.locator.LocatorService")
 public class LocatorServiceImpl implements LocatorService {
 
     static final Logger LOG = Logger.getLogger(LocatorServiceImpl.class.getName());
@@ -55,12 +61,12 @@
         LOG.info("Executing operation deregisterPeerManager");
     }
 
-    public void registerEndpoint(org.apache.cxf.testutils.locator.EndpointIdentity endpointId,
+    public void registerEndpoint(EndpointIdentity endpointId,
                                  org.apache.cxf.ws.addressing.EndpointReferenceType endpointReference)
{
         LOG.info("Executing operation registerEndpoint");
     }
 
-    public void deregisterEndpoint(org.apache.cxf.testutils.locator.EndpointIdentity endpointId,
+    public void deregisterEndpoint(EndpointIdentity endpointId,
                                    org.apache.cxf.ws.addressing.EndpointReferenceType endpointReference)
{
         LOG.info("Executing operation deregisterEndpoint");
     }
@@ -75,15 +81,14 @@
 
     
     public java.util.List<
-        org.apache.cxf.testutils.locator.ListEndpointsResponse.Endpoint> listEndpoints()
{
+        Endpoint> listEndpoints() {
         LOG.info("Executing operation listEndpoints");
         return null;
     }
 
     
-    public java.util.List<
-        org.apache.cxf.testutils.locator.QueryEndpointsResponse.Endpoint> queryEndpoints(
-            org.apache.cxf.testutils.locator.QuerySelectType select) {
+    public List<org.apache.locator.types.QueryEndpointsResponse.Endpoint> queryEndpoints(
+        QuerySelectType select) {
         LOG.info("Executing operation queryEndpoints");
         return null;
     }

Modified: incubator/cxf/trunk/tools/common/src/main/java/org/apache/cxf/tools/util/ProcessorUtil.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/tools/common/src/main/java/org/apache/cxf/tools/util/ProcessorUtil.java?view=diff&rev=513622&r1=513621&r2=513622
==============================================================================
--- incubator/cxf/trunk/tools/common/src/main/java/org/apache/cxf/tools/util/ProcessorUtil.java
(original)
+++ incubator/cxf/trunk/tools/common/src/main/java/org/apache/cxf/tools/util/ProcessorUtil.java
Thu Mar  1 21:12:45 2007
@@ -159,6 +159,18 @@
        
     }
 
+    public static String resolvePartNamespace(Part part) {
+        QName qname = part.getElementName();
+        if (qname == null) {
+            qname = part.getTypeName();
+        }
+        if (qname != null) {
+            return qname.getNamespaceURI();
+        } else {
+            return null;
+        }
+    }
+    
     public static String resolvePartNamespace(Part part, Definition definition) {
         QName qname = part.getElementName();
         

Modified: incubator/cxf/trunk/tools/wsdl2java/src/main/java/org/apache/cxf/tools/wsdl2java/processor/internal/OperationProcessor.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/tools/wsdl2java/src/main/java/org/apache/cxf/tools/wsdl2java/processor/internal/OperationProcessor.java?view=diff&rev=513622&r1=513621&r2=513622
==============================================================================
--- incubator/cxf/trunk/tools/wsdl2java/src/main/java/org/apache/cxf/tools/wsdl2java/processor/internal/OperationProcessor.java
(original)
+++ incubator/cxf/trunk/tools/wsdl2java/src/main/java/org/apache/cxf/tools/wsdl2java/processor/internal/OperationProcessor.java
Thu Mar  1 21:12:45 2007
@@ -26,7 +26,7 @@
 import java.util.logging.Level;
 
 import javax.jws.soap.SOAPBinding;
-import javax.wsdl.Definition;
+//import javax.wsdl.Definition;
 import javax.wsdl.Fault;
 import javax.wsdl.Message;
 import javax.wsdl.Operation;
@@ -53,10 +53,10 @@
     private JavaParameter wrapperRequest;
     private JavaParameter wrapperResponse;
 
-    private Definition definition;
+    //private Definition definition;
     public OperationProcessor(ToolContext penv) {
         super(penv);
-        definition = (Definition)penv.get(ToolConstants.WSDL_DEFINITION);
+        //definition = (Definition)penv.get(ToolConstants.WSDL_DEFINITION);
     }
 
     @SuppressWarnings("unchecked")
@@ -276,7 +276,7 @@
             wrapperRequest = new JavaParameter();
             wrapperRequest.setName(ProcessorUtil.resolvePartName(inputPart));
             wrapperRequest.setType(ProcessorUtil.getPartType(inputPart));
-            wrapperRequest.setTargetNamespace(ProcessorUtil.resolvePartNamespace(inputPart,
definition));
+            wrapperRequest.setTargetNamespace(ProcessorUtil.resolvePartNamespace(inputPart));
 
             wrapperRequest.setClassName(ProcessorUtil.getFullClzName(inputPart, 
                                                                      this.env, this.collector,
false));
@@ -286,7 +286,7 @@
             wrapperResponse = new JavaParameter();
             wrapperResponse.setName(ProcessorUtil.resolvePartName(outputPart));
             wrapperResponse.setType(ProcessorUtil.getPartType(outputPart));
-            wrapperResponse.setTargetNamespace(ProcessorUtil.resolvePartNamespace(outputPart,
definition));
+            wrapperResponse.setTargetNamespace(ProcessorUtil.resolvePartNamespace(outputPart));
 
             wrapperResponse.setClassName(ProcessorUtil.getFullClzName(outputPart, 
                                                                       this.env, this.collector,
false));



Mime
View raw message