Author: heiko.braun(a)jboss.com
Date: 2006-11-03 06:29:00 -0500 (Fri, 03 Nov 2006)
New Revision: 1356
Modified:
branches/JEE5_TCK/src/main/java/javax/xml/ws/soap/SOAPFaultException.java
branches/JEE5_TCK/src/main/java/org/jboss/ws/jaxws/client/ClientImpl.java
branches/JEE5_TCK/src/test/java/org/jboss/test/ws/jaxws/exception/ExceptionTestCase.java
Log:
Fix JBWS-1321
Modified: branches/JEE5_TCK/src/main/java/javax/xml/ws/soap/SOAPFaultException.java
===================================================================
--- branches/JEE5_TCK/src/main/java/javax/xml/ws/soap/SOAPFaultException.java 2006-11-03
10:52:48 UTC (rev 1355)
+++ branches/JEE5_TCK/src/main/java/javax/xml/ws/soap/SOAPFaultException.java 2006-11-03
11:29:00 UTC (rev 1356)
@@ -43,6 +43,7 @@
*/
public class SOAPFaultException extends ProtocolException
{
+ private SOAPFault fault;
public SOAPFaultException(SOAPFault fault)
{
@@ -50,10 +51,13 @@
this.fault = fault;
}
+ public SOAPFaultException(Exception ex)
+ {
+ super(ex);
+ }
public SOAPFault getFault()
{
return fault;
}
- private SOAPFault fault;
}
\ No newline at end of file
Modified: branches/JEE5_TCK/src/main/java/org/jboss/ws/jaxws/client/ClientImpl.java
===================================================================
--- branches/JEE5_TCK/src/main/java/org/jboss/ws/jaxws/client/ClientImpl.java 2006-11-03
10:52:48 UTC (rev 1355)
+++ branches/JEE5_TCK/src/main/java/org/jboss/ws/jaxws/client/ClientImpl.java 2006-11-03
11:29:00 UTC (rev 1356)
@@ -53,8 +53,9 @@
import org.jboss.ws.metadata.OperationMetaData;
import org.jboss.ws.metadata.HandlerMetaData.HandlerType;
import org.jboss.ws.soap.MessageContextAssociation;
+import org.jboss.ws.soap.SOAPFaultImpl;
-/**
+/**
* Provides support for the dynamic invocation of a service endpoint.
*
* @author Thomas.Diesler(a)jboss.org
@@ -64,7 +65,7 @@
{
// provide logging
private static Logger log = Logger.getLogger(ClientImpl.class);
-
+
public ClientImpl(EndpointMetaData epMetaData, HandlerResolver handlerResolver)
{
super(epMetaData);
@@ -120,14 +121,14 @@
CommonMessageContext msgContext = MessageContextAssociation.peekMessageContext();
msgContext.setProperty(MessageContextJAXWS.MESSAGE_OUTBOUND_PROPERTY, new
Boolean(true));
}
-
+
// Invoked by the proxy invokation handler
public Object invoke(QName opName, Object[] args, Map<String, Object>
resContext) throws RemoteException
{
// Associate a message context with the current thread
SOAPMessageContextJAXWS msgContext = new SOAPMessageContextJAXWS();
MessageContextAssociation.pushMessageContext(msgContext);
-
+
// The contents of the request context are used to initialize the message context
(see section 9.4.1)
// prior to invoking any handlers (see chapter 9) for the outbound message. Each
property within the
// request context is copied to the message context with a scope of HANDLER.
@@ -186,7 +187,7 @@
String bindingId = opMetaData.getEndpointMetaData().getBindingId();
if (SOAPBinding.SOAP11HTTP_BINDING.equals(bindingId) ||
SOAPBinding.SOAP12HTTP_BINDING.equals(bindingId))
{
- throw new SOAPFaultException(null);
+ throw new SOAPFaultException(ex);
}
else if (HTTPBinding.HTTP_BINDING.equals(bindingId))
{
@@ -220,7 +221,7 @@
}
return bindingProvider;
}
-
+
public Map<String, Object> getRequestContext()
{
return getBindingProvider().getRequestContext();
Modified:
branches/JEE5_TCK/src/test/java/org/jboss/test/ws/jaxws/exception/ExceptionTestCase.java
===================================================================
---
branches/JEE5_TCK/src/test/java/org/jboss/test/ws/jaxws/exception/ExceptionTestCase.java 2006-11-03
10:52:48 UTC (rev 1355)
+++
branches/JEE5_TCK/src/test/java/org/jboss/test/ws/jaxws/exception/ExceptionTestCase.java 2006-11-03
11:29:00 UTC (rev 1356)
@@ -63,19 +63,13 @@
public void testRuntimeException() throws Exception
{
- if (true)
- {
- System.out.println("FIXME: JBWS-1321");
- return;
- }
-
try
{
proxy.throwRuntimeException();
}
catch (SOAPFaultException e)
{
- assertEquals("oh no, a runtime exception occured.", e.getMessage());
+ assertTrue(e.getMessage().indexOf("oh no, a runtime exception
occured.")!=-1);
return;
}
Show replies by date