axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sc...@apache.org
Subject svn commit: r498056 [2/3] - in /webservices/axis2/trunk/java/modules: jaxws/src/org/apache/axis2/jaxws/binding/ jaxws/src/org/apache/axis2/jaxws/client/ jaxws/src/org/apache/axis2/jaxws/client/async/ jaxws/src/org/apache/axis2/jaxws/client/proxy/ jaxws...
Date Sat, 20 Jan 2007 03:25:45 GMT
Modified: webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/message/factory/MessageFactory.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/message/factory/MessageFactory.java?view=diff&rev=498056&r1=498055&r2=498056
==============================================================================
--- webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/message/factory/MessageFactory.java (original)
+++ webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/message/factory/MessageFactory.java Fri Jan 19 19:25:43 2007
@@ -19,11 +19,11 @@
 import javax.xml.soap.SOAPMessage;
 import javax.xml.stream.XMLStreamException;
 import javax.xml.stream.XMLStreamReader;
+import javax.xml.ws.WebServiceException;
 
 import org.apache.axiom.om.OMElement;
 import org.apache.axis2.jaxws.message.Block;
 import org.apache.axis2.jaxws.message.Message;
-import org.apache.axis2.jaxws.message.MessageException;
 import org.apache.axis2.jaxws.message.Protocol;
 
 /**
@@ -43,14 +43,14 @@
 	 * @param reader XMLStreamReader
 	 * @throws XMLStreamException
 	 */
-	public Message createFrom(XMLStreamReader reader) throws XMLStreamException, MessageException;
+	public Message createFrom(XMLStreamReader reader) throws XMLStreamException, WebServiceException;
 	
 	/**
 	 * create Message with the xml from the OMElement
 	 * @param omElement OMElement
 	 * @throws XMLStreamException
 	 */
-	public Message createFrom(OMElement omElement) throws XMLStreamException, MessageException;
+	public Message createFrom(OMElement omElement) throws XMLStreamException, WebServiceException;
 	
 	/**
 	 * create Message from a Block
@@ -58,15 +58,15 @@
 	 * @param context Associated Context or null
 	 * @throws XMLStreamException
 	 */
-	public Message createFrom(Block other, Object context) throws XMLStreamException, MessageException;
+	public Message createFrom(Block other, Object context) throws XMLStreamException, WebServiceException;
 
 	/**
 	 * create Message from SOAPMessage
 	 * The xml and attachments from the SOAPMessage are used to populate the new Message
 	 * @param SOAPMessage
-	 * @throws XMLStreamException, MessageException
+	 * @throws XMLStreamException, WebServiceException
 	 */
-	public Message createFrom(SOAPMessage message) throws XMLStreamException, MessageException;
+	public Message createFrom(SOAPMessage message) throws XMLStreamException, WebServiceException;
 
 	
 	/**
@@ -74,5 +74,5 @@
 	 * @param protocol
 	 * @throws XMLStreamException
 	 */
-	public Message create(Protocol protocol) throws XMLStreamException, MessageException;
+	public Message create(Protocol protocol) throws XMLStreamException, WebServiceException;
 }

Modified: webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/message/factory/XMLPartFactory.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/message/factory/XMLPartFactory.java?view=diff&rev=498056&r1=498055&r2=498056
==============================================================================
--- webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/message/factory/XMLPartFactory.java (original)
+++ webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/message/factory/XMLPartFactory.java Fri Jan 19 19:25:43 2007
@@ -19,9 +19,9 @@
 import javax.xml.soap.SOAPEnvelope;
 import javax.xml.stream.XMLStreamException;
 import javax.xml.stream.XMLStreamReader;
+import javax.xml.ws.WebServiceException;
 
 import org.apache.axiom.om.OMElement;
-import org.apache.axis2.jaxws.message.MessageException;
 import org.apache.axis2.jaxws.message.Protocol;
 import org.apache.axis2.jaxws.message.XMLPart;
 
@@ -41,27 +41,27 @@
 	 * @param reader XMLStreamReader
 	 * @throws MessageStreamException
 	 */
-	public XMLPart createFrom(XMLStreamReader reader) throws XMLStreamException, MessageException;
+	public XMLPart createFrom(XMLStreamReader reader) throws XMLStreamException, WebServiceException;
 	
 	/**
 	 * create XMLPart from OMElement
 	 * @param omElement OMElement
-	 * @throws MessageException
+	 * @throws WebServiceException
 	 */
-	public XMLPart createFrom(OMElement omElement) throws XMLStreamException, MessageException;
+	public XMLPart createFrom(OMElement omElement) throws XMLStreamException, WebServiceException;
 	
 	/**
 	 * create XMLPart from SOAPEnvelope
 	 * @param soapEnvelope SOAPEnvelope
-	 * @throws MessageException
+	 * @throws WebServiceException
 	 */
-	public XMLPart createFrom(SOAPEnvelope soapEnvelope) throws XMLStreamException, MessageException;
+	public XMLPart createFrom(SOAPEnvelope soapEnvelope) throws XMLStreamException, WebServiceException;
 
 	/**
 	 * create empty XMLPart of the specified protocol
 	 * @param protocol
-	 * @throws MessageException
+	 * @throws WebServiceException
 	 */
-	public XMLPart create(Protocol protocol) throws XMLStreamException, MessageException;
+	public XMLPart create(Protocol protocol) throws XMLStreamException, WebServiceException;
 	
 }

Modified: webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/message/impl/BlockFactoryImpl.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/message/impl/BlockFactoryImpl.java?view=diff&rev=498056&r1=498055&r2=498056
==============================================================================
--- webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/message/impl/BlockFactoryImpl.java (original)
+++ webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/message/impl/BlockFactoryImpl.java Fri Jan 19 19:25:43 2007
@@ -19,11 +19,11 @@
 import javax.xml.namespace.QName;
 import javax.xml.stream.XMLStreamException;
 import javax.xml.stream.XMLStreamReader;
+import javax.xml.ws.WebServiceException;
 
 import org.apache.axiom.om.OMElement;
 import org.apache.axiom.om.impl.builder.StAXOMBuilder;
 import org.apache.axis2.jaxws.message.Block;
-import org.apache.axis2.jaxws.message.MessageException;
 import org.apache.axis2.jaxws.message.factory.BlockFactory;
 
 /**
@@ -39,7 +39,7 @@
 	/* (non-Javadoc)
 	 * @see org.apache.axis2.jaxws.message.BlockFactory#createFrom(org.apache.axis2.jaxws.message.Block, java.lang.Object)
 	 */
-	public Block createFrom(Block other, Object context) throws XMLStreamException, MessageException {
+	public Block createFrom(Block other, Object context) throws XMLStreamException, WebServiceException {
 		// This is the default behavior.  Derived Factories may
 		// provide a more performant implementation.
 		if (other.getBlockFactory().equals(this)) {
@@ -60,7 +60,7 @@
         return newBlock;
 	}
 
-	public Block createFrom(XMLStreamReader reader, Object context, QName qName) throws XMLStreamException, MessageException {
+	public Block createFrom(XMLStreamReader reader, Object context, QName qName) throws XMLStreamException, WebServiceException {
 		StAXOMBuilder builder = new StAXOMBuilder(reader);  
 		OMElement omElement = builder.getDocumentElement();
 		return createFrom(omElement, context, qName);

Modified: webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/message/impl/BlockImpl.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/message/impl/BlockImpl.java?view=diff&rev=498056&r1=498055&r2=498056
==============================================================================
--- webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/message/impl/BlockImpl.java (original)
+++ webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/message/impl/BlockImpl.java Fri Jan 19 19:25:43 2007
@@ -23,6 +23,7 @@
 import javax.xml.stream.XMLStreamException;
 import javax.xml.stream.XMLStreamReader;
 import javax.xml.stream.XMLStreamWriter;
+import javax.xml.ws.WebServiceException;
 
 import org.apache.axiom.om.OMElement;
 import org.apache.axiom.om.OMOutputFormat;
@@ -33,7 +34,6 @@
 import org.apache.axis2.jaxws.i18n.Messages;
 import org.apache.axis2.jaxws.message.Block;
 import org.apache.axis2.jaxws.message.Message;
-import org.apache.axis2.jaxws.message.MessageException;
 import org.apache.axis2.jaxws.message.XMLPart;
 import org.apache.axis2.jaxws.message.factory.BlockFactory;
 import org.apache.axis2.jaxws.message.util.Reader2Writer;
@@ -125,9 +125,9 @@
 	/* (non-Javadoc)
 	 * @see org.apache.axis2.jaxws.message.Block#getBusinessObject(boolean)
 	 */
-	public Object getBusinessObject(boolean consume) throws XMLStreamException, MessageException {
+	public Object getBusinessObject(boolean consume) throws XMLStreamException, WebServiceException {
 		if (consumed) {
-			throw ExceptionFactory.makeMessageException(Messages.getMessage("BlockImplErr1", this.getClass().getName()));
+			throw ExceptionFactory.makeWebServiceException(Messages.getMessage("BlockImplErr1", this.getClass().getName()));
 		}
 		if (busObject != null) {
 			busObject =  _getBOFromBO(busObject, busContext, consume);
@@ -153,7 +153,7 @@
 	/* (non-Javadoc)
 	 * @see org.apache.axis2.jaxws.message.Block#getQName()
 	 */
-	public QName getQName() throws MessageException {
+	public QName getQName() throws WebServiceException {
 		// If the QName is not known, find it
 		try {
 			if (qName == null) {
@@ -168,7 +168,7 @@
 			return qName;
 		} catch (Exception xse) {
             setConsumed(true);
-			throw ExceptionFactory.makeMessageException(xse);
+			throw ExceptionFactory.makeWebServiceException(xse);
 		}
 	}
 	
@@ -183,10 +183,10 @@
 	/* (non-Javadoc)
 	 * @see org.apache.axis2.jaxws.message.Block#getXMLStreamReader(boolean)
 	 */
-	public XMLStreamReader getXMLStreamReader(boolean consume) throws XMLStreamException, MessageException {
+	public XMLStreamReader getXMLStreamReader(boolean consume) throws XMLStreamException, WebServiceException {
 		XMLStreamReader newReader = null;
 		if (consumed) {
-			throw ExceptionFactory.makeMessageException(Messages.getMessage("BlockImplErr1", this.getClass().getName()));
+			throw ExceptionFactory.makeWebServiceException(Messages.getMessage("BlockImplErr1", this.getClass().getName()));
 		}
 		if (omElement != null) {
 			if (consume) {
@@ -212,11 +212,7 @@
 	 * @see org.apache.axiom.om.OMDataSource#getReader()
 	 */
 	public XMLStreamReader getReader() throws XMLStreamException {
-		try {
-			return getXMLStreamReader(true);
-		} catch (MessageException e) {
-			throw ExceptionFactory.makeMessageInternalException(null, e);
-		}
+	    return getXMLStreamReader(true);
 	}
 
 	/* (non-Javadoc)
@@ -242,18 +238,14 @@
 	 * @see org.apache.axiom.om.OMDataSource#serialize(javax.xml.stream.XMLStreamWriter)
 	 */
 	public void serialize(XMLStreamWriter writer) throws XMLStreamException {
-		try {
-			outputTo(writer, true);
-		} catch (MessageException e) {
-			throw ExceptionFactory.makeMessageInternalException(null, e);
-		}
+		outputTo(writer, true);
 	}
 
-	public OMElement getOMElement() throws XMLStreamException, MessageException {
+	public OMElement getOMElement() throws XMLStreamException, WebServiceException {
 		OMElement newOMElement = null;
 		boolean consume =true;  // get the OM consumes the message
 		if (consumed) {
-			throw ExceptionFactory.makeMessageException(Messages.getMessage("BlockImplErr1", this.getClass().getName()));
+			throw ExceptionFactory.makeWebServiceException(Messages.getMessage("BlockImplErr1", this.getClass().getName()));
 		}
 		if (omElement != null) {
 			newOMElement = omElement;
@@ -300,9 +292,9 @@
 		return (qName != null);
 	}
 
-	public void outputTo(XMLStreamWriter writer, boolean consume) throws XMLStreamException, MessageException {
+	public void outputTo(XMLStreamWriter writer, boolean consume) throws XMLStreamException, WebServiceException {
 		if (consumed) {
-			throw ExceptionFactory.makeMessageException(Messages.getMessage("BlockImplErr1", this.getClass().getName()));
+			throw ExceptionFactory.makeWebServiceException(Messages.getMessage("BlockImplErr1", this.getClass().getName()));
 		}
 		if (omElement != null) {
 			if (consume) {
@@ -352,7 +344,7 @@
 	 * @param busContext
 	 * @return
 	 */
-	protected abstract Object _getBOFromReader(XMLStreamReader reader, Object busContext) throws XMLStreamException, MessageException;
+	protected abstract Object _getBOFromReader(XMLStreamReader reader, Object busContext) throws XMLStreamException, WebServiceException;
 	
 	/**
 	 * Get an XMLStreamReader for the BusinessObject
@@ -361,7 +353,7 @@
 	 * @param busContext
 	 * @return
 	 */
-	protected abstract XMLStreamReader _getReaderFromBO(Object busObj, Object busContext) throws XMLStreamException, MessageException;
+	protected abstract XMLStreamReader _getReaderFromBO(Object busObj, Object busContext) throws XMLStreamException, WebServiceException;
 	
 	/**
 	 * Output Reader contents to a Writer.
@@ -382,8 +374,8 @@
 	 * @param busContext
 	 * @param writer
 	 * @throws XMLStreamException
-	 * @throws MessageException
+	 * @throws WebServiceException
 	 */
-	protected abstract void _outputFromBO(Object busObject, Object busContext, XMLStreamWriter writer) throws XMLStreamException, MessageException;
+	protected abstract void _outputFromBO(Object busObject, Object busContext, XMLStreamWriter writer) throws XMLStreamException, WebServiceException;
 	
 }

Modified: webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/message/impl/MessageFactoryImpl.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/message/impl/MessageFactoryImpl.java?view=diff&rev=498056&r1=498055&r2=498056
==============================================================================
--- webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/message/impl/MessageFactoryImpl.java (original)
+++ webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/message/impl/MessageFactoryImpl.java Fri Jan 19 19:25:43 2007
@@ -22,6 +22,7 @@
 import javax.xml.soap.SOAPMessage;
 import javax.xml.stream.XMLStreamException;
 import javax.xml.stream.XMLStreamReader;
+import javax.xml.ws.WebServiceException;
 
 import org.apache.axiom.om.OMElement;
 import org.apache.axiom.soap.SOAPEnvelope;
@@ -30,7 +31,6 @@
 import org.apache.axis2.jaxws.message.Attachment;
 import org.apache.axis2.jaxws.message.Block;
 import org.apache.axis2.jaxws.message.Message;
-import org.apache.axis2.jaxws.message.MessageException;
 import org.apache.axis2.jaxws.message.Protocol;
 import org.apache.axis2.jaxws.message.databinding.SOAPEnvelopeBlock;
 import org.apache.axis2.jaxws.message.factory.MessageFactory;
@@ -51,7 +51,7 @@
 	/* (non-Javadoc)
 	 * @see org.apache.axis2.jaxws.message.factory.MessageFactory#createFrom(javax.xml.stream.XMLStreamReader)
 	 */
-	public Message createFrom(XMLStreamReader reader) throws XMLStreamException, MessageException {
+	public Message createFrom(XMLStreamReader reader) throws XMLStreamException, WebServiceException {
 		StAXSOAPModelBuilder builder = new StAXSOAPModelBuilder(reader, null);  // Pass null has the version to trigger autodetection
 		SOAPEnvelope omEnvelope = builder.getSOAPEnvelope();
 		return createFrom(omEnvelope);
@@ -60,14 +60,14 @@
 	/* (non-Javadoc)
 	 * @see org.apache.axis2.jaxws.message.MessageFactory#createFrom(org.apache.axiom.om.OMElement)
 	 */
-	public Message createFrom(OMElement omElement) throws XMLStreamException, MessageException {
+	public Message createFrom(OMElement omElement) throws XMLStreamException, WebServiceException {
 		return new MessageImpl(omElement);
 	}
 
 	/* (non-Javadoc)
 	 * @see org.apache.axis2.jaxws.message.MessageFactory#create(org.apache.axis2.jaxws.message.Protocol)
 	 */
-	public Message create(Protocol protocol) throws XMLStreamException, MessageException {
+	public Message create(Protocol protocol) throws XMLStreamException, WebServiceException {
 		return new MessageImpl(protocol);
 	}
 
@@ -75,7 +75,7 @@
 	/* (non-Javadoc)
 	 * @see org.apache.axis2.jaxws.message.factory.MessageFactory#createFrom(javax.xml.soap.SOAPMessage)
 	 */
-	public Message createFrom(SOAPMessage message) throws XMLStreamException, MessageException {
+	public Message createFrom(SOAPMessage message) throws XMLStreamException, WebServiceException {
 		try {
             // Create a Message with an XMLPart from the SOAPEnvelope
 			Message m = new MessageImpl(message.getSOAPPart().getEnvelope());
@@ -89,14 +89,14 @@
             }
 			return m;
 		} catch (Exception e) {
-			throw ExceptionFactory.makeMessageException(e);
+			throw ExceptionFactory.makeWebServiceException(e);
 		}
 	}
 
 	/* (non-Javadoc)
 	 * @see org.apache.axis2.jaxws.message.factory.MessageFactory#createFrom(org.apache.axis2.jaxws.message.Block, java.lang.Object)
 	 */
-	public Message createFrom(Block block, Object context) throws XMLStreamException, MessageException {
+	public Message createFrom(Block block, Object context) throws XMLStreamException, WebServiceException {
 		
 		// Small optimization to quickly consider the SOAPEnvelope case
 		if (block instanceof SOAPEnvelopeBlock) {

Modified: webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/message/impl/MessageImpl.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/message/impl/MessageImpl.java?view=diff&rev=498056&r1=498055&r2=498056
==============================================================================
--- webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/message/impl/MessageImpl.java (original)
+++ webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/message/impl/MessageImpl.java Fri Jan 19 19:25:43 2007
@@ -33,6 +33,7 @@
 import javax.xml.stream.XMLStreamException;
 import javax.xml.stream.XMLStreamReader;
 import javax.xml.stream.XMLStreamWriter;
+import javax.xml.ws.WebServiceException;
 
 import org.apache.axiom.om.OMElement;
 import org.apache.axiom.om.OMNamespace;
@@ -41,7 +42,6 @@
 import org.apache.axis2.jaxws.message.Attachment;
 import org.apache.axis2.jaxws.message.Block;
 import org.apache.axis2.jaxws.message.Message;
-import org.apache.axis2.jaxws.message.MessageException;
 import org.apache.axis2.jaxws.message.Protocol;
 import org.apache.axis2.jaxws.message.XMLFault;
 import org.apache.axis2.jaxws.message.XMLPart;
@@ -80,7 +80,7 @@
 	 * This constructor constructs an empty message with the specified protocol
 	 * @param protocol
 	 */
-	MessageImpl(Protocol protocol) throws MessageException, XMLStreamException {
+	MessageImpl(Protocol protocol) throws WebServiceException, XMLStreamException {
 		createXMLPart(protocol);
 	}
 	
@@ -89,7 +89,7 @@
 	 * This constructor creates a message from the specified root.
 	 * @param root
 	 */
-	MessageImpl(OMElement root) throws MessageException, XMLStreamException  {
+	MessageImpl(OMElement root) throws WebServiceException, XMLStreamException  {
 		createXMLPart(root);
 	}
 	
@@ -98,17 +98,17 @@
 	 * This constructor creates a message from the specified root.
 	 * @param root
 	 */
-	MessageImpl(SOAPEnvelope root) throws MessageException, XMLStreamException  {
+	MessageImpl(SOAPEnvelope root) throws WebServiceException, XMLStreamException  {
 	    createXMLPart(root);
 	}
     
     /**
      * Create a new XMLPart and Protocol from the root
      * @param root SOAPEnvelope
-     * @throws MessageException
+     * @throws WebServiceException
      * @throws XMLStreamException
      */
-    private void createXMLPart(SOAPEnvelope root) throws MessageException, XMLStreamException {
+    private void createXMLPart(SOAPEnvelope root) throws WebServiceException, XMLStreamException {
         XMLPartFactory factory = (XMLPartFactory) FactoryRegistry.getFactory(XMLPartFactory.class);
         xmlPart = factory.createFrom(root);
         protocol = xmlPart.getProtocol();
@@ -118,10 +118,10 @@
     /**
      * Create a new XMLPart and Protocol from the root
      * @param root OMElement
-     * @throws MessageException
+     * @throws WebServiceException
      * @throws XMLStreamException
      */
-    private void createXMLPart(OMElement root) throws MessageException, XMLStreamException {
+    private void createXMLPart(OMElement root) throws WebServiceException, XMLStreamException {
         XMLPartFactory factory = (XMLPartFactory) FactoryRegistry.getFactory(XMLPartFactory.class);
         xmlPart = factory.createFrom(root);
         protocol = xmlPart.getProtocol();
@@ -131,16 +131,16 @@
     /**
      * Create a new empty XMLPart from the Protocol
      * @param protocol
-     * @throws MessageException
+     * @throws WebServiceException
      * @throws XMLStreamException
      */
-    private void createXMLPart(Protocol protocol) throws MessageException, XMLStreamException {
+    private void createXMLPart(Protocol protocol) throws WebServiceException, XMLStreamException {
         this.protocol = protocol;
         if (protocol.equals(Protocol.unknown)) {
-            throw ExceptionFactory.makeMessageException(Messages.getMessage("ProtocolIsNotKnown"));
+            throw ExceptionFactory.makeWebServiceException(Messages.getMessage("ProtocolIsNotKnown"));
         } else if (protocol.equals(Protocol.rest)) {
             // TODO Need REST support
-            throw ExceptionFactory.makeMessageException(Messages.getMessage("RESTIsNotSupported"));
+            throw ExceptionFactory.makeWebServiceException(Messages.getMessage("RESTIsNotSupported"));
         }
         XMLPartFactory factory = (XMLPartFactory) FactoryRegistry.getFactory(XMLPartFactory.class);
         xmlPart = factory.create(protocol);
@@ -150,7 +150,7 @@
 	/* (non-Javadoc)
 	 * @see org.apache.axis2.jaxws.message.Message#getAsSOAPMessage()
 	 */
-	public SOAPMessage getAsSOAPMessage() throws MessageException {
+	public SOAPMessage getAsSOAPMessage() throws WebServiceException {
 
 		// TODO: 
 		// This is a non performant way to create SOAPMessage. I will serialize
@@ -205,7 +205,7 @@
             
             return soapMessage;
 		} catch (Exception e) {
-			throw ExceptionFactory.makeMessageException(e);
+			throw ExceptionFactory.makeWebServiceException(e);
 		}
 
 	}
@@ -216,7 +216,7 @@
 	 * @see org.apache.axis2.jaxws.message.XMLPart#getAsBlock(java.lang.Object,
 	 *      org.apache.axis2.jaxws.message.factory.BlockFactory)
 	 */
-	public Block getAsBlock(Object context, BlockFactory blockFactory) throws MessageException, XMLStreamException {
+	public Block getAsBlock(Object context, BlockFactory blockFactory) throws WebServiceException, XMLStreamException {
 		return xmlPart.getAsBlock(context, blockFactory);
 	}
 
@@ -271,31 +271,31 @@
 		return protocol;
 	}
 
-	public OMElement getAsOMElement() throws MessageException {
+	public OMElement getAsOMElement() throws WebServiceException {
 		return xmlPart.getAsOMElement();
 	}
 
-	public javax.xml.soap.SOAPEnvelope getAsSOAPEnvelope() throws MessageException {
+	public javax.xml.soap.SOAPEnvelope getAsSOAPEnvelope() throws WebServiceException {
 		return xmlPart.getAsSOAPEnvelope();
 	}
 
-	public Block getBodyBlock(int index, Object context, BlockFactory blockFactory) throws MessageException {
+	public Block getBodyBlock(int index, Object context, BlockFactory blockFactory) throws WebServiceException {
 		return xmlPart.getBodyBlock(index, context, blockFactory);
 	}
 
-	public Block getHeaderBlock(String namespace, String localPart, Object context, BlockFactory blockFactory) throws MessageException {
+	public Block getHeaderBlock(String namespace, String localPart, Object context, BlockFactory blockFactory) throws WebServiceException {
 		return xmlPart.getHeaderBlock(namespace, localPart, context, blockFactory);
 	}
 
-	public int getNumBodyBlocks() throws MessageException {
+	public int getNumBodyBlocks() throws WebServiceException {
 		return xmlPart.getNumBodyBlocks();
 	}
 
-	public int getNumHeaderBlocks() throws MessageException {
+	public int getNumHeaderBlocks() throws WebServiceException {
 		return xmlPart.getNumHeaderBlocks();
 	}
 
-	public XMLStreamReader getXMLStreamReader(boolean consume) throws MessageException {
+	public XMLStreamReader getXMLStreamReader(boolean consume) throws WebServiceException {
 		return xmlPart.getXMLStreamReader(consume);
 	}
 
@@ -303,23 +303,23 @@
 		return xmlPart.isConsumed();
 	}
 
-	public void outputTo(XMLStreamWriter writer, boolean consume) throws XMLStreamException, MessageException {
+	public void outputTo(XMLStreamWriter writer, boolean consume) throws XMLStreamException, WebServiceException {
 		xmlPart.outputTo(writer, consume);
 	}
 
-	public void removeBodyBlock(int index) throws MessageException {
+	public void removeBodyBlock(int index) throws WebServiceException {
 		xmlPart.removeBodyBlock(index);
 	}
 
-	public void removeHeaderBlock(String namespace, String localPart) throws MessageException {
+	public void removeHeaderBlock(String namespace, String localPart) throws WebServiceException {
 		xmlPart.removeHeaderBlock(namespace, localPart);
 	}
 
-	public void setBodyBlock(int index, Block block) throws MessageException {
+	public void setBodyBlock(int index, Block block) throws WebServiceException {
         xmlPart.setBodyBlock(index, block);
 	}
 
-	public void setHeaderBlock(String namespace, String localPart, Block block) throws MessageException {
+	public void setHeaderBlock(String namespace, String localPart, Block block) throws WebServiceException {
 		xmlPart.setHeaderBlock(namespace, localPart, block);
 	}
 
@@ -371,15 +371,15 @@
         mtomEnabled = b;
     }
 
-	public XMLFault getXMLFault() throws MessageException {
+	public XMLFault getXMLFault() throws WebServiceException {
 		return xmlPart.getXMLFault();
 	}
 
-	public void setXMLFault(XMLFault xmlFault) throws MessageException {
+	public void setXMLFault(XMLFault xmlFault) throws WebServiceException {
 		xmlPart.setXMLFault(xmlFault);
 	}
 
-	public boolean isFault() throws MessageException {
+	public boolean isFault() throws WebServiceException {
 		return xmlPart.isFault();
 	}
 
@@ -391,15 +391,15 @@
         return xmlPart.getStyle();
     }
 
-    public void setStyle(Style style) throws MessageException {
+    public void setStyle(Style style) throws WebServiceException {
         xmlPart.setStyle(style);
     }
 
-    public QName getOperationElement() throws MessageException {
+    public QName getOperationElement() throws WebServiceException {
         return xmlPart.getOperationElement();
     }
 
-    public void setOperationElement(QName operationQName) throws MessageException {
+    public void setOperationElement(QName operationQName) throws WebServiceException {
         xmlPart.setOperationElement(operationQName);
     }
 

Modified: webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/message/impl/XMLPartBase.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/message/impl/XMLPartBase.java?view=diff&rev=498056&r1=498055&r2=498056
==============================================================================
--- webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/message/impl/XMLPartBase.java (original)
+++ webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/message/impl/XMLPartBase.java Fri Jan 19 19:25:43 2007
@@ -28,6 +28,7 @@
 import javax.xml.stream.XMLStreamException;
 import javax.xml.stream.XMLStreamReader;
 import javax.xml.stream.XMLStreamWriter;
+import javax.xml.ws.WebServiceException;
 
 import org.apache.axiom.om.OMElement;
 import org.apache.axiom.soap.SOAP11Constants;
@@ -36,7 +37,6 @@
 import org.apache.axis2.jaxws.i18n.Messages;
 import org.apache.axis2.jaxws.message.Block;
 import org.apache.axis2.jaxws.message.Message;
-import org.apache.axis2.jaxws.message.MessageException;
 import org.apache.axis2.jaxws.message.Protocol;
 import org.apache.axis2.jaxws.message.XMLFault;
 import org.apache.axis2.jaxws.message.XMLPart;
@@ -112,15 +112,15 @@
 	 * XMLPart should be constructed via the XMLPartFactory.
 	 * This constructor constructs an empty XMLPart with the specified protocol
 	 * @param protocol
-	 * @throws MessageException
+	 * @throws WebServiceException
 	 */
-	XMLPartBase(Protocol protocol) throws MessageException {
+	XMLPartBase(Protocol protocol) throws WebServiceException {
 		super();
 		this.protocol = protocol;
 		if (protocol.equals(Protocol.unknown)) {
-			throw ExceptionFactory.makeMessageException(Messages.getMessage("ProtocolIsNotKnown"));
+			throw ExceptionFactory.makeWebServiceException(Messages.getMessage("ProtocolIsNotKnown"));
 		} else if (protocol.equals(Protocol.rest)) {
-			throw ExceptionFactory.makeMessageException(Messages.getMessage("RESTIsNotSupported"));
+			throw ExceptionFactory.makeWebServiceException(Messages.getMessage("RESTIsNotSupported"));
 		}
 		content = _createSpine(protocol);
 		contentType = SPINE;
@@ -130,9 +130,9 @@
 	 * XMLPart should be constructed via the XMLPartFactory.
 	 * This constructor creates an XMLPart from the specified root.
 	 * @param root
-	 * @throws MessageException
+	 * @throws WebServiceException
 	 */
-	XMLPartBase(OMElement root) throws MessageException {
+	XMLPartBase(OMElement root) throws WebServiceException {
 		content = root;
 		contentType = OM;
 		QName qName = root.getQName();
@@ -141,7 +141,7 @@
 		} else if (qName.getNamespaceURI().equals(SOAP12Constants.SOAP_ENVELOPE_NAMESPACE_URI)) {
 			protocol = Protocol.soap12;
 		} else {
-			throw ExceptionFactory.makeMessageException(Messages.getMessage("RESTIsNotSupported"));
+			throw ExceptionFactory.makeWebServiceException(Messages.getMessage("RESTIsNotSupported"));
 		}
 	}
 	
@@ -149,9 +149,9 @@
 	 * XMLPart should be constructed via the XMLPartFactory.
 	 * This constructor creates an XMLPart from the specified root.
 	 * @param root
-	 * @throws MessageException
+	 * @throws WebServiceException
 	 */
-	XMLPartBase(SOAPEnvelope root) throws MessageException {
+	XMLPartBase(SOAPEnvelope root) throws WebServiceException {
 		content = root;
 		contentType = SOAPENVELOPE;
 		String ns = root.getNamespaceURI();
@@ -160,7 +160,7 @@
 		} else if (ns.equals(SOAP12Constants.SOAP_ENVELOPE_NAMESPACE_URI)) {
 			protocol = Protocol.soap12;
 		} else {
-			throw ExceptionFactory.makeMessageException(Messages.getMessage("RESTIsNotSupported"));
+			throw ExceptionFactory.makeWebServiceException(Messages.getMessage("RESTIsNotSupported"));
 		}
 	}
 	
@@ -169,7 +169,7 @@
 		this.contentType = contentType;
 	}
 	
-	private OMElement getContentAsOMElement() throws MessageException {
+	private OMElement getContentAsOMElement() throws WebServiceException {
 		
 		OMElement om = null;
 		switch (contentType) {
@@ -183,13 +183,13 @@
 			om = _convertSE2OM((SOAPEnvelope) content);
 			break;
 		default:
-			throw ExceptionFactory.makeMessageInternalException(Messages.getMessage("XMLPartImplErr2"), null);
+			throw ExceptionFactory.makeWebServiceException(Messages.getMessage("XMLPartImplErr2"));
 		}
 		setContent(om, OM);
 		return om;
 	}
 		
-	private SOAPEnvelope getContentAsSOAPEnvelope() throws MessageException {
+	private SOAPEnvelope getContentAsSOAPEnvelope() throws WebServiceException {
 		SOAPEnvelope se = null;
 		switch (contentType) {
 		case (SOAPENVELOPE):
@@ -202,13 +202,13 @@
 			se = _convertOM2SE((OMElement) content);
 			break;
 		default:
-			throw ExceptionFactory.makeMessageInternalException(Messages.getMessage("XMLPartImplErr2"), null);
+			throw ExceptionFactory.makeWebServiceException(Messages.getMessage("XMLPartImplErr2"));
 		}
 		setContent(se, SOAPENVELOPE);
 		return se;
 	}
 	
-	private XMLSpine getContentAsXMLSpine() throws MessageException {
+	private XMLSpine getContentAsXMLSpine() throws WebServiceException {
 		XMLSpine spine = null;
 		switch (contentType) {
 		case (SPINE):
@@ -221,7 +221,7 @@
 			spine = _convertOM2Spine((OMElement) content);
 			break;
 		default:
-			throw ExceptionFactory.makeMessageInternalException(Messages.getMessage("XMLPartImplErr2"), null);
+			throw ExceptionFactory.makeWebServiceException(Messages.getMessage("XMLPartImplErr2"));
 		}
         setContent(spine, SPINE);
 		return spine;
@@ -230,21 +230,21 @@
 	/* (non-Javadoc)
 	 * @see org.apache.axis2.jaxws.message.XMLPart#getAsOMElement()
 	 */
-	public OMElement getAsOMElement() throws MessageException {
+	public OMElement getAsOMElement() throws WebServiceException {
 		return getContentAsOMElement();
 	}
 
 	/* (non-Javadoc)
 	 * @see org.apache.axis2.jaxws.message.XMLPart#getAsSOAPEnvelope()
 	 */
-	public SOAPEnvelope getAsSOAPEnvelope() throws MessageException {
+	public SOAPEnvelope getAsSOAPEnvelope() throws WebServiceException {
 		return getContentAsSOAPEnvelope();
 	}
 
 	/* (non-Javadoc)
 	 * @see org.apache.axis2.jaxws.message.XMLPart#getAsBlock(java.lang.Object, org.apache.axis2.jaxws.message.factory.BlockFactory)
 	 */
-	public Block getAsBlock(Object context, BlockFactory blockFactory) throws MessageException, XMLStreamException {
+	public Block getAsBlock(Object context, BlockFactory blockFactory) throws WebServiceException, XMLStreamException {
 		
 		// Get the content as the specfied block.  There is some optimization here to prevent unnecessary copies.
 		// More optimization may be added later.
@@ -278,7 +278,7 @@
     /* (non-Javadoc)
      * @see org.apache.axis2.jaxws.message.XMLPart#setStyle(javax.jws.soap.SOAPBinding.Style)
      */
-    public void setStyle(Style style) throws MessageException {
+    public void setStyle(Style style) throws WebServiceException {
         if (this.style != style) {
             if (contentType == SPINE) {
                 // Must switch to something other than XMLSpine
@@ -288,7 +288,7 @@
         this.style = style;
     }
 
-    public QName getOperationElement() throws MessageException {
+    public QName getOperationElement() throws WebServiceException {
         try {
             if (style != Style.RPC) {
                 return null;
@@ -311,11 +311,11 @@
             }
             return null;
         } catch (SOAPException se) {
-            throw ExceptionFactory.makeMessageException(se);
+            throw ExceptionFactory.makeWebServiceException(se);
         }
     }
 
-    public void setOperationElement(QName operationQName) throws MessageException {
+    public void setOperationElement(QName operationQName) throws WebServiceException {
         if (this.style == Style.RPC) {
             this.getContentAsXMLSpine().setOperationElement(operationQName);
         }
@@ -340,9 +340,9 @@
     /* (non-Javadoc)
      * @see org.apache.axis2.jaxws.message.XMLPart#getXMLStreamReader(boolean)
      */
-    public XMLStreamReader getXMLStreamReader(boolean consume) throws MessageException {
+    public XMLStreamReader getXMLStreamReader(boolean consume) throws WebServiceException {
 		if (consumed) {
-			throw ExceptionFactory.makeMessageException(Messages.getMessage("XMLPartImplErr1"));
+			throw ExceptionFactory.makeWebServiceException(Messages.getMessage("XMLPartImplErr1"));
 		}
 		XMLStreamReader reader = null;
 		if (contentType == SPINE) {
@@ -362,7 +362,7 @@
 	/* (non-Javadoc)
 	 * @see org.apache.axis2.jaxws.message.XMLPart#getXMLFault()
 	 */
-	public XMLFault getXMLFault() throws MessageException {
+	public XMLFault getXMLFault() throws WebServiceException {
         
         XMLFault xmlFault = null;
         
@@ -390,7 +390,7 @@
 	/* (non-Javadoc)
 	 * @see org.apache.axis2.jaxws.message.XMLPart#setXMLFault(org.apache.axis2.jaxws.message.XMLFault)
 	 */
-	public void setXMLFault(XMLFault xmlFault) throws MessageException {
+	public void setXMLFault(XMLFault xmlFault) throws WebServiceException {
 	    // For each block in the xmlfault, set the message
         Block[] blocks = xmlFault.getDetailBlocks();
         if (blocks != null) {
@@ -409,9 +409,9 @@
 	/* (non-Javadoc)
 	 * @see org.apache.axis2.jaxws.message.XMLPart#isFault()
 	 */
-	public boolean isFault() throws MessageException {
+	public boolean isFault() throws WebServiceException {
         if (consumed) {
-            throw ExceptionFactory.makeMessageException(Messages.getMessage("XMLPartImplErr1"));
+            throw ExceptionFactory.makeWebServiceException(Messages.getMessage("XMLPartImplErr1"));
         }
 
         try {
@@ -425,7 +425,7 @@
                 return getContentAsXMLSpine().isFault();
             }
         } catch (SOAPException se) {
-            throw ExceptionFactory.makeMessageException(se);
+            throw ExceptionFactory.makeWebServiceException(se);
         }
         return false;
 	}
@@ -440,9 +440,9 @@
 	/* (non-Javadoc)
 	 * @see org.apache.axis2.jaxws.message.XMLPart#outputTo(javax.xml.stream.XMLStreamWriter, boolean)
 	 */
-	public void outputTo(XMLStreamWriter writer, boolean consume) throws XMLStreamException, MessageException {
+	public void outputTo(XMLStreamWriter writer, boolean consume) throws XMLStreamException, WebServiceException {
 		if (consumed) {
-			throw ExceptionFactory.makeMessageException(Messages.getMessage("XMLPartImplErr1"));
+			throw ExceptionFactory.makeWebServiceException(Messages.getMessage("XMLPartImplErr1"));
 		}
 		if (contentType == SPINE) {
 			getContentAsXMLSpine().outputTo(writer, consume);
@@ -470,7 +470,7 @@
 	/* (non-Javadoc)
 	 * @see org.apache.axis2.jaxws.message.XMLPart#getBodyBlock(int, java.lang.Object, org.apache.axis2.jaxws.message.factory.BlockFactory)
 	 */
-	public Block getBodyBlock(int index, Object context, BlockFactory blockFactory) throws MessageException {
+	public Block getBodyBlock(int index, Object context, BlockFactory blockFactory) throws WebServiceException {
 		Block block = getContentAsXMLSpine().getBodyBlock(index, context, blockFactory);
 		block.setParent(getParent());
         return block;
@@ -479,7 +479,7 @@
 	/* (non-Javadoc)
 	 * @see org.apache.axis2.jaxws.message.XMLPart#getHeaderBlock(java.lang.String, java.lang.String, java.lang.Object, org.apache.axis2.jaxws.message.factory.BlockFactory)
 	 */
-	public Block getHeaderBlock(String namespace, String localPart, Object context, BlockFactory blockFactory) throws MessageException {
+	public Block getHeaderBlock(String namespace, String localPart, Object context, BlockFactory blockFactory) throws WebServiceException {
 		Block block = getContentAsXMLSpine().getHeaderBlock(namespace, localPart, context, blockFactory);
         block.setParent(getParent());
         return block;
@@ -488,35 +488,35 @@
 	/* (non-Javadoc)
 	 * @see org.apache.axis2.jaxws.message.XMLPart#getNumBodyBlocks()
 	 */
-	public int getNumBodyBlocks() throws MessageException {
+	public int getNumBodyBlocks() throws WebServiceException {
 		return getContentAsXMLSpine().getNumBodyBlocks();
 	}
 
 	/* (non-Javadoc)
 	 * @see org.apache.axis2.jaxws.message.XMLPart#getNumHeaderBlocks()
 	 */
-	public int getNumHeaderBlocks() throws MessageException {
+	public int getNumHeaderBlocks() throws WebServiceException {
 		return getContentAsXMLSpine().getNumHeaderBlocks();
 	}
 
 	/* (non-Javadoc)
 	 * @see org.apache.axis2.jaxws.message.XMLPart#removeBodyBlock(int)
 	 */
-	public void removeBodyBlock(int index) throws MessageException {
+	public void removeBodyBlock(int index) throws WebServiceException {
 		getContentAsXMLSpine().removeBodyBlock(index);
 	}
 
 	/* (non-Javadoc)
 	 * @see org.apache.axis2.jaxws.message.XMLPart#removeHeaderBlock(java.lang.String, java.lang.String)
 	 */
-	public void removeHeaderBlock(String namespace, String localPart) throws MessageException {
+	public void removeHeaderBlock(String namespace, String localPart) throws WebServiceException {
 		getContentAsXMLSpine().removeHeaderBlock(namespace, localPart);
 	}
 
 	/* (non-Javadoc)
 	 * @see org.apache.axis2.jaxws.message.XMLPart#setBodyBlock(int, org.apache.axis2.jaxws.message.Block)
 	 */
-	public void setBodyBlock(int index, Block block) throws MessageException {
+	public void setBodyBlock(int index, Block block) throws WebServiceException {
 		block.setParent(getParent());
         getContentAsXMLSpine().setBodyBlock(index, block);
 	}
@@ -524,7 +524,7 @@
 	/* (non-Javadoc)
 	 * @see org.apache.axis2.jaxws.message.XMLPart#setHeaderBlock(java.lang.String, java.lang.String, org.apache.axis2.jaxws.message.Block)
 	 */
-	public void setHeaderBlock(String namespace, String localPart, Block block) throws MessageException {
+	public void setHeaderBlock(String namespace, String localPart, Block block) throws WebServiceException {
 		block.setParent(getParent());
         getContentAsXMLSpine().setHeaderBlock(namespace, localPart, block);
 	}
@@ -548,57 +548,57 @@
 	 * Convert SOAPEnvelope into an OM tree
 	 * @param se SOAPEnvelope
 	 * @return OM
-	 * @throws MessageException
+	 * @throws WebServiceException
 	 */
-	protected abstract OMElement _convertSE2OM(SOAPEnvelope se) throws MessageException;
+	protected abstract OMElement _convertSE2OM(SOAPEnvelope se) throws WebServiceException;
 	
 	/**
 	 * Convert XMLSpine into an OM tree
 	 * @param spine XMLSpine
 	 * @return OM
-	 * @throws MessageException
+	 * @throws WebServiceException
 	 */
-	protected abstract OMElement _convertSpine2OM(XMLSpine spine) throws MessageException;
+	protected abstract OMElement _convertSpine2OM(XMLSpine spine) throws WebServiceException;
 	
 	/**
 	 * Convert OM tree into a SOAPEnvelope
 	 * @param om
 	 * @return SOAPEnvelope
-	 * @throws MessageException
+	 * @throws WebServiceException
 	 */
-	protected abstract SOAPEnvelope _convertOM2SE(OMElement om) throws MessageException;
+	protected abstract SOAPEnvelope _convertOM2SE(OMElement om) throws WebServiceException;
 	
 	/**
 	 * Convert XMLSpine into a SOAPEnvelope
 	 * @param spine
 	 * @return SOAPEnvelope
-	 * @throws MessageException
+	 * @throws WebServiceException
 	 */
-	protected abstract SOAPEnvelope _convertSpine2SE(XMLSpine spine) throws MessageException;
+	protected abstract SOAPEnvelope _convertSpine2SE(XMLSpine spine) throws WebServiceException;
 	
 	/**
 	 * Convert OM into XMLSpine
 	 * @param om
 	 * @return
-	 * @throws MessageException
+	 * @throws WebServiceException
 	 */
-	protected abstract XMLSpine _convertOM2Spine(OMElement om) throws MessageException;
+	protected abstract XMLSpine _convertOM2Spine(OMElement om) throws WebServiceException;
 	
 	/**
 	 * Convert SOAPEnvelope into XMLSPine
 	 * @param SOAPEnvelope
 	 * @return XMLSpine
-	 * @throws MessageException
+	 * @throws WebServiceException
 	 */
-	protected abstract XMLSpine _convertSE2Spine(SOAPEnvelope se) throws MessageException;
+	protected abstract XMLSpine _convertSE2Spine(SOAPEnvelope se) throws WebServiceException;
 	
 	/**
 	 * Create an empty, default spine for the specificed protocol
 	 * @param protocol
 	 * @return 
-	 * @throws MessageException
+	 * @throws WebServiceException
 	 */
-	protected XMLSpine _createSpine(Protocol protocol) throws MessageException {
+	protected XMLSpine _createSpine(Protocol protocol) throws WebServiceException {
 		// Default implementation is to simply construct the spine. 
 		// Derived classes may wish to construct a different kind of XMLSpine
 		return new XMLSpineImpl(protocol, getStyle());

Modified: webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/message/impl/XMLPartFactoryImpl.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/message/impl/XMLPartFactoryImpl.java?view=diff&rev=498056&r1=498055&r2=498056
==============================================================================
--- webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/message/impl/XMLPartFactoryImpl.java (original)
+++ webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/message/impl/XMLPartFactoryImpl.java Fri Jan 19 19:25:43 2007
@@ -18,11 +18,11 @@
 
 import javax.xml.stream.XMLStreamException;
 import javax.xml.stream.XMLStreamReader;
+import javax.xml.ws.WebServiceException;
 
 import org.apache.axiom.om.OMElement;
 import org.apache.axiom.soap.SOAPEnvelope;
 import org.apache.axiom.soap.impl.builder.StAXSOAPModelBuilder;
-import org.apache.axis2.jaxws.message.MessageException;
 import org.apache.axis2.jaxws.message.Protocol;
 import org.apache.axis2.jaxws.message.XMLPart;
 import org.apache.axis2.jaxws.message.factory.XMLPartFactory;
@@ -42,7 +42,7 @@
 	/* (non-Javadoc)
 	 * @see org.apache.axis2.jaxws.message.factory.XMLPartFactory#createFrom(javax.xml.stream.XMLStreamReader)
 	 */
-	public XMLPart createFrom(XMLStreamReader reader) throws XMLStreamException, MessageException {
+	public XMLPart createFrom(XMLStreamReader reader) throws XMLStreamException, WebServiceException {
 		StAXSOAPModelBuilder builder = new StAXSOAPModelBuilder(reader, null);  // Pass null has the version to trigger autodetection
 		SOAPEnvelope omEnvelope = builder.getSOAPEnvelope();
 		return createFrom(omEnvelope);
@@ -51,21 +51,21 @@
 	/* (non-Javadoc)
 	 * @see org.apache.axis2.jaxws.message.MessageFactory#createFrom(org.apache.axiom.om.OMElement)
 	 */
-	public XMLPart createFrom(OMElement omElement) throws XMLStreamException, MessageException {
+	public XMLPart createFrom(OMElement omElement) throws XMLStreamException, WebServiceException {
 		return new XMLPartImpl(omElement);
 	}
 
 	/* (non-Javadoc)
 	 * @see org.apache.axis2.jaxws.message.MessageFactory#create(org.apache.axis2.jaxws.message.Protocol)
 	 */
-	public XMLPart create(Protocol protocol) throws XMLStreamException, MessageException {
+	public XMLPart create(Protocol protocol) throws XMLStreamException, WebServiceException {
 		return new XMLPartImpl(protocol);
 	}
 
 	/* (non-Javadoc)
 	 * @see org.apache.axis2.jaxws.message.factory.XMLPartFactory#createFrom(javax.xml.soap.SOAPEnvelope)
 	 */
-	public XMLPart createFrom(javax.xml.soap.SOAPEnvelope soapEnvelope) throws XMLStreamException, MessageException {
+	public XMLPart createFrom(javax.xml.soap.SOAPEnvelope soapEnvelope) throws XMLStreamException, WebServiceException {
 		return new XMLPartImpl(soapEnvelope);
 	}
 

Modified: webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/message/impl/XMLPartImpl.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/message/impl/XMLPartImpl.java?view=diff&rev=498056&r1=498055&r2=498056
==============================================================================
--- webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/message/impl/XMLPartImpl.java (original)
+++ webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/message/impl/XMLPartImpl.java Fri Jan 19 19:25:43 2007
@@ -17,9 +17,9 @@
 package org.apache.axis2.jaxws.message.impl;
 
 import javax.xml.soap.SOAPEnvelope;
+import javax.xml.ws.WebServiceException;
 
 import org.apache.axiom.om.OMElement;
-import org.apache.axis2.jaxws.message.MessageException;
 import org.apache.axis2.jaxws.message.Protocol;
 import org.apache.axis2.jaxws.message.factory.SAAJConverterFactory;
 import org.apache.axis2.jaxws.message.util.SAAJConverter;
@@ -41,9 +41,9 @@
 	 * XMLPart should be constructed via the XMLPartFactory.
 	 * This constructor constructs an empty XMLPart with the specified protocol
 	 * @param protocol
-	 * @throws MessageException
+	 * @throws WebServiceException
 	 */
-	XMLPartImpl(Protocol protocol) throws MessageException {
+	XMLPartImpl(Protocol protocol) throws WebServiceException {
 		super(protocol);
 	}
 	
@@ -51,9 +51,9 @@
 	 * XMLPart should be constructed via the XMLPartFactory.
 	 * This constructor creates an XMLPart from the specified root.
 	 * @param root
-	 * @throws MessageException
+	 * @throws WebServiceException
 	 */
-	XMLPartImpl(OMElement root) throws MessageException {
+	XMLPartImpl(OMElement root) throws WebServiceException {
 		super(root);
 	}
 	
@@ -61,46 +61,46 @@
 	 * XMLPart should be constructed via the XMLPartFactory.
 	 * This constructor creates an XMLPart from the specified root.
 	 * @param root
-	 * @throws MessageException
+	 * @throws WebServiceException
 	 */
-	XMLPartImpl(SOAPEnvelope root) throws MessageException {
+	XMLPartImpl(SOAPEnvelope root) throws WebServiceException {
 		super(root);
 	}
 	
 	@Override
-	protected OMElement _convertSE2OM(SOAPEnvelope se) throws MessageException {
+	protected OMElement _convertSE2OM(SOAPEnvelope se) throws WebServiceException {
 		return getSAAJConverter().toOM(se);
 	}
 
 	@Override
-	protected OMElement _convertSpine2OM(XMLSpine spine) throws MessageException {
+	protected OMElement _convertSpine2OM(XMLSpine spine) throws WebServiceException {
 		
 		OMElement omEnvelope = spine.getAsOMElement();
 		return omEnvelope;
 	}
 
 	@Override
-	protected SOAPEnvelope _convertOM2SE(OMElement om) throws MessageException {
+	protected SOAPEnvelope _convertOM2SE(OMElement om) throws WebServiceException {
 		return getSAAJConverter().toSAAJ((org.apache.axiom.soap.SOAPEnvelope) om);
 	}
 
 	@Override
-	protected SOAPEnvelope _convertSpine2SE(XMLSpine spine) throws MessageException {
+	protected SOAPEnvelope _convertSpine2SE(XMLSpine spine) throws WebServiceException {
 		return _convertOM2SE(_convertSpine2OM(spine));
 	}
 
 	@Override
-	protected XMLSpine _convertOM2Spine(OMElement om) throws MessageException {
+	protected XMLSpine _convertOM2Spine(OMElement om) throws WebServiceException {
 		return new XMLSpineImpl((org.apache.axiom.soap.SOAPEnvelope) om, getStyle());
 	}
 
 	@Override
-	protected XMLSpine _convertSE2Spine(SOAPEnvelope se) throws MessageException {
+	protected XMLSpine _convertSE2Spine(SOAPEnvelope se) throws WebServiceException {
 		return _convertOM2Spine(_convertSE2OM(se));
 	}
 
 	@Override
-	protected XMLSpine _createSpine(Protocol protocol) throws MessageException {
+	protected XMLSpine _createSpine(Protocol protocol) throws WebServiceException {
 		// Use the default implementation provided in XMLPartBase
 		return super._createSpine(protocol);
 	}

Modified: webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/message/impl/XMLSpine.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/message/impl/XMLSpine.java?view=diff&rev=498056&r1=498055&r2=498056
==============================================================================
--- webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/message/impl/XMLSpine.java (original)
+++ webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/message/impl/XMLSpine.java Fri Jan 19 19:25:43 2007
@@ -21,10 +21,10 @@
 import javax.xml.stream.XMLStreamException;
 import javax.xml.stream.XMLStreamReader;
 import javax.xml.stream.XMLStreamWriter;
+import javax.xml.ws.WebServiceException;
 
 import org.apache.axiom.om.OMElement;
 import org.apache.axis2.jaxws.message.Block;
-import org.apache.axis2.jaxws.message.MessageException;
 import org.apache.axis2.jaxws.message.Protocol;
 import org.apache.axis2.jaxws.message.XMLFault;
 import org.apache.axis2.jaxws.message.factory.BlockFactory;
@@ -48,18 +48,18 @@
      * Write out the Message
      * @param writer XMLStreamWriter
      * @param consume true if this is the last request on the block.
-     * @throws MessageException
+     * @throws WebServiceException
      */
-    public void outputTo(XMLStreamWriter writer, boolean consume) throws XMLStreamException, MessageException;  
+    public void outputTo(XMLStreamWriter writer, boolean consume) throws XMLStreamException, WebServiceException;  
     
     /**
      * Get the XMLStreamReader represented by this Message for the xml part
      * @param consume true if this is the last request on the Message
      * @return XMLStreamReader
-     * @throws MessageException
+     * @throws WebServiceException
      * @throws XMLStreamException
      */
-    public XMLStreamReader getXMLStreamReader(boolean consume) throws MessageException;
+    public XMLStreamReader getXMLStreamReader(boolean consume) throws WebServiceException;
     
     /**
      * @return the Style (document or rpc)
@@ -69,14 +69,14 @@
     /**
      * @return the QName of the operation element if Style.rpc.  Otherwise null
      */
-    public QName getOperationElement() throws MessageException;
+    public QName getOperationElement() throws WebServiceException;
     
     /**
      * Set the operation element qname.  The operation qname is only used if
      * Style.rpc
      * @param operationQName
      */
-    public void setOperationElement(QName operationQName) throws MessageException;
+    public void setOperationElement(QName operationQName) throws WebServiceException;
     
     /**
      * isConsumed
@@ -90,7 +90,7 @@
      * Determines whether the XMLPart represents a Fault
      * @return true if the message represents a fault
      */
-    public boolean isFault() throws MessageException;
+    public boolean isFault() throws WebServiceException;
     
     /**
      * If the XMLPart represents a fault, an XMLFault is returned
@@ -98,7 +98,7 @@
      * @return the XMLFault object or null
      * @see XMLFault
      */
-    public XMLFault getXMLFault() throws MessageException;
+    public XMLFault getXMLFault() throws WebServiceException;
     
     /**
      * Change the XMLPart so that it represents the fault described
@@ -106,22 +106,22 @@
      * @param xmlfault
      * @see XMLFault
      */
-    public void setXMLFault(XMLFault xmlFault) throws MessageException;
+    public void setXMLFault(XMLFault xmlFault) throws WebServiceException;
     
     /**
      * getAsOMElement
      * Get the xml part as a read/write OM
      * @return OMElement (probably OM SOAPEnvelope)
-     * @throws MessageException
+     * @throws WebServiceException
      */
-    public OMElement getAsOMElement() throws MessageException;
+    public OMElement getAsOMElement() throws WebServiceException;
     
     /**
      * getNumBodyBlocks
      * @return number of body blocks
-     * @throws MessageException
+     * @throws WebServiceException
      */
-    public int getNumBodyBlocks() throws MessageException;
+    public int getNumBodyBlocks() throws WebServiceException;
     
     /**
      * getBodyBlock
@@ -133,10 +133,10 @@
      * @param context
      * @param blockFactory
      * @return Block
-     * @throws MessageException
+     * @throws WebServiceException
      */
     public Block getBodyBlock(int index, Object context, BlockFactory blockFactory)  
-        throws MessageException;
+        throws WebServiceException;
     
     /**
      * setBodyBlock
@@ -145,25 +145,25 @@
      * use the getBodyBlock method to access it.
      * @param index
      * @param block
-     * @throws MessageException
+     * @throws WebServiceException
      */
-    public void setBodyBlock(int index, Block block) throws MessageException;
+    public void setBodyBlock(int index, Block block) throws WebServiceException;
     
     /**
      * removePayload
      * Removes the indicated BodyBlock
      * @param index
-     * @throws MessageException
+     * @throws WebServiceException
      */
-    public void removeBodyBlock(int index) throws MessageException;
+    public void removeBodyBlock(int index) throws WebServiceException;
     
     
     /**
      * getNumHeaderBlocks
      * @return number of header blocks
-     * @throws MessageException
+     * @throws WebServiceException
      */
-    public int getNumHeaderBlocks() throws MessageException;
+    public int getNumHeaderBlocks() throws WebServiceException;
     
     /**
      * getHeaderBlock
@@ -176,12 +176,12 @@
      * @param context
      * @param blockFactory
      * @return Block
-     * @throws MessageException
+     * @throws WebServiceException
      */
     public Block getHeaderBlock(String namespace, String localPart, 
             Object context, 
             BlockFactory blockFactory)  
-        throws MessageException;
+        throws WebServiceException;
     
     /**
      * appendHeaderBlock
@@ -191,20 +191,20 @@
      * @param namespace
      * @param localPart
      * @param block
-     * @throws MessageException
+     * @throws WebServiceException
      */
     public void setHeaderBlock(String namespace, String localPart, Block block) 
-        throws MessageException;
+        throws WebServiceException;
     
     /**
      * removePayload
      * Removes the indicated block
      * @param namespace
      * @param localPart
-     * @throws MessageException
+     * @throws WebServiceException
      */
     public void removeHeaderBlock(String namespace, String localPart) 
-        throws MessageException;
+        throws WebServiceException;
     
     
     /**

Modified: webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/message/impl/XMLSpineImpl.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/message/impl/XMLSpineImpl.java?view=diff&rev=498056&r1=498055&r2=498056
==============================================================================
--- webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/message/impl/XMLSpineImpl.java (original)
+++ webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/message/impl/XMLSpineImpl.java Fri Jan 19 19:25:43 2007
@@ -25,6 +25,7 @@
 import javax.xml.stream.XMLStreamException;
 import javax.xml.stream.XMLStreamReader;
 import javax.xml.stream.XMLStreamWriter;
+import javax.xml.ws.WebServiceException;
 
 import org.apache.axiom.om.OMElement;
 import org.apache.axiom.om.OMNamespace;
@@ -44,7 +45,6 @@
 import org.apache.axis2.jaxws.i18n.Messages;
 import org.apache.axis2.jaxws.message.Block;
 import org.apache.axis2.jaxws.message.Message;
-import org.apache.axis2.jaxws.message.MessageException;
 import org.apache.axis2.jaxws.message.Protocol;
 import org.apache.axis2.jaxws.message.XMLFault;
 import org.apache.axis2.jaxws.message.factory.BlockFactory;
@@ -104,9 +104,9 @@
 	 * Create spine from an existing OM tree
 	 * @param envelope
      * @param style Style
-	 * @throws MessageException
+	 * @throws WebServiceException
 	 */
-	public XMLSpineImpl(SOAPEnvelope envelope, Style style) throws MessageException {
+	public XMLSpineImpl(SOAPEnvelope envelope, Style style) throws WebServiceException {
 		super();
         this.style = style;
 		init(envelope);
@@ -116,11 +116,11 @@
 			protocol = Protocol.soap12;
 		} else {
 			// TODO Support for REST
-			throw ExceptionFactory.makeMessageInternalException(Messages.getMessage("RESTIsNotSupported"), null);
+			throw ExceptionFactory.makeWebServiceException(Messages.getMessage("RESTIsNotSupported"));
 		}
 	} 
 
-	private void init(SOAPEnvelope envelope) throws MessageException {
+	private void init(SOAPEnvelope envelope) throws WebServiceException {
 		root = envelope;
 		headerBlocks.clear();
 		bodyBlocks.clear();
@@ -181,9 +181,9 @@
 	 * @param it Iterator
 	 * @param blocks List<Block> to update
 	 * @param toEnd if true, iterator is advanced to the end, otherwise it is advanced one Element
-	 * @throws MessageException
+	 * @throws WebServiceException
 	 */
-	private  void advanceIterator(Iterator it, List<Block> blocks, boolean toEnd) throws MessageException {
+	private  void advanceIterator(Iterator it, List<Block> blocks, boolean toEnd) throws WebServiceException {
 		
 		// TODO This code must be reworked.  The OM Iterator causes the entire OMElement to be 
 		// parsed when it.next() is invoked.  I will need to fix this to gain performance.  (scheu)
@@ -198,7 +198,7 @@
 					block = obf.createFrom((OMElement) node, null, null);
                     it.remove();  // Remove the nodes as they are converted 
 				} catch (XMLStreamException xse) {
-					throw ExceptionFactory.makeMessageException(xse);
+					throw ExceptionFactory.makeWebServiceException(xse);
 				}
 				blocks.add(block);
                 if (!toEnd) {
@@ -220,7 +220,7 @@
 			soapFactory = new SOAP12Factory();
 		} else {
 			// TODO REST Support is needed
-			throw ExceptionFactory.makeMessageInternalException(Messages.getMessage("RESTIsNotSupported"), null);
+			throw ExceptionFactory.makeWebServiceException(Messages.getMessage("RESTIsNotSupported"), null);
 		}
 		return soapFactory;
 	}
@@ -264,17 +264,17 @@
 	/* (non-Javadoc)
 	 * @see org.apache.axis2.jaxws.message.XMLPart#outputTo(javax.xml.stream.XMLStreamWriter, boolean)
 	 */
-	public void outputTo(XMLStreamWriter writer, boolean consume) throws XMLStreamException, MessageException {
+	public void outputTo(XMLStreamWriter writer, boolean consume) throws XMLStreamException, WebServiceException {
 		Reader2Writer r2w = new Reader2Writer(getXMLStreamReader(consume));
 		r2w.outputTo(writer);
 	}
 
-	public XMLStreamReader getXMLStreamReader(boolean consume) throws MessageException {
+	public XMLStreamReader getXMLStreamReader(boolean consume) throws WebServiceException {
 		return new XMLStreamReaderForXMLSpine(root, protocol,
 					headerBlocks, bodyBlocks, detailBlocks, consume);
 	}
 
-	public XMLFault getXMLFault() throws MessageException {
+	public XMLFault getXMLFault() throws WebServiceException {
 		if (!isFault()) {
 		    return null;
         }
@@ -292,14 +292,14 @@
         return xmlFault;
 	}
     
-    private int getNumDetailBlocks() throws MessageException {
+    private int getNumDetailBlocks() throws WebServiceException {
         if (detailIterator != null) {
             advanceIterator(detailIterator, detailBlocks, true);
         }
         return detailBlocks.size();
     }
 	
-	public void setXMLFault(XMLFault xmlFault) throws MessageException {
+	public void setXMLFault(XMLFault xmlFault) throws WebServiceException {
         
         // Clear out the existing body and detail blocks
         SOAPBody body = root.getBody();
@@ -329,7 +329,7 @@
 		return consumed;
 	}
 
-	public OMElement getAsOMElement() throws MessageException {
+	public OMElement getAsOMElement() throws WebServiceException {
 	    if (headerBlocks != null) {        
 	        for (int i=0; i<headerBlocks.size(); i++) {                   
 	            Block b = (Block) headerBlocks.get(i);                   
@@ -384,14 +384,14 @@
 	/* (non-Javadoc)
 	 * @see org.apache.axis2.jaxws.message.XMLPart#getNumBodyBlocks()
 	 */
-	public int getNumBodyBlocks() throws MessageException {
+	public int getNumBodyBlocks() throws WebServiceException {
 		if (bodyIterator != null) {
 			advanceIterator(bodyIterator, bodyBlocks, true);
 		}
 		return bodyBlocks.size();
 	}
 
-	public Block getBodyBlock(int index, Object context, BlockFactory blockFactory) throws MessageException {
+	public Block getBodyBlock(int index, Object context, BlockFactory blockFactory) throws WebServiceException {
 		if (index >= bodyBlocks.size() && bodyIterator != null) {
 			advanceIterator(bodyIterator, bodyBlocks, true);
 		}
@@ -405,29 +405,29 @@
 			}
 			return newBlock;
 		} catch (XMLStreamException xse) {
-			throw ExceptionFactory.makeMessageException(xse);
+			throw ExceptionFactory.makeWebServiceException(xse);
 		}
 	}
 
-	public void setBodyBlock(int index, Block block) throws MessageException {
+	public void setBodyBlock(int index, Block block) throws WebServiceException {
 		if (index >= bodyBlocks.size() && bodyIterator != null) {
 			advanceIterator(bodyIterator, bodyBlocks, true);
 		}
 		bodyBlocks.add(index, block);
 	}
 
-	public void removeBodyBlock(int index) throws MessageException {
+	public void removeBodyBlock(int index) throws WebServiceException {
 		if (index >= bodyBlocks.size() && bodyIterator != null) {
 			advanceIterator(bodyIterator, bodyBlocks, true);
 		}
 		bodyBlocks.remove(index);
 	}
 
-	public int getNumHeaderBlocks() throws MessageException {
+	public int getNumHeaderBlocks() throws WebServiceException {
 		return headerBlocks.size();
 	}
 
-	public Block getHeaderBlock(String namespace, String localPart, Object context, BlockFactory blockFactory) throws MessageException {
+	public Block getHeaderBlock(String namespace, String localPart, Object context, BlockFactory blockFactory) throws WebServiceException {
 		int index = getHeaderBlockIndex(namespace, localPart);
         if (index < 0) {
             // REVIEW What should happen if header block not found
@@ -442,11 +442,11 @@
 			}
 			return newBlock;
 		} catch (XMLStreamException xse) {
-			throw ExceptionFactory.makeMessageException(xse);
+			throw ExceptionFactory.makeWebServiceException(xse);
 		}
 	}
 
-	public void setHeaderBlock(String namespace, String localPart, Block block) throws MessageException {
+	public void setHeaderBlock(String namespace, String localPart, Block block) throws WebServiceException {
 		int index = getHeaderBlockIndex(namespace, localPart);
         if (index >= 0) {
             headerBlocks.set(index, block);
@@ -460,9 +460,9 @@
 	 * @param namespace
 	 * @param localPart
 	 * @return index of header block or -1
-	 * @throws MessageException
+	 * @throws WebServiceException
 	 */
-	private int getHeaderBlockIndex(String namespace, String localPart) throws MessageException {
+	private int getHeaderBlockIndex(String namespace, String localPart) throws WebServiceException {
 		for (int i=0; i<headerBlocks.size(); i++) {
 			Block block = headerBlocks.get(i);
 			QName qName = block.getQName();
@@ -473,7 +473,7 @@
 		}
 		return -1;
 	}
-	public void removeHeaderBlock(String namespace, String localPart) throws MessageException {
+	public void removeHeaderBlock(String namespace, String localPart) throws WebServiceException {
 		int index = getHeaderBlockIndex(namespace, localPart);
         if (index >= 0) {
             headerBlocks.remove(index);
@@ -489,7 +489,7 @@
         return "SPINE";
     }
 
-    public boolean isFault() throws MessageException {
+    public boolean isFault() throws WebServiceException {
 		return XMLFaultUtils.isFault(root);
 	}
 

Modified: webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/message/impl/XMLStreamReaderForXMLSpine.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/message/impl/XMLStreamReaderForXMLSpine.java?view=diff&rev=498056&r1=498055&r2=498056
==============================================================================
--- webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/message/impl/XMLStreamReaderForXMLSpine.java (original)
+++ webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/message/impl/XMLStreamReaderForXMLSpine.java Fri Jan 19 19:25:43 2007
@@ -20,10 +20,10 @@
 
 import javax.xml.namespace.QName;
 import javax.xml.stream.XMLStreamException;
+import javax.xml.ws.WebServiceException;
 
 import org.apache.axiom.om.OMElement;
 import org.apache.axis2.jaxws.message.Block;
-import org.apache.axis2.jaxws.message.MessageException;
 import org.apache.axis2.jaxws.message.Protocol;
 import org.apache.axis2.jaxws.message.util.StackableReader;
 import org.apache.axis2.jaxws.message.util.XMLStreamReaderFilter;
@@ -158,7 +158,7 @@
 					sr.push(block.getXMLStreamReader(consume));
 				}
 			}
-		} catch (MessageException me) {
+		} catch (WebServiceException me) {
 			throw new XMLStreamException(me);
 		}
 	}

Modified: webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/message/util/MessageUtils.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/message/util/MessageUtils.java?view=diff&rev=498056&r1=498055&r2=498056
==============================================================================
--- webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/message/util/MessageUtils.java (original)
+++ webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/message/util/MessageUtils.java Fri Jan 19 19:25:43 2007
@@ -29,6 +29,7 @@
 import javax.xml.soap.MimeHeaders;
 import javax.xml.soap.SOAPException;
 import javax.xml.soap.SOAPMessage;
+import javax.xml.ws.WebServiceException;
 
 import org.apache.axiom.attachments.Attachments;
 import org.apache.axiom.om.OMAbstractFactory;
@@ -49,7 +50,6 @@
 import org.apache.axis2.jaxws.ExceptionFactory;
 import org.apache.axis2.jaxws.message.Attachment;
 import org.apache.axis2.jaxws.message.Message;
-import org.apache.axis2.jaxws.message.MessageException;
 import org.apache.axis2.jaxws.message.attachments.AttachmentUtils;
 import org.apache.axis2.jaxws.message.factory.MessageFactory;
 import org.apache.axis2.jaxws.registry.FactoryRegistry;
@@ -156,7 +156,7 @@
      * @param msgContext
      * @return Message
      */
-    public static Message getMessageFromMessageContext(MessageContext msgContext) throws MessageException {
+    public static Message getMessageFromMessageContext(MessageContext msgContext) throws WebServiceException {
         if (log.isDebugEnabled()) {
             log.debug("Start getMessageFromMessageContext");
         }
@@ -259,7 +259,7 @@
      * @param message JAX-WS Message
      * @param msgContext Axis2MessageContext
      */
-    public static void putMessageOnMessageContext(Message message, MessageContext msgContext) throws AxisFault, MessageException {
+    public static void putMessageOnMessageContext(Message message, MessageContext msgContext) throws AxisFault, WebServiceException {
         // Put the XML message on the Axis 2 Message Context
         SOAPEnvelope envelope = (SOAPEnvelope) message.getAsOMElement();
         msgContext.setEnvelope(envelope);

Modified: webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/message/util/Reader.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/message/util/Reader.java?view=diff&rev=498056&r1=498055&r2=498056
==============================================================================
--- webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/message/util/Reader.java (original)
+++ webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/message/util/Reader.java Fri Jan 19 19:25:43 2007
@@ -21,10 +21,10 @@
 import javax.xml.stream.Location;
 import javax.xml.stream.XMLStreamException;
 import javax.xml.stream.XMLStreamReader;
+import javax.xml.ws.WebServiceException;
 
 import org.apache.axis2.jaxws.ExceptionFactory;
 import org.apache.axis2.jaxws.i18n.Messages;
-import org.apache.axis2.jaxws.message.MessageInternalException;
 
 /**
  * Reader
@@ -67,9 +67,9 @@
 		return resettable;
 	}
 	
-	public void reset() throws MessageInternalException {
+	public void reset() throws WebServiceException {
 		if (!resettable) {
-			throw ExceptionFactory.makeMessageInternalException(Messages.getMessage("resetReaderErr"), null);
+			throw ExceptionFactory.makeWebServiceException(Messages.getMessage("resetReaderErr"));
 		}
 		reader = newReader();
 	}

Modified: webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/message/util/SAAJConverter.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/message/util/SAAJConverter.java?view=diff&rev=498056&r1=498055&r2=498056
==============================================================================
--- webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/message/util/SAAJConverter.java (original)
+++ webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/message/util/SAAJConverter.java Fri Jan 19 19:25:43 2007
@@ -21,9 +21,9 @@
 import javax.xml.soap.SOAPEnvelope;
 import javax.xml.soap.SOAPException;
 import javax.xml.soap.SOAPFactory;
+import javax.xml.ws.WebServiceException;
 
 import org.apache.axiom.om.OMElement;
-import org.apache.axis2.jaxws.message.MessageException;
 
 /**
  * SAAJConverter
@@ -35,28 +35,28 @@
 	 * Convert OM SOAPEnvleope to SAAJ SOAPEnvelope
 	 * @param omElement
 	 * @return SOAPEnvelope
-	 * @throws MessageException
+	 * @throws WebServiceException
 	 */
 	public SOAPEnvelope toSAAJ(org.apache.axiom.soap.SOAPEnvelope omElement)
-		throws MessageException;
+		throws WebServiceException;
 
 	/**
 	 * Convert SAAJ SOAPEnvelope to OM SOAPEnvelope
 	 * @param saajEnvelope
 	 * @return OM Envelope
-	 * @throws MessageException
+	 * @throws WebServiceException
 	 */
 	public org.apache.axiom.soap.SOAPEnvelope toOM(SOAPEnvelope saajEnvelope)
-		throws MessageException;
+		throws WebServiceException;
 	
 	/**
 	 * Convert SOAPElement into an OMElement
 	 * @param soapElement
 	 * @return OMElement
-	 * @throws MessageException
+	 * @throws WebServiceException
 	 */
 	public OMElement toOM(SOAPElement soapElement) 
-		throws MessageException;
+		throws WebServiceException;
 	
 	/**
 	 * Convert omElement into a SOAPElement and add it to the parent SOAPElement.
@@ -66,11 +66,11 @@
 	 * @param omElement
 	 * @param parent SOAPElement
 	 * @return SOAPElement that was added to the parent.
-	 * @throws MessageException
+	 * @throws WebServiceException
 	 * @see toSAAJ(OMElement, SOAPElement, SOAPFactory)
 	 */
 	public SOAPElement toSAAJ(OMElement omElement, SOAPElement parent)
-		throws MessageException;
+		throws WebServiceException;
 	
 	/**
 	 * Convert omElement into a SOAPElement and add it to the parent SOAPElement.
@@ -78,19 +78,19 @@
 	 * @param parent SOAPElement
 	 * @param sf SOAPFactory that is used to create Name objects
 	 * @return SOAPElement that was added to the parent.
-	 * @throws MessageException
+	 * @throws WebServiceException
 	 * * @see toSAAJ(OMElement, SOAPElement)
 	 */
 	public SOAPElement toSAAJ(OMElement omElement, SOAPElement parent, SOAPFactory sf)
-		throws MessageException;
+		throws WebServiceException;
 	
 	/**
 	 * Creates a MessageFactory that can support the SOAP version identified
 	 * by the specified envelope namespace. 
 	 * @param namespace
 	 * @return
-	 * @throws MessageException if the namespace is SOAP 1.2 and the SAAJ does not support
+	 * @throws WebServiceException if the namespace is SOAP 1.2 and the SAAJ does not support
 	 * SOAP 1.2 or the namespace is unknown.
 	 */
-	public MessageFactory createMessageFactory(String namespace) throws SOAPException, MessageException;
+	public MessageFactory createMessageFactory(String namespace) throws SOAPException, WebServiceException;
 }

Modified: webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/message/util/XMLFaultUtils.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/message/util/XMLFaultUtils.java?view=diff&rev=498056&r1=498055&r2=498056
==============================================================================
--- webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/message/util/XMLFaultUtils.java (original)
+++ webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/message/util/XMLFaultUtils.java Fri Jan 19 19:25:43 2007
@@ -25,6 +25,7 @@
 import javax.xml.soap.Detail;
 import javax.xml.soap.SOAPConstants;
 import javax.xml.soap.SOAPException;
+import javax.xml.ws.WebServiceException;
 
 import org.apache.axiom.om.OMElement;
 import org.apache.axiom.om.OMNamespace;
@@ -43,7 +44,6 @@
 import org.apache.axiom.soap.SOAPFaultValue;
 import org.apache.axis2.jaxws.ExceptionFactory;
 import org.apache.axis2.jaxws.message.Block;
-import org.apache.axis2.jaxws.message.MessageException;
 import org.apache.axis2.jaxws.message.Protocol;
 import org.apache.axis2.jaxws.message.XMLFault;
 import org.apache.axis2.jaxws.message.XMLFaultCode;
@@ -93,7 +93,7 @@
 	 * @param detailBlocks
 	 * @return
 	 */
-	public static XMLFault createXMLFault(SOAPFault soapFault, Block[] detailBlocks) throws MessageException {
+	public static XMLFault createXMLFault(SOAPFault soapFault, Block[] detailBlocks) throws WebServiceException {
         
 	    // The SOAPFault structure is modeled after SOAP 1.2.  
         // Here is a sample comprehensive SOAP 1.2 fault which will help you understand the
@@ -192,9 +192,9 @@
      * Create XMLFault
      * @param soapFault
      * @return xmlFault
-     * @throws MessageException
+     * @throws WebServiceException
      */
-    public static XMLFault createXMLFault(javax.xml.soap.SOAPFault soapFault) throws MessageException {
+    public static XMLFault createXMLFault(javax.xml.soap.SOAPFault soapFault) throws WebServiceException {
         Block[] detailBlocks = getDetailBlocks(soapFault);
         return createXMLFault(soapFault, detailBlocks);
     }
@@ -205,7 +205,7 @@
      * @param detailBlocks
      * @return
      */
-    public static XMLFault createXMLFault(javax.xml.soap.SOAPFault soapFault, Block[] detailBlocks) throws MessageException {
+    public static XMLFault createXMLFault(javax.xml.soap.SOAPFault soapFault, Block[] detailBlocks) throws WebServiceException {
         
         // The SOAPFault structure is modeled after SOAP 1.2.  
         // Here is a sample comprehensive SOAP 1.2 fault which will help you understand the
@@ -306,7 +306,7 @@
      * @return
      */
     /*
-    public static XMLFault createXMLFault(javax.xml.soap.SOAPFault soapFault) throws MessageException {
+    public static XMLFault createXMLFault(javax.xml.soap.SOAPFault soapFault) throws WebServiceException {
         
        // Convert the SOAPFault into an OM SOAPFault.  OMSOAP Fault already supports SOAP 1.2, so this makes the code easier to migrate
        
@@ -325,7 +325,7 @@
     }
     */
     
-    private static Block[] getDetailBlocks(SOAPFault soapFault) throws MessageException {
+    private static Block[] getDetailBlocks(SOAPFault soapFault) throws WebServiceException {
         try {
             Block[] blocks = null;
             SOAPFaultDetail detail = soapFault.getDetail();
@@ -343,11 +343,11 @@
             }
             return blocks;
         } catch (Exception e) {
-            throw ExceptionFactory.makeMessageException(e);
+            throw ExceptionFactory.makeWebServiceException(e);
         }
     }
     
-    private static Block[] getDetailBlocks(javax.xml.soap.SOAPFault soapFault) throws MessageException {
+    private static Block[] getDetailBlocks(javax.xml.soap.SOAPFault soapFault) throws WebServiceException {
         try {
             Block[] blocks = null;
             Detail detail = soapFault.getDetail();
@@ -365,7 +365,7 @@
             }
             return blocks;
         } catch (Exception e) {
-            throw ExceptionFactory.makeMessageException(e);
+            throw ExceptionFactory.makeWebServiceException(e);
         }
     }
         
@@ -382,7 +382,7 @@
      */
     public static SOAPFault createSOAPFault(XMLFault xmlFault, 
                 SOAPBody body, 
-                boolean ignoreDetailBlocks) throws MessageException {
+                boolean ignoreDetailBlocks) throws WebServiceException {
         
         // Get the factory and create the soapFault
         SOAPFactory factory = MessageUtils.getSOAPFactory(body);
@@ -494,7 +494,7 @@
      * @return SOAPFault (which is attached to body)
      */
     public static javax.xml.soap.SOAPFault createSAAJFault(XMLFault xmlFault, 
-                javax.xml.soap.SOAPBody body) throws SOAPException, MessageException {
+                javax.xml.soap.SOAPBody body) throws SOAPException, WebServiceException {
         
         // Get the factory and create the soapFault
         String protocolNS = body.getNamespaceURI();

Modified: webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/message/util/impl/SAAJConverterImpl.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/message/util/impl/SAAJConverterImpl.java?view=diff&rev=498056&r1=498055&r2=498056
==============================================================================
--- webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/message/util/impl/SAAJConverterImpl.java (original)
+++ webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/message/util/impl/SAAJConverterImpl.java Fri Jan 19 19:25:43 2007
@@ -33,6 +33,7 @@
 import javax.xml.soap.SOAPPart;
 import javax.xml.stream.XMLStreamException;
 import javax.xml.stream.XMLStreamReader;
+import javax.xml.ws.WebServiceException;
 
 import org.apache.axiom.om.OMElement;
 import org.apache.axiom.om.OMNamespace;
@@ -40,7 +41,6 @@
 import org.apache.axiom.soap.impl.builder.StAXSOAPModelBuilder;
 import org.apache.axis2.jaxws.ExceptionFactory;
 import org.apache.axis2.jaxws.i18n.Messages;
-import org.apache.axis2.jaxws.message.MessageException;
 import org.apache.axis2.jaxws.message.util.SAAJConverter;
 import org.apache.axis2.jaxws.message.util.SOAPElementReader;
 import org.apache.axis2.jaxws.util.SAAJFactory;
@@ -62,7 +62,7 @@
 	 * @see org.apache.axis2.jaxws.message.util.SAAJConverter#toSAAJ(org.apache.axiom.soap.SOAPEnvelope)
 	 */
 	public SOAPEnvelope toSAAJ(org.apache.axiom.soap.SOAPEnvelope omEnvelope)
-			throws MessageException {
+			throws WebServiceException {
 		SOAPEnvelope soapEnvelope = null;
 		try {
 			// Build the default envelope
@@ -91,10 +91,10 @@
 			
 			NameCreator nc = new NameCreator(soapEnvelope);
 			buildSOAPTree(nc, soapEnvelope, null, reader, false);
-		} catch (MessageException e) {
+		} catch (WebServiceException e) {
 			throw e;
 		} catch (SOAPException e) {
-			throw ExceptionFactory.makeMessageException(e);
+			throw ExceptionFactory.makeWebServiceException(e);
 		}
 		return soapEnvelope;
 	}
@@ -103,7 +103,7 @@
 	 * @see org.apache.axis2.jaxws.message.util.SAAJConverter#toOM(javax.xml.soap.SOAPEnvelope)
 	 */
 	public org.apache.axiom.soap.SOAPEnvelope toOM(SOAPEnvelope saajEnvelope)
-			throws MessageException {
+			throws WebServiceException {
 		// Get a XMLStreamReader backed by a SOAPElement tree
 		XMLStreamReader reader = new SOAPElementReader(saajEnvelope);
 		// Get a SOAP OM Builder.  Passing null causes the version to be automatically triggered
@@ -118,7 +118,7 @@
 	/* (non-Javadoc)
 	 * @see org.apache.axis2.jaxws.message.util.SAAJConverter#toOM(javax.xml.soap.SOAPElement)
 	 */
-	public OMElement toOM(SOAPElement soapElement) throws MessageException {
+	public OMElement toOM(SOAPElement soapElement) throws WebServiceException {
 		// Get a XMLStreamReader backed by a SOAPElement tree
 		XMLStreamReader reader = new SOAPElementReader(soapElement);
 		// Get a OM Builder.  
@@ -131,7 +131,7 @@
 	/* (non-Javadoc)
 	 * @see org.apache.axis2.jaxws.message.util.SAAJConverter#toSAAJ(org.apache.axiom.om.OMElement, javax.xml.soap.SOAPElement)
 	 */
-	public SOAPElement toSAAJ(OMElement omElement, SOAPElement parent) throws MessageException {
+	public SOAPElement toSAAJ(OMElement omElement, SOAPElement parent) throws WebServiceException {
 		XMLStreamReader reader = null;
 		
 		// If the OM element is not attached to a parser (builder), then the OM
@@ -148,7 +148,7 @@
 			env = env.getParentElement();
 		}
 		if (env == null) {
-			throw ExceptionFactory.makeMessageException(Messages.getMessage("SAAJConverterErr1"));
+			throw ExceptionFactory.makeWebServiceException(Messages.getMessage("SAAJConverterErr1"));
 		}
 		NameCreator nc = new NameCreator((SOAPEnvelope) env);
 		return buildSOAPTree(nc, null, parent, reader, false);
@@ -158,7 +158,7 @@
 	/* (non-Javadoc)
 	 * @see org.apache.axis2.jaxws.message.util.SAAJConverter#toSAAJ(org.apache.axiom.om.OMElement, javax.xml.soap.SOAPElement, javax.xml.soap.SOAPFactory)
 	 */
-	public SOAPElement toSAAJ(OMElement omElement, SOAPElement parent, SOAPFactory sf) throws MessageException {
+	public SOAPElement toSAAJ(OMElement omElement, SOAPElement parent, SOAPFactory sf) throws WebServiceException {
 		XMLStreamReader reader = null;
 		
 		// If the OM element is not attached to a parser (builder), then the OM
@@ -191,7 +191,7 @@
 					SOAPElement parent, 
 					XMLStreamReader reader, 
 					boolean quitAtBody) 
-		throws MessageException {
+		throws WebServiceException {
 		try {
 			while(reader.hasNext()) {
 				int eventID = reader.next();	
@@ -272,12 +272,12 @@
 					this._unexpectedEvent("EventID " +String.valueOf(eventID));
 				}
 			}	
-		} catch (MessageException e) {
+		} catch (WebServiceException e) {
 			throw e;
 		} catch (XMLStreamException e) {
-			throw ExceptionFactory.makeMessageException(e);
+			throw ExceptionFactory.makeWebServiceException(e);
 		} catch (SOAPException e) {
-			throw ExceptionFactory.makeMessageException(e);
+			throw ExceptionFactory.makeWebServiceException(e);
 		}
 		return root;
 	}
@@ -405,11 +405,11 @@
 		}
 	}
 	
-	private void _unexpectedEvent(String event) throws MessageException {
+	private void _unexpectedEvent(String event) throws WebServiceException {
 		// Review We need NLS for this message, but this code will probably 
 		// be added to JAX-WS.  So for now we there is no NLS.
 		// TODO NLS
-		throw ExceptionFactory.makeMessageException(Messages.getMessage("SAAJConverterErr2", event));
+		throw ExceptionFactory.makeWebServiceException(Messages.getMessage("SAAJConverterErr2", event));
 	}
 	
 	/**
@@ -447,7 +447,7 @@
 		
 	}
 
-    public MessageFactory createMessageFactory(String namespace) throws SOAPException, MessageException {
+    public MessageFactory createMessageFactory(String namespace) throws SOAPException, WebServiceException {
         return SAAJFactory.createMessageFactory(namespace);
     }
 }



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


Mime
View raw message