cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject git commit: Fix the URL's for the WSDL
Date Thu, 27 Mar 2014 20:38:23 GMT
Repository: cxf
Updated Branches:
  refs/heads/master d214d1052 -> 1592a6773


Fix the URL's for the WSDL


Project: http://git-wip-us.apache.org/repos/asf/cxf/repo
Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/1592a677
Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/1592a677
Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/1592a677

Branch: refs/heads/master
Commit: 1592a677343fb389a004e828a177a51447109584
Parents: d214d10
Author: Daniel Kulp <dkulp@apache.org>
Authored: Thu Mar 27 15:43:51 2014 -0400
Committer: Daniel Kulp <dkulp@apache.org>
Committed: Thu Mar 27 15:56:40 2014 -0400

----------------------------------------------------------------------
 .../factory/ReflectionServiceFactoryBean.java     | 18 +-----------------
 .../cxf/systest/jaxws/AddNumbersImplPartial2.java |  2 +-
 .../cxf/systest/jms/swa/ClientServerSwaTest.java  |  7 ++++---
 3 files changed, 6 insertions(+), 21 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cxf/blob/1592a677/rt/wsdl/src/main/java/org/apache/cxf/wsdl/service/factory/ReflectionServiceFactoryBean.java
----------------------------------------------------------------------
diff --git a/rt/wsdl/src/main/java/org/apache/cxf/wsdl/service/factory/ReflectionServiceFactoryBean.java
b/rt/wsdl/src/main/java/org/apache/cxf/wsdl/service/factory/ReflectionServiceFactoryBean.java
index 6d056e7..46062d6 100644
--- a/rt/wsdl/src/main/java/org/apache/cxf/wsdl/service/factory/ReflectionServiceFactoryBean.java
+++ b/rt/wsdl/src/main/java/org/apache/cxf/wsdl/service/factory/ReflectionServiceFactoryBean.java
@@ -46,9 +46,7 @@ import java.util.concurrent.Executor;
 import java.util.logging.Level;
 import java.util.logging.Logger;
 
-import javax.wsdl.Definition;
 import javax.wsdl.Operation;
-import javax.wsdl.WSDLException;
 import javax.xml.bind.annotation.XmlAttachmentRef;
 import javax.xml.bind.annotation.XmlElementWrapper;
 import javax.xml.bind.annotation.XmlList;
@@ -106,7 +104,6 @@ import org.apache.cxf.service.model.SchemaInfo;
 import org.apache.cxf.service.model.ServiceInfo;
 import org.apache.cxf.service.model.UnwrappedOperationInfo;
 import org.apache.cxf.wsdl.WSDLConstants;
-import org.apache.cxf.wsdl.WSDLManager;
 import org.apache.cxf.wsdl11.WSDLServiceBuilder;
 import org.apache.cxf.wsdl11.WSDLServiceFactory;
 import org.apache.ws.commons.schema.XmlSchema;
@@ -520,7 +517,7 @@ public class ReflectionServiceFactoryBean extends org.apache.cxf.service.factory
     }
 
     protected boolean isFromWsdl() {
-        return !populateFromClass && getWsdlURL() != null && !isEmptywsdl(getWsdlURL());
+        return !populateFromClass && !StringUtils.isEmpty(getWsdlURL());
     }
 
     protected void initializeServiceModel() {
@@ -2577,17 +2574,4 @@ public class ReflectionServiceFactoryBean extends org.apache.cxf.service.factory
     public void setSchemaLocations(List<String> schemaLocations) {
         this.schemaLocations = schemaLocations;
     }
-    private boolean isEmptywsdl(String wsdlUrl) {
-        Definition definition;
-        try {
-            definition = getBus().getExtension(WSDLManager.class).getDefinition(wsdlUrl);
-        } catch (WSDLException e) {
-            LOG.log(Level.WARNING, "Failed to parse WSDL", e);
-            return true;
-        }
-        if (definition.getPortTypes().isEmpty() && definition.getImports().isEmpty())
{
-            return true;
-        } 
-        return false;
-    }
 }

http://git-wip-us.apache.org/repos/asf/cxf/blob/1592a677/systests/jaxws/src/test/java/org/apache/cxf/systest/jaxws/AddNumbersImplPartial2.java
----------------------------------------------------------------------
diff --git a/systests/jaxws/src/test/java/org/apache/cxf/systest/jaxws/AddNumbersImplPartial2.java
b/systests/jaxws/src/test/java/org/apache/cxf/systest/jaxws/AddNumbersImplPartial2.java
index 734710b..21bd809 100644
--- a/systests/jaxws/src/test/java/org/apache/cxf/systest/jaxws/AddNumbersImplPartial2.java
+++ b/systests/jaxws/src/test/java/org/apache/cxf/systest/jaxws/AddNumbersImplPartial2.java
@@ -19,8 +19,8 @@
 
 package org.apache.cxf.systest.jaxws;
 import javax.jws.WebService;
-@WebService(wsdlLocation = "partialwsdl/AddNumbersImplPartial2Service.wsdl")
 
+@WebService
 public class AddNumbersImplPartial2 {
     public int addTwoNumbers(int number1, int number2) {
         return number1 + number2;

http://git-wip-us.apache.org/repos/asf/cxf/blob/1592a677/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/swa/ClientServerSwaTest.java
----------------------------------------------------------------------
diff --git a/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/swa/ClientServerSwaTest.java
b/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/swa/ClientServerSwaTest.java
index 1d650ec..854c510 100644
--- a/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/swa/ClientServerSwaTest.java
+++ b/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/swa/ClientServerSwaTest.java
@@ -51,7 +51,8 @@ public class ClientServerSwaTest extends AbstractBusClientServerTestBase
{
         protected void run() {
             try {
                 JaxWsServerFactoryBean factory = new JaxWsServerFactoryBean();
-                factory.setWsdlLocation("classpath:wsdl/swa-mime-jms.wsdl");
+                factory.setBus(getBus());
+                factory.setWsdlLocation("classpath:/swa-mime_jms.wsdl");
                 factory.setTransportId(SoapJMSConstants.SOAP_JMS_SPECIFICIATION_TRANSPORTID);
                 factory.setServiceName(new QName("http://cxf.apache.org/swa", "SwAService"));
                 factory.setEndpointName(new QName("http://cxf.apache.org/swa", "SwAServiceJMSPort"));
@@ -80,10 +81,10 @@ public class ClientServerSwaTest extends AbstractBusClientServerTestBase
{
     @Test
     public void testSwa() throws Exception {
         JaxWsProxyFactoryBean factory = new JaxWsProxyFactoryBean();
-        factory.setWsdlLocation("classpath:wsdl/swa-mime-jms.wsdl");
+        factory.setWsdlLocation("classpath:/swa-mime_jms.wsdl");
         factory.setTransportId(SoapJMSConstants.SOAP_JMS_SPECIFICIATION_TRANSPORTID);
         factory.setServiceName(new QName("http://cxf.apache.org/swa", "SwAService"));
-        factory.setEndpointName(new QName("http://cxf.apache.org/swa", "SwAServiceHttpPort"));
+        factory.setEndpointName(new QName("http://cxf.apache.org/swa", "SwAServiceJMSPort"));
         factory.setAddress(ADDRESS + broker.getEncodedBrokerURL());
         factory.getOutInterceptors().add(new LoggingOutInterceptor());
         SwAService port = factory.create(SwAService.class);


Mime
View raw message