You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cxf.apache.org by dk...@apache.org on 2008/01/02 23:31:39 UTC

svn commit: r608265 - in /incubator/cxf/branches/2.0.x-fixes: ./ api/src/main/java/org/apache/cxf/wsdl/EndpointReferenceUtils.java rt/ws/addr/src/main/java/org/apache/cxf/ws/addressing/soap/MAPCodec.java

Author: dkulp
Date: Wed Jan  2 14:31:38 2008
New Revision: 608265

URL: http://svn.apache.org/viewvc?rev=608265&view=rev
Log:
Merged revisions 607018 via svnmerge from 
https://svn.apache.org/repos/asf/incubator/cxf/trunk

........
  r607018 | mmao | 2007-12-27 03:14:26 -0500 (Thu, 27 Dec 2007) | 6 lines
  
  CXF-1341  Request ReferenceParameter not handled
  
    * EndpointReferenceUtils used wrong addressing wsdl namespace caused the getPort return null
    * MAPCodec used a wrong REFERENCE_PARAM_ATTR_NAME caused interop with RI failed
........

Modified:
    incubator/cxf/branches/2.0.x-fixes/   (props changed)
    incubator/cxf/branches/2.0.x-fixes/api/src/main/java/org/apache/cxf/wsdl/EndpointReferenceUtils.java
    incubator/cxf/branches/2.0.x-fixes/rt/ws/addr/src/main/java/org/apache/cxf/ws/addressing/soap/MAPCodec.java

Propchange: incubator/cxf/branches/2.0.x-fixes/
------------------------------------------------------------------------------
Binary property 'svnmerge-integrated' - no diff available.

Modified: incubator/cxf/branches/2.0.x-fixes/api/src/main/java/org/apache/cxf/wsdl/EndpointReferenceUtils.java
URL: http://svn.apache.org/viewvc/incubator/cxf/branches/2.0.x-fixes/api/src/main/java/org/apache/cxf/wsdl/EndpointReferenceUtils.java?rev=608265&r1=608264&r2=608265&view=diff
==============================================================================
--- incubator/cxf/branches/2.0.x-fixes/api/src/main/java/org/apache/cxf/wsdl/EndpointReferenceUtils.java (original)
+++ incubator/cxf/branches/2.0.x-fixes/api/src/main/java/org/apache/cxf/wsdl/EndpointReferenceUtils.java Wed Jan  2 14:31:38 2008
@@ -69,6 +69,7 @@
 import org.apache.cxf.transport.MultiplexDestination;
 import org.apache.cxf.ws.addressing.AttributedURIType;
 import org.apache.cxf.ws.addressing.EndpointReferenceType;
+import org.apache.cxf.ws.addressing.JAXWSAConstants;
 import org.apache.cxf.ws.addressing.MetadataType;
 import org.apache.cxf.ws.addressing.wsdl.AttributedQNameType;
 import org.apache.cxf.ws.addressing.wsdl.ServiceNameType;
@@ -85,11 +86,9 @@
 
     private static final String WSDL_INSTANCE_NAMESPACE = 
         "http://www.w3.org/2006/01/wsdl-instance";
-    private static final String WSA_WSDL_NAMESPACE =
-        "http://www.w3.org/2005/02/addressing/wsdl";
-    private static final String WSA_WSDL_NAMESPACE_PREFIX = "wsaw";
+    
     private static final QName WSA_WSDL_NAMESPACE_NS =
-        new QName("xmlns:" + WSA_WSDL_NAMESPACE_PREFIX);
+        new QName("xmlns:" + JAXWSAConstants.WSAW_PREFIX);
     private static final String XML_SCHEMA_NAMESPACE =
         "http://www.w3.org/2001/XMLSchema";
     private static final String XML_SCHEMA_NAMESPACE_PREFIX = "xs";
@@ -156,9 +155,9 @@
         ServiceNameType serviceNameType = WSA_WSDL_OBJECT_FACTORY.createServiceNameType();
         serviceNameType.setValue(serviceName);
         serviceNameType.setEndpointName(portName);
-        serviceNameType.getOtherAttributes().put(WSA_WSDL_NAMESPACE_NS, WSA_WSDL_NAMESPACE);
+        serviceNameType.getOtherAttributes().put(WSA_WSDL_NAMESPACE_NS, JAXWSAConstants.NS_WSAW);
         serviceNameType.getOtherAttributes().put(XSI_TYPE, 
-                                                 WSA_WSDL_NAMESPACE_PREFIX + ":" 
+                                                 JAXWSAConstants.WSAW_PREFIX + ":" 
                                                  + serviceNameType.getClass().getSimpleName());
         return WSA_WSDL_OBJECT_FACTORY.createServiceName(serviceNameType);
     }
@@ -174,7 +173,7 @@
             for (Object obj : metadata.getAny()) {
                 if (obj instanceof Element) {
                     Node node = (Element)obj;
-                    if (node.getNamespaceURI().equals(WSA_WSDL_NAMESPACE) 
+                    if (node.getNamespaceURI().equals(JAXWSAConstants.NS_WSAW) 
                         && node.getLocalName().equals("ServiceName")) {
                         String content = node.getTextContent();
                         String namespaceURI = node.getFirstChild().getNamespaceURI();
@@ -213,7 +212,7 @@
             for (Object obj : metadata.getAny()) {
                 if (obj instanceof Element) {
                     Node node = (Element)obj;
-                    if (node.getNamespaceURI().equals(WSA_WSDL_NAMESPACE)
+                    if (node.getNamespaceURI().equals(JAXWSAConstants.NS_WSAW)
                         && node.getNodeName().contains("ServiceName")) {
                         return node.getAttributes().getNamedItem("EndpointName").getTextContent();
                     }
@@ -276,8 +275,7 @@
             for (Object obj : metadata.getAny()) {
                 if (obj instanceof Element) {
                     Node node = (Element)obj;
-                    System.out.println(node.getNamespaceURI() + ":" + node.getNodeName());
-                    if (node.getNamespaceURI().equals(WSA_WSDL_NAMESPACE)
+                    if (node.getNamespaceURI().equals(JAXWSAConstants.NS_WSAW)
                         && node.getNodeName().contains("InterfaceName")) {
                         
                         String content = node.getTextContent();

Modified: incubator/cxf/branches/2.0.x-fixes/rt/ws/addr/src/main/java/org/apache/cxf/ws/addressing/soap/MAPCodec.java
URL: http://svn.apache.org/viewvc/incubator/cxf/branches/2.0.x-fixes/rt/ws/addr/src/main/java/org/apache/cxf/ws/addressing/soap/MAPCodec.java?rev=608265&r1=608264&r2=608265&view=diff
==============================================================================
--- incubator/cxf/branches/2.0.x-fixes/rt/ws/addr/src/main/java/org/apache/cxf/ws/addressing/soap/MAPCodec.java (original)
+++ incubator/cxf/branches/2.0.x-fixes/rt/ws/addr/src/main/java/org/apache/cxf/ws/addressing/soap/MAPCodec.java Wed Jan  2 14:31:38 2008
@@ -60,6 +60,7 @@
 import org.apache.cxf.ws.addressing.AttributedURIType;
 import org.apache.cxf.ws.addressing.ContextUtils;
 import org.apache.cxf.ws.addressing.EndpointReferenceType;
+import org.apache.cxf.ws.addressing.JAXWSAConstants;
 import org.apache.cxf.ws.addressing.Names;
 import org.apache.cxf.ws.addressing.ReferenceParametersType;
 import org.apache.cxf.ws.addressing.RelatesToType;
@@ -324,19 +325,19 @@
         String pfx = lastAdded.lookupPrefix(namespaceURI);
         if (StringUtils.isEmpty(pfx)) {
             //attributes cannot be in empty namespace...
-            if (lastAdded.lookupNamespaceURI("wsa") == null) {
-                pfx = "wsa";
+            if (lastAdded.lookupNamespaceURI(JAXWSAConstants.WSA_PREFIX) == null) {
+                pfx = JAXWSAConstants.WSA_PREFIX;
                 lastAdded.setAttributeNS("http://www.w3.org/2000/xmlns/",
                                          "xmlns:wsa",
                                          namespaceURI);
-            } else if (lastAdded.lookupNamespaceURI("wsa").equals(namespaceURI)) {
-                pfx = "wsa";
+            } else if (lastAdded.lookupNamespaceURI(JAXWSAConstants.WSA_PREFIX).equals(namespaceURI)) {
+                pfx = JAXWSAConstants.WSA_PREFIX;
             } else {
                 int cnt = 1;
-                while (lastAdded.lookupNamespaceURI("wsa" + cnt) != null) {
+                while (lastAdded.lookupNamespaceURI(JAXWSAConstants.WSA_PREFIX + cnt) != null) {
                     cnt++;
                 }
-                pfx = "wsa" + cnt;
+                pfx = JAXWSAConstants.WSA_PREFIX + cnt;
                 lastAdded.setAttributeNS("http://www.w3.org/2000/xmlns/",
                                          "xmlns:wsa" + cnt,
                                          namespaceURI);