You are viewing a plain text version of this content. The canonical link for it is here.
Posted to axis-cvs@ws.apache.org by pr...@apache.org on 2008/03/08 23:35:55 UTC

svn commit: r635100 - in /webservices/axis2/trunk/java/modules: jaxws/src/org/apache/axis2/jaxws/addressing/ jaxws/src/org/apache/axis2/jaxws/addressing/factory/impl/ jaxws/src/org/apache/axis2/jaxws/addressing/util/ kernel/src/org/apache/axis2/address...

Author: pradine
Date: Sat Mar  8 14:35:50 2008
New Revision: 635100

URL: http://svn.apache.org/viewvc?rev=635100&view=rev
Log:
Complete endpoint reference metadata utility classes.

Modified:
    webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/addressing/SubmissionEndpointReferenceBuilder.java
    webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/addressing/factory/impl/Axis2EndpointReferenceFactoryImpl.java
    webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/addressing/util/EndpointReferenceUtils.java
    webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/addressing/EndpointReferenceHelper.java
    webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/addressing/metadata/InterfaceName.java
    webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/addressing/metadata/ServiceName.java
    webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/addressing/metadata/WSDLLocation.java

Modified: webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/addressing/SubmissionEndpointReferenceBuilder.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/addressing/SubmissionEndpointReferenceBuilder.java?rev=635100&r1=635099&r2=635100&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/addressing/SubmissionEndpointReferenceBuilder.java (original)
+++ webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/addressing/SubmissionEndpointReferenceBuilder.java Sat Mar  8 14:35:50 2008
@@ -23,7 +23,6 @@
 
 import javax.xml.namespace.QName;
 
-import org.apache.axis2.addressing.metadata.InterfaceName;
 import org.apache.axis2.jaxws.ExceptionFactory;
 import org.apache.axis2.jaxws.addressing.util.EndpointReferenceUtils;
 import org.w3c.dom.Element;
@@ -179,7 +178,7 @@
                 EndpointReferenceUtils.addReferenceParameters(axis2EPR, referenceParameters.toArray(ZERO_LENGTH_ARRAY));
         	
             if (portType != null)
-                EndpointReferenceUtils.addInterface(axis2EPR, portType, InterfaceName.subQName);
+                EndpointReferenceUtils.addInterface(axis2EPR, portType, addressingNamespace);
         	
             submissionEPR =
                 (SubmissionEndpointReference) EndpointReferenceUtils.convertFromAxis2(axis2EPR, addressingNamespace);
@@ -194,7 +193,32 @@
 
     @Override
     public String toString() {
-        // TODO Auto-generated method stub
-        return super.toString();
+        StringBuffer buffer = new StringBuffer();
+        
+        if (address != null) {
+            buffer.append("Address: ").append(address);
+        }
+        
+        if (serviceName != null) {
+            buffer.append(", Service name: ").append(serviceName);
+        }
+        
+        if (endpointName != null) {
+            buffer.append(", Endpoint name: ").append(endpointName);
+        }
+        
+        if (portType != null) {
+            buffer.append(", Port type: ").append(portType);
+        }
+        
+        if (referenceParameters != null) {
+            buffer.append(", Reference parameters: ").append(referenceParameters);
+        }
+        
+        if (wsdlDocumentLocation != null) {
+            buffer.append(", WSDL location: ").append(wsdlDocumentLocation);
+        }
+
+        return buffer.toString();
     }
 }

Modified: webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/addressing/factory/impl/Axis2EndpointReferenceFactoryImpl.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/addressing/factory/impl/Axis2EndpointReferenceFactoryImpl.java?rev=635100&r1=635099&r2=635100&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/addressing/factory/impl/Axis2EndpointReferenceFactoryImpl.java (original)
+++ webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/addressing/factory/impl/Axis2EndpointReferenceFactoryImpl.java Sat Mar  8 14:35:50 2008
@@ -23,14 +23,12 @@
 import javax.xml.namespace.QName;
 
 import org.apache.axis2.addressing.EndpointReference;
-import org.apache.axis2.addressing.EndpointReferenceHelper;
-import org.apache.axis2.addressing.metadata.ServiceName;
-import org.apache.axis2.addressing.metadata.WSDLLocation;
 import org.apache.axis2.jaxws.ExceptionFactory;
 import org.apache.axis2.jaxws.addressing.factory.Axis2EndpointReferenceFactory;
 import org.apache.axis2.jaxws.addressing.util.EndpointKey;
 import org.apache.axis2.jaxws.addressing.util.EndpointContextMap;
 import org.apache.axis2.jaxws.addressing.util.EndpointContextMapManager;
+import org.apache.axis2.jaxws.addressing.util.EndpointReferenceUtils;
 import org.apache.axis2.jaxws.util.WSDL4JWrapper;
 import org.apache.axis2.jaxws.util.WSDLWrapper;
 
@@ -95,10 +93,7 @@
             //This code is locate here instead of in the createEndpointReference(QName, QName)
             //method so that if the address is also specified the EPR metadata will still be
             //filled in correctly.
-            if (serviceName != null && portName != null) {
-                ServiceName service = new ServiceName(serviceName, portName.getLocalPart());
-                EndpointReferenceHelper.setServiceNameMetadata(axis2EPR, addressingNamespace, service);
-            }
+            EndpointReferenceUtils.addService(axis2EPR, serviceName, portName, addressingNamespace);
 
             if (wsdlDocumentLocation != null) {
             	URL wsdlURL = new URL(wsdlDocumentLocation);
@@ -126,11 +121,10 @@
                 		//TODO NLS enable
                 		if (!found)
                 			throw new IllegalStateException("The specified port name does not exist in the specified WSDL service.");
-                	}
+
+                        EndpointReferenceUtils.addLocation(axis2EPR, portName.getNamespaceURI(), wsdlDocumentLocation, addressingNamespace);
+                    }
             	}
-            	
-                WSDLLocation wsdlLocation = new WSDLLocation(portName.getNamespaceURI(), wsdlDocumentLocation);
-                EndpointReferenceHelper.setWSDLLocationMetadata(axis2EPR, addressingNamespace, wsdlLocation);
             }
         }
         catch (IllegalStateException ise) {

Modified: webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/addressing/util/EndpointReferenceUtils.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/addressing/util/EndpointReferenceUtils.java?rev=635100&r1=635099&r2=635100&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/addressing/util/EndpointReferenceUtils.java (original)
+++ webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/addressing/util/EndpointReferenceUtils.java Sat Mar  8 14:35:50 2008
@@ -23,8 +23,8 @@
 
 import javax.xml.namespace.QName;
 import javax.xml.transform.Source;
-import javax.xml.transform.dom.DOMSource;
 import javax.xml.transform.stream.StreamResult;
+import javax.xml.transform.stream.StreamSource;
 
 import org.apache.axiom.om.OMAbstractFactory;
 import org.apache.axiom.om.OMElement;
@@ -32,6 +32,8 @@
 import org.apache.axis2.addressing.EndpointReference;
 import org.apache.axis2.addressing.EndpointReferenceHelper;
 import org.apache.axis2.addressing.metadata.InterfaceName;
+import org.apache.axis2.addressing.metadata.ServiceName;
+import org.apache.axis2.addressing.metadata.WSDLLocation;
 import org.apache.axis2.jaxws.addressing.factory.Axis2EndpointReferenceFactory;
 import org.apache.axis2.jaxws.addressing.factory.JAXWSEndpointReferenceFactory;
 import org.apache.axis2.jaxws.registry.FactoryRegistry;
@@ -49,7 +51,6 @@
      * Convert from a {@link EndpointReference} to a
      * subclass of {@link javax.xml.ws.EndpointReference}.
      * 
-     * @param <T>
      * @param axis2EPR
      * @param addressingNamespace
      * @return
@@ -60,8 +61,10 @@
         QName qname = new QName(addressingNamespace, "EndpointReference", "wsa");
         OMElement omElement =
             EndpointReferenceHelper.toOM(omFactory, axis2EPR, qname, addressingNamespace);
-        Element eprElement = XMLUtils.toDOM(omElement);
-        Source eprInfoset = new DOMSource(eprElement);
+        ByteArrayOutputStream baos = new ByteArrayOutputStream();
+        omElement.serialize(baos);
+        ByteArrayInputStream bais = new ByteArrayInputStream(baos.toByteArray());        
+        Source eprInfoset = new StreamSource(bais);
         
         return convertFromSource(eprInfoset);
     }
@@ -70,9 +73,7 @@
      * Convert from a {@link Source} to a
      * subclass of {@link javax.xml.ws.EndpointReference}.
      * 
-     * @param <T>
      * @param eprInfoset
-     * @param addressingNamespace
      * @return
      * @throws Exception
      */
@@ -90,7 +91,7 @@
      * 
      * @param axis2EPR
      * @param jaxwsEPR
-     * @return
+     * @return the WS-Addressing namespace of the <code>javax.xml.ws.EndpointReference</code>.
      * @throws Exception
      */
     public static String convertToAxis2(EndpointReference axis2EPR, javax.xml.ws.EndpointReference jaxwsEPR)
@@ -103,13 +104,28 @@
         return EndpointReferenceHelper.fromOM(axis2EPR, eprElement);
     }
 
-    public static String getAddressingNamespace(Class clazz) {
+    /**
+     * 
+     * @param <T>
+     * @param clazz
+     * @return
+     */
+    public static <T extends javax.xml.ws.EndpointReference> String getAddressingNamespace(Class<T> clazz) {
         JAXWSEndpointReferenceFactory factory = (JAXWSEndpointReferenceFactory)
             FactoryRegistry.getFactory(JAXWSEndpointReferenceFactory.class);
         
         return factory.getAddressingNamespace(clazz);
     }
     
+    /**
+     * 
+     * @param address
+     * @param serviceName
+     * @param portName
+     * @param wsdlDocumentLocation
+     * @param addressingNamespace
+     * @return
+     */
     public static EndpointReference createAxis2EndpointReference(String address, QName serviceName, QName portName, String wsdlDocumentLocation, String addressingNamespace) {
         Axis2EndpointReferenceFactory factory = (Axis2EndpointReferenceFactory)
             FactoryRegistry.getFactory(Axis2EndpointReferenceFactory.class);
@@ -117,6 +133,11 @@
         return factory.createEndpointReference(address, serviceName, portName, wsdlDocumentLocation, addressingNamespace);
     }
     
+    /**
+     * 
+     * @param address
+     * @return
+     */
     public static EndpointReference createAxis2EndpointReference(String address) {
         Axis2EndpointReferenceFactory factory = (Axis2EndpointReferenceFactory)
             FactoryRegistry.getFactory(Axis2EndpointReferenceFactory.class);
@@ -124,6 +145,12 @@
     	return factory.createEndpointReference(address);
     }
     
+    /**
+     * 
+     * @param axis2EPR
+     * @param referenceParameters
+     * @throws Exception
+     */
     public static void addReferenceParameters(EndpointReference axis2EPR, Element...referenceParameters)
     throws Exception {
         if (referenceParameters != null) {
@@ -134,6 +161,12 @@
         }    	
     }
     
+    /**
+     * 
+     * @param axis2EPR
+     * @param metadata
+     * @throws Exception
+     */
     public static void addMetadata(EndpointReference axis2EPR, Element...metadata)
     throws Exception {
         if (metadata != null) {
@@ -144,12 +177,50 @@
         }
     }
     
-    public static void addInterface(EndpointReference axis2EPR, QName portType, QName interfaceType)
+    /**
+     * 
+     * @param axis2EPR
+     * @param portType
+     * @param addressingNamespace
+     * @throws Exception
+     */
+    public static void addInterface(EndpointReference axis2EPR, QName portType, String addressingNamespace)
     throws Exception {
     	if (portType != null) {
     		InterfaceName interfaceName = new InterfaceName(portType);
-    		OMElement omElement = interfaceName.toOM(interfaceType, omFactory);
-    		axis2EPR.addExtensibleElement(omElement);
+    		EndpointReferenceHelper.setInterfaceNameMetadata(omFactory, axis2EPR, addressingNamespace, interfaceName);
     	}
+    }
+    
+    /**
+     * 
+     * @param axis2EPR
+     * @param service
+     * @param port
+     * @param addressingNamespace
+     * @throws Exception
+     */
+    public static void addService(EndpointReference axis2EPR, QName service, QName port, String addressingNamespace)
+    throws Exception {
+        if (service != null && port != null) {
+            ServiceName serviceName = new ServiceName(service, port.getLocalPart());
+            EndpointReferenceHelper.setServiceNameMetadata(omFactory, axis2EPR, addressingNamespace, serviceName);
+        }
+    }
+    
+    /**
+     * 
+     * @param axis2EPR
+     * @param targetNamespace
+     * @param wsdlDocumentLocation
+     * @param addressingNamespace
+     * @throws Exception
+     */
+    public static void addLocation(EndpointReference axis2EPR, String targetNamespace, String wsdlDocumentLocation, String addressingNamespace)
+    throws Exception {
+        if (targetNamespace != null && wsdlDocumentLocation != null) {
+            WSDLLocation wsdlLocation = new WSDLLocation(targetNamespace, wsdlDocumentLocation);
+            EndpointReferenceHelper.setWSDLLocationMetadata(omFactory, axis2EPR, addressingNamespace, wsdlLocation);
+        }
     }
 }

Modified: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/addressing/EndpointReferenceHelper.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/addressing/EndpointReferenceHelper.java?rev=635100&r1=635099&r2=635100&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/addressing/EndpointReferenceHelper.java (original)
+++ webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/addressing/EndpointReferenceHelper.java Sat Mar  8 14:35:50 2008
@@ -18,7 +18,6 @@
  */
 package org.apache.axis2.addressing;
 
-import org.apache.axiom.om.OMAbstractFactory;
 import org.apache.axiom.om.OMAttribute;
 import org.apache.axiom.om.OMElement;
 import org.apache.axiom.om.OMFactory;
@@ -29,6 +28,7 @@
 import org.apache.axiom.om.util.ElementHelper;
 import org.apache.axiom.soap.SOAPFactory;
 import org.apache.axis2.AxisFault;
+import org.apache.axis2.addressing.metadata.InterfaceName;
 import org.apache.axis2.addressing.metadata.ServiceName;
 import org.apache.axis2.addressing.metadata.WSDLLocation;
 import org.apache.commons.logging.Log;
@@ -356,10 +356,13 @@
     }
     
     /**
+     * Retrieves the WS-Addressing EPR ServiceName element from an EPR.
      * 
-     * @param epr
-     * @param addressingNamespace
-     * @return
+     * @param epr the EPR to retrieve the element from
+     * @param addressingNamespace the WS-Addressing namespace associated with
+     * the EPR.
+     * @return an instance of <code>ServiceName</code>. The return value is
+     * never <code>null</code>.
      * @throws AxisFault
      */
     public static ServiceName getServiceNameMetadata(EndpointReference epr, String addressingNamespace) throws AxisFault {
@@ -376,14 +379,8 @@
             for (int i = 0, size = elements.size(); i < size; i++) {
                 OMElement omElement = (OMElement) elements.get(i);
                 if (ServiceName.isServiceNameElement(omElement)) {
-                    try {
-                        serviceName.fromOM(omElement);
-                        break;
-                    }
-                    catch (Exception e) {
-                        //TODO NLS enable.
-                        throw new AxisFault("Metadata conversion error.", e);
-                    }
+                    serviceName.fromOM(omElement);
+                    break;
                 }
             }
         }
@@ -392,10 +389,47 @@
     }
     
     /**
+     * Retrieves the WS-Addressing EPR PortType, or InterfaceName, element from an EPR,
+     * as appropriate.
      * 
-     * @param epr
-     * @param addressingNamespace
-     * @return
+     * @param epr the EPR to retrieve the element from
+     * @param addressingNamespace the WS-Addressing namespace associated with
+     * the EPR.
+     * @return an instance of <code>InterfaceName</code>. The return value is
+     * never <code>null</code>.
+     * @throws AxisFault
+     */
+    public static InterfaceName getInterfaceNameMetadata(EndpointReference epr, String addressingNamespace) throws AxisFault {
+        InterfaceName interfaceName = new InterfaceName();
+        List elements = null;
+        
+        if (AddressingConstants.Submission.WSA_NAMESPACE.equals(addressingNamespace))
+            elements = epr.getExtensibleElements();
+        else
+            elements = epr.getMetaData();
+        
+        if (elements != null) {
+            //Retrieve the service name and endpoint name.
+            for (int i = 0, size = elements.size(); i < size; i++) {
+                OMElement omElement = (OMElement) elements.get(i);
+                if (InterfaceName.isInterfaceNameElement(omElement)) {
+                    interfaceName.fromOM(omElement);
+                    break;
+                }
+            }
+        }
+        
+        return interfaceName;
+    }
+    
+    /**
+     * Retrieves the wsdli:wsdlLocation attribute from an EPR.
+     * 
+     * @param epr the EPR to retrieve the attribute from
+     * @param addressingNamespace the WS-Addressing namespace associated with
+     * the EPR.
+     * @return an instance of <code>WSDLLocation</code>. The return value is
+     * never <code>null</code>.
      * @throws AxisFault
      */
     public static WSDLLocation getWSDLLocationMetadata(EndpointReference epr, String addressingNamespace) throws AxisFault {
@@ -412,14 +446,8 @@
             for (int i = 0, size = attributes.size(); i < size; i++) {
                 OMAttribute omAttribute = (OMAttribute) attributes.get(i);
                 if (WSDLLocation.isWSDLLocationAttribute(omAttribute)) {
-                    try {
-                        wsdlLocation.fromOM(omAttribute);
-                        break;
-                    }
-                    catch (Exception e) {
-                        //TODO NLS enable.
-                        throw new AxisFault("Metadata conversion error.", e);
-                    }
+                    wsdlLocation.fromOM(omAttribute);
+                    break;
                 }
             }
         }
@@ -428,14 +456,18 @@
     }
 
     /**
+     * Adds an instance of <code>ServiceName</code> as metadata to the specified EPR.
+     * The metadata is mapped to a WS-Addressing EPR ServiceName element.
      * 
-     * @param epr
-     * @param addressingNamespace
-     * @param serviceName
+     * @param factory an <code>OMFactory</code>
+     * @param epr the EPR to retrieve the attribute from
+     * @param addressingNamespace the WS-Addressing namespace associated with
+     * the EPR.
+     * @param serviceName an instance of <code>ServiceName</code> that contains the
+     * metadata
      * @throws AxisFault
      */
-    public static void setServiceNameMetadata(EndpointReference epr, String addressingNamespace, ServiceName serviceName) throws AxisFault {
-        OMFactory factory = OMAbstractFactory.getOMFactory();
+    public static void setServiceNameMetadata(OMFactory factory, EndpointReference epr, String addressingNamespace, ServiceName serviceName) throws AxisFault {
         if (AddressingConstants.Submission.WSA_NAMESPACE.equals(addressingNamespace)) {
             OMElement omElement = serviceName.toOM(factory, ServiceName.subQName);
             epr.addExtensibleElement(omElement);
@@ -445,16 +477,43 @@
             epr.addMetaData(omElement);
         }
     }
-    
+
     /**
+     * Adds an instance of <code>InterfaceName</code> as metadata to the specified EPR.
+     * The metadata is mapped to a WS-Addressing EPR PortType or InterfaceName element.
      * 
-     * @param epr
-     * @param addressingNamespace
-     * @return
+     * @param factory an <code>OMFactory</code>
+     * @param epr the EPR to retrieve the attribute from
+     * @param addressingNamespace the WS-Addressing namespace associated with
+     * the EPR.
+     * @param interfaceName an instance of <code>InterfaceName</code> that contains the
+     * metadata
      * @throws AxisFault
      */
-    public static void setWSDLLocationMetadata(EndpointReference epr, String addressingNamespace, WSDLLocation wsdlLocation) throws AxisFault {
-        OMFactory factory = OMAbstractFactory.getOMFactory();
+     public static void setInterfaceNameMetadata(OMFactory factory, EndpointReference epr, String addressingNamespace, InterfaceName interfaceName) throws AxisFault {
+        if (AddressingConstants.Submission.WSA_NAMESPACE.equals(addressingNamespace)) {
+            OMElement omElement = interfaceName.toOM(factory, InterfaceName.subQName);
+            epr.addExtensibleElement(omElement);
+        }
+        else {
+            OMElement omElement = interfaceName.toOM(factory, InterfaceName.finalQName);
+            epr.addMetaData(omElement);
+        }
+    }
+    
+     /**
+      * Adds an instance of <code>WSDLLocation</code> as metadata to the specified EPR.
+      * The metadata is mapped to a wsdli:wsdlLocation attribute.
+      * 
+      * @param factory an <code>OMFactory</code>
+      * @param epr the EPR to retrieve the attribute from
+      * @param addressingNamespace the WS-Addressing namespace associated with
+      * the EPR.
+      * @param wsdlLocation an instance of <code>WSDLLocation</code> that contains the
+      * metadata
+      * @throws AxisFault
+      */
+    public static void setWSDLLocationMetadata(OMFactory factory, EndpointReference epr, String addressingNamespace, WSDLLocation wsdlLocation) throws AxisFault {
         OMAttribute attribute = wsdlLocation.toOM(factory);
 
         if (AddressingConstants.Submission.WSA_NAMESPACE.equals(addressingNamespace)) {

Modified: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/addressing/metadata/InterfaceName.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/addressing/metadata/InterfaceName.java?rev=635100&r1=635099&r2=635100&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/addressing/metadata/InterfaceName.java (original)
+++ webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/addressing/metadata/InterfaceName.java Sat Mar  8 14:35:50 2008
@@ -20,7 +20,6 @@
 
 import javax.xml.namespace.QName;
 
-import org.apache.axiom.om.OMAbstractFactory;
 import org.apache.axiom.om.OMElement;
 import org.apache.axiom.om.OMFactory;
 import org.apache.axiom.om.OMNamespace;
@@ -79,7 +78,7 @@
      * <p>or</p>
      * <p>
      * OMElement omElement =
-     * serviceName.toOM(new QName("http://www.w3.org/2007/02/addressing/metadata", "InterfaceName", "wsam"));
+     * serviceName.toOM(new QName("http://www.w3.org/2007/05/addressing/metadata", "InterfaceName", "wsam"));
      * </p>
      * <p>
      * the difference being whether the EndpointReference is meant to represent a 2004/08
@@ -90,7 +89,7 @@
      * @param fac TODO
      * @return an OMElement that can be added to the metadata of an EndpointReference.
      */
-    public OMElement toOM(QName qname, OMFactory fac) throws AxisFault {
+    public OMElement toOM(OMFactory fac, QName qname) throws AxisFault {
         String prefix = qname.getPrefix();
         if (prefix == null) {
             throw new AxisFault("The prefix cannot be null.");
@@ -117,7 +116,7 @@
      * Convenience method to extract metadata from an element.
      * 
      * <p>
-     * &lt;wsam:InterfaceName xmlns:wsam="http://www.w3.org/2007/02/addressing/metadata"&gt;...&lt;/wsam:ServiceName&gt;
+     * &lt;wsam:InterfaceName xmlns:wsam="http://www.w3.org/2007/05/addressing/metadata"&gt;...&lt;/wsam:ServiceName&gt;
      * </p>
      * <p>or</p>
      * <p>

Modified: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/addressing/metadata/ServiceName.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/addressing/metadata/ServiceName.java?rev=635100&r1=635099&r2=635100&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/addressing/metadata/ServiceName.java (original)
+++ webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/addressing/metadata/ServiceName.java Sat Mar  8 14:35:50 2008
@@ -20,7 +20,6 @@
 
 import javax.xml.namespace.QName;
 
-import org.apache.axiom.om.OMAbstractFactory;
 import org.apache.axiom.om.OMElement;
 import org.apache.axiom.om.OMFactory;
 import org.apache.axiom.om.OMNamespace;
@@ -110,7 +109,7 @@
      * <p>or</p>
      * <p>
      * OMElement omElement =
-     * serviceName.toOM(new QName("http://www.w3.org/2007/02/addressing/metadata", "ServiceName", "wsam"));
+     * serviceName.toOM(new QName("http://www.w3.org/2007/05/addressing/metadata", "ServiceName", "wsam"));
      * </p>
      * <p>
      * the difference being whether the EndpointReference is meant to represent a 2004/08
@@ -155,7 +154,7 @@
      * Convenience method to extract metadata from the ServiceName element.
      * 
      * <p>
-     * &lt;wsam:ServiceName xmlns:wsam="http://www.w3.org/2007/02/addressing/metadata" EndpointName="..."&gt;...&lt;/wsam:ServiceName&gt;
+     * &lt;wsam:ServiceName xmlns:wsam="http://www.w3.org/2007/05/addressing/metadata" EndpointName="..."&gt;...&lt;/wsam:ServiceName&gt;
      * </p>
      * <p>or</p>
      * <p>

Modified: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/addressing/metadata/WSDLLocation.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/addressing/metadata/WSDLLocation.java?rev=635100&r1=635099&r2=635100&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/addressing/metadata/WSDLLocation.java (original)
+++ webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/addressing/metadata/WSDLLocation.java Sat Mar  8 14:35:50 2008
@@ -20,7 +20,6 @@
 
 import javax.xml.namespace.QName;
 
-import org.apache.axiom.om.OMAbstractFactory;
 import org.apache.axiom.om.OMAttribute;
 import org.apache.axiom.om.OMFactory;
 import org.apache.axiom.om.OMNamespace;



---------------------------------------------------------------------
To unsubscribe, e-mail: axis-cvs-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-cvs-help@ws.apache.org