diff options
author | antelder <antelder@13f79535-47bb-0310-9956-ffa450edef68> | 2010-04-21 10:04:17 +0000 |
---|---|---|
committer | antelder <antelder@13f79535-47bb-0310-9956-ffa450edef68> | 2010-04-21 10:04:17 +0000 |
commit | 683fada0bbec8d40488ec7ed916399ee538d45c8 (patch) | |
tree | fc8a08afdf55a33bef7a2829cf5b1f352ef0e9d0 /sca-java-2.x/trunk/modules/binding-ws-runtime-jaxws/src/main/java/org/apache/tuscany/sca | |
parent | a7d7fea89ca5ed6a0abb394d62a63ae09d32d4a4 (diff) |
Put back code to create a soap fault message from an exception. Was there a reason this got commented out? The build seems to work with it and it gets some of the failing compliance tests working again
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@936239 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'sca-java-2.x/trunk/modules/binding-ws-runtime-jaxws/src/main/java/org/apache/tuscany/sca')
-rw-r--r-- | sca-java-2.x/trunk/modules/binding-ws-runtime-jaxws/src/main/java/org/apache/tuscany/sca/binding/ws/jaxws/JAXWSBindingProvider.java | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/sca-java-2.x/trunk/modules/binding-ws-runtime-jaxws/src/main/java/org/apache/tuscany/sca/binding/ws/jaxws/JAXWSBindingProvider.java b/sca-java-2.x/trunk/modules/binding-ws-runtime-jaxws/src/main/java/org/apache/tuscany/sca/binding/ws/jaxws/JAXWSBindingProvider.java index 2636edc2c2..23e7d7d584 100644 --- a/sca-java-2.x/trunk/modules/binding-ws-runtime-jaxws/src/main/java/org/apache/tuscany/sca/binding/ws/jaxws/JAXWSBindingProvider.java +++ b/sca-java-2.x/trunk/modules/binding-ws-runtime-jaxws/src/main/java/org/apache/tuscany/sca/binding/ws/jaxws/JAXWSBindingProvider.java @@ -22,8 +22,13 @@ import java.util.List; import javax.annotation.Resource; import javax.wsdl.extensions.soap.SOAPAddress; +import javax.xml.namespace.QName; +import javax.xml.soap.Detail; +import javax.xml.soap.DetailEntry; +import javax.xml.soap.SOAPElement; import javax.xml.soap.SOAPException; import javax.xml.soap.SOAPFactory; +import javax.xml.soap.SOAPFault; import javax.xml.soap.SOAPMessage; import javax.xml.ws.Provider; import javax.xml.ws.ServiceMode; @@ -37,6 +42,7 @@ import org.apache.tuscany.sca.databinding.DataBindingExtensionPoint; import org.apache.tuscany.sca.host.http.ServletHost; import org.apache.tuscany.sca.interfacedef.InterfaceContract; import org.apache.tuscany.sca.interfacedef.Operation; +import org.apache.tuscany.sca.interfacedef.util.FaultException; import org.apache.tuscany.sca.invocation.InvocationChain; import org.apache.tuscany.sca.invocation.Message; import org.apache.tuscany.sca.invocation.MessageFactory; @@ -150,17 +156,18 @@ public class JAXWSBindingProvider implements Provider<SOAPMessage> { SOAPMessage response = soapMessageFactory.createMessage(); if (responseMsg.isFault()) { - ServiceRuntimeException e = responseMsg.getBody(); - throw e; -/* - SOAPFault fault = response.getSOAPBody().addFault(new QName(response.getSOAPBody().getNamespaceURI(), "Server"), "unknown"); +// ServiceRuntimeException e = responseMsg.getBody(); +// throw e; + + FaultException fe = responseMsg.getBody(); + SOAPFault fault = response.getSOAPBody().addFault(new QName(response.getSOAPBody().getNamespaceURI(), "Server"), fe.getMessage()); Detail d = fault.addDetail(); DetailEntry de = d.addDetailEntry(fe.getFaultName()); SOAPElement dece = de.addChildElement("message"); if (fe.getMessage() != null) { dece.addTextNode(fe.getMessage()); } -*/ + } else { Element element = responseMsg.getBody(); response.getSOAPBody().addChildElement(soapFactory.createElement(element)); |