cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject svn commit: r649293 - in /incubator/cxf/trunk: api/src/main/java/org/apache/cxf/wsdl/ rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/ rt/transports/http-jetty/src/test/java/org/apache/cxf/transport/http_jetty/ rt/transports/jbi/src/main/java/org/...
Date Thu, 17 Apr 2008 21:41:46 GMT
Author: dkulp
Date: Thu Apr 17 14:41:45 2008
New Revision: 649293

URL: http://svn.apache.org/viewvc?rev=649293&view=rev
Log:
Workaround the buggy xalan issues as the xalan team is not being very helpful getting 2.7.1
into maven repos

Modified:
    incubator/cxf/trunk/api/src/main/java/org/apache/cxf/wsdl/EndpointReferenceUtils.java
    incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/ServiceImpl.java
    incubator/cxf/trunk/rt/transports/http-jetty/src/test/java/org/apache/cxf/transport/http_jetty/JettyHTTPDestinationTest.java
    incubator/cxf/trunk/rt/transports/jbi/src/main/java/org/apache/cxf/transport/jbi/JBIConduitOutputStream.java
    incubator/cxf/trunk/rt/ws/addr/src/main/java/org/apache/cxf/ws/addressing/VersionTransformer.java
    incubator/cxf/trunk/rt/ws/addr/src/test/java/org/apache/cxf/ws/addressing/VersionTransformerTest.java
    incubator/cxf/trunk/rt/ws/security/pom.xml
    incubator/cxf/trunk/systests/pom.xml
    incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/callback/ServerImpl.java
    incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/factory_pattern/ManualHttpMulitplexClientServerTest.java
    incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/nested_callback/ServerImpl.java

Modified: incubator/cxf/trunk/api/src/main/java/org/apache/cxf/wsdl/EndpointReferenceUtils.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/api/src/main/java/org/apache/cxf/wsdl/EndpointReferenceUtils.java?rev=649293&r1=649292&r2=649293&view=diff
==============================================================================
--- incubator/cxf/trunk/api/src/main/java/org/apache/cxf/wsdl/EndpointReferenceUtils.java
(original)
+++ incubator/cxf/trunk/api/src/main/java/org/apache/cxf/wsdl/EndpointReferenceUtils.java
Thu Apr 17 14:41:45 2008
@@ -256,35 +256,39 @@
      * @param ref the endpoint reference.
      * @return the service name.
      */
-    public static QName getServiceName(EndpointReferenceType ref) {
+    public static QName getServiceName(EndpointReferenceType ref, Bus bus) {
         MetadataType metadata = ref.getMetadata();
-        if (metadata != null) {
-            for (Object obj : metadata.getAny()) {
-                if (obj instanceof Element) {
-                    Node node = (Element)obj;
-                    if (node.getNamespaceURI().equals(JAXWSAConstants.NS_WSAW) 
-                        && node.getLocalName().equals("ServiceName")) {
-                        String content = node.getTextContent();
-                        String namespaceURI = node.getFirstChild().getNamespaceURI();
-                        String service = content;
-                        if (content.contains(":")) {
-                            namespaceURI = getNameSpaceUri(node, content, namespaceURI);
-                            service = getService(content);
-                        } else {
-                            Node nodeAttr = node.getAttributes().getNamedItem("xmlns");
-                            namespaceURI = nodeAttr.getNodeValue();
+        if (metadata == null) {
+            return null;
+        }
+        for (Object obj : metadata.getAny()) {
+            if (obj instanceof Element) {
+                Node node = (Element)obj;
+                if (node.getNamespaceURI().equals(JAXWSAConstants.NS_WSAW) 
+                    && node.getLocalName().equals("ServiceName")) {
+                    String content = node.getTextContent();
+                    String namespaceURI = node.getFirstChild().getNamespaceURI();
+                    String service = content;
+                    if (content.contains(":")) {
+                        namespaceURI = getNameSpaceUri(node, content, namespaceURI);
+                        if (StringUtils.isEmpty(namespaceURI)) {
+                            namespaceURI = findNamespaceHack(ref, bus);                 
              
                         }
-                        
-                        return new QName(namespaceURI, service);
-                    }
-                } else if (obj instanceof JAXBElement) {
-                    Object val = ((JAXBElement)obj).getValue();
-                    if (val instanceof ServiceNameType) {
-                        return ((ServiceNameType)val).getValue();
+                        service = getService(content);
+                    } else {
+                        Node nodeAttr = node.getAttributes().getNamedItem("xmlns");
+                        namespaceURI = nodeAttr.getNodeValue();
                     }
-                } else if (obj instanceof ServiceNameType) {
-                    return ((ServiceNameType)obj).getValue();
+                    
+                    return new QName(namespaceURI, service);
                 }
+            } else if (obj instanceof JAXBElement) {
+                Object val = ((JAXBElement)obj).getValue();
+                if (val instanceof ServiceNameType) {
+                    return ((ServiceNameType)val).getValue();
+                }
+            } else if (obj instanceof ServiceNameType) {
+                return ((ServiceNameType)obj).getValue();
             }
         }
         return null;
@@ -318,8 +322,8 @@
         return null;
     }
     
-    public static QName getPortQName(EndpointReferenceType ref) {
-        QName serviceName = getServiceName(ref); 
+    public static QName getPortQName(EndpointReferenceType ref, Bus bus) {
+        QName serviceName = getServiceName(ref, bus); 
         return new QName(serviceName.getNamespaceURI(), getPortName(ref));
     }
     
@@ -363,42 +367,72 @@
         }
     }
   
-    public static QName getInterfaceName(EndpointReferenceType ref) {
+    public static QName getInterfaceName(EndpointReferenceType ref, Bus bus) {
         MetadataType metadata = ref.getMetadata();
-        if (metadata != null) {
-            for (Object obj : metadata.getAny()) {
-                if (obj instanceof Element) {
-                    Node node = (Element)obj;
-                    if (node.getNamespaceURI().equals(JAXWSAConstants.NS_WSAW)
-                        && node.getNodeName().contains("InterfaceName")) {
-                        
-                        String content = node.getTextContent();
-                        String namespaceURI = node.getFirstChild().getNamespaceURI();
-                        //String service = content;
-                        if (content.contains(":")) {
-                            namespaceURI = getNameSpaceUri(node, content, namespaceURI);
-                            content = getService(content);
-                        } else {
-                            Node nodeAttr = node.getAttributes().getNamedItem("xmlns");
-                            namespaceURI = nodeAttr.getNodeValue();
+        if (metadata == null) {
+            return null;
+        }
+        for (Object obj : metadata.getAny()) {
+            if (obj instanceof Element) {
+                Node node = (Element)obj;
+                if (node.getNamespaceURI().equals(JAXWSAConstants.NS_WSAW)
+                    && node.getNodeName().contains("InterfaceName")) {
+                    
+                    String content = node.getTextContent();
+                    String namespaceURI = node.getFirstChild().getNamespaceURI();
+                    //String service = content;
+                    if (content.contains(":")) {
+                        namespaceURI = getNameSpaceUri(node, content, namespaceURI);
+                        if (StringUtils.isEmpty(namespaceURI)) {
+                            namespaceURI = findNamespaceHack(ref, bus);                 
              
                         }
-
-                        return new QName(namespaceURI, content);
-                    }
-                } else if (obj instanceof JAXBElement) {
-                    Object val = ((JAXBElement)obj).getValue();
-                    if (val instanceof AttributedQNameType) {
-                        return ((AttributedQNameType)val).getValue();
+                        content = getService(content);
+                    } else {
+                        Node nodeAttr = node.getAttributes().getNamedItem("xmlns");
+                        namespaceURI = nodeAttr.getNodeValue();
                     }
-                } else if (obj instanceof AttributedQNameType) {
-                    return ((AttributedQNameType)obj).getValue();
+
+                    return new QName(namespaceURI, content);
+                }
+            } else if (obj instanceof JAXBElement) {
+                Object val = ((JAXBElement)obj).getValue();
+                if (val instanceof AttributedQNameType) {
+                    return ((AttributedQNameType)val).getValue();
                 }
+            } else if (obj instanceof AttributedQNameType) {
+                return ((AttributedQNameType)obj).getValue();
             }
         }
 
         return null;
     }
     
+    private static String findNamespaceHack(EndpointReferenceType ref, Bus bus) {
+        //probably a broken version of Xalan, we'll have to 
+        //try a hack to figure out the namespace as xalan
+        //dropped the namespace declaration so there isn't 
+        //a way to map the namespace prefix to the real namespace.
+        //This is fixed in xalan 2.7.1, but older versions may 
+        //be used
+        if (bus == null) {
+            return "";
+        }
+        String wsdlLocation = getWSDLLocation(ref);
+        if (StringUtils.isEmpty(wsdlLocation)) {
+            return "";
+        }
+        WSDLManager manager = bus.getExtension(WSDLManager.class);
+        if (manager != null) {
+            try {
+                Definition def = manager.getDefinition(wsdlLocation);
+                return def.getTargetNamespace();
+            } catch (WSDLException e) {
+                //ignore
+            }
+        }
+        return "";
+    }
+
     public static void setWSDLLocation(EndpointReferenceType ref, String... wsdlLocation)
{
         
         MetadataType metadata = ref.getMetadata();
@@ -626,8 +660,11 @@
             }
         }
         
-        QName serviceName = getServiceName(ref);
+        QName serviceName = getServiceName(ref, null);
         if (null != serviceName) {
+            if (StringUtils.isEmpty(serviceName.getNamespaceURI())) {
+                serviceName = new QName(def.getTargetNamespace(), serviceName.getLocalPart());
+            }
             Service service = def.getService(serviceName);
             if (service == null) {
                 throw new WSDLException(WSDLException.OTHER_ERROR, "Cannot find service for
" + serviceName);

Modified: incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/ServiceImpl.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/ServiceImpl.java?rev=649293&r1=649292&r2=649293&view=diff
==============================================================================
--- incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/ServiceImpl.java
(original)
+++ incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/ServiceImpl.java
Thu Apr 17 14:41:45 2008
@@ -51,6 +51,7 @@
 import org.apache.cxf.binding.BindingFactoryManager;
 import org.apache.cxf.common.i18n.Message;
 import org.apache.cxf.common.logging.LogUtils;
+import org.apache.cxf.common.util.StringUtils;
 import org.apache.cxf.configuration.Configurer;
 import org.apache.cxf.databinding.DataBinding;
 import org.apache.cxf.databinding.source.SourceDataBinding;
@@ -257,12 +258,24 @@
     public <T> T getPort(EndpointReferenceType endpointReference, Class<T> type,
                          WebServiceFeature... features) {
         endpointReference = EndpointReferenceUtils.resolve(endpointReference, bus);
-        QName serviceQName = EndpointReferenceUtils.getServiceName(endpointReference);
+        QName serviceQName = EndpointReferenceUtils.getServiceName(endpointReference, bus);
         String portName = EndpointReferenceUtils.getPortName(endpointReference);
 
         QName portQName = null;
         if (portName != null && serviceQName != null) {
-            portQName = new QName(serviceQName.getNamespaceURI(), portName);
+            String ns = serviceQName.getNamespaceURI();
+            if (StringUtils.isEmpty(ns)) {
+                //hack to workaround a xalan bug
+                for (QName qn : portInfos.keySet()) {
+                    if (portName.equals(qn.getLocalPart())) {
+                        ns = qn.getNamespaceURI();
+                    }
+                }
+            }
+            if (StringUtils.isEmpty(ns) && serviceName != null) {
+                ns = serviceName.getNamespaceURI();
+            }
+            portQName = new QName(ns, portName);
         }
 
         return createPort(portQName, endpointReference, type, features);
@@ -521,7 +534,7 @@
                                           Mode mode,
                                           WebServiceFeature... features) {
         EndpointReferenceType ref = VersionTransformer.convertToInternal(endpointReference);
-        return createDispatch(EndpointReferenceUtils.getPortQName(ref), 
+        return createDispatch(EndpointReferenceUtils.getPortQName(ref, bus), 
                               type, mode, features);
     }   
 
@@ -565,7 +578,7 @@
                                            Mode mode,
                                            WebServiceFeature... features) {
         EndpointReferenceType ref = VersionTransformer.convertToInternal(endpointReference);
-        return createDispatch(EndpointReferenceUtils.getPortQName(ref), 
+        return createDispatch(EndpointReferenceUtils.getPortQName(ref, bus), 
                               context, mode, features);        
     }
 

Modified: incubator/cxf/trunk/rt/transports/http-jetty/src/test/java/org/apache/cxf/transport/http_jetty/JettyHTTPDestinationTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/transports/http-jetty/src/test/java/org/apache/cxf/transport/http_jetty/JettyHTTPDestinationTest.java?rev=649293&r1=649292&r2=649293&view=diff
==============================================================================
--- incubator/cxf/trunk/rt/transports/http-jetty/src/test/java/org/apache/cxf/transport/http_jetty/JettyHTTPDestinationTest.java
(original)
+++ incubator/cxf/trunk/rt/transports/http-jetty/src/test/java/org/apache/cxf/transport/http_jetty/JettyHTTPDestinationTest.java
Thu Apr 17 14:41:45 2008
@@ -151,7 +151,7 @@
                      EndpointReferenceUtils.getAddress(ref),
                      StringUtils.addDefaultPortIfMissing(EndpointReferenceUtils.getAddress(address)));
         assertEquals("unexpected service name local part",
-                     EndpointReferenceUtils.getServiceName(ref).getLocalPart(),
+                     EndpointReferenceUtils.getServiceName(ref, bus).getLocalPart(),
                      "Service");
         assertEquals("unexpected portName",
                      EndpointReferenceUtils.getPortName(ref),

Modified: incubator/cxf/trunk/rt/transports/jbi/src/main/java/org/apache/cxf/transport/jbi/JBIConduitOutputStream.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/transports/jbi/src/main/java/org/apache/cxf/transport/jbi/JBIConduitOutputStream.java?rev=649293&r1=649292&r2=649293&view=diff
==============================================================================
--- incubator/cxf/trunk/rt/transports/jbi/src/main/java/org/apache/cxf/transport/jbi/JBIConduitOutputStream.java
(original)
+++ incubator/cxf/trunk/rt/transports/jbi/src/main/java/org/apache/cxf/transport/jbi/JBIConduitOutputStream.java
Thu Apr 17 14:41:45 2008
@@ -35,6 +35,7 @@
 import javax.xml.transform.Source;
 import javax.xml.transform.stream.StreamSource;
 
+import org.apache.cxf.Bus;
 import org.apache.cxf.common.logging.LogUtils;
 import org.apache.cxf.io.CachedOutputStream;
 import org.apache.cxf.message.Exchange;
@@ -91,7 +92,8 @@
             QName interfaceName = new QName(ws.targetNamespace(), ws.name());
             QName serviceName = null;
             if (target != null) {
-                serviceName = EndpointReferenceUtils.getServiceName(target);
+                serviceName = EndpointReferenceUtils.getServiceName(target,
+                                                                    message.getExchange().get(Bus.class));
             } else {
                 serviceName = message.getExchange().get(org.apache.cxf.service.Service.class).getName();
             }

Modified: incubator/cxf/trunk/rt/ws/addr/src/main/java/org/apache/cxf/ws/addressing/VersionTransformer.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/ws/addr/src/main/java/org/apache/cxf/ws/addressing/VersionTransformer.java?rev=649293&r1=649292&r2=649293&view=diff
==============================================================================
--- incubator/cxf/trunk/rt/ws/addr/src/main/java/org/apache/cxf/ws/addressing/VersionTransformer.java
(original)
+++ incubator/cxf/trunk/rt/ws/addr/src/main/java/org/apache/cxf/ws/addressing/VersionTransformer.java
Thu Apr 17 14:41:45 2008
@@ -141,7 +141,7 @@
         exposed.setAddress(convert(internal.getAddress()));
         exposed.setReferenceParameters(
                             convert(internal.getReferenceParameters()));
-        QName serviceQName = EndpointReferenceUtils.getServiceName(internal);
+        QName serviceQName = EndpointReferenceUtils.getServiceName(internal, null);
         if (serviceQName != null) {
             ServiceNameType serviceName =
                 Names200408.WSA_OBJECT_FACTORY.createServiceNameType();

Modified: incubator/cxf/trunk/rt/ws/addr/src/test/java/org/apache/cxf/ws/addressing/VersionTransformerTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/ws/addr/src/test/java/org/apache/cxf/ws/addressing/VersionTransformerTest.java?rev=649293&r1=649292&r2=649293&view=diff
==============================================================================
--- incubator/cxf/trunk/rt/ws/addr/src/test/java/org/apache/cxf/ws/addressing/VersionTransformerTest.java
(original)
+++ incubator/cxf/trunk/rt/ws/addr/src/test/java/org/apache/cxf/ws/addressing/VersionTransformerTest.java
Thu Apr 17 14:41:45 2008
@@ -53,7 +53,7 @@
         assertNotNull(ert);
         assertEquals("http://localhost:8080/test", ert.getAddress().getValue());
         assertEquals(new QName("http://apache.org/hello_world_soap_http", "SOAPService"),

-                               EndpointReferenceUtils.getServiceName(ert));
+                               EndpointReferenceUtils.getServiceName(ert, null));
     }
     
     private EndpointReference readEndpointReference(Source eprInfoset) {

Modified: incubator/cxf/trunk/rt/ws/security/pom.xml
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/ws/security/pom.xml?rev=649293&r1=649292&r2=649293&view=diff
==============================================================================
--- incubator/cxf/trunk/rt/ws/security/pom.xml (original)
+++ incubator/cxf/trunk/rt/ws/security/pom.xml Thu Apr 17 14:41:45 2008
@@ -72,7 +72,6 @@
             <groupId>xalan</groupId>
             <artifactId>xalan</artifactId>
             <version>2.7.0</version>
-            <scope>test</scope>
             <exclusions>
               <exclusion>
                 <groupId>xml-apis</groupId>

Modified: incubator/cxf/trunk/systests/pom.xml
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/systests/pom.xml?rev=649293&r1=649292&r2=649293&view=diff
==============================================================================
--- incubator/cxf/trunk/systests/pom.xml (original)
+++ incubator/cxf/trunk/systests/pom.xml Thu Apr 17 14:41:45 2008
@@ -190,34 +190,16 @@
         <dependency>
             <groupId>org.apache.cxf</groupId>
             <artifactId>cxf-rt-bindings-jbi</artifactId>
-                 <exclusions>
-                    <exclusion>
-                        <groupId>xalan</groupId>
-                        <artifactId>xalan</artifactId>
-                    </exclusion>
-                </exclusions>            
             <version>${project.version}</version>
         </dependency>
         <dependency>
             <groupId>org.apache.cxf</groupId>
             <artifactId>cxf-rt-transports-jbi</artifactId>
-                 <exclusions>
-                    <exclusion>
-                        <groupId>xalan</groupId>
-                        <artifactId>xalan</artifactId>
-                    </exclusion>
-                </exclusions>            
             <version>${project.version}</version>
         </dependency>
         <dependency>
             <groupId>org.apache.cxf</groupId>
             <artifactId>cxf-integration-jbi</artifactId>
-            <exclusions>
-                    <exclusion>
-                        <groupId>xalan</groupId>
-                        <artifactId>xalan</artifactId>
-                    </exclusion>
-            </exclusions>                        
             <version>${project.version}</version>
         </dependency>
 
@@ -249,12 +231,6 @@
         <dependency>
             <groupId>org.apache.cxf</groupId>
             <artifactId>cxf-rt-transports-jms</artifactId>
-                <exclusions>
-                    <exclusion>
-                        <groupId>xalan</groupId>
-                        <artifactId>xalan</artifactId>
-                    </exclusion>
-                </exclusions>             
             <version>${project.version}</version>
         </dependency>
         <dependency>
@@ -336,12 +312,6 @@
         <dependency>
             <groupId>org.apache.activemq</groupId>
             <artifactId>activemq-core</artifactId>
-                <exclusions>
-                    <exclusion>
-                        <groupId>xalan</groupId>
-                        <artifactId>xalan</artifactId>
-                    </exclusion>
-                </exclusions>            
             <scope>test</scope>
         </dependency>
         <dependency>
@@ -384,12 +354,6 @@
         <dependency>
             <groupId>org.apache.servicemix</groupId>
             <artifactId>servicemix-core</artifactId>
-                <exclusions>
-                    <exclusion>
-                        <groupId>xalan</groupId>
-                        <artifactId>xalan</artifactId>
-                    </exclusion>
-                </exclusions>                       
             <version>${servicemix.version}</version>
         </dependency>
 

Modified: incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/callback/ServerImpl.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/callback/ServerImpl.java?rev=649293&r1=649292&r2=649293&view=diff
==============================================================================
--- incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/callback/ServerImpl.java
(original)
+++ incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/callback/ServerImpl.java
Thu Apr 17 14:41:45 2008
@@ -22,12 +22,14 @@
 
 import java.net.URL;
 
+import javax.annotation.Resource;
 import javax.xml.namespace.QName;
 import javax.xml.ws.Service;
 import javax.xml.ws.wsaddressing.W3CEndpointReference;
 
 import org.apache.callback.CallbackPortType;
 import org.apache.callback.ServerPortType;
+import org.apache.cxf.Bus;
 import org.apache.cxf.jaxb.JAXBUtils;
 import org.apache.cxf.ws.addressing.EndpointReferenceType;
 import org.apache.cxf.ws.addressing.VersionTransformer;
@@ -44,6 +46,8 @@
                   
 public class ServerImpl implements ServerPortType  {
 
+    @Resource
+    Bus bus;
     
     public String foo(String s) {
         return s;
@@ -57,9 +61,9 @@
         
             EndpointReferenceType callback = VersionTransformer.convertToInternal(w3cRef);
         
-            QName interfaceName = EndpointReferenceUtils.getInterfaceName(callback);
+            QName interfaceName = EndpointReferenceUtils.getInterfaceName(callback, bus);
             String wsdlLocation = EndpointReferenceUtils.getWSDLLocation(callback);
-            QName serviceName = EndpointReferenceUtils.getServiceName(callback);
+            QName serviceName = EndpointReferenceUtils.getServiceName(callback, bus);
 
             
             String portString = EndpointReferenceUtils.getPortName(callback);

Modified: incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/factory_pattern/ManualHttpMulitplexClientServerTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/factory_pattern/ManualHttpMulitplexClientServerTest.java?rev=649293&r1=649292&r2=649293&view=diff
==============================================================================
--- incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/factory_pattern/ManualHttpMulitplexClientServerTest.java
(original)
+++ incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/factory_pattern/ManualHttpMulitplexClientServerTest.java
Thu Apr 17 14:41:45 2008
@@ -88,7 +88,7 @@
         // no wsdl so default generated soap/http binding will be used
         // address url must come from the calling context
         EndpointReferenceType epr = VersionTransformer.convertToInternal(w3cEpr); 
-        QName serviceName = EndpointReferenceUtils.getServiceName(epr);
+        QName serviceName = EndpointReferenceUtils.getServiceName(epr, bus);
         Service numService = Service.create(serviceName);
         
         String portString = EndpointReferenceUtils.getPortName(epr);

Modified: incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/nested_callback/ServerImpl.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/nested_callback/ServerImpl.java?rev=649293&r1=649292&r2=649293&view=diff
==============================================================================
--- incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/nested_callback/ServerImpl.java
(original)
+++ incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/nested_callback/ServerImpl.java
Thu Apr 17 14:41:45 2008
@@ -22,10 +22,12 @@
 
 import java.net.URL;
 
+import javax.annotation.Resource;
 import javax.xml.namespace.QName;
 import javax.xml.ws.Service;
 import javax.xml.ws.wsaddressing.W3CEndpointReference;
 
+import org.apache.cxf.Bus;
 import org.apache.cxf.jaxb.JAXBUtils;
 import org.apache.cxf.ws.addressing.EndpointReferenceType;
 import org.apache.cxf.ws.addressing.VersionTransformer;
@@ -44,6 +46,8 @@
                       
                   
 public class ServerImpl implements ServerPortType  {
+    @Resource
+    Bus bus;
     
     public String foo(String s) {
         return s;
@@ -57,9 +61,9 @@
 
             WSDLManager manager = new WSDLManagerImpl();
         
-            QName interfaceName = EndpointReferenceUtils.getInterfaceName(callback);
+            QName interfaceName = EndpointReferenceUtils.getInterfaceName(callback, bus);
             String wsdlLocation = EndpointReferenceUtils.getWSDLLocation(callback);
-            QName serviceName = EndpointReferenceUtils.getServiceName(callback);
+            QName serviceName = EndpointReferenceUtils.getServiceName(callback, bus);
 
             
             String portString = EndpointReferenceUtils.getPortName(callback);



Mime
View raw message