You are viewing a plain text version of this content. The canonical link for it is here.
Posted to wsrf-dev@ws.apache.org by sc...@apache.org on 2005/04/25 16:03:21 UTC

svn commit: r164573 - in /incubator/apollo/trunk: jndi-config/ jndi-config/src/ jndi-config/src/schema/ src/java/org/apache/ws/resource/ src/java/org/apache/ws/resource/handler/ src/java/org/apache/ws/resource/handler/axis/ src/java/org/apache/ws/resource/i18n/ src/java/org/apache/ws/resource/impl/ src/java/org/apache/ws/resource/metadataexchange/ src/java/org/apache/ws/resource/properties/ src/java/org/apache/ws/resource/properties/v2004_06/impl/ src/java/org/apache/ws/resource/properties/v2004_11/impl/ src/java/org/apache/ws/resource/tool/ src/java/org/apache/ws/resource/tool/porttype/v2004_09/ src/java/org/apache/ws/resource/tool/porttype/v2004_11/ src/java/org/apache/ws/util/jndi/ src/java/org/apache/ws/util/jndi/tools/ src/java/org/apache/ws/util/soap/ src/templates/ src/templates/v2004_09/ src/test/org/apache/ws/resource/metadataexchange/ src/test/org/apache/ws/resource/properties/ wsrf-xbeans/src/wsdl/wsx/

Author: scamp
Date: Mon Apr 25 07:03:19 2005
New Revision: 164573

URL: http://svn.apache.org/viewcvs?rev=164573&view=rev
Log:
Jira Apollo-30

Added support for WS-MetadataExchange specification.

Added:
    incubator/apollo/trunk/src/java/org/apache/ws/resource/metadataexchange/
    incubator/apollo/trunk/src/java/org/apache/ws/resource/tool/porttype/v2004_09/
    incubator/apollo/trunk/src/java/org/apache/ws/util/jndi/tools/MetadataConfig.java
    incubator/apollo/trunk/src/test/org/apache/ws/resource/metadataexchange/
    incubator/apollo/trunk/wsrf-xbeans/src/wsdl/wsx/
    incubator/apollo/trunk/wsrf-xbeans/src/wsdl/wsx/Metadataexchange-2004_09.wsdl
    incubator/apollo/trunk/wsrf-xbeans/src/wsdl/wsx/Metadataexchange-2004_09.xsd
Modified:
    incubator/apollo/trunk/jndi-config/   (props changed)
    incubator/apollo/trunk/jndi-config/project.xml
    incubator/apollo/trunk/jndi-config/src/   (props changed)
    incubator/apollo/trunk/jndi-config/src/schema/jndi-schema.xsd
    incubator/apollo/trunk/src/java/org/apache/ws/resource/JndiConstants.java
    incubator/apollo/trunk/src/java/org/apache/ws/resource/ResourceContext.java
    incubator/apollo/trunk/src/java/org/apache/ws/resource/handler/AbstractSoapMethodNameMap.java
    incubator/apollo/trunk/src/java/org/apache/ws/resource/handler/DefaultMethodMap.java
    incubator/apollo/trunk/src/java/org/apache/ws/resource/handler/ResourceHandler.java
    incubator/apollo/trunk/src/java/org/apache/ws/resource/handler/ServiceSoapMethodNameMap.java
    incubator/apollo/trunk/src/java/org/apache/ws/resource/handler/SoapMethodNameMap.java
    incubator/apollo/trunk/src/java/org/apache/ws/resource/handler/WsddSoapMethodNameMap.java
    incubator/apollo/trunk/src/java/org/apache/ws/resource/handler/axis/ResourceProvider.java
    incubator/apollo/trunk/src/java/org/apache/ws/resource/i18n/Keys.java
    incubator/apollo/trunk/src/java/org/apache/ws/resource/impl/AbstractResourceContext.java
    incubator/apollo/trunk/src/java/org/apache/ws/resource/properties/NamespaceVersionHolder.java
    incubator/apollo/trunk/src/java/org/apache/ws/resource/properties/v2004_06/impl/NamespaceVersionHolderImpl.java
    incubator/apollo/trunk/src/java/org/apache/ws/resource/properties/v2004_11/impl/NamespaceVersionHolderImpl.java
    incubator/apollo/trunk/src/java/org/apache/ws/resource/tool/Wsdl2Java.java
    incubator/apollo/trunk/src/java/org/apache/ws/resource/tool/porttype/v2004_11/DeleteResourcePropertiesPortType2JavaInfo.java
    incubator/apollo/trunk/src/java/org/apache/ws/util/jndi/XmlBeanJndiUtils.java
    incubator/apollo/trunk/src/java/org/apache/ws/util/jndi/XmlBeanNamingContext.java
    incubator/apollo/trunk/src/java/org/apache/ws/util/soap/SoapClient.java
    incubator/apollo/trunk/src/templates/AbstractService.vm
    incubator/apollo/trunk/src/templates/Service.vm
    incubator/apollo/trunk/src/templates/v2004_09/GetMetadata.txt
    incubator/apollo/trunk/src/test/org/apache/ws/resource/properties/SushiResourceContext.java

Propchange: incubator/apollo/trunk/jndi-config/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Mon Apr 25 07:03:19 2005
@@ -0,0 +1 @@
+target

Modified: incubator/apollo/trunk/jndi-config/project.xml
URL: http://svn.apache.org/viewcvs/incubator/apollo/trunk/jndi-config/project.xml?rev=164573&r1=164572&r2=164573&view=diff
==============================================================================
--- incubator/apollo/trunk/jndi-config/project.xml (original)
+++ incubator/apollo/trunk/jndi-config/project.xml Mon Apr 25 07:03:19 2005
@@ -60,7 +60,19 @@
         <usage>Needed for handling XML types in a platform agnostic way.</usage>
       </properties>
     </dependency>
-    
+
+    <dependency>
+      <groupId>apollo</groupId>
+      <artifactId>wsa-xbeans</artifactId>
+      <version>SNAPSHOT</version>
+      <url>http://incubator.apache.org/apollo/</url>
+      <properties>
+        <license>ApacheLicense-2.0.txt</license>
+        <usage>XMLBeans for WSA spec types</usage>
+        <war.bundle>true</war.bundle>
+      </properties>
+    </dependency>    
+
   </dependencies>
 
   <build>    

Propchange: incubator/apollo/trunk/jndi-config/src/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Mon Apr 25 07:03:19 2005
@@ -0,0 +1,2 @@
+java
+wsa

Modified: incubator/apollo/trunk/jndi-config/src/schema/jndi-schema.xsd
URL: http://svn.apache.org/viewcvs/incubator/apollo/trunk/jndi-config/src/schema/jndi-schema.xsd?rev=164573&r1=164572&r2=164573&view=diff
==============================================================================
--- incubator/apollo/trunk/jndi-config/src/schema/jndi-schema.xsd (original)
+++ incubator/apollo/trunk/jndi-config/src/schema/jndi-schema.xsd Mon Apr 25 07:03:19 2005
@@ -1,5 +1,6 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" attributeFormDefault="unqualified" targetNamespace="http://www.apache.org/wsfx/wsrf/jndi/config" xmlns:tns="http://www.apache.org/wsfx/wsrf/jndi/config">
+<xs:schema targetNamespace="http://www.apache.org/wsfx/wsrf/jndi/config" xmlns:tns="http://www.apache.org/wsfx/wsrf/jndi/config" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing" elementFormDefault="qualified" attributeFormDefault="unqualified">
+      <xs:import namespace="http://schemas.xmlsoap.org/ws/2004/08/addressing" schemaLocation="../wsa/WS-Addressing-2004_08_10.xsd"/>
 	<xs:element name="global">
 		<xs:complexType>
 			<xs:sequence>
@@ -13,8 +14,8 @@
 	<xs:element name="jndiConfig">
 		<xs:complexType>
 			<xs:sequence>
-				<xs:element ref="tns:global" maxOccurs="1" minOccurs="0"/>
-				<xs:element ref="tns:service" maxOccurs="unbounded" minOccurs="0"/>
+				<xs:element ref="tns:global" minOccurs="0"/>
+				<xs:element ref="tns:service" minOccurs="0" maxOccurs="unbounded"/>
 			</xs:sequence>
 		</xs:complexType>
 	</xs:element>
@@ -22,23 +23,42 @@
 	<xs:element name="parameter">
 		<xs:complexType>
 			<xs:sequence>
-				<xs:element ref="tns:name" maxOccurs="1" minOccurs="1" />
-				<xs:element ref="tns:value" maxOccurs="1" minOccurs="1"/>
+				<xs:element ref="tns:name"/>
+				<xs:element ref="tns:value"/>
 			</xs:sequence>
 		</xs:complexType>
 	</xs:element>
 	<xs:element name="resource">
 		<xs:complexType>
-			<xs:sequence>
+			<xs:choice>
 				<xs:element ref="tns:resourceParams"/>
-			</xs:sequence>
+				<xs:element ref="tns:metadata-config" minOccurs="0" maxOccurs="1"/>
+			</xs:choice>
 			<xs:attribute name="name" type="xs:string" use="required"/>
 			<xs:attribute name="type" type="xs:string" use="required"/>
-			<xs:attribute name="scope" type="xs:string" />
-			<xs:attribute name="auth" type="xs:string" />
-			<xs:attribute name="description" type="xs:string" />
+			<xs:attribute name="scope" type="xs:string"/>
+			<xs:attribute name="auth" type="xs:string"/>
+			<xs:attribute name="description" type="xs:string"/>
+		</xs:complexType>
+	</xs:element>
+      	<xs:element name="metadata-config">
+      		<xs:complexType>
+		    <xs:sequence>
+		    	<xs:element ref="tns:metadata" minOccurs="1" maxOccurs="unbounded"/>
+		    </xs:sequence>
+		</xs:complexType>
+	</xs:element>
+      	<xs:element name="metadata">
+      		<xs:complexType>
+		    <xs:choice>
+		      <xs:element  name="MetadataReferece" type="wsa:EndpointReferenceType"/>
+		      <xs:element name="Location" type="xs:string"/>
+		    </xs:choice>
+		    <xs:attribute name="Dialect" type="xs:anyURI" use="required"/>
+    		    <xs:attribute name="Identifier" type="xs:anyURI" use="optional"/>
 		</xs:complexType>
 	</xs:element>
+
 	<xs:element name="resourceLink">
 		<xs:complexType>
 			<xs:attribute name="name" type="xs:string" use="required"/>
@@ -71,5 +91,4 @@
 			<xs:attribute name="description" type="xs:string"/>
 		</xs:complexType>
 	</xs:element>
-
 </xs:schema>

Modified: incubator/apollo/trunk/src/java/org/apache/ws/resource/JndiConstants.java
URL: http://svn.apache.org/viewcvs/incubator/apollo/trunk/src/java/org/apache/ws/resource/JndiConstants.java?rev=164573&r1=164572&r2=164573&view=diff
==============================================================================
--- incubator/apollo/trunk/src/java/org/apache/ws/resource/JndiConstants.java (original)
+++ incubator/apollo/trunk/src/java/org/apache/ws/resource/JndiConstants.java Mon Apr 25 07:03:19 2005
@@ -80,4 +80,8 @@
     */
    String ATOMIC_NAME_HOME = "home";
 
+   /**
+    * JNDI path appended to JNDI service path when looking up the service's resource metadata
+    */
+   String ATOMIC_METADATA_HOME = "metadata";
 }

Modified: incubator/apollo/trunk/src/java/org/apache/ws/resource/ResourceContext.java
URL: http://svn.apache.org/viewcvs/incubator/apollo/trunk/src/java/org/apache/ws/resource/ResourceContext.java?rev=164573&r1=164572&r2=164573&view=diff
==============================================================================
--- incubator/apollo/trunk/src/java/org/apache/ws/resource/ResourceContext.java (original)
+++ incubator/apollo/trunk/src/java/org/apache/ws/resource/ResourceContext.java Mon Apr 25 07:03:19 2005
@@ -25,7 +25,6 @@
 import java.util.Iterator;
 
 /**
- * LOG-DONE
  * <code>ResourceContext</code> wraps around a {@link SOAPMessageContext SOAPMessageContext} and provides convenience
  * functions for obtaining {@link ResourceKey ResourceKey}, {@link ResourceHome ResourceHome}, and resource objects
  * associated with the given SOAP message (referenced in <code>SOAPMessageContext</code>).
@@ -175,4 +174,11 @@
     * @see SOAPMessageContext#removeProperty(String)
     */
    public abstract void removeProperty( String name );
+
+   /**
+    * Returns the value of the WS-Addressing Action header
+    *
+    * @return WS-Addressing Action Header value
+    */
+   public abstract String getAddressingAction();
 }

Modified: incubator/apollo/trunk/src/java/org/apache/ws/resource/handler/AbstractSoapMethodNameMap.java
URL: http://svn.apache.org/viewcvs/incubator/apollo/trunk/src/java/org/apache/ws/resource/handler/AbstractSoapMethodNameMap.java?rev=164573&r1=164572&r2=164573&view=diff
==============================================================================
--- incubator/apollo/trunk/src/java/org/apache/ws/resource/handler/AbstractSoapMethodNameMap.java (original)
+++ incubator/apollo/trunk/src/java/org/apache/ws/resource/handler/AbstractSoapMethodNameMap.java Mon Apr 25 07:03:19 2005
@@ -66,6 +66,39 @@
    }
 
    /**
+    * Returns a Default name for a method based on a request's WS-Addressing Action Header.
+    *
+    * @param action String representation of WS-Addressing Action Header Value
+    *
+    * @return A defualt name for the method.
+    */
+   public abstract String getSpecActionMethodName( String action );
+
+   /**
+    * Returns the method name for an operation which
+    * is registered via its WS-Addressing Action header
+    * value.
+    *
+    * @param action The WS-AAddressing Action Header value.
+    * @return The name of the operation OR null if there is no Action registered.
+    */
+   public String getMethodNameFromAction( String action )
+   {
+      SoapMethodNameMap parent     = getParent(  );
+      String            methodName = null;
+      if ( parent != null )
+      {
+         methodName = parent.getMethodNameFromAction( action );
+      }
+       if ( methodName == null )
+     {
+        methodName = getSpecActionMethodName( action );
+     }
+
+      return methodName;
+   }
+
+   /**
     * Sets the parent SoapMethodNameMap to be searched.
     *
     * @param parent

Modified: incubator/apollo/trunk/src/java/org/apache/ws/resource/handler/DefaultMethodMap.java
URL: http://svn.apache.org/viewcvs/incubator/apollo/trunk/src/java/org/apache/ws/resource/handler/DefaultMethodMap.java?rev=164573&r1=164572&r2=164573&view=diff
==============================================================================
--- incubator/apollo/trunk/src/java/org/apache/ws/resource/handler/DefaultMethodMap.java (original)
+++ incubator/apollo/trunk/src/java/org/apache/ws/resource/handler/DefaultMethodMap.java Mon Apr 25 07:03:19 2005
@@ -16,6 +16,8 @@
 package org.apache.ws.resource.handler;
 
 
+import org.apache.ws.resource.metadataexchange.v2004_09.MetadataExchangeConstants;
+
 import javax.xml.namespace.QName;
 import java.util.HashMap;
 import java.util.Map;
@@ -36,6 +38,7 @@
       Map map = new HashMap(  );
       addWsrpOperations( map );
       addWsrlOperations( map );
+      addWsxOperations( map );
       return map;
    }
 
@@ -87,6 +90,18 @@
                                          "destroy" );
    }
 
+    /**
+     * Adds the WS-MetadataExchange operation and Action String to the map
+     * @param map
+     */
+   private static void addWsxOperations(Map map )
+   {
+       //put this in as string for looking up the "Get/Request" operation
+       map.put(MetadataExchangeConstants.ACTION_GET,"get");
+       //put this in as string for looking up the "GetMetadata/Request" operation
+       map.put(MetadataExchangeConstants.ACTION_GETMETADATA, "getMetadata");
+   }
+
    private SoapMethodNameMap m_parent;
 
    /**
@@ -111,7 +126,18 @@
       return (String) METHOD_MAP.get( request );
    }
 
-   /**
+    /**
+     * Returns a Default name for a method based on a request's WS-Addressing Action Header.
+     *
+     * @param action String representation of WS-Addressing Action Header Value
+     * @return The name of the operation OR null if there is no Action registered.
+     */
+    public String getSpecActionMethodName(String action)
+    {
+        return (String) METHOD_MAP.get( action );
+    }
+
+    /**
     * DOCUMENT_ME
     *
     * @return DOCUMENT_ME

Modified: incubator/apollo/trunk/src/java/org/apache/ws/resource/handler/ResourceHandler.java
URL: http://svn.apache.org/viewcvs/incubator/apollo/trunk/src/java/org/apache/ws/resource/handler/ResourceHandler.java?rev=164573&r1=164572&r2=164573&view=diff
==============================================================================
--- incubator/apollo/trunk/src/java/org/apache/ws/resource/handler/ResourceHandler.java (original)
+++ incubator/apollo/trunk/src/java/org/apache/ws/resource/handler/ResourceHandler.java Mon Apr 25 07:03:19 2005
@@ -126,81 +126,179 @@
     {
         try
         {
-            LOG.debug( MSG.getMessage( Keys.RECEIVED_REQUEST ) );
+            LOG.debug(MSG.getMessage(Keys.RECEIVED_REQUEST));
             SOAPMessageContext soapMsgContext = (SOAPMessageContext) msgContext;
             SOAPEnvelope envelope = soapMsgContext.getMessage().getSOAPPart().getEnvelope();
-            EnvelopeDocument envelopeDocXmlBean = EnvelopeDocument.Factory.parse( envelope.toString() );
+            EnvelopeDocument envelopeDocXmlBean = EnvelopeDocument.Factory.parse(envelope.toString());
 
-            if(LOG.isDebugEnabled())
+            if (LOG.isDebugEnabled())
             {
                 LOG.debug("The request envelope: \n" + envelope.toString());
             }
             Envelope envelopeXmlBean = envelopeDocXmlBean.getEnvelope();
             Body body = envelopeXmlBean.getBody();
 
-            ResourceContext resourceContext = createResourceContext( soapMsgContext );
-            resourceContext.setProperty( SOAP_ENVELOPE_XMLBEAN, envelopeXmlBean );
+            ResourceContext resourceContext = createResourceContext(soapMsgContext);
+            resourceContext.setProperty(SOAP_ENVELOPE_XMLBEAN, envelopeXmlBean);
+
+            String addressingAction = resourceContext.getAddressingAction();
+            SoapMethodNameMap methodnameMap = new ServiceSoapMethodNameMap(resourceContext);
+            String methodNameFromAction = methodnameMap.getMethodNameFromAction(addressingAction);
             List responseBodyElems = new ArrayList();
 
-            XmlObject[] childElements = XmlBeanUtils.getChildElements( body );
+            Class serviceClass = getServiceClassName(resourceContext);
+            WsrfService service = createService(serviceClass, resourceContext);
+            XmlObject[] childElements = XmlBeanUtils.getChildElements(body);
+            Method serviceMethod = null;
 
-            for ( int i = 0; i < childElements.length; i++ )
+            if (childElements.length == 0)
             {
-                XmlObject requestXBean = childElements[i];
-
-                //todo probably need to change method signatures to take types instead of documents to avoid this,
-                requestXBean = XmlObject.Factory.parse( requestXBean.xmlText( new XmlOptions().setSaveOuter() ) );
-                if ( requestXBean != null )
+                if (methodNameFromAction != null)
                 {
-                    Class serviceClass = getServiceClassName( resourceContext );
-                    WsrfService service = createService( serviceClass, resourceContext );
-                    Method serviceMethod = getServiceMethod( service, requestXBean );
-                    LOG.debug( MSG.getMessage( Keys.INVOKE_RESOURCE_METHOD,
-                            serviceMethod.getName() ) );
-                    XmlObject responseXBean = null;
-                    try
+                    //try to find a method based on the action
+                    serviceMethod = getServiceMethod(service, methodNameFromAction);
+                    LOG.debug(MSG.getMessage(Keys.INVOKE_RESOURCE_METHOD,
+                                             serviceMethod.getName()));
+                    XmlObject responseXBean = invokeServiceMethod(serviceMethod, service, null, serviceClass);
+                    if (responseXBean != null)
                     {
-                        responseXBean = (XmlObject) serviceMethod.invoke( service,
-                                new Object[]
-                                {
-                                    requestXBean
-                                } );
+                        responseBodyElems.add(responseXBean);
                     }
-                    catch ( InvocationTargetException ite )
-                    {
-                        LOG.error( MSG.getMessage( Keys.ERROR_INVOKING_METHOD_ON_SERVICE,
-                                serviceMethod.getName(),
-                                serviceClass.getName(),
-                                ite.getCause() ) );
-                        throw ExceptionUtils.getRootCause( ite );
-                    }
-                    if ( responseXBean != null )
+                }
+                else
+                {
+                    //else there was no body..so nothing to invoke...bad request
+                    ///throw exception
+                    LOG.warn("No SOAP Body elements were defined and there was no WS-Addressing Action determined. Unable to process request.");
+                    throw new IllegalArgumentException("No SOAP Body elements were defined and there was no WS-Addressing Action determined. Unable to process request.");
+                }
+            }
+
+            else    //normal request
+            {
+                for (int i = 0; i < childElements.length; i++)
+                {
+                    XmlObject requestXBean = childElements[i];
+
+                    //todo probably need to change method signatures to take types instead of documents to avoid this,
+                    requestXBean = XmlObject.Factory.parse(requestXBean.xmlText(new XmlOptions().setSaveOuter()));
+                    if (requestXBean != null)
                     {
-                        responseBodyElems.add( responseXBean );
+                        if (methodNameFromAction != null)
+                        {
+                            serviceMethod = getServiceMethod(service, methodNameFromAction, requestXBean); //get method based on Action
+                        }
+                        else
+                        {
+                            serviceMethod = getServiceMethod(service, requestXBean); //get method based solely on request elem
+                        }
+
+                        LOG.debug(MSG.getMessage(Keys.INVOKE_RESOURCE_METHOD,
+                                                 serviceMethod.getName()));
+                        XmlObject responseXBean = invokeServiceMethod(serviceMethod, service, requestXBean, serviceClass);
+                        if (responseXBean != null)
+                        {
+                            responseBodyElems.add(responseXBean);
+                        }
                     }
                 }
+
             }
-            if ( ! responseBodyElems.isEmpty() )
+            if (!responseBodyElems.isEmpty())
             {
-                msgContext.setProperty( WSRF_RESPONSE_XMLOBJECT_LIST, responseBodyElems );
+                msgContext.setProperty(WSRF_RESPONSE_XMLOBJECT_LIST, responseBodyElems);
             }
         }
-        catch ( Throwable t )
+        catch (Throwable t)
         {
-            if ( t instanceof SOAPFaultException )
+            if (t instanceof SOAPFaultException)
             {
                 throw (SOAPFaultException) t;
             }
             else
             {
                 t.printStackTrace();
-                throw new JAXRPCException( MSG.getMessage( Keys.UNEXPECTED_ERROR_WITH_EXCEPTION, t ) );
+                throw new JAXRPCException(MSG.getMessage(Keys.UNEXPECTED_ERROR_WITH_EXCEPTION, t));
             }
         }
         return false;
     }
 
     /**
+     * This method is used when there are no parameters to a method
+     *
+     * @param service The service to find the method on.
+     * @param methodNameFromAction  The method name we are looking for.
+     * @return The Method object
+     */
+    private Method getServiceMethod(WsrfService service, String methodNameFromAction)
+    {
+        Method serviceMethod = null;
+        LOG.debug("Based on the request, looking for method named: " + methodNameFromAction+ " in service " + service.getClass().getName()+ " with " + 0 + " param types");
+        Method[] methods = service.getClass().getMethods();
+        for ( int i = 0; i < methods.length; i++ )
+        {
+            Method method = methods[i];
+            if ( method.getName().equals( methodNameFromAction ))
+            {
+                if( method.getParameterTypes().length == 0 )
+                {
+                    serviceMethod = method;
+                    break;
+                }
+                else
+                {
+                   LOG.warn("Found method named: " + methodNameFromAction + " in service " + service.getClass().getName()+ " with " + method.getParameterTypes().length + " param types, expected 0 param type.");
+                }
+            }
+        }
+
+        if ( serviceMethod == null )
+        {
+            throw new JAXRPCException( MSG.getMessage( Keys.UNABLE_TO_FIND_METHOD_IN_SERVICE,
+                    methodNameFromAction,
+                    service.getClass().getName() ) );
+        }
+
+        LOG.debug( MSG.getMessage( Keys.FOUND_SERVICE_METHOD,
+                serviceMethod.getName() ) );
+        return serviceMethod;
+    }
+
+    private XmlObject invokeServiceMethod(Method serviceMethod, WsrfService service, XmlObject requestXBean, Class serviceClass)
+            throws Throwable
+    {
+        XmlObject responseXBean = null;
+        try
+        {
+            if (requestXBean != null)
+            {
+                responseXBean = (XmlObject) serviceMethod.invoke( service,
+                        new Object[]
+                        {
+                            requestXBean
+                        } );
+            }
+            else
+            {
+                responseXBean = (XmlObject) serviceMethod.invoke( service,
+                        new Object[0]);
+            }
+        }
+        catch ( InvocationTargetException ite )
+        {
+            LOG.error( MSG.getMessage( Keys.ERROR_INVOKING_METHOD_ON_SERVICE,
+                    serviceMethod.getName(),
+                    serviceClass.getName(),
+                    ite.getCause() ) );
+            throw ExceptionUtils.getRootCause( ite );
+        }
+        return responseXBean;
+    }
+
+
+
+    /**
      * DOCUMENT_ME
      *
      * @param messageContext DOCUMENT_ME
@@ -221,7 +319,12 @@
                 for ( int i = 0; i < responseBodyElems.size(); i++ )
                 {
                     XmlObject responseBodyElem = (XmlObject) responseBodyElems.get( i );
-                    body.addChildElement( createSOAPBodyElement( responseBodyElem ) );
+                    SOAPBodyElement[] soapBodyElements = createSOAPBodyElements( responseBodyElem );
+                    for (int j = 0; j < soapBodyElements.length; j++)
+                    {
+                        SOAPBodyElement soapBodyElement = soapBodyElements[j];
+                        body.addChildElement( soapBodyElement );
+                    }                    
                 }
             }
             catch ( Exception e )
@@ -261,7 +364,7 @@
      *
      * @return DOCUMENT_ME
      */
-    protected abstract SOAPBodyElement createSOAPBodyElement( XmlObject responseBodyElem );
+    protected abstract SOAPBodyElement[] createSOAPBodyElements( XmlObject responseBodyElem );
 
     /**
      * DOCUMENT_ME
@@ -349,6 +452,13 @@
         return ( soap_envelope );
     }
 
+    /**
+     * Finds the method based on the requestXBean name
+     *
+     * @param service
+     * @param requestXBean
+     * @return
+     */
     private Method getServiceMethod( WsrfService service,
                                      XmlObject requestXBean )
     {
@@ -361,7 +471,24 @@
         Method serviceMethod = null;
         String serviceMethodName =
                 service.getMethodNameMap().getMethodName( XmlBeanUtils.getName( requestXBean ) );
-        LOG.debug("Based on the request, looking for method named: " + serviceMethodName+ " in service " + service.getClass().getName()+ " with " + 1 + " param type called: " + requestXBean.getClass().getName());
+        serviceMethod = getServiceMethod(service, serviceMethodName, requestXBean);
+
+        return serviceMethod;
+    }
+
+    /**
+     * Method used to locate a Method object in a Service based on the method name and param
+     *
+     * @param service
+     * @param serviceMethodName
+     * @param requestXBean
+     * @return
+     */
+    private Method getServiceMethod(WsrfService service, String serviceMethodName, XmlObject requestXBean)
+    {
+
+        Method serviceMethod = null;
+        LOG.debug("Based on the request, looking for method named: " + serviceMethodName+ " in service " + service.getClass().getName()+ " with " + 1 + " param type called: " + requestXBean == null ? "null" : requestXBean.getClass().getName());
         Method[] methods = service.getClass().getMethods();
         for ( int i = 0; i < methods.length; i++ )
         {
@@ -370,7 +497,7 @@
             {
                 if( method.getParameterTypes().length == 1 )
                 {
-                    if( method.getParameterTypes()[0].isInstance( requestXBean ) )
+                    if( method.getParameterTypes()[0].isInstance( requestXBean ) )   //todo check if handles null
                     {
 
                         serviceMethod = method;
@@ -383,7 +510,7 @@
                 }
                 else
                 {
-                   LOG.warn("Found method named: " + serviceMethodName + " in service " + service.getClass().getName()+ " with " + method.getParameterTypes().length + " param types, expected 1 param type."); 
+                   LOG.warn("Found method named: " + serviceMethodName + " in service " + service.getClass().getName()+ " with " + method.getParameterTypes().length + " param types, expected 1 param type.");
                 }
             }
         }

Modified: incubator/apollo/trunk/src/java/org/apache/ws/resource/handler/ServiceSoapMethodNameMap.java
URL: http://svn.apache.org/viewcvs/incubator/apollo/trunk/src/java/org/apache/ws/resource/handler/ServiceSoapMethodNameMap.java?rev=164573&r1=164572&r2=164573&view=diff
==============================================================================
--- incubator/apollo/trunk/src/java/org/apache/ws/resource/handler/ServiceSoapMethodNameMap.java (original)
+++ incubator/apollo/trunk/src/java/org/apache/ws/resource/handler/ServiceSoapMethodNameMap.java Mon Apr 25 07:03:19 2005
@@ -74,4 +74,16 @@
 
       return methodName;
    }
+
+    /**
+     * Returns a Default name for a method based on a request's WS-Addressing Action Header.
+     *
+     * @param action String representation of WS-Addressing Action Header Value
+     * @return The name of the operation OR null if there is no Action registered. 
+     */
+    public String getSpecActionMethodName(String action)
+    {
+        String methodName = (String) m_RequestQnameToMethodNameMap.get( action );
+        return methodName;
+    }
 }

Modified: incubator/apollo/trunk/src/java/org/apache/ws/resource/handler/SoapMethodNameMap.java
URL: http://svn.apache.org/viewcvs/incubator/apollo/trunk/src/java/org/apache/ws/resource/handler/SoapMethodNameMap.java?rev=164573&r1=164572&r2=164573&view=diff
==============================================================================
--- incubator/apollo/trunk/src/java/org/apache/ws/resource/handler/SoapMethodNameMap.java (original)
+++ incubator/apollo/trunk/src/java/org/apache/ws/resource/handler/SoapMethodNameMap.java Mon Apr 25 07:03:19 2005
@@ -47,4 +47,6 @@
     * @return DOCUMENT_ME
     */
    public SoapMethodNameMap getParent(  );
+
+   public String getMethodNameFromAction(String action);
 }

Modified: incubator/apollo/trunk/src/java/org/apache/ws/resource/handler/WsddSoapMethodNameMap.java
URL: http://svn.apache.org/viewcvs/incubator/apollo/trunk/src/java/org/apache/ws/resource/handler/WsddSoapMethodNameMap.java?rev=164573&r1=164572&r2=164573&view=diff
==============================================================================
--- incubator/apollo/trunk/src/java/org/apache/ws/resource/handler/WsddSoapMethodNameMap.java (original)
+++ incubator/apollo/trunk/src/java/org/apache/ws/resource/handler/WsddSoapMethodNameMap.java Mon Apr 25 07:03:19 2005
@@ -49,7 +49,18 @@
       return (String) m_resourceContext.getProperty( request.toString(  ) );
    }
 
-   /**
+    /**
+     * Returns a Default name for a method based on a request's WS-Addressing Action Header.
+     *
+     * @param action String representation of WS-Addressing Action Header Value
+     * @return A defualt name for the method.
+     */
+    public String getSpecActionMethodName(String action)
+    {
+        return null;//todo not sure if we need something here
+    }
+
+    /**
     * DOCUMENT_ME
     *
     * @return DOCUMENT_ME

Modified: incubator/apollo/trunk/src/java/org/apache/ws/resource/handler/axis/ResourceProvider.java
URL: http://svn.apache.org/viewcvs/incubator/apollo/trunk/src/java/org/apache/ws/resource/handler/axis/ResourceProvider.java?rev=164573&r1=164572&r2=164573&view=diff
==============================================================================
--- incubator/apollo/trunk/src/java/org/apache/ws/resource/handler/axis/ResourceProvider.java (original)
+++ incubator/apollo/trunk/src/java/org/apache/ws/resource/handler/axis/ResourceProvider.java Mon Apr 25 07:03:19 2005
@@ -32,6 +32,8 @@
 import org.apache.xmlbeans.XmlObject;
 import org.w3c.dom.Document;
 import org.w3c.dom.Element;
+import org.w3c.dom.Node;
+import org.w3c.dom.NodeList;
 
 import javax.xml.namespace.QName;
 import javax.xml.rpc.handler.soap.SOAPMessageContext;
@@ -43,6 +45,7 @@
 import java.util.Hashtable;
 import java.util.Iterator;
 import java.util.List;
+import java.util.ArrayList;
 
 /**
  * LOG-DONE Axis provider that dispatches requests to WS-Resources.
@@ -279,10 +282,21 @@
      *
      * @return DOCUMENT_ME
      */
-    protected SOAPBodyElement createSOAPBodyElement( XmlObject responseBodyElem )
+    protected SOAPBodyElement[] createSOAPBodyElements( XmlObject responseBodyElem )
     {
-        return new org.apache.axis.message.SOAPBodyElement(
-                (Element) responseBodyElem.newDomNode().getFirstChild() );
+        List bodyElems = new ArrayList();
+        Node node = responseBodyElem.newDomNode();
+        NodeList childNodes = node.getChildNodes();
+        for (int i = 0; i < childNodes.getLength(); i++)
+        {
+            Node child = childNodes.item(i);
+            //add all child elements
+            if(child.getNodeType() == Node.ELEMENT_NODE)
+            {
+                bodyElems.add(new org.apache.axis.message.SOAPBodyElement((Element)child));
+            }
+        }
+        return (SOAPBodyElement[])bodyElems.toArray(new SOAPBodyElement[0]);
     }
 
     private Message createMessage( MessageContext axisMsgContext )

Modified: incubator/apollo/trunk/src/java/org/apache/ws/resource/i18n/Keys.java
URL: http://svn.apache.org/viewcvs/incubator/apollo/trunk/src/java/org/apache/ws/resource/i18n/Keys.java?rev=164573&r1=164572&r2=164573&view=diff
==============================================================================
--- incubator/apollo/trunk/src/java/org/apache/ws/resource/i18n/Keys.java (original)
+++ incubator/apollo/trunk/src/java/org/apache/ws/resource/i18n/Keys.java Mon Apr 25 07:03:19 2005
@@ -587,4 +587,9 @@
      * @msg Wsdl2Java expects the WSDL files to have the extension .wsdl the passed-in file was named: {0}
      */
     String ERROR_ONLY_WSDLS = "ERROR_ONLY_WSDLS";
+
+    /**
+     * @msg Retrieving the Action from the Addressing Headers.  Action is: {0}
+     */
+    String GET_ACTION_FROM_ADDR_HDR = "GET_ACTION_FROM_ADDR_HDR";
 }

Modified: incubator/apollo/trunk/src/java/org/apache/ws/resource/impl/AbstractResourceContext.java
URL: http://svn.apache.org/viewcvs/incubator/apollo/trunk/src/java/org/apache/ws/resource/impl/AbstractResourceContext.java?rev=164573&r1=164572&r2=164573&view=diff
==============================================================================
--- incubator/apollo/trunk/src/java/org/apache/ws/resource/impl/AbstractResourceContext.java (original)
+++ incubator/apollo/trunk/src/java/org/apache/ws/resource/impl/AbstractResourceContext.java Mon Apr 25 07:03:19 2005
@@ -16,6 +16,7 @@
 package org.apache.ws.resource.impl;
 
 import org.apache.axis.message.addressing.AddressingHeaders;
+import org.apache.axis.message.addressing.Action;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 import org.apache.ws.resource.*;
@@ -60,6 +61,7 @@
    private Class m_resourceKeyClass;
    private ResourceKey m_resourceKey;
     private String m_baseURL;
+    private String m_action;
 
     /**
     * Creates a new {@link AbstractResourceContext} object.
@@ -507,11 +509,32 @@
       }
    }
 
+   /**
+    * Returns the WS-Addressing Action Header
+    *
+    * @param msgContext
+    * @return
+    */
+   protected String getAddressingAction( MessageContext msgContext )
+   {
+       if (msgContext == null)
+       {
+           throw new IllegalArgumentException(MSG.getMessage(Keys.NULL_MSGCTX));
+       }
+
+       AddressingHeaders addrHeaders =
+               (AddressingHeaders) msgContext.getProperty(org.apache.axis.message.addressing.Constants.ENV_ADDRESSING_REQUEST_HEADERS);
+
+       String action = addrHeaders.getAction().toString();
+       LOG.debug(MSG.getMessage(Keys.GET_ACTION_FROM_ADDR_HDR, action));
+       return action;
+   }
    private void extractFields( MessageContext msgContext )
    {
       m_serviceURL = getServiceURL( msgContext );
       m_serviceName = getServiceName( msgContext );
       m_baseURL = getBaseURL(m_serviceURL);
+      m_action = getAddressingAction(msgContext);
       extractProperties( msgContext );
    }
 
@@ -536,5 +559,10 @@
     public String getBaseURL()
     {
         return m_baseURL;
+    }
+
+    public String getAddressingAction()
+    {
+        return m_action;
     }
 }

Modified: incubator/apollo/trunk/src/java/org/apache/ws/resource/properties/NamespaceVersionHolder.java
URL: http://svn.apache.org/viewcvs/incubator/apollo/trunk/src/java/org/apache/ws/resource/properties/NamespaceVersionHolder.java?rev=164573&r1=164572&r2=164573&view=diff
==============================================================================
--- incubator/apollo/trunk/src/java/org/apache/ws/resource/properties/NamespaceVersionHolder.java (original)
+++ incubator/apollo/trunk/src/java/org/apache/ws/resource/properties/NamespaceVersionHolder.java Mon Apr 25 07:03:19 2005
@@ -17,4 +17,5 @@
     String getBaseFaultsXsdNamespace();
     String getAddressingNamespace();
     String getServiceGroupsXsdNamespace();
+    String getMetadataExchangeNamespace();
 }

Modified: incubator/apollo/trunk/src/java/org/apache/ws/resource/properties/v2004_06/impl/NamespaceVersionHolderImpl.java
URL: http://svn.apache.org/viewcvs/incubator/apollo/trunk/src/java/org/apache/ws/resource/properties/v2004_06/impl/NamespaceVersionHolderImpl.java?rev=164573&r1=164572&r2=164573&view=diff
==============================================================================
--- incubator/apollo/trunk/src/java/org/apache/ws/resource/properties/v2004_06/impl/NamespaceVersionHolderImpl.java (original)
+++ incubator/apollo/trunk/src/java/org/apache/ws/resource/properties/v2004_06/impl/NamespaceVersionHolderImpl.java Mon Apr 25 07:03:19 2005
@@ -6,6 +6,7 @@
 import org.apache.ws.resource.properties.NamespaceVersionHolder;
 import org.apache.ws.resource.properties.v2004_06.ResourcePropertiesConstants;
 import org.apache.ws.resource.servicegroup.v2004_06.ServiceGroupConstants;
+import org.apache.ws.resource.metadataexchange.v2004_09.MetadataExchangeConstants;
 
 
 /**
@@ -37,5 +38,10 @@
     public String getServiceGroupsXsdNamespace()
     {
         return ServiceGroupConstants.NSURI_WSSG_SCHEMA;
+    }
+
+    public String getMetadataExchangeNamespace()
+    {
+        return MetadataExchangeConstants.NSURI;
     }
 }

Modified: incubator/apollo/trunk/src/java/org/apache/ws/resource/properties/v2004_11/impl/NamespaceVersionHolderImpl.java
URL: http://svn.apache.org/viewcvs/incubator/apollo/trunk/src/java/org/apache/ws/resource/properties/v2004_11/impl/NamespaceVersionHolderImpl.java?rev=164573&r1=164572&r2=164573&view=diff
==============================================================================
--- incubator/apollo/trunk/src/java/org/apache/ws/resource/properties/v2004_11/impl/NamespaceVersionHolderImpl.java (original)
+++ incubator/apollo/trunk/src/java/org/apache/ws/resource/properties/v2004_11/impl/NamespaceVersionHolderImpl.java Mon Apr 25 07:03:19 2005
@@ -6,6 +6,7 @@
 import org.apache.ws.resource.properties.NamespaceVersionHolder;
 import org.apache.ws.resource.properties.v2004_11.ResourcePropertiesConstants;
 import org.apache.ws.resource.servicegroup.v2004_11.ServiceGroupConstants;
+import org.apache.ws.resource.metadataexchange.v2004_09.MetadataExchangeConstants;
 
 
 /**
@@ -37,5 +38,10 @@
     public String getServiceGroupsXsdNamespace()
     {
         return ServiceGroupConstants.NSURI_WSSG_SCHEMA;
+    }
+
+    public String getMetadataExchangeNamespace()
+    {
+        return MetadataExchangeConstants.NSURI;
     }
 }

Modified: incubator/apollo/trunk/src/java/org/apache/ws/resource/tool/Wsdl2Java.java
URL: http://svn.apache.org/viewcvs/incubator/apollo/trunk/src/java/org/apache/ws/resource/tool/Wsdl2Java.java?rev=164573&r1=164572&r2=164573&view=diff
==============================================================================
--- incubator/apollo/trunk/src/java/org/apache/ws/resource/tool/Wsdl2Java.java (original)
+++ incubator/apollo/trunk/src/java/org/apache/ws/resource/tool/Wsdl2Java.java Mon Apr 25 07:03:19 2005
@@ -433,7 +433,7 @@
             }
             else
             {
-                System.err.println("\n\n!!!!!!Unable to find a port type info for the implemented capability: " + ptName.toString() + "!!!!!!\n\n"); 
+                System.err.println("\n\nUnable to find a port type info for the implemented capability: " + ptName.toString() + "!!!!!!\n\n");
             }
         }
 
@@ -553,6 +553,9 @@
         addPortType2JavaInfo( new org.apache.ws.resource.tool.porttype.v2004_11.UpdateResourcePropertiesPortType2JavaInfo() );
         addPortType2JavaInfo( new org.apache.ws.resource.tool.porttype.v2004_11.DeleteResourcePropertiesPortType2JavaInfo() );
         addPortType2JavaInfo( new org.apache.ws.resource.tool.porttype.v2004_11.GetResourcePropertyDocumentPortType2JavaInfo() );
+
+        //metadataexchange 2004/09
+        addPortType2JavaInfo( new org.apache.ws.resource.tool.porttype.v2004_09.MetadataExchangePortType2JavaInfo() );        
     }
 
     private void initVelocity()

Modified: incubator/apollo/trunk/src/java/org/apache/ws/resource/tool/porttype/v2004_11/DeleteResourcePropertiesPortType2JavaInfo.java
URL: http://svn.apache.org/viewcvs/incubator/apollo/trunk/src/java/org/apache/ws/resource/tool/porttype/v2004_11/DeleteResourcePropertiesPortType2JavaInfo.java?rev=164573&r1=164572&r2=164573&view=diff
==============================================================================
--- incubator/apollo/trunk/src/java/org/apache/ws/resource/tool/porttype/v2004_11/DeleteResourcePropertiesPortType2JavaInfo.java (original)
+++ incubator/apollo/trunk/src/java/org/apache/ws/resource/tool/porttype/v2004_11/DeleteResourcePropertiesPortType2JavaInfo.java Mon Apr 25 07:03:19 2005
@@ -25,7 +25,6 @@
  */
 public class DeleteResourcePropertiesPortType2JavaInfo extends org.apache.ws.resource.tool.PortType2JavaInfo
 {
-
     public javax.xml.namespace.QName getName()
     {
         return DeleteResourcePropertiesPortType.NAME;

Modified: incubator/apollo/trunk/src/java/org/apache/ws/util/jndi/XmlBeanJndiUtils.java
URL: http://svn.apache.org/viewcvs/incubator/apollo/trunk/src/java/org/apache/ws/util/jndi/XmlBeanJndiUtils.java?rev=164573&r1=164572&r2=164573&view=diff
==============================================================================
--- incubator/apollo/trunk/src/java/org/apache/ws/util/jndi/XmlBeanJndiUtils.java (original)
+++ incubator/apollo/trunk/src/java/org/apache/ws/util/jndi/XmlBeanJndiUtils.java Mon Apr 25 07:03:19 2005
@@ -23,6 +23,7 @@
 import org.apache.ws.util.jndi.tools.Resource;
 import org.apache.ws.util.jndi.tools.ResourceLink;
 import org.apache.ws.util.jndi.tools.ResourceParameters;
+import org.apache.ws.util.jndi.tools.MetadataConfig;
 import org.apache.wsfx.wsrf.jndi.config.EnvironmentDocument;
 import org.apache.wsfx.wsrf.jndi.config.GlobalDocument;
 import org.apache.wsfx.wsrf.jndi.config.JndiConfigDocument;
@@ -31,6 +32,7 @@
 import org.apache.wsfx.wsrf.jndi.config.ResourceLinkDocument;
 import org.apache.wsfx.wsrf.jndi.config.ResourceParamsDocument;
 import org.apache.wsfx.wsrf.jndi.config.ServiceDocument;
+import org.apache.wsfx.wsrf.jndi.config.MetadataConfigDocument;
 import org.apache.xmlbeans.XmlObject;
 
 import javax.naming.Context;
@@ -375,7 +377,7 @@
 
    }
 
-   private static Resource[] getResourceArray( ResourceDocument.Resource[] resourceArray )
+   private static Resource[] getResourceArray(ResourceDocument.Resource[] resourceArray, String name, XmlBeanNamingContext namingContext) throws NamingException
    {
       List resources = new ArrayList(  );
       if ( resourceArray != null )
@@ -383,6 +385,24 @@
          for ( int i = 0; i < resourceArray.length; i++ )
          {
             ResourceDocument.Resource resourceDoc = resourceArray[i];
+             //special type of resource....metatdata...handle differently....
+             MetadataConfigDocument.MetadataConfig metadataConfig = resourceDoc.getMetadataConfig();
+             if(metadataConfig != null)
+             {
+                 //Class.forName(resourceDoc.getType()).newInstance() todo extract abstract class/intefact..dictate constructor to make configurable.
+                 MetadataConfig metaConfig = new MetadataConfig(metadataConfig);
+                //short circuit this here
+                 String contextName = null;
+                if(name != null)
+                {
+                    namingContext.getContext().createSubcontext(name); //add subcontext                    
+                    contextName = name + "/";
+                }
+                contextName = contextName + resourceDoc.getName();
+
+                namingContext.bind(contextName, metaConfig);
+                continue;
+             }
             Resource                  resource = new Resource(  );
             resource.setName( resourceDoc.getName(  ) );
             resource.setAuth( resourceDoc.getAuth(  ) );
@@ -415,7 +435,7 @@
       return (ResourceLink[]) resourceLinks.toArray( new ResourceLink[0] );
    }
 
-   private static ConfigContext[] getServiceArray( ServiceDocument.Service[] serviceArray )
+   private static ConfigContext[] getServiceArray(ServiceDocument.Service[] serviceArray, XmlBeanNamingContext namingContext) throws NamingException
    {
       List services = new ArrayList(  );
       if ( serviceArray != null )
@@ -430,7 +450,7 @@
             {
                context.addEnvironment( environmentArray[j] );
             }
-            Resource[] resourceArray = getResourceArray( service.getResourceArray(  ) );
+            Resource[] resourceArray = getResourceArray( service.getResourceArray(  ), service.getName(),namingContext );
             for ( int j = 0; j < resourceArray.length; j++ )
             {
                Resource resource = resourceArray[j];
@@ -491,13 +511,13 @@
             namingContext.addEnvironment( environmentArray[i] );
          }
 
-         ConfigContext[] subContext = getServiceArray( global.getServiceArray(  ) );
+         ConfigContext[] subContext = getServiceArray( global.getServiceArray(  ),namingContext );
          for ( int i = 0; i < subContext.length; i++ )
          {
             namingContext.addSubContext( subContext[i] );
          }
 
-         Resource[] resourceArray = getResourceArray( global.getResourceArray(  ) );
+         Resource[] resourceArray = getResourceArray( global.getResourceArray(  ), null, namingContext );
          for ( int i = 0; i < resourceArray.length; i++ )
          {
             namingContext.addResource( resourceArray[i] );
@@ -517,7 +537,7 @@
    {
       if ( serviceArray != null )
       {
-         ConfigContext[] services = getServiceArray( serviceArray );
+         ConfigContext[] services = getServiceArray( serviceArray, namingContext );
          for ( int i = 0; i < services.length; i++ )
          {
             ConfigContext service = services[i];

Modified: incubator/apollo/trunk/src/java/org/apache/ws/util/jndi/XmlBeanNamingContext.java
URL: http://svn.apache.org/viewcvs/incubator/apollo/trunk/src/java/org/apache/ws/util/jndi/XmlBeanNamingContext.java?rev=164573&r1=164572&r2=164573&view=diff
==============================================================================
--- incubator/apollo/trunk/src/java/org/apache/ws/util/jndi/XmlBeanNamingContext.java (original)
+++ incubator/apollo/trunk/src/java/org/apache/ws/util/jndi/XmlBeanNamingContext.java Mon Apr 25 07:03:19 2005
@@ -214,6 +214,15 @@
       LOG.debug( "Added resource entry with name: " + resource.getName(  ) );
    }
 
+   public Context getContext()
+   {
+       return m_context;
+   }
+
+   public void bind(String name, Object ref) throws NamingException
+   {
+       this.m_context.bind( name, ref );
+   }
    /**
     * DOCUMENT_ME
     *

Added: incubator/apollo/trunk/src/java/org/apache/ws/util/jndi/tools/MetadataConfig.java
URL: http://svn.apache.org/viewcvs/incubator/apollo/trunk/src/java/org/apache/ws/util/jndi/tools/MetadataConfig.java?rev=164573&view=auto
==============================================================================
--- incubator/apollo/trunk/src/java/org/apache/ws/util/jndi/tools/MetadataConfig.java (added)
+++ incubator/apollo/trunk/src/java/org/apache/ws/util/jndi/tools/MetadataConfig.java Mon Apr 25 07:03:19 2005
@@ -0,0 +1,336 @@
+/*=============================================================================*
+ *  Copyright 2004 The Apache Software Foundation
+ *
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *=============================================================================*/
+package org.apache.ws.util.jndi.tools;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.apache.wsfx.wsrf.jndi.config.MetadataConfigDocument;
+import org.apache.wsfx.wsrf.jndi.config.MetadataDocument;
+import org.apache.xmlbeans.XmlObject;
+import org.xmlsoap.schemas.ws.x2004.x08.addressing.EndpointReferenceType;
+import org.xmlsoap.schemas.ws.x2004.x09.mex.LocationDocument;
+import org.xmlsoap.schemas.ws.x2004.x09.mex.MetadataReferenceDocument;
+
+import java.io.File;
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * A config object to represent the MetadataExchange information from the
+ * jndi-config.xml config file.
+ * <p/>
+ * This class will store any "loadable" metadata documents, this will avoid
+ * unnecessary loading of files.
+ *
+ * @author Sal Campana
+ */
+public class MetadataConfig
+{
+   private static final Log LOG = LogFactory.getLog( MetadataConfig.class );
+
+    /**
+     * Constant used for adding/getting the IDENTIFIER map from the dialect map
+     */
+   private static final String IDENTIFIER_MAP       = "IDENTIFIER_MAP";
+    /**
+     * Constant for pulling the Complete list of metatdata from the dialect map.
+     */
+   private static final String COMPLETE_METADATA_LIST = "COMPLETE_METADATA_LIST";
+
+   /** XmlBean MetadataConfig object */
+   MetadataConfigDocument.MetadataConfig m_metadata;
+
+   /**
+    * Internal Map for storing metatdata.
+    *
+    * The map will have the structure of:
+    *
+    * key=dialect
+    * value=Map (dialect-specific Map)
+    *
+    * The dialect-specific Map will have the structure:
+    *
+    * Two Entries:
+    * key= IDENTIFIER_MAP
+    * value= A Map keyed on Identifier keyed-to the metatdata
+    *
+    * key= COMPLETE_METADATA_LIST
+    * value= A List containing ALL metadata given this dialect (this includes all entries from IDENTIFIER_MAP)
+    *
+    **/
+   private Map                           m_metatdataMap = new HashMap(  );
+
+   /**
+    * Creates a new {@link MetadataConfig} object.
+    *
+    * @param metadata DOCUMENT_ME
+    */
+   public MetadataConfig( MetadataConfigDocument.MetadataConfig metadata )
+   {
+      m_metadata = metadata;
+
+      loadMetadata(  );
+   }
+
+   /**
+    * Returns all known metadata for all dialects.
+    *
+    * @return A Map keyed on dialect keyed-to a List of metadata
+    */
+   public Map getAllMetadata(  )
+   {
+      Map allMetatdata = new HashMap(  );
+
+      //iterate all the metadata
+       Iterator iterator = m_metatdataMap.keySet().iterator();
+       while (iterator.hasNext())
+       {
+           String key = (String) iterator.next();
+           Map dialectMap = (Map) m_metatdataMap.get(key);
+           List all = (List) dialectMap.get(COMPLETE_METADATA_LIST);
+           allMetatdata.put(key, all);
+       }
+
+      return allMetatdata;
+   }
+
+   /**
+    * Returns the metadata given a dialect and an identifier.
+    *
+    * @param dialect
+    * @param identifierUri
+    * @return  A Map keyed on dialect keyed-to a List of metadata
+    */
+   public Map getMetadata( String dialect,
+                                String identifierUri )
+   {
+      Map results = new HashMap(  );
+      if ( ( dialect != null ) && !"".equals( dialect ) ) //only get metatdata for specific dialect
+      {
+         Map dialectMap = (Map) m_metatdataMap.get( dialect );
+         if ( dialectMap != null )
+         {
+            if ( identifierUri != null )
+            {
+               Map    identifierMap = (Map) dialectMap.get( IDENTIFIER_MAP );
+               Object metatdata = identifierMap.get( identifierUri );
+               if ( metatdata != null )
+               {
+                   List list = new ArrayList();
+                   list.add(metatdata);
+                   results.put( dialect, list );
+               }
+            }
+            else
+            {
+               List metatdataList = (List) dialectMap.get( COMPLETE_METADATA_LIST );
+               results.put( dialect, metatdataList );
+            }
+         }
+      }
+      else //get all metatdata
+      {
+         return getAllMetadata(  );
+      }
+
+      return results;
+   }
+
+   /**
+    * Returns metadata based on dialect
+    *
+    * @param dialect
+    * @return A Map keyed on dialect keyed-to a List of metadata
+    */
+   public Map getMetadata( String dialect )
+   {
+      return getMetadata( dialect, null );
+   }
+
+   /**
+    * Adds the parsed-in metadata to the undelying lookup structures.
+    *
+    * precondition: The structures have already been setup for the metadata
+    *
+    * @param dialect
+    * @param identifier
+    * @param metadata   The "parsed" metadata (could be XmlObject, MetadataReference or Location )
+    */
+   protected void addToMetadataMap( String    dialect,
+                                    String    identifier,
+                                    XmlObject metadata )
+   {
+      Map dialectMap = (Map) m_metatdataMap.get( dialect );
+      if ( dialectMap == null )
+      {
+         addStructureForDialect( dialect );
+         dialectMap = (Map) m_metatdataMap.get( dialect );
+      }
+
+      List metatadataList = (List) dialectMap.get( COMPLETE_METADATA_LIST );
+      metatadataList.add( metadata );
+
+      if ( ( identifier != null ) && !"".equals( identifier ) )
+      {
+         Map identifierMap = (Map) dialectMap.get( IDENTIFIER_MAP );
+         identifierMap.put( identifier, metadata );
+      }
+   }
+
+   /**
+    * Builds the lookup structure given a dialect.
+    *
+    * @param dialect
+    */
+   private synchronized void addStructureForDialect( String dialect )
+   {
+      Map dialectMap = new HashMap(  );
+      m_metatdataMap.put( dialect, dialectMap ); //add to metadatamap
+
+      //add parsedMetatdata to the list of metadata for this dialect
+      dialectMap.put( COMPLETE_METADATA_LIST,
+                      new ArrayList(  ) );
+      dialectMap.put( IDENTIFIER_MAP,
+                      new HashMap(  ) );
+   }
+
+   /**
+    * Loads up lookup structures with the metadata.
+    *
+    * This method initializes a Map for a given dialect if it doesn't already exist.  The Map is keyed using
+    * 2 constants for pulling a map of identifiers->metatada AND a List of all metatdata.
+    */
+   private synchronized void loadMetadata(  )
+   {
+      MetadataDocument.Metadata[] metadataArray = m_metadata.getMetadataArray(  );
+      for ( int i = 0; i < metadataArray.length; i++ )
+      {
+         MetadataDocument.Metadata metadata       = metadataArray[i];
+         String                    dialect        = metadata.getDialect(  );
+         String                    identifier     = metadata.getIdentifier(  );
+         XmlObject                 parsedMetadata = parseMetadata( metadata );
+
+         if ( parsedMetadata != null )
+         {
+            //see if we already built a map for this dialect, then just add the metatdata
+            if ( m_metatdataMap.containsKey( dialect ) )
+            {
+               addToMetadataMap( dialect, identifier, parsedMetadata );
+            }
+            else //build the mapping for this dialect
+            {
+               addStructureForDialect( dialect );
+               addToMetadataMap( dialect, identifier, parsedMetadata );
+            }
+         }
+      }
+   }
+
+   /**
+    * This method will return either a MetadataReferenceDocument,
+    * LocationDocument or an XmlObject which has the metadata document parsed into it.
+    * <p/>
+    * The operation ALWAYS avoids loading the file if the metadata contains a MetadataReference.
+    * The operation ALWAYS avoids loading the file if the metadata contains a Location which is a standard Http URL.
+    * <p/>
+    * The operation WILL load the file if it is a file or a file URL.
+    * The operation WILL load the file if it is located in the classpath.
+    * <p/>
+    * Note: The "load" scenarios are handled last, and if the documents are un-loadable, null will be returned
+    *
+    * @param metadata
+    * @return The XmlObject metadata or null
+    */
+   private XmlObject parseMetadata( MetadataDocument.Metadata metadata )
+   {
+      //check for MetadataReference...if its there, we're finished.
+      XmlObject             result           = null;
+      EndpointReferenceType metadataReferece = metadata.getMetadataReferece(  );
+      if ( metadataReferece != null )
+      {
+         MetadataReferenceDocument metadataReferenceDocument = MetadataReferenceDocument.Factory.newInstance(  );
+         metadataReferenceDocument.setMetadataReference( metadataReferece );
+         result = metadataReferenceDocument;
+      }
+      else //use location instead
+      {
+         String location = metadata.getLocation(  );
+
+         //determine if its a valid URL
+         if ( location != null )
+         {
+            try
+            {
+               URL url = new URL( location );
+
+               //if we get here then is it a file url??? if so load it
+               if ( location.startsWith( "file" ) )
+               {
+                  try
+                  {
+                     result = XmlObject.Factory.parse( new File(url.getFile()) );
+                  }
+                  catch ( Exception e )
+                  {
+                     LOG.fatal( "*********Unable to load file from file url: " + url+ " CAUSE:", e );
+                  }
+               }
+               else //if not then return a Location...let them do it....
+               {
+                  LocationDocument locationDocument = LocationDocument.Factory.newInstance(  );
+                  locationDocument.setLocation( location );
+                  result = locationDocument;
+               }
+            }
+            catch ( MalformedURLException e )
+            {
+               //not valid..is it a file withoud url prefix? ...load it
+               File f = new File( location );
+               if ( f.exists(  ) )
+               {
+                  try
+                  {
+                     result = XmlObject.Factory.parse( f );
+                  }
+                  catch ( Exception e1 )
+                  {
+                     LOG.fatal( "*********Unable to load file: " + f + " CAUSE:", e );
+                  }
+               }
+               else //check classpath
+               {
+                  URL resource = this.getClass(  ).getClassLoader(  ).getResource( location );
+                  try
+                  {
+                     result = XmlObject.Factory.parse( resource );
+                  }
+                  catch ( Exception e1 )
+                  {
+                     LOG.fatal( "*********Unable to load file: " + resource + " from classpath."+ " CAUSE:", e );
+                  }
+               }
+            }
+         }
+      }
+
+      return result;
+   }
+}
\ No newline at end of file

Modified: incubator/apollo/trunk/src/java/org/apache/ws/util/soap/SoapClient.java
URL: http://svn.apache.org/viewcvs/incubator/apollo/trunk/src/java/org/apache/ws/util/soap/SoapClient.java?rev=164573&r1=164572&r2=164573&view=diff
==============================================================================
--- incubator/apollo/trunk/src/java/org/apache/ws/util/soap/SoapClient.java (original)
+++ incubator/apollo/trunk/src/java/org/apache/ws/util/soap/SoapClient.java Mon Apr 25 07:03:19 2005
@@ -157,4 +157,5 @@
       }
    }
 
+    
 }

Modified: incubator/apollo/trunk/src/templates/AbstractService.vm
URL: http://svn.apache.org/viewcvs/incubator/apollo/trunk/src/templates/AbstractService.vm?rev=164573&r1=164572&r2=164573&view=diff
==============================================================================
--- incubator/apollo/trunk/src/templates/AbstractService.vm (original)
+++ incubator/apollo/trunk/src/templates/AbstractService.vm Mon Apr 25 07:03:19 2005
@@ -59,13 +59,7 @@
       return m_methodNameMap.getMethodName( requestQname );
    }
 
-   /**
-    * DOCUMENT_ME
-    *
-    * @return DOCUMENT_ME
-    */
-   public abstract ResourceContext getResourceContext(  );
-
+ 
    /**
     * DOCUMENT_ME
     *

Modified: incubator/apollo/trunk/src/templates/Service.vm
URL: http://svn.apache.org/viewcvs/incubator/apollo/trunk/src/templates/Service.vm?rev=164573&r1=164572&r2=164573&view=diff
==============================================================================
--- incubator/apollo/trunk/src/templates/Service.vm (original)
+++ incubator/apollo/trunk/src/templates/Service.vm Mon Apr 25 07:03:19 2005
@@ -24,8 +24,7 @@
    extends Abstract${serviceName}Service 
    implements ${serviceName}CustomOperationsPortType
 {
-
-   private ResourceContext m_resourceContext;
+   
    #if($namespaceVersionHolder)    
    
    /**
@@ -42,7 +41,6 @@
    public ${serviceName}Service( ResourceContext resourceContext )
    {
       super(resourceContext);
-      m_resourceContext = resourceContext;
       init();
    }
    
@@ -57,17 +55,7 @@
    {
       return SPEC_NAMESPACE_SET;
    }
-   #end
-   
-   /**
-    * DOCUMENT_ME
-    *
-    * @return DOCUMENT_ME
-    */
-   public ResourceContext getResourceContext(  )
-   {
-      return m_resourceContext;
-   }
+   #end   
 
    #foreach( $key in $customMethodList.keySet() )
    

Modified: incubator/apollo/trunk/src/templates/v2004_09/GetMetadata.txt
URL: http://svn.apache.org/viewcvs/incubator/apollo/trunk/src/templates/v2004_09/GetMetadata.txt?rev=164573&r1=164572&r2=164573&view=diff
==============================================================================
--- incubator/apollo/trunk/src/templates/v2004_09/GetMetadata.txt (original)
+++ incubator/apollo/trunk/src/templates/v2004_09/GetMetadata.txt Mon Apr 25 07:03:19 2005
@@ -2,10 +2,10 @@
 
 public org.xmlsoap.schemas.ws.x2004.x09.mex.MetadataDocument getMetadata(org.xmlsoap.schemas.ws.x2004.x09.mex.GetMetadataDocument request)
 {
-   return new org.apache.ws.resource.metadataexchange.v2004_09.porttype.impl.MetadataExchangeExchangePortTypeImpl( getResourceContext(  ) ).getMetadata( request);
+   return new org.apache.ws.resource.metadataexchange.v2004_09.porttype.impl.MetadataExchangePortTypeImpl( getResourceContext(  ) ).getMetadata( request);
 }
 
 public org.xmlsoap.schemas.ws.x2004.x09.mex.AnyXmlType get()
 {
-   return new org.apache.ws.resource.metadataexchange.v2004_09.porttype.impl.MetadataExchangeExchangePortTypeImpl( getResourceContext(  ) ).get();
+   return new org.apache.ws.resource.metadataexchange.v2004_09.porttype.impl.MetadataExchangePortTypeImpl( getResourceContext(  ) ).get();
 }

Modified: incubator/apollo/trunk/src/test/org/apache/ws/resource/properties/SushiResourceContext.java
URL: http://svn.apache.org/viewcvs/incubator/apollo/trunk/src/test/org/apache/ws/resource/properties/SushiResourceContext.java?rev=164573&r1=164572&r2=164573&view=diff
==============================================================================
--- incubator/apollo/trunk/src/test/org/apache/ws/resource/properties/SushiResourceContext.java (original)
+++ incubator/apollo/trunk/src/test/org/apache/ws/resource/properties/SushiResourceContext.java Mon Apr 25 07:03:19 2005
@@ -183,6 +183,16 @@
 
     }
 
+    /**
+     * Returns the value of the WS-Addressing Action header
+     *
+     * @return WS-Addressing Action Header value
+     */
+    public String getAddressingAction()
+    {
+        return null;
+    }
+
     public void setProperty( String name, Object value )
     {
 

Added: incubator/apollo/trunk/wsrf-xbeans/src/wsdl/wsx/Metadataexchange-2004_09.wsdl
URL: http://svn.apache.org/viewcvs/incubator/apollo/trunk/wsrf-xbeans/src/wsdl/wsx/Metadataexchange-2004_09.wsdl?rev=164573&view=auto
==============================================================================
--- incubator/apollo/trunk/wsrf-xbeans/src/wsdl/wsx/Metadataexchange-2004_09.wsdl (added)
+++ incubator/apollo/trunk/wsrf-xbeans/src/wsdl/wsx/Metadataexchange-2004_09.wsdl Mon Apr 25 07:03:19 2005
@@ -0,0 +1,94 @@
+<?xml version='1.0' encoding='UTF-8' ?>
+<!--
+(c) 2004 BEA Systems Inc., Computer Associates International, Inc.,
+International Business Machines Corporation, Microsoft Corporation,
+Inc., SAP AG, Sun Microsystems, and webMethods. All rights reserved.
+
+Permission to copy and display the WS-MetadataExchange Specification
+(the "Specification"), in any medium without fee or royalty is hereby
+granted, provided that you include the following on ALL copies of the
+Specification that you make:
+
+1.	A link or URL to the Specification at this location.
+2.	The copyright notice as shown in the Specification.
+
+BEA Systems, Computer Associates, IBM, Microsoft, SAP, Sun, and
+webMethods (collectively, the "Authors") each agree to grant you a
+license, under royalty-free and otherwise reasonable,
+non-discriminatory terms and conditions, to their respective essential
+patent claims that they deem necessary to implement the
+WS-MetadataExchange Specification.
+
+THE SPECIFICATION IS PROVIDED "AS IS," AND THE AUTHORS MAKE NO
+REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED, INCLUDING, BUT NOT
+LIMITED TO, WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
+PURPOSE, NON-INFRINGEMENT, OR TITLE; THAT THE CONTENTS OF THE
+SPECIFICATION ARE SUITABLE FOR ANY PURPOSE; NOR THAT THE
+IMPLEMENTATION OF SUCH CONTENTS WILL NOT INFRINGE ANY THIRD PARTY
+PATENTS, COPYRIGHTS, TRADEMARKS OR OTHER RIGHTS.
+
+THE AUTHORS WILL NOT BE LIABLE FOR ANY DIRECT, INDIRECT, SPECIAL,
+INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF OR RELATING TO ANY
+USE OR DISTRIBUTION OF THE SPECIFICATIONS.
+
+The name and trademarks of the Authors may NOT be used in any manner,
+including advertising or publicity pertaining to the Specifications or
+their contents without specific, written prior permission. Title to
+copyright in the Specifications will at all times remain with the
+Authors.
+
+No other rights are granted by implication, estoppel or otherwise.
+-->
+
+<wsdl:definitions
+    targetNamespace='http://schemas.xmlsoap.org/ws/2004/09/mex'
+    xmlns:tns='http://schemas.xmlsoap.org/ws/2004/09/mex'
+    xmlns:wsa='http://schemas.xmlsoap.org/ws/2004/08/addressing'
+    xmlns:wsdl='http://schemas.xmlsoap.org/wsdl/'
+    xmlns:xs='http://www.w3.org/2001/XMLSchema' >
+
+  <wsdl:types>
+    <xs:schema
+        targetNamespace='http://schemas.xmlsoap.org/ws/2004/09/mex' >
+      <xs:include schemaLocation='Metadataexchange-2004_09.xsd' />
+    </xs:schema>
+  </wsdl:types>
+
+  <wsdl:message name='GetMetadataMsg' >
+    <wsdl:part name='body' element='tns:GetMetadata' />
+  </wsdl:message>
+
+  <wsdl:message name='GetMetadataResponseMsg' >
+    <wsdl:part name='body' element='tns:Metadata' />
+  </wsdl:message>
+
+  <wsdl:message name='GetMsg' />
+
+  <wsdl:message name='GetResponseMsg' >
+    <wsdl:part name='body' type='tns:AnyXmlType' />
+  </wsdl:message>
+
+  <wsdl:portType name='MetadataExchange' >
+    <wsdl:operation name='GetMetadata' >
+      <wsdl:input
+          message='tns:GetMetadataMsg'
+          wsa:Action=
+           'http://schemas.xmlsoap.org/ws/2004/09/mex/GetMetadata/Request' />
+      <wsdl:output
+          message='tns:GetMetadataResponseMsg'
+          wsa:Action=
+           'http://schemas.xmlsoap.org/ws/2004/09/mex/GetMetadata/Response' />
+    </wsdl:operation>
+    <wsdl:operation name='Get' >
+      <wsdl:input
+          message='tns:GetMsg'
+          wsa:Action=
+           'http://schemas.xmlsoap.org/ws/2004/09/mex/Get/Request' />
+      <wsdl:output
+          message='tns:GetResponseMsg'
+          wsa:Action=
+           'http://schemas.xmlsoap.org/ws/2004/09/mex/Get/Response' />
+    </wsdl:operation>
+  </wsdl:portType>
+
+</wsdl:definitions>

Added: incubator/apollo/trunk/wsrf-xbeans/src/wsdl/wsx/Metadataexchange-2004_09.xsd
URL: http://svn.apache.org/viewcvs/incubator/apollo/trunk/wsrf-xbeans/src/wsdl/wsx/Metadataexchange-2004_09.xsd?rev=164573&view=auto
==============================================================================
--- incubator/apollo/trunk/wsrf-xbeans/src/wsdl/wsx/Metadataexchange-2004_09.xsd (added)
+++ incubator/apollo/trunk/wsrf-xbeans/src/wsdl/wsx/Metadataexchange-2004_09.xsd Mon Apr 25 07:03:19 2005
@@ -0,0 +1,114 @@
+<?xml version='1.0' encoding='UTF-8' ?>
+<!--
+(c) 2004 BEA Systems Inc., Computer Associates International, Inc.,
+International Business Machines Corporation, Microsoft Corporation,
+Inc., SAP AG, Sun Microsystems, and webMethods. All rights reserved. 
+
+Permission to copy and display the WS-MetadataExchange Specification
+(the "Specification"), in any medium without fee or royalty is hereby
+granted, provided that you include the following on ALL copies of the
+Specification that you make:
+
+1.	A link or URL to the Specification at this location.
+2.	The copyright notice as shown in the Specification.
+
+BEA Systems, Computer Associates, IBM, Microsoft, SAP, Sun, and
+webMethods (collectively, the "Authors") each agree to grant you a
+license, under royalty-free and otherwise reasonable,
+non-discriminatory terms and conditions, to their respective essential
+patent claims that they deem necessary to implement the
+WS-MetadataExchange Specification.
+
+THE SPECIFICATION IS PROVIDED "AS IS," AND THE AUTHORS MAKE NO
+REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED, INCLUDING, BUT NOT
+LIMITED TO, WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
+PURPOSE, NON-INFRINGEMENT, OR TITLE; THAT THE CONTENTS OF THE
+SPECIFICATION ARE SUITABLE FOR ANY PURPOSE; NOR THAT THE
+IMPLEMENTATION OF SUCH CONTENTS WILL NOT INFRINGE ANY THIRD PARTY
+PATENTS, COPYRIGHTS, TRADEMARKS OR OTHER RIGHTS.
+
+THE AUTHORS WILL NOT BE LIABLE FOR ANY DIRECT, INDIRECT, SPECIAL,
+INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF OR RELATING TO ANY
+USE OR DISTRIBUTION OF THE SPECIFICATIONS.
+
+The name and trademarks of the Authors may NOT be used in any manner,
+including advertising or publicity pertaining to the Specifications or
+their contents without specific, written prior permission. Title to
+copyright in the Specifications will at all times remain with the
+Authors.
+
+No other rights are granted by implication, estoppel or otherwise.
+-->
+
+<xs:schema
+    targetNamespace='http://schemas.xmlsoap.org/ws/2004/09/mex'
+    xmlns:tns='http://schemas.xmlsoap.org/ws/2004/09/mex'
+    xmlns:wsa='http://schemas.xmlsoap.org/ws/2004/08/addressing'
+    xmlns:xs='http://www.w3.org/2001/XMLSchema'
+    elementFormDefault='qualified'
+    blockDefault='#all' >
+
+  <xs:import
+      namespace='http://schemas.xmlsoap.org/ws/2004/08/addressing'
+      schemaLocation='../wsa/WS-Addressing-2004_08_10.xsd' />
+
+  <!-- Get Metadata request -->
+  <xs:element name='GetMetadata' >
+    <xs:complexType>
+      <xs:sequence>
+        <xs:element ref='tns:Dialect' minOccurs='0' />
+        <xs:element ref='tns:Identifier' minOccurs='0' />
+      </xs:sequence>
+      <xs:anyAttribute namespace='##other' processContents='lax' />
+    </xs:complexType>
+  </xs:element>
+
+  <xs:element name='Dialect' type='xs:anyURI' />
+  <xs:element name='Identifier' type='xs:anyURI' />
+
+  <!-- Get Metadata response -->
+  <xs:element name='Metadata' >
+    <xs:complexType>
+      <xs:sequence>
+        <xs:element ref='tns:MetadataSection'
+                    minOccurs='0'
+                    maxOccurs='unbounded' />
+      </xs:sequence>
+      <xs:anyAttribute namespace='##other' processContents='lax' />
+    </xs:complexType>
+  </xs:element>
+
+  <xs:element name='MetadataSection' >
+    <xs:complexType>
+      <xs:choice>
+        <xs:any namespace='##other'
+                processContents='lax'
+                minOccurs='0'
+                maxOccurs='unbounded' />
+        <xs:element ref='tns:MetadataReference' />
+        <xs:element ref='tns:Location' />
+      </xs:choice>
+      <xs:attribute name='Dialect' type='xs:anyURI' use='required' />
+      <xs:attribute name='Identifier' type='xs:anyURI' />
+      <xs:anyAttribute namespace='##other' processContents='lax' />
+    </xs:complexType>
+  </xs:element>
+
+  <xs:element name='MetadataReference'
+              type='wsa:EndpointReferenceType' />
+
+  <xs:element name='Location'
+              type='xs:anyURI' />
+
+  <!-- count(/s:Envelope/s:Body/*) = 0 for Get request -->
+
+  <!-- Get Response returns xs:any -->
+
+  <xs:complexType name='AnyXmlType' >
+    <xs:sequence>
+      <xs:any namespace='##any' processContents='lax' />
+    </xs:sequence>
+    <xs:anyAttribute namespace='##any' processContents='lax' />
+  </xs:complexType>
+
+</xs:schema>



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