You are viewing a plain text version of this content. The canonical link for it is here.
Posted to muse-commits@ws.apache.org by da...@apache.org on 2007/03/24 14:24:36 UTC

svn commit: r522026 [3/10] - in /webservices/muse/trunk/modules: osgi-bundles/muse-complete/src/org/apache/muse/complete/ osgi-bundles/muse-util-all/src/org/apache/muse/util/osgi/ osgi-bundles/muse-wsa-soap/src/org/apache/muse/ws/addressing/osgi/ osgi-...

Modified: webservices/muse/trunk/modules/preview/muse-platform-jaxws/src/org/apache/muse/core/platform/jaxws/JaxWsEnvironment.java
URL: http://svn.apache.org/viewvc/webservices/muse/trunk/modules/preview/muse-platform-jaxws/src/org/apache/muse/core/platform/jaxws/JaxWsEnvironment.java?view=diff&rev=522026&r1=522025&r2=522026
==============================================================================
--- webservices/muse/trunk/modules/preview/muse-platform-jaxws/src/org/apache/muse/core/platform/jaxws/JaxWsEnvironment.java (original)
+++ webservices/muse/trunk/modules/preview/muse-platform-jaxws/src/org/apache/muse/core/platform/jaxws/JaxWsEnvironment.java Sat Mar 24 06:24:32 2007
@@ -1,206 +1,225 @@
-
-package org.apache.muse.core.platform.jaxws;
-
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.FileNotFoundException;
-import java.io.InputStream;
-import java.net.InetAddress;
-import java.net.MalformedURLException;
-import java.net.URI;
-import java.net.URL;
-import java.net.UnknownHostException;
-
-import javax.servlet.ServletContext;
-import javax.servlet.http.HttpServletRequest;
-import javax.xml.ws.handler.MessageContext;
-
-import org.apache.muse.core.AbstractEnvironment;
-import org.apache.muse.util.messages.Messages;
-import org.apache.muse.util.messages.MessagesFactory;
-import org.apache.muse.ws.addressing.EndpointReference;
-
-/**
- * 
- * JaxWsEnvironment is a concrete {@linkplain org.apache.muse.core.Environment Environment} 
- * for SOAP engines that support the JAX-WS specification. It provides all of the 
- * lower-level functionality that is abstracted through the Environment interface 
- * using the local file system, javax.servlet.*, and JAX-WS APIs.
- * 
- * @author Balan Subramanian
- * @author Dan Jemiolo (danj)
- * 
- */
-
-public class JaxWsEnvironment extends AbstractEnvironment
-{
-    //
-    // used to look up all error messages
-    //
-    private static Messages _MESSAGES = MessagesFactory.get(JaxWsEnvironment.class);
-    
-    //
-    // relative path of the files that hold the Muse artifacts and 
-    // user's resource-specific artifacts
-    //
-    private static final String _MUSE_INSTALL_PATH = "/WEB-INF/services/muse";
-    
-    private MessageContext _messageContext = null;
-
-    //
-    // The WAR installation directory
-    //
-    private File _realDirectory = null;
-
-    /**
-     * 
-     * This constructor allows the user to initialize the environment at 
-     * any point in the J2EE service lifecycle. It does not rely on the 
-     * JAX-RPC API or request-specific data in order to complete its tasks.
-     *
-     */
-    public JaxWsEnvironment(MessageContext context)
-    {
-        if (context == null)
-            throw new NullPointerException(_MESSAGES.get("NullMessageContext"));
-        
-        _messageContext = context;
-        
-        ServletContext servletContext = (ServletContext)_messageContext.get(MessageContext.SERVLET_CONTEXT);
-        String realPath = servletContext.getRealPath(_MUSE_INSTALL_PATH);
-        _realDirectory = new File(realPath);
-        
-        if (!_realDirectory.exists())
-        {
-            Object[] filler = { _MUSE_INSTALL_PATH, realPath };
-            throw new IllegalStateException(_MESSAGES.get("NoMuseDirectory", filler));
-        }
-
-        HttpServletRequest request = (HttpServletRequest)_messageContext.get(MessageContext.SERVLET_REQUEST);
-        URI uri = getDeploymentURI(request);
-        setDefaultURI(uri.toString());
-    }
-
-    public URL getDataResource(String path)
-    {
-        if (path == null)
-            throw new NullPointerException(_MESSAGES.get("NullResourcePath"));
-
-        File file = new File(getRealDirectory(), path);
-
-        try
-        {
-            return file.toURL();
-        }
-
-        catch (MalformedURLException error)
-        {
-            throw new RuntimeException(error.getMessage(), error);
-        }
-    }
-
-    public InputStream getDataResourceStream(String path)
-    {
-        if (path == null)
-            throw new NullPointerException(_MESSAGES.get("NullResourcePath"));
-
-        File file = new File(getRealDirectory(), path);
-
-        try
-        {
-            return new FileInputStream(file);
-        }
-
-        catch (FileNotFoundException error)
-        {
-            Object[] filler = { path, getRealDirectory() };
-            throw new RuntimeException(_MESSAGES.get("InvalidFile", filler));
-        }
-    }
-
-    public EndpointReference getDeploymentEPR()
-    {
-        //
-        // not triggered by an HTTP request? use the backup
-        //
-        if (_messageContext == null)
-        {
-            String defaultString = getDefaultURI();
-
-            if (defaultString == null)
-                throw new IllegalStateException(_MESSAGES.get("NoDefaultURI"));
-            
-            URI defaultURI = URI.create(defaultString);
-            return new EndpointReference(defaultURI);
-        }
-
-        //
-        // figure out where we've been deployed - network location
-        //
-        HttpServletRequest request = (HttpServletRequest)_messageContext.get(MessageContext.SERVLET_REQUEST);
-
-        //
-        // only support HTTP request types - don't know how to extract 
-        // this info with other protocols/properties
-        //
-        if (request == null)
-            throw new IllegalStateException(_MESSAGES.get("NoHttpServletRequest"));
-
-        URI deploymentURI = getDeploymentURI(request);
-        return new EndpointReference(deploymentURI);
-    }
-
-    /**
-     * 
-     * @param request
-     * 
-     * @return The URI being targeted by the current request. This URI 
-     *         includes an IP address rather than a host name, because 
-     *         we often use it to create EPRs/URIs for remote users 
-     *         based on the results of a local request. Just because the 
-     *         initial request was local doesn't mean we should represent 
-     *         ourselves to remote users with a local name. It also means 
-     *         that remote systems don't have to have a hosts lookup that 
-     *         includes our endpoint's machine.
-     *
-     */
-    protected URI getDeploymentURI(HttpServletRequest request)
-    {
-        String urlWithHostName = request.getRequestURL().toString();
-        String ip = null;
-
-        try
-        {
-            ip = InetAddress.getLocalHost().getHostAddress();
-        }
-
-        catch (UnknownHostException error)
-        {
-            throw new RuntimeException(error);
-        }
-
-        int start = urlWithHostName.indexOf("://") + 3;
-        int end = urlWithHostName.indexOf('/', start);
-
-        int port = urlWithHostName.indexOf(':', start);
-
-        //
-        // check for port - we don't want to lose that in the replacement
-        //
-        if (port >= 0 && port < end)
-            end = port;
-
-        StringBuffer urlWithIP = new StringBuffer(urlWithHostName.length());
-        urlWithIP.append(urlWithHostName.substring(0, start));
-        urlWithIP.append(ip);
-        urlWithIP.append(urlWithHostName.substring(end));
-
-        return URI.create(urlWithIP.toString());
-    }
-
-    public File getRealDirectory()
-    {
-        return _realDirectory;
-    }
-
-}
+/* 
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you 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.muse.core.platform.jaxws;
+
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileNotFoundException;
+import java.io.InputStream;
+import java.net.InetAddress;
+import java.net.MalformedURLException;
+import java.net.URI;
+import java.net.URL;
+import java.net.UnknownHostException;
+
+import javax.servlet.ServletContext;
+import javax.servlet.http.HttpServletRequest;
+import javax.xml.ws.handler.MessageContext;
+
+import org.apache.muse.core.AbstractEnvironment;
+import org.apache.muse.util.messages.Messages;
+import org.apache.muse.util.messages.MessagesFactory;
+import org.apache.muse.ws.addressing.EndpointReference;
+
+/**
+ * 
+ * JaxWsEnvironment is a concrete {@linkplain org.apache.muse.core.Environment Environment} 
+ * for SOAP engines that support the JAX-WS specification. It provides all of the 
+ * lower-level functionality that is abstracted through the Environment interface 
+ * using the local file system, javax.servlet.*, and JAX-WS APIs.
+ * 
+ * @author Balan Subramanian
+ * @author Dan Jemiolo (danj)
+ * 
+ */
+
+public class JaxWsEnvironment extends AbstractEnvironment
+{
+    //
+    // used to look up all error messages
+    //
+    private static Messages _MESSAGES = MessagesFactory.get(JaxWsEnvironment.class);
+    
+    //
+    // relative path of the files that hold the Muse artifacts and 
+    // user's resource-specific artifacts
+    //
+    private static final String _MUSE_INSTALL_PATH = "/WEB-INF/services/muse";
+    
+    private MessageContext _messageContext = null;
+
+    //
+    // The WAR installation directory
+    //
+    private File _realDirectory = null;
+
+    /**
+     * 
+     * This constructor allows the user to initialize the environment at 
+     * any point in the J2EE service lifecycle. It does not rely on the 
+     * JAX-RPC API or request-specific data in order to complete its tasks.
+     *
+     */
+    public JaxWsEnvironment(MessageContext context)
+    {
+        if (context == null)
+            throw new NullPointerException(_MESSAGES.get("NullMessageContext"));
+        
+        _messageContext = context;
+        
+        ServletContext servletContext = (ServletContext)_messageContext.get(MessageContext.SERVLET_CONTEXT);
+        String realPath = servletContext.getRealPath(_MUSE_INSTALL_PATH);
+        _realDirectory = new File(realPath);
+        
+        if (!_realDirectory.exists())
+        {
+            Object[] filler = { _MUSE_INSTALL_PATH, realPath };
+            throw new IllegalStateException(_MESSAGES.get("NoMuseDirectory", filler));
+        }
+
+        HttpServletRequest request = (HttpServletRequest)_messageContext.get(MessageContext.SERVLET_REQUEST);
+        URI uri = getDeploymentURI(request);
+        setDefaultURI(uri.toString());
+    }
+
+    public URL getDataResource(String path)
+    {
+        if (path == null)
+            throw new NullPointerException(_MESSAGES.get("NullResourcePath"));
+
+        File file = new File(getRealDirectory(), path);
+
+        try
+        {
+            return file.toURL();
+        }
+
+        catch (MalformedURLException error)
+        {
+            throw new RuntimeException(error.getMessage(), error);
+        }
+    }
+
+    public InputStream getDataResourceStream(String path)
+    {
+        if (path == null)
+            throw new NullPointerException(_MESSAGES.get("NullResourcePath"));
+
+        File file = new File(getRealDirectory(), path);
+
+        try
+        {
+            return new FileInputStream(file);
+        }
+
+        catch (FileNotFoundException error)
+        {
+            Object[] filler = { path, getRealDirectory() };
+            throw new RuntimeException(_MESSAGES.get("InvalidFile", filler));
+        }
+    }
+
+    public EndpointReference getDeploymentEPR()
+    {
+        //
+        // not triggered by an HTTP request? use the backup
+        //
+        if (_messageContext == null)
+        {
+            String defaultString = getDefaultURI();
+
+            if (defaultString == null)
+                throw new IllegalStateException(_MESSAGES.get("NoDefaultURI"));
+            
+            URI defaultURI = URI.create(defaultString);
+            return new EndpointReference(defaultURI);
+        }
+
+        //
+        // figure out where we've been deployed - network location
+        //
+        HttpServletRequest request = (HttpServletRequest)_messageContext.get(MessageContext.SERVLET_REQUEST);
+
+        //
+        // only support HTTP request types - don't know how to extract 
+        // this info with other protocols/properties
+        //
+        if (request == null)
+            throw new IllegalStateException(_MESSAGES.get("NoHttpServletRequest"));
+
+        URI deploymentURI = getDeploymentURI(request);
+        return new EndpointReference(deploymentURI);
+    }
+
+    /**
+     * 
+     * @param request
+     * 
+     * @return The URI being targeted by the current request. This URI 
+     *         includes an IP address rather than a host name, because 
+     *         we often use it to create EPRs/URIs for remote users 
+     *         based on the results of a local request. Just because the 
+     *         initial request was local doesn't mean we should represent 
+     *         ourselves to remote users with a local name. It also means 
+     *         that remote systems don't have to have a hosts lookup that 
+     *         includes our endpoint's machine.
+     *
+     */
+    protected URI getDeploymentURI(HttpServletRequest request)
+    {
+        String urlWithHostName = request.getRequestURL().toString();
+        String ip = null;
+
+        try
+        {
+            ip = InetAddress.getLocalHost().getHostAddress();
+        }
+
+        catch (UnknownHostException error)
+        {
+            throw new RuntimeException(error);
+        }
+
+        int start = urlWithHostName.indexOf("://") + 3;
+        int end = urlWithHostName.indexOf('/', start);
+
+        int port = urlWithHostName.indexOf(':', start);
+
+        //
+        // check for port - we don't want to lose that in the replacement
+        //
+        if (port >= 0 && port < end)
+            end = port;
+
+        StringBuffer urlWithIP = new StringBuffer(urlWithHostName.length());
+        urlWithIP.append(urlWithHostName.substring(0, start));
+        urlWithIP.append(ip);
+        urlWithIP.append(urlWithHostName.substring(end));
+
+        return URI.create(urlWithIP.toString());
+    }
+
+    public File getRealDirectory()
+    {
+        return _realDirectory;
+    }
+
+}

Modified: webservices/muse/trunk/modules/preview/muse-platform-jaxws/src/org/apache/muse/core/platform/jaxws/JaxWsIsolationLayer.java
URL: http://svn.apache.org/viewvc/webservices/muse/trunk/modules/preview/muse-platform-jaxws/src/org/apache/muse/core/platform/jaxws/JaxWsIsolationLayer.java?view=diff&rev=522026&r1=522025&r2=522026
==============================================================================
--- webservices/muse/trunk/modules/preview/muse-platform-jaxws/src/org/apache/muse/core/platform/jaxws/JaxWsIsolationLayer.java (original)
+++ webservices/muse/trunk/modules/preview/muse-platform-jaxws/src/org/apache/muse/core/platform/jaxws/JaxWsIsolationLayer.java Sat Mar 24 06:24:32 2007
@@ -1,199 +1,219 @@
-package org.apache.muse.core.platform.jaxws;
-
-import javax.annotation.PostConstruct;
-import javax.annotation.Resource;
-import javax.xml.soap.MessageFactory;
-import javax.xml.soap.SOAPBody;
-import javax.xml.soap.SOAPConstants;
-import javax.xml.soap.SOAPElement;
-import javax.xml.soap.SOAPEnvelope;
-import javax.xml.soap.SOAPException;
-import javax.xml.soap.SOAPFactory;
-import javax.xml.soap.SOAPHeader;
-import javax.xml.soap.SOAPMessage;
-import javax.xml.ws.BindingType;
-import javax.xml.ws.Provider;
-import javax.xml.ws.Service;
-import javax.xml.ws.ServiceMode;
-import javax.xml.ws.WebServiceContext;
-import javax.xml.ws.WebServiceProvider;
-import javax.xml.ws.handler.MessageContext;
-
-import org.w3c.dom.Document;
-import org.w3c.dom.Element;
-
-import org.apache.muse.core.Environment;
-import org.apache.muse.core.platform.AbstractIsolationLayer;
-import org.apache.muse.util.LoggingUtils;
-import org.apache.muse.util.xml.XmlUtils;
-import org.apache.muse.ws.addressing.MessageHeaders;
-import org.apache.muse.ws.addressing.soap.SoapFault;
-import org.apache.muse.ws.addressing.soap.SoapUtils;
-
-/**
- * 
- * JaxWsIsolationLayer is a JAX-WS-compliant service that forwards requests for 
- * WS-resources to the Muse resource router for further processing. It also 
- * handles the conversion of DOM elements to SAAJ elements (SOAPElement) and back. 
- * Like all JAX-WS services, this class requires JDK 1.5.
- *
- * @author Balan Subramanian
- * @author Dan Jemiolo (danj)
- *
- */
-
-@ServiceMode(value=Service.Mode.MESSAGE)
-@WebServiceProvider()
-@BindingType(value="http://www.w3.org/2003/05/soap/bindings/HTTP/")
-public class JaxWsIsolationLayer extends AbstractIsolationLayer implements Provider<SOAPMessage> 
-{    
-    private static MessageFactory _MESSAGE_FACTORY = null;
-    
-    private static SOAPFactory _SOAP_FACTORY = null;
-    
-    @Resource WebServiceContext wsContext;
-
-    static
-    {
-        try
-        {
-            _MESSAGE_FACTORY = MessageFactory.newInstance(SOAPConstants.SOAP_1_2_PROTOCOL);
-            _SOAP_FACTORY = SOAPFactory.newInstance(SOAPConstants.SOAP_1_2_PROTOCOL);
-        }
-        
-        catch (SOAPException error)
-        {
-            throw new RuntimeException(error.getMessage(), error);
-        }
-    }
-    
-    @Override
-    protected Environment createEnvironment() 
-    {
-        MessageContext mc = wsContext.getMessageContext();
-        return new JaxWsEnvironment(mc);
-    }
-    
-	@PostConstruct
-    public void init()
-    {
-        if (!hasBeenInitialized())
-            initialize();
-    }
-    
-	public SOAPMessage invoke(SOAPMessage request)
-    {
-        try
-        {
-            return invokeOperation(request);
-        }
-        
-        //
-        // jax-ws won't let us through a SOAPException - this would 
-        // results from mis-configuration of the SAAJ API, so we 
-        // re-throw as a runtime exception
-        //
-        catch (Throwable error)
-        {
-            throw new RuntimeException(error.getMessage(), error);
-        }
-    }
-    
-    protected Element invokeOperation(MessageHeaders addressing, Element soapBody) 
-    {
-		Environment env = getRouter().getEnvironment();
-        env.addAddressingContext(addressing);
-
-        Element soapResponse = null;
-        
-        //
-        // if the initialization failed, there will be a fault 
-        // waiting to be serialized/sent back
-        //
-        if (hasFailedToInitialize())
-            soapResponse = getCauseOfFailure().toXML();
-        
-        //
-        // otherwise, proceed as normal with routing
-        //
-        else
-            soapResponse = getRouter().invoke(soapBody);
-        
-        //
-        // all done - don't forget to clean up the context or 
-        // we'll have a memory leak
-        //
-        env.removeAddressingContext();
-        
-		return soapResponse;
-	}
-	
-	protected SOAPMessage invokeOperation(SOAPMessage request)
-        throws SOAPException, SoapFault
-    {
-        SOAPEnvelope env = request.getSOAPPart().getEnvelope();
-        
-        if (!hasFailedToInitialize())
-            LoggingUtils.logMessage(getRouter().getLog(), env, true);
-        
-		SOAPMessage response = _MESSAGE_FACTORY.createMessage();
-        
-		Element soapHeader = env.getHeader();
-        Element soapBody = null;
-        
-        //
-        // handle empty SOAP bodies
-        //
-        if (env.getBody().hasChildNodes()) 
-            soapBody = XmlUtils.getFirstElement(env.getBody());
-
-		MessageHeaders addressing = new MessageHeaders(soapHeader);
-        
-        //
-        // forward to Muse framework and invoke actual user code
-        //
-        Element responseElement = invokeOperation(addressing, soapBody);
-        
-        //
-        // create response envelope
-        //
-        SOAPEnvelope responseEnv = response.getSOAPPart().getEnvelope();
-        SOAPHeader responseHeader = responseEnv.getHeader();
-        SOAPBody responseBody =responseEnv.getBody();
-        
-        if(responseHeader == null)
-            responseHeader = responseEnv.addHeader();
-        
-        //
-        // convert DOM -> SAAJ and add to response body
-        //
-    	SOAPElement soapElement = _SOAP_FACTORY.createElement(responseElement);
-        responseBody.addChildElement(soapElement);
-        
-        MessageHeaders replyAddressing = null;
-        
-        //
-        // send back fault headers on exception
-        //
-        if (SoapUtils.isFault(soapElement))
-            replyAddressing = addressing.createFaultHeaders();
-        
-        else
-            replyAddressing = addressing.createReplyHeaders();
-                    
-        Element replyAddressingXML = replyAddressing.toXML();
-        Element[] children = XmlUtils.getAllElements(replyAddressingXML);
-        Document responseDoc = responseEnv.getOwnerDocument();
-        
-        for (int n = 0; n < children.length; ++n)
-        {
-            Element next = (Element)responseDoc.importNode(children[n], true);
-            responseHeader.appendChild(next);
-        }
-        
-        if (!hasFailedToInitialize())
-            LoggingUtils.logMessage(getRouter().getLog(), responseEnv, false);
-        
-        return response;
-	}
-}
+/* 
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you 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.muse.core.platform.jaxws;
+
+import javax.annotation.PostConstruct;
+import javax.annotation.Resource;
+import javax.xml.soap.MessageFactory;
+import javax.xml.soap.SOAPBody;
+import javax.xml.soap.SOAPConstants;
+import javax.xml.soap.SOAPElement;
+import javax.xml.soap.SOAPEnvelope;
+import javax.xml.soap.SOAPException;
+import javax.xml.soap.SOAPFactory;
+import javax.xml.soap.SOAPHeader;
+import javax.xml.soap.SOAPMessage;
+import javax.xml.ws.BindingType;
+import javax.xml.ws.Provider;
+import javax.xml.ws.Service;
+import javax.xml.ws.ServiceMode;
+import javax.xml.ws.WebServiceContext;
+import javax.xml.ws.WebServiceProvider;
+import javax.xml.ws.handler.MessageContext;
+
+import org.w3c.dom.Document;
+import org.w3c.dom.Element;
+
+import org.apache.muse.core.Environment;
+import org.apache.muse.core.platform.AbstractIsolationLayer;
+import org.apache.muse.util.LoggingUtils;
+import org.apache.muse.util.xml.XmlUtils;
+import org.apache.muse.ws.addressing.MessageHeaders;
+import org.apache.muse.ws.addressing.soap.SoapFault;
+import org.apache.muse.ws.addressing.soap.SoapUtils;
+
+/**
+ * 
+ * JaxWsIsolationLayer is a JAX-WS-compliant service that forwards requests for 
+ * WS-resources to the Muse resource router for further processing. It also 
+ * handles the conversion of DOM elements to SAAJ elements (SOAPElement) and back. 
+ * Like all JAX-WS services, this class requires JDK 1.5.
+ *
+ * @author Balan Subramanian
+ * @author Dan Jemiolo (danj)
+ *
+ */
+
+@ServiceMode(value=Service.Mode.MESSAGE)
+@WebServiceProvider()
+@BindingType(value="http://www.w3.org/2003/05/soap/bindings/HTTP/")
+public class JaxWsIsolationLayer extends AbstractIsolationLayer implements Provider<SOAPMessage> 
+{    
+    private static MessageFactory _MESSAGE_FACTORY = null;
+    
+    private static SOAPFactory _SOAP_FACTORY = null;
+    
+    @Resource WebServiceContext wsContext;
+
+    static
+    {
+        try
+        {
+            _MESSAGE_FACTORY = MessageFactory.newInstance(SOAPConstants.SOAP_1_2_PROTOCOL);
+            _SOAP_FACTORY = SOAPFactory.newInstance(SOAPConstants.SOAP_1_2_PROTOCOL);
+        }
+        
+        catch (SOAPException error)
+        {
+            throw new RuntimeException(error.getMessage(), error);
+        }
+    }
+    
+    @Override
+    protected Environment createEnvironment() 
+    {
+        MessageContext mc = wsContext.getMessageContext();
+        return new JaxWsEnvironment(mc);
+    }
+    
+	@PostConstruct
+    public void init()
+    {
+        if (!hasBeenInitialized())
+            initialize();
+    }
+    
+	public SOAPMessage invoke(SOAPMessage request)
+    {
+        try
+        {
+            return invokeOperation(request);
+        }
+        
+        //
+        // jax-ws won't let us through a SOAPException - this would 
+        // results from mis-configuration of the SAAJ API, so we 
+        // re-throw as a runtime exception
+        //
+        catch (Throwable error)
+        {
+            throw new RuntimeException(error.getMessage(), error);
+        }
+    }
+    
+    protected Element invokeOperation(MessageHeaders addressing, Element soapBody) 
+    {
+		Environment env = getRouter().getEnvironment();
+        env.addAddressingContext(addressing);
+
+        Element soapResponse = null;
+        
+        //
+        // if the initialization failed, there will be a fault 
+        // waiting to be serialized/sent back
+        //
+        if (hasFailedToInitialize())
+            soapResponse = getCauseOfFailure().toXML();
+        
+        //
+        // otherwise, proceed as normal with routing
+        //
+        else
+            soapResponse = getRouter().invoke(soapBody);
+        
+        //
+        // all done - don't forget to clean up the context or 
+        // we'll have a memory leak
+        //
+        env.removeAddressingContext();
+        
+		return soapResponse;
+	}
+	
+	protected SOAPMessage invokeOperation(SOAPMessage request)
+        throws SOAPException, SoapFault
+    {
+        SOAPEnvelope env = request.getSOAPPart().getEnvelope();
+        
+        if (!hasFailedToInitialize())
+            LoggingUtils.logMessage(getRouter().getLog(), env, true);
+        
+		SOAPMessage response = _MESSAGE_FACTORY.createMessage();
+        
+		Element soapHeader = env.getHeader();
+        Element soapBody = null;
+        
+        //
+        // handle empty SOAP bodies
+        //
+        if (env.getBody().hasChildNodes()) 
+            soapBody = XmlUtils.getFirstElement(env.getBody());
+
+		MessageHeaders addressing = new MessageHeaders(soapHeader);
+        
+        //
+        // forward to Muse framework and invoke actual user code
+        //
+        Element responseElement = invokeOperation(addressing, soapBody);
+        
+        //
+        // create response envelope
+        //
+        SOAPEnvelope responseEnv = response.getSOAPPart().getEnvelope();
+        SOAPHeader responseHeader = responseEnv.getHeader();
+        SOAPBody responseBody =responseEnv.getBody();
+        
+        if(responseHeader == null)
+            responseHeader = responseEnv.addHeader();
+        
+        //
+        // convert DOM -> SAAJ and add to response body
+        //
+    	SOAPElement soapElement = _SOAP_FACTORY.createElement(responseElement);
+        responseBody.addChildElement(soapElement);
+        
+        MessageHeaders replyAddressing = null;
+        
+        //
+        // send back fault headers on exception
+        //
+        if (SoapUtils.isFault(soapElement))
+            replyAddressing = addressing.createFaultHeaders();
+        
+        else
+            replyAddressing = addressing.createReplyHeaders();
+                    
+        Element replyAddressingXML = replyAddressing.toXML();
+        Element[] children = XmlUtils.getAllElements(replyAddressingXML);
+        Document responseDoc = responseEnv.getOwnerDocument();
+        
+        for (int n = 0; n < children.length; ++n)
+        {
+            Element next = (Element)responseDoc.importNode(children[n], true);
+            responseHeader.appendChild(next);
+        }
+        
+        if (!hasFailedToInitialize())
+            LoggingUtils.logMessage(getRouter().getLog(), responseEnv, false);
+        
+        return response;
+	}
+}

Modified: webservices/muse/trunk/modules/preview/muse-wsrt-api/src/org/apache/muse/ws/resource/transfer/AttributeNode.java
URL: http://svn.apache.org/viewvc/webservices/muse/trunk/modules/preview/muse-wsrt-api/src/org/apache/muse/ws/resource/transfer/AttributeNode.java?view=diff&rev=522026&r1=522025&r2=522026
==============================================================================
--- webservices/muse/trunk/modules/preview/muse-wsrt-api/src/org/apache/muse/ws/resource/transfer/AttributeNode.java (original)
+++ webservices/muse/trunk/modules/preview/muse-wsrt-api/src/org/apache/muse/ws/resource/transfer/AttributeNode.java Sat Mar 24 06:24:32 2007
@@ -1,34 +1,38 @@
-/*=============================================================================*
- *  Copyright 2006 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.muse.ws.resource.transfer;
-
-import org.apache.muse.util.xml.XmlSerializable;
-
-/**
- * Models the wsrt:AttributeNode element
- * 
- * @author Mohammad Fakhar
- * 
- */
-
-public interface AttributeNode extends XmlSerializable
-{
-
-    public String getAttributeName();
-
-    public String getAttributeValue();
-}
+/* 
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you 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.muse.ws.resource.transfer;
+
+import org.apache.muse.util.xml.XmlSerializable;
+
+/**
+ * Models the wsrt:AttributeNode element
+ * 
+ * @author Mohammad Fakhar
+ * 
+ */
+
+public interface AttributeNode extends XmlSerializable
+{
+
+    public String getAttributeName();
+
+    public String getAttributeValue();
+}

Modified: webservices/muse/trunk/modules/preview/muse-wsrt-api/src/org/apache/muse/ws/resource/transfer/EvaluativeExpression.java
URL: http://svn.apache.org/viewvc/webservices/muse/trunk/modules/preview/muse-wsrt-api/src/org/apache/muse/ws/resource/transfer/EvaluativeExpression.java?view=diff&rev=522026&r1=522025&r2=522026
==============================================================================
--- webservices/muse/trunk/modules/preview/muse-wsrt-api/src/org/apache/muse/ws/resource/transfer/EvaluativeExpression.java (original)
+++ webservices/muse/trunk/modules/preview/muse-wsrt-api/src/org/apache/muse/ws/resource/transfer/EvaluativeExpression.java Sat Mar 24 06:24:32 2007
@@ -1,87 +1,90 @@
-/*=============================================================================*
- *  Copyright 2006 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.muse.ws.resource.transfer;
-
-import org.w3c.dom.Node;
-
-import org.apache.muse.ws.resource.transfer.faults.InvalidExpressionFault;
-
-/**
- * EvaluativeExpression is the interface for modeling the notion of WS-RT
- * expressions that are evaluated by some processor.
- * 
- * @see org.apache.muse.ws.resource.transfer.impl.XPathExpression
- * 
- * @author Mohammad Fakhar
- * 
- */
-
-public interface EvaluativeExpression extends Expression
-{
-
-    /**
-     * Evaluates the expression to determine target nodes.
-     * 
-     * @throws InvalidExpressionFault
-     *             <ul>
-     *             <li>If the expression was deemed invalid by the implementing
-     *             class </li>
-     *             </ul>
-     */
-    public void evaluate() throws InvalidExpressionFault;
-
-    /**
-     * WS-RT expressions are evaluated on a DOM representation of the WS-RT
-     * resource. And this DOM representation of resource is set by the WS-RT
-     * engine at runtime before evaluating the expression, so that the
-     * expression impelementation has the resource's latest representation on
-     * which to evaluate the expression.
-     * 
-     * @param domToQuery
-     * 
-     */
-    public void setDomToQuery(Node domToQuery);
-
-    /**
-     * A convenience method that returns the Expression's current DOM on which
-     * expressions are evaluated.
-     */
-    public Node getDomToQuery();
-
-    /**
-     * Some EvaluativeExpressions use name space bound expressions, eg: XPath
-     * expressions. So the underlying expression implementation can resolve
-     * those namespaces, a setNSContextNode method is provided, which gives the
-     * implementation a location in the DOM from which to to resolve namespaces
-     * in the expression.
-     * 
-     * It is the responsibility of the WS-RT engine to set the context node at
-     * runtime, so expressions can successfully evaluate namespaces.
-     * 
-     * @param contextNode
-     * 
-     */
-    public void setNSContextNode(Node contextNode);
-
-    /**
-     * A convenience method that returns the Expression's current context node
-     * from which namespaces used in expressions are evaluated.
-     */
-    public Node getNSContextNode();
-
-}
+/* 
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you 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.muse.ws.resource.transfer;
+
+import org.w3c.dom.Node;
+
+import org.apache.muse.ws.resource.transfer.faults.InvalidExpressionFault;
+
+/**
+ * EvaluativeExpression is the interface for modeling the notion of WS-RT
+ * expressions that are evaluated by some processor.
+ * 
+ * @see org.apache.muse.ws.resource.transfer.impl.XPathExpression
+ * 
+ * @author Mohammad Fakhar
+ * 
+ */
+
+public interface EvaluativeExpression extends Expression
+{
+
+    /**
+     * Evaluates the expression to determine target nodes.
+     * 
+     * @throws InvalidExpressionFault
+     *             <ul>
+     *             <li>If the expression was deemed invalid by the implementing
+     *             class </li>
+     *             </ul>
+     */
+    public void evaluate() throws InvalidExpressionFault;
+
+    /**
+     * WS-RT expressions are evaluated on a DOM representation of the WS-RT
+     * resource. And this DOM representation of resource is set by the WS-RT
+     * engine at runtime before evaluating the expression, so that the
+     * expression impelementation has the resource's latest representation on
+     * which to evaluate the expression.
+     * 
+     * @param domToQuery
+     * 
+     */
+    public void setDomToQuery(Node domToQuery);
+
+    /**
+     * A convenience method that returns the Expression's current DOM on which
+     * expressions are evaluated.
+     */
+    public Node getDomToQuery();
+
+    /**
+     * Some EvaluativeExpressions use name space bound expressions, eg: XPath
+     * expressions. So the underlying expression implementation can resolve
+     * those namespaces, a setNSContextNode method is provided, which gives the
+     * implementation a location in the DOM from which to to resolve namespaces
+     * in the expression.
+     * 
+     * It is the responsibility of the WS-RT engine to set the context node at
+     * runtime, so expressions can successfully evaluate namespaces.
+     * 
+     * @param contextNode
+     * 
+     */
+    public void setNSContextNode(Node contextNode);
+
+    /**
+     * A convenience method that returns the Expression's current context node
+     * from which namespaces used in expressions are evaluated.
+     */
+    public Node getNSContextNode();
+
+}

Modified: webservices/muse/trunk/modules/preview/muse-wsrt-api/src/org/apache/muse/ws/resource/transfer/Expression.java
URL: http://svn.apache.org/viewvc/webservices/muse/trunk/modules/preview/muse-wsrt-api/src/org/apache/muse/ws/resource/transfer/Expression.java?view=diff&rev=522026&r1=522025&r2=522026
==============================================================================
--- webservices/muse/trunk/modules/preview/muse-wsrt-api/src/org/apache/muse/ws/resource/transfer/Expression.java (original)
+++ webservices/muse/trunk/modules/preview/muse-wsrt-api/src/org/apache/muse/ws/resource/transfer/Expression.java Sat Mar 24 06:24:32 2007
@@ -1,46 +1,49 @@
-/*=============================================================================*
- *  Copyright 2006 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.muse.ws.resource.transfer;
-
-import org.w3c.dom.Node;
-
-import org.apache.muse.util.xml.XmlSerializable;
-
-/**
- * Expression is the base interface for modeling the notion of WS-RT
- * expressions.
- * 
- * @see org.apache.muse.ws.resource.transfer.EvaluativeExpression
- * @see org.apache.muse.ws.resource.transfer.impl.QNameExpression
- * @see org.apache.muse.ws.resource.transfer.put.impl.PutInsertXPathExpression
- * 
- * @author Mohammad Fakhar
- * 
- */
-
-public interface Expression extends XmlSerializable
-{
-
-    /**
-     * 
-     * Returns the nodes targetted by this expression
-     * 
-     */
-    public Node[] getTargetNodes();
-
-}
+/* 
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you 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.muse.ws.resource.transfer;
+
+import org.w3c.dom.Node;
+
+import org.apache.muse.util.xml.XmlSerializable;
+
+/**
+ * Expression is the base interface for modeling the notion of WS-RT
+ * expressions.
+ * 
+ * @see org.apache.muse.ws.resource.transfer.EvaluativeExpression
+ * @see org.apache.muse.ws.resource.transfer.impl.QNameExpression
+ * @see org.apache.muse.ws.resource.transfer.put.impl.PutInsertXPathExpression
+ * 
+ * @author Mohammad Fakhar
+ * 
+ */
+
+public interface Expression extends XmlSerializable
+{
+
+    /**
+     * 
+     * Returns the nodes targetted by this expression
+     * 
+     */
+    public Node[] getTargetNodes();
+
+}

Modified: webservices/muse/trunk/modules/preview/muse-wsrt-api/src/org/apache/muse/ws/resource/transfer/ExpressionFactory.java
URL: http://svn.apache.org/viewvc/webservices/muse/trunk/modules/preview/muse-wsrt-api/src/org/apache/muse/ws/resource/transfer/ExpressionFactory.java?view=diff&rev=522026&r1=522025&r2=522026
==============================================================================
--- webservices/muse/trunk/modules/preview/muse-wsrt-api/src/org/apache/muse/ws/resource/transfer/ExpressionFactory.java (original)
+++ webservices/muse/trunk/modules/preview/muse-wsrt-api/src/org/apache/muse/ws/resource/transfer/ExpressionFactory.java Sat Mar 24 06:24:32 2007
@@ -1,92 +1,95 @@
-/*=============================================================================*
- *  Copyright 2006 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.muse.ws.resource.transfer;
-
-import javax.xml.namespace.QName;
-
-import org.w3c.dom.Element;
-
-/**
- * ExpressionFactory is the interface which WS-RT clients use to create WS-RT
- * Expressions for requests they send to a WS-RT web service.
- * 
- * This interface serves the WS-RT engine as well, as it creates Expressions
- * from XML as well, which the engine uses to create Expression objects from
- * incoming WS-RT requests.
- * 
- * @see org.apache.muse.ws.resource.transfer.impl.SimpleExpressionFactory
- * 
- * @author Mohammad Fakhar
- * 
- */
-
-public interface ExpressionFactory
-{
-
-    /**
-     * Given a QName, creates a QName dialect expression.
-     * 
-     * @param property
-     * 
-     */
-    public Expression createQNameExpression(QName property);
-
-    /**
-     * Given an XPath string, creates an XPath expression
-     * 
-     * @param xpath
-     * 
-     */
-    public Expression createXPathExpression(String xpath);
-
-    /**
-     * Given an XPath string that uses namespaces and an array of namespaces
-     * used in the XPath, creates an XPath expression
-     * 
-     * @param xpath
-     * @param namespaces
-     */
-    public Expression createXPathExpression(String xpath, QName[] namespaces);
-
-    /**
-     * Given a WS-RT Expression element and a dialect, creates the appropriate
-     * expression. This is used by WS-RT engines to create expressions from
-     * incoming WS-RT requests
-     * 
-     * @param xml
-     * @param dialect
-     */
-    public Expression createExpression(Element xml, String dialect);
-
-    /**
-     * Given a WS-RT Expression element, creates the QName dialect
-     * expression. This is used by WS-RT engines.
-     * 
-     * @param xml
-     */
-    public Expression createQNameExpression(Element xml);
-
-    /**
-     * Given a WS-RT Expression element, creates the XPath dialect expression.
-     * This is used by WS-RT engines.
-     * 
-     * @param xml
-     */
-    public Expression createXPathExpression(Element xml);
-
-}
+/* 
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you 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.muse.ws.resource.transfer;
+
+import javax.xml.namespace.QName;
+
+import org.w3c.dom.Element;
+
+/**
+ * ExpressionFactory is the interface which WS-RT clients use to create WS-RT
+ * Expressions for requests they send to a WS-RT web service.
+ * 
+ * This interface serves the WS-RT engine as well, as it creates Expressions
+ * from XML as well, which the engine uses to create Expression objects from
+ * incoming WS-RT requests.
+ * 
+ * @see org.apache.muse.ws.resource.transfer.impl.SimpleExpressionFactory
+ * 
+ * @author Mohammad Fakhar
+ * 
+ */
+
+public interface ExpressionFactory
+{
+
+    /**
+     * Given a QName, creates a QName dialect expression.
+     * 
+     * @param property
+     * 
+     */
+    public Expression createQNameExpression(QName property);
+
+    /**
+     * Given an XPath string, creates an XPath expression
+     * 
+     * @param xpath
+     * 
+     */
+    public Expression createXPathExpression(String xpath);
+
+    /**
+     * Given an XPath string that uses namespaces and an array of namespaces
+     * used in the XPath, creates an XPath expression
+     * 
+     * @param xpath
+     * @param namespaces
+     */
+    public Expression createXPathExpression(String xpath, QName[] namespaces);
+
+    /**
+     * Given a WS-RT Expression element and a dialect, creates the appropriate
+     * expression. This is used by WS-RT engines to create expressions from
+     * incoming WS-RT requests
+     * 
+     * @param xml
+     * @param dialect
+     */
+    public Expression createExpression(Element xml, String dialect);
+
+    /**
+     * Given a WS-RT Expression element, creates the QName dialect
+     * expression. This is used by WS-RT engines.
+     * 
+     * @param xml
+     */
+    public Expression createQNameExpression(Element xml);
+
+    /**
+     * Given a WS-RT Expression element, creates the XPath dialect expression.
+     * This is used by WS-RT engines.
+     * 
+     * @param xml
+     */
+    public Expression createXPathExpression(Element xml);
+
+}

Modified: webservices/muse/trunk/modules/preview/muse-wsrt-api/src/org/apache/muse/ws/resource/transfer/Fragment.java
URL: http://svn.apache.org/viewvc/webservices/muse/trunk/modules/preview/muse-wsrt-api/src/org/apache/muse/ws/resource/transfer/Fragment.java?view=diff&rev=522026&r1=522025&r2=522026
==============================================================================
--- webservices/muse/trunk/modules/preview/muse-wsrt-api/src/org/apache/muse/ws/resource/transfer/Fragment.java (original)
+++ webservices/muse/trunk/modules/preview/muse-wsrt-api/src/org/apache/muse/ws/resource/transfer/Fragment.java Sat Mar 24 06:24:32 2007
@@ -1,76 +1,79 @@
-/*=============================================================================*
- *  Copyright 2006 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.muse.ws.resource.transfer;
-
-import org.w3c.dom.Node;
-
-import org.apache.muse.util.xml.XmlSerializable;
-
-/**
- * Fragment is the base interface for modeling the notion of WS-RT fragments.
- * All WS-RT fragments are compose of a WS-RT Expression and zero or 1 WS-RT
- * Value, where a value is a collection of Nodes. WS-RT values can be text
- * nodes, element nodes or mixed content.
- * 
- * @see org.apache.muse.ws.resource.transfer.impl.SimpleFragment
- * @see org.apache.muse.ws.resource.transfer.WsrtConstants
- * 
- * @author Mohammad Fakhar
- * 
- */
-
-public interface Fragment extends XmlSerializable
-{
-
-    /**
-     * Returns the WS-RT Expression of this fragment
-     */
-    public Expression getExpression();
-
-    /**
-     * Set the WS-RT Expression of this fragment
-     */
-    public void setExpression(Expression expression);
-
-    /**
-     */
-    public String getMode();
-
-    /**
-     * Sets the mode of this fragment. Fragment mode constants are in the
-     * WsrtConstants class
-     * 
-     * @param mode
-     * 
-     * @see org.apache.muse.ws.resource.transfer.WsrtConstants
-     */
-    public void setMode(String mode);
-
-    /**
-     * Gets the WS-RT value of this fragment.
-     */
-    public Node[] getValue();
-
-    /**
-     * Sets the WS-RT value of this fragment.
-     * 
-     * @param value
-     */
-    public void setValue(Node[] value);
-
-}
+/* 
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you 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.muse.ws.resource.transfer;
+
+import org.w3c.dom.Node;
+
+import org.apache.muse.util.xml.XmlSerializable;
+
+/**
+ * Fragment is the base interface for modeling the notion of WS-RT fragments.
+ * All WS-RT fragments are compose of a WS-RT Expression and zero or 1 WS-RT
+ * Value, where a value is a collection of Nodes. WS-RT values can be text
+ * nodes, element nodes or mixed content.
+ * 
+ * @see org.apache.muse.ws.resource.transfer.impl.SimpleFragment
+ * @see org.apache.muse.ws.resource.transfer.WsrtConstants
+ * 
+ * @author Mohammad Fakhar
+ * 
+ */
+
+public interface Fragment extends XmlSerializable
+{
+
+    /**
+     * Returns the WS-RT Expression of this fragment
+     */
+    public Expression getExpression();
+
+    /**
+     * Set the WS-RT Expression of this fragment
+     */
+    public void setExpression(Expression expression);
+
+    /**
+     */
+    public String getMode();
+
+    /**
+     * Sets the mode of this fragment. Fragment mode constants are in the
+     * WsrtConstants class
+     * 
+     * @param mode
+     * 
+     * @see org.apache.muse.ws.resource.transfer.WsrtConstants
+     */
+    public void setMode(String mode);
+
+    /**
+     * Gets the WS-RT value of this fragment.
+     */
+    public Node[] getValue();
+
+    /**
+     * Sets the WS-RT value of this fragment.
+     * 
+     * @param value
+     */
+    public void setValue(Node[] value);
+
+}

Modified: webservices/muse/trunk/modules/preview/muse-wsrt-api/src/org/apache/muse/ws/resource/transfer/FragmentFactory.java
URL: http://svn.apache.org/viewvc/webservices/muse/trunk/modules/preview/muse-wsrt-api/src/org/apache/muse/ws/resource/transfer/FragmentFactory.java?view=diff&rev=522026&r1=522025&r2=522026
==============================================================================
--- webservices/muse/trunk/modules/preview/muse-wsrt-api/src/org/apache/muse/ws/resource/transfer/FragmentFactory.java (original)
+++ webservices/muse/trunk/modules/preview/muse-wsrt-api/src/org/apache/muse/ws/resource/transfer/FragmentFactory.java Sat Mar 24 06:24:32 2007
@@ -1,73 +1,76 @@
-/*=============================================================================*
- *  Copyright 2006 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.muse.ws.resource.transfer;
-
-import org.w3c.dom.Element;
-import org.w3c.dom.Node;
-
-/**
- * FragmentFactory is the base interface which WS-RT Clients use to create WS-RT
- * Fragments for sending requests to WS-RT Web services.
- * 
- * This interface serves the WS-RT engine as well, as its capabable of creating
- * Fragments from XML, which the engine uses to create Fragment objects from
- * incoming WS-RT requests.
- * 
- * @see org.apache.muse.ws.resource.transfer.Fragment
- * @see org.apache.muse.ws.resource.transfer.Expression
- * @see org.apache.muse.ws.resource.transfer.impl.SimpleFragmentFactory
- * @see org.apache.muse.ws.resource.transfer.WsrtConstants
- * 
- * @author Mohammad Fakhar
- */
-
-public interface FragmentFactory
-{
-    /**
-     * Given a WS-RT Expression, a fragment mode and a node array of values,
-     * creates a WS-RT Fragment.
-     * 
-     * @param expression
-     * @param mode -
-     *            if a null mode is passed (for WS-RT Create operations), it
-     *            defaults to WsrtConstants.FRAGMENT_MODE_INSERT
-     * @param value
-     * 
-     * @see org.apache.muse.ws.resource.transfer.WsrtConstants
-     */
-    public Fragment createFragment(Expression expression, String mode, Node[] value);
-
-    /**
-     * Given the XML for a WS-RT Put request, returns an array of Fragment
-     * objects. This is used by WS-RT engines.
-     * 
-     * @param request
-     * @param dialect
-     */
-    public Fragment[] createFragments(Element request, String dialect);
-
-    /**
-     * Given the XML for a WS-RT Fragment and a dialect returns a Fragment
-     * object. This is used by WS-RT engines.
-     * 
-     * @param fragmentXML
-     * @param dialect
-     */
-    public Fragment createFragment(Element fragmentXML, String dialect);
-
-}
+/* 
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you 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.muse.ws.resource.transfer;
+
+import org.w3c.dom.Element;
+import org.w3c.dom.Node;
+
+/**
+ * FragmentFactory is the base interface which WS-RT Clients use to create WS-RT
+ * Fragments for sending requests to WS-RT Web services.
+ * 
+ * This interface serves the WS-RT engine as well, as its capabable of creating
+ * Fragments from XML, which the engine uses to create Fragment objects from
+ * incoming WS-RT requests.
+ * 
+ * @see org.apache.muse.ws.resource.transfer.Fragment
+ * @see org.apache.muse.ws.resource.transfer.Expression
+ * @see org.apache.muse.ws.resource.transfer.impl.SimpleFragmentFactory
+ * @see org.apache.muse.ws.resource.transfer.WsrtConstants
+ * 
+ * @author Mohammad Fakhar
+ */
+
+public interface FragmentFactory
+{
+    /**
+     * Given a WS-RT Expression, a fragment mode and a node array of values,
+     * creates a WS-RT Fragment.
+     * 
+     * @param expression
+     * @param mode -
+     *            if a null mode is passed (for WS-RT Create operations), it
+     *            defaults to WsrtConstants.FRAGMENT_MODE_INSERT
+     * @param value
+     * 
+     * @see org.apache.muse.ws.resource.transfer.WsrtConstants
+     */
+    public Fragment createFragment(Expression expression, String mode, Node[] value);
+
+    /**
+     * Given the XML for a WS-RT Put request, returns an array of Fragment
+     * objects. This is used by WS-RT engines.
+     * 
+     * @param request
+     * @param dialect
+     */
+    public Fragment[] createFragments(Element request, String dialect);
+
+    /**
+     * Given the XML for a WS-RT Fragment and a dialect returns a Fragment
+     * object. This is used by WS-RT engines.
+     * 
+     * @param fragmentXML
+     * @param dialect
+     */
+    public Fragment createFragment(Element fragmentXML, String dialect);
+
+}

Modified: webservices/muse/trunk/modules/preview/muse-wsrt-api/src/org/apache/muse/ws/resource/transfer/OperationResult.java
URL: http://svn.apache.org/viewvc/webservices/muse/trunk/modules/preview/muse-wsrt-api/src/org/apache/muse/ws/resource/transfer/OperationResult.java?view=diff&rev=522026&r1=522025&r2=522026
==============================================================================
--- webservices/muse/trunk/modules/preview/muse-wsrt-api/src/org/apache/muse/ws/resource/transfer/OperationResult.java (original)
+++ webservices/muse/trunk/modules/preview/muse-wsrt-api/src/org/apache/muse/ws/resource/transfer/OperationResult.java Sat Mar 24 06:24:32 2007
@@ -1,39 +1,42 @@
-/*=============================================================================*
- *  Copyright 2006 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.muse.ws.resource.transfer;
-
-import org.w3c.dom.Element;
-
-import org.apache.muse.util.xml.XmlSerializable;
-
-/**
- * Models wsrt:Result elements
- * 
- * @author Mohammad Fakhar
- * 
- */
-
-public interface OperationResult extends XmlSerializable
-{
-
-    public Element[] getElements();
-
-    public AttributeNode[] getAttributes();
-
-    public TextNode[] getText();
-}
+/* 
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you 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.muse.ws.resource.transfer;
+
+import org.w3c.dom.Element;
+
+import org.apache.muse.util.xml.XmlSerializable;
+
+/**
+ * Models wsrt:Result elements
+ * 
+ * @author Mohammad Fakhar
+ * 
+ */
+
+public interface OperationResult extends XmlSerializable
+{
+
+    public Element[] getElements();
+
+    public AttributeNode[] getAttributes();
+
+    public TextNode[] getText();
+}

Modified: webservices/muse/trunk/modules/preview/muse-wsrt-api/src/org/apache/muse/ws/resource/transfer/TextNode.java
URL: http://svn.apache.org/viewvc/webservices/muse/trunk/modules/preview/muse-wsrt-api/src/org/apache/muse/ws/resource/transfer/TextNode.java?view=diff&rev=522026&r1=522025&r2=522026
==============================================================================
--- webservices/muse/trunk/modules/preview/muse-wsrt-api/src/org/apache/muse/ws/resource/transfer/TextNode.java (original)
+++ webservices/muse/trunk/modules/preview/muse-wsrt-api/src/org/apache/muse/ws/resource/transfer/TextNode.java Sat Mar 24 06:24:32 2007
@@ -1,33 +1,36 @@
-/*=============================================================================*
- *  Copyright 2006 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.muse.ws.resource.transfer;
-
-import org.apache.muse.util.xml.XmlSerializable;
-
-/**
- * Models the wsrt:TextNode elements
- * 
- * @author Mohammad Fakhar
- * 
- */
-
-public interface TextNode extends XmlSerializable
-{
-
-    public String getTextValue();
-}
+/* 
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you 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.muse.ws.resource.transfer;
+
+import org.apache.muse.util.xml.XmlSerializable;
+
+/**
+ * Models the wsrt:TextNode elements
+ * 
+ * @author Mohammad Fakhar
+ * 
+ */
+
+public interface TextNode extends XmlSerializable
+{
+
+    public String getTextValue();
+}

Modified: webservices/muse/trunk/modules/preview/muse-wsrt-api/src/org/apache/muse/ws/resource/transfer/WsrtConstants.java
URL: http://svn.apache.org/viewvc/webservices/muse/trunk/modules/preview/muse-wsrt-api/src/org/apache/muse/ws/resource/transfer/WsrtConstants.java?view=diff&rev=522026&r1=522025&r2=522026
==============================================================================
--- webservices/muse/trunk/modules/preview/muse-wsrt-api/src/org/apache/muse/ws/resource/transfer/WsrtConstants.java (original)
+++ webservices/muse/trunk/modules/preview/muse-wsrt-api/src/org/apache/muse/ws/resource/transfer/WsrtConstants.java Sat Mar 24 06:24:32 2007
@@ -1,145 +1,148 @@
-/*=============================================================================*
- *  Copyright 2006 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.muse.ws.resource.transfer;
-
-import javax.xml.namespace.QName;
-
-/**
- * 
- * WsrtConstants is a collection of constants defined in the WS-ResourceTransfer
- * and WS-Transfer specifications.
- * 
- * @author Mohammad Fakhar
- * 
- */
-
-public class WsrtConstants
-{
-
-    public static final String WST_NAMESPACE_URI = "http://schemas.xmlsoap.org/ws/2004/09/transfer";
-
-    public static final String WSRT_NAMESPACE_URI = "http://schemas.xmlsoap.org/ws/200Y/MM/resourceTransfer";
-
-    public static final String MEX_NAMESPACE_URI = "http://schemas.xmlsoap.org/ws/2004/09/mex";
-
-    public static final String WSX_PREFIX = "wxf";
-
-    public static final String WSRT_PREFIX = "wsrt";
-
-    public static final String MEX_PREFIX = "mex";
-
-    public static final String RESULT_ATTRIBUTE_NAME = "name";
-
-    public static final String GET_URI = WST_NAMESPACE_URI + "/Get";
-    
-    public static final String RESOURCE_TRANSFER_LOCALNAME= "ResourceTransfer";
-    
-    public static final QName GET_QNAME = new QName(WSRT_NAMESPACE_URI, "Get", WSRT_PREFIX);
-
-    public static final QName RESOURCE_TRANSFER_QNAME = new QName(WSRT_NAMESPACE_URI, "ResourceTransfer", WSRT_PREFIX);
-    
-    public static final QName GET_RESPONSE_QNAME = new QName(WSRT_NAMESPACE_URI, "GetResponse",
-            WSRT_PREFIX);
-
-    public static final String PUT_URI = WST_NAMESPACE_URI + "/Put";
-
-    public static final QName PUT_QNAME = new QName(WSRT_NAMESPACE_URI, "Put", WSRT_PREFIX);
-
-    public static final String CREATE_URI = WST_NAMESPACE_URI + "/Create";
-
-    public static final QName CREATE_QNAME = new QName(WSRT_NAMESPACE_URI, "Create", WSRT_PREFIX);
-
-    public static final QName RESOURCE_CREATED_QNAME = new QName(WST_NAMESPACE_URI,
-            "ResourceCreated", WSX_PREFIX);
-
-    public static final String DELETE_URI = WST_NAMESPACE_URI + "/Delete";
-
-    public static final QName METADATA_QNAME = new QName(MEX_NAMESPACE_URI, "SimpleMetadata",
-            MEX_PREFIX);
-
-    public static final QName METADATA_SECTION_QNAME = new QName(MEX_NAMESPACE_URI,
-            "SimpleMetadataSection", MEX_PREFIX);
-
-    public static final QName WSRT_METADATA_QNAME = new QName(WSRT_NAMESPACE_URI, "SimpleMetadata",
-            WSRT_PREFIX);
-
-    public static final QName WSRT_LIFETIME_QNAME = new QName(WSRT_NAMESPACE_URI, "Lifetime",
-            WSRT_PREFIX);
-
-    public static final QName WSRT_TERMINATEAT_QNAME = new QName(WSRT_NAMESPACE_URI, "TerminateAt",
-            WSRT_PREFIX);
-
-    public static final String DIALECT_ATTR_NAME = "Dialect";
-
-    public static final String QNAME_DIALECT = WSRT_NAMESPACE_URI + "/Dialect/QName";
-
-    public static final String XPATH_LEVEL1_DIALECT = WSRT_NAMESPACE_URI + "/Dialect/XPath-Level-1";
-
-    public static final QName DIALECTS_QNAME_NAME = new QName(WSRT_NAMESPACE_URI, "Dialects",
-            WSRT_PREFIX);
-
-    public static final QName EXPRESSION_QNAME = new QName(WSRT_NAMESPACE_URI, "Expression",
-            WSRT_PREFIX);
-
-    public static final QName RESULT_QNAME = new QName(WSRT_NAMESPACE_URI, "Result", WSRT_PREFIX);
-
-    public static final QName RESULT_TEXT_QNAME = new QName(WSRT_NAMESPACE_URI, "TextNode",
-            WSRT_PREFIX);
-
-    public static final QName RESULT_ATTRIBUTE_QNAME = new QName(WSRT_NAMESPACE_URI, "TextNode",
-            WSRT_PREFIX);
-
-    public static final QName VALUE_QNAME = new QName(WSRT_NAMESPACE_URI, "Value", WSRT_PREFIX);
-
-    public static final QName FRAGMENT_QNAME = new QName(WSRT_NAMESPACE_URI, "Fragment",
-            WSRT_PREFIX);
-
-    public static final String FRAGMENT_MODE_ATTR = "Mode";
-
-    public static final String FRAGMENT_MODE_MODIFY = "Modify";
-
-    public static final String FRAGMENT_MODE_INSERT = "Insert";
-
-    public static final String FRAGMENT_MODE_REMOVE = "Remove";
-
-    public static final QName UNSUPPORTED_DIALECT = new QName(WSRT_NAMESPACE_URI,
-            "UnsupportedDialectFault", WSRT_PREFIX);
-
-    public static final QName INVALID_EXPRESSION = new QName(WSRT_NAMESPACE_URI,
-            "InvalidExpressionFault", WSRT_PREFIX);
-
-    public static final QName GET_FAULT = new QName(WSRT_NAMESPACE_URI, "GetFault", WSRT_PREFIX);
-
-    public static final QName RESOURCE_VALIDATION_FAULT = new QName(WSRT_NAMESPACE_URI,
-            "ResourceValidationFault", WSRT_PREFIX);
-
-    public static final QName FRAGMENT_ALREADY_EXISTS = new QName(WSRT_NAMESPACE_URI,
-            "FragmentAlreadyExistsFault", WSRT_PREFIX);
-
-    public static final QName PUT_FAULT = new QName(WSRT_NAMESPACE_URI, "PutFault", WSRT_PREFIX);
-
-    public static final QName PUTMODE_UNSUPPORTED = new QName(WSRT_NAMESPACE_URI,
-            "PutModeUnsupportedFault", WSRT_PREFIX);
-
-    public static final QName CREATE_FAULT = new QName(WSRT_NAMESPACE_URI, "CreateFault",
-            WSRT_PREFIX);
-
-    public static final QName INVALID_METADATA = new QName(WSRT_NAMESPACE_URI,
-            "InvalidMetadataFault", WSRT_PREFIX);
-
-}
+/* 
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you 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.muse.ws.resource.transfer;
+
+import javax.xml.namespace.QName;
+
+/**
+ * 
+ * WsrtConstants is a collection of constants defined in the WS-ResourceTransfer
+ * and WS-Transfer specifications.
+ * 
+ * @author Mohammad Fakhar
+ * 
+ */
+
+public class WsrtConstants
+{
+
+    public static final String WST_NAMESPACE_URI = "http://schemas.xmlsoap.org/ws/2004/09/transfer";
+
+    public static final String WSRT_NAMESPACE_URI = "http://schemas.xmlsoap.org/ws/200Y/MM/resourceTransfer";
+
+    public static final String MEX_NAMESPACE_URI = "http://schemas.xmlsoap.org/ws/2004/09/mex";
+
+    public static final String WSX_PREFIX = "wxf";
+
+    public static final String WSRT_PREFIX = "wsrt";
+
+    public static final String MEX_PREFIX = "mex";
+
+    public static final String RESULT_ATTRIBUTE_NAME = "name";
+
+    public static final String GET_URI = WST_NAMESPACE_URI + "/Get";
+    
+    public static final String RESOURCE_TRANSFER_LOCALNAME= "ResourceTransfer";
+    
+    public static final QName GET_QNAME = new QName(WSRT_NAMESPACE_URI, "Get", WSRT_PREFIX);
+
+    public static final QName RESOURCE_TRANSFER_QNAME = new QName(WSRT_NAMESPACE_URI, "ResourceTransfer", WSRT_PREFIX);
+    
+    public static final QName GET_RESPONSE_QNAME = new QName(WSRT_NAMESPACE_URI, "GetResponse",
+            WSRT_PREFIX);
+
+    public static final String PUT_URI = WST_NAMESPACE_URI + "/Put";
+
+    public static final QName PUT_QNAME = new QName(WSRT_NAMESPACE_URI, "Put", WSRT_PREFIX);
+
+    public static final String CREATE_URI = WST_NAMESPACE_URI + "/Create";
+
+    public static final QName CREATE_QNAME = new QName(WSRT_NAMESPACE_URI, "Create", WSRT_PREFIX);
+
+    public static final QName RESOURCE_CREATED_QNAME = new QName(WST_NAMESPACE_URI,
+            "ResourceCreated", WSX_PREFIX);
+
+    public static final String DELETE_URI = WST_NAMESPACE_URI + "/Delete";
+
+    public static final QName METADATA_QNAME = new QName(MEX_NAMESPACE_URI, "SimpleMetadata",
+            MEX_PREFIX);
+
+    public static final QName METADATA_SECTION_QNAME = new QName(MEX_NAMESPACE_URI,
+            "SimpleMetadataSection", MEX_PREFIX);
+
+    public static final QName WSRT_METADATA_QNAME = new QName(WSRT_NAMESPACE_URI, "SimpleMetadata",
+            WSRT_PREFIX);
+
+    public static final QName WSRT_LIFETIME_QNAME = new QName(WSRT_NAMESPACE_URI, "Lifetime",
+            WSRT_PREFIX);
+
+    public static final QName WSRT_TERMINATEAT_QNAME = new QName(WSRT_NAMESPACE_URI, "TerminateAt",
+            WSRT_PREFIX);
+
+    public static final String DIALECT_ATTR_NAME = "Dialect";
+
+    public static final String QNAME_DIALECT = WSRT_NAMESPACE_URI + "/Dialect/QName";
+
+    public static final String XPATH_LEVEL1_DIALECT = WSRT_NAMESPACE_URI + "/Dialect/XPath-Level-1";
+
+    public static final QName DIALECTS_QNAME_NAME = new QName(WSRT_NAMESPACE_URI, "Dialects",
+            WSRT_PREFIX);
+
+    public static final QName EXPRESSION_QNAME = new QName(WSRT_NAMESPACE_URI, "Expression",
+            WSRT_PREFIX);
+
+    public static final QName RESULT_QNAME = new QName(WSRT_NAMESPACE_URI, "Result", WSRT_PREFIX);
+
+    public static final QName RESULT_TEXT_QNAME = new QName(WSRT_NAMESPACE_URI, "TextNode",
+            WSRT_PREFIX);
+
+    public static final QName RESULT_ATTRIBUTE_QNAME = new QName(WSRT_NAMESPACE_URI, "TextNode",
+            WSRT_PREFIX);
+
+    public static final QName VALUE_QNAME = new QName(WSRT_NAMESPACE_URI, "Value", WSRT_PREFIX);
+
+    public static final QName FRAGMENT_QNAME = new QName(WSRT_NAMESPACE_URI, "Fragment",
+            WSRT_PREFIX);
+
+    public static final String FRAGMENT_MODE_ATTR = "Mode";
+
+    public static final String FRAGMENT_MODE_MODIFY = "Modify";
+
+    public static final String FRAGMENT_MODE_INSERT = "Insert";
+
+    public static final String FRAGMENT_MODE_REMOVE = "Remove";
+
+    public static final QName UNSUPPORTED_DIALECT = new QName(WSRT_NAMESPACE_URI,
+            "UnsupportedDialectFault", WSRT_PREFIX);
+
+    public static final QName INVALID_EXPRESSION = new QName(WSRT_NAMESPACE_URI,
+            "InvalidExpressionFault", WSRT_PREFIX);
+
+    public static final QName GET_FAULT = new QName(WSRT_NAMESPACE_URI, "GetFault", WSRT_PREFIX);
+
+    public static final QName RESOURCE_VALIDATION_FAULT = new QName(WSRT_NAMESPACE_URI,
+            "ResourceValidationFault", WSRT_PREFIX);
+
+    public static final QName FRAGMENT_ALREADY_EXISTS = new QName(WSRT_NAMESPACE_URI,
+            "FragmentAlreadyExistsFault", WSRT_PREFIX);
+
+    public static final QName PUT_FAULT = new QName(WSRT_NAMESPACE_URI, "PutFault", WSRT_PREFIX);
+
+    public static final QName PUTMODE_UNSUPPORTED = new QName(WSRT_NAMESPACE_URI,
+            "PutModeUnsupportedFault", WSRT_PREFIX);
+
+    public static final QName CREATE_FAULT = new QName(WSRT_NAMESPACE_URI, "CreateFault",
+            WSRT_PREFIX);
+
+    public static final QName INVALID_METADATA = new QName(WSRT_NAMESPACE_URI,
+            "InvalidMetadataFault", WSRT_PREFIX);
+
+}

Modified: webservices/muse/trunk/modules/preview/muse-wsrt-api/src/org/apache/muse/ws/resource/transfer/create/CreateCapability.java
URL: http://svn.apache.org/viewvc/webservices/muse/trunk/modules/preview/muse-wsrt-api/src/org/apache/muse/ws/resource/transfer/create/CreateCapability.java?view=diff&rev=522026&r1=522025&r2=522026
==============================================================================
--- webservices/muse/trunk/modules/preview/muse-wsrt-api/src/org/apache/muse/ws/resource/transfer/create/CreateCapability.java (original)
+++ webservices/muse/trunk/modules/preview/muse-wsrt-api/src/org/apache/muse/ws/resource/transfer/create/CreateCapability.java Sat Mar 24 06:24:32 2007
@@ -1,48 +1,51 @@
-/*=============================================================================*
- *  Copyright 2006 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.muse.ws.resource.transfer.create;
-
-import org.apache.muse.core.Capability;
-import org.apache.muse.ws.addressing.EndpointReference;
-import org.apache.muse.ws.addressing.soap.SoapFault;
-import org.apache.muse.ws.resource.transfer.faults.InvalidExpressionFault;
-
-/**
- * 
- * This is the Muse capability for the WS-RT Create operation. This capability
- * handles both WS-RT style fragmented creates with metadata and WS-Transfer
- * style creates where the entire resource property document is sent.
- * 
- * @author Mohammad Fakhar
- * 
- */
-
-public interface CreateCapability extends Capability
-{
-
-    /**
-     * This operation handles WS-RT create requests by acting on the resource
-     * data passed in.
-     * 
-     * @param resourceData
-     * @see ResourceData
-     */
-    public EndpointReference create(ResourceData resourceData) 
-        throws InvalidExpressionFault, CreateFault, InvalidMetadataFault, SoapFault;
-
-}
+/* 
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you 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.muse.ws.resource.transfer.create;
+
+import org.apache.muse.core.Capability;
+import org.apache.muse.ws.addressing.EndpointReference;
+import org.apache.muse.ws.addressing.soap.SoapFault;
+import org.apache.muse.ws.resource.transfer.faults.InvalidExpressionFault;
+
+/**
+ * 
+ * This is the Muse capability for the WS-RT Create operation. This capability
+ * handles both WS-RT style fragmented creates with metadata and WS-Transfer
+ * style creates where the entire resource property document is sent.
+ * 
+ * @author Mohammad Fakhar
+ * 
+ */
+
+public interface CreateCapability extends Capability
+{
+
+    /**
+     * This operation handles WS-RT create requests by acting on the resource
+     * data passed in.
+     * 
+     * @param resourceData
+     * @see ResourceData
+     */
+    public EndpointReference create(ResourceData resourceData) 
+        throws InvalidExpressionFault, CreateFault, InvalidMetadataFault, SoapFault;
+
+}

Modified: webservices/muse/trunk/modules/preview/muse-wsrt-api/src/org/apache/muse/ws/resource/transfer/create/CreateFault.java
URL: http://svn.apache.org/viewvc/webservices/muse/trunk/modules/preview/muse-wsrt-api/src/org/apache/muse/ws/resource/transfer/create/CreateFault.java?view=diff&rev=522026&r1=522025&r2=522026
==============================================================================
--- webservices/muse/trunk/modules/preview/muse-wsrt-api/src/org/apache/muse/ws/resource/transfer/create/CreateFault.java (original)
+++ webservices/muse/trunk/modules/preview/muse-wsrt-api/src/org/apache/muse/ws/resource/transfer/create/CreateFault.java Sat Mar 24 06:24:32 2007
@@ -1,48 +1,51 @@
-/*=============================================================================*
- *  Copyright 2006 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.muse.ws.resource.transfer.create;
-
-import org.w3c.dom.Element;
-
-import org.apache.muse.ws.resource.transfer.WsrtConstants;
-import org.apache.muse.ws.resource.transfer.faults.SenderFault;
-
-/**
- * Thrown by WS-RT create operations when valid create request fails
- * 
- * @author Mohammad Fakhar
- */
-
-public class CreateFault extends SenderFault
-{
-    public CreateFault(Element xml)
-    {
-        super(xml);
-    }
-
-    public CreateFault(String msg)
-    {
-        super(WsrtConstants.CREATE_FAULT, msg);
-    }
-
-    public CreateFault(Throwable th, String msg)
-    {
-        super(WsrtConstants.CREATE_FAULT, msg, th);
-    }
-
-}
+/* 
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you 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.muse.ws.resource.transfer.create;
+
+import org.w3c.dom.Element;
+
+import org.apache.muse.ws.resource.transfer.WsrtConstants;
+import org.apache.muse.ws.resource.transfer.faults.SenderFault;
+
+/**
+ * Thrown by WS-RT create operations when valid create request fails
+ * 
+ * @author Mohammad Fakhar
+ */
+
+public class CreateFault extends SenderFault
+{
+    public CreateFault(Element xml)
+    {
+        super(xml);
+    }
+
+    public CreateFault(String msg)
+    {
+        super(WsrtConstants.CREATE_FAULT, msg);
+    }
+
+    public CreateFault(Throwable th, String msg)
+    {
+        super(WsrtConstants.CREATE_FAULT, msg, th);
+    }
+
+}



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