Author: jason.greene(a)jboss.com
Date: 2006-11-06 20:35:50 -0500 (Mon, 06 Nov 2006)
New Revision: 1406
Modified:
trunk/src/main/java/org/jboss/ws/soap/SOAPConnectionImpl.java
trunk/src/test/java/org/jboss/test/ws/jaxws/jsr181/webmethod/JSR181WebMethodTestCase.java
trunk/src/test/java/org/jboss/test/ws/jaxws/wsaddressing/replyto/AddressingReplyToTestCase.java
Log:
Fix JBREM-626
Modified: trunk/src/main/java/org/jboss/ws/soap/SOAPConnectionImpl.java
===================================================================
--- trunk/src/main/java/org/jboss/ws/soap/SOAPConnectionImpl.java 2006-11-06 19:21:25 UTC
(rev 1405)
+++ trunk/src/main/java/org/jboss/ws/soap/SOAPConnectionImpl.java 2006-11-07 01:35:50 UTC
(rev 1406)
@@ -43,6 +43,7 @@
import org.jboss.remoting.Client;
import org.jboss.remoting.InvokerLocator;
import org.jboss.remoting.security.SSLSocketBuilder;
+import org.jboss.remoting.transport.http.HTTPMetadataConstants;
import org.jboss.ws.binding.soap.SOAPMessageMarshaller;
import org.jboss.ws.binding.soap.SOAPMessageUnMarshaller;
import org.jboss.ws.jaxrpc.StubExt;
@@ -200,7 +201,7 @@
{
resMessage = (SOAPMessage)remotingClient.invoke(reqMessage, metadata);
}
-
+
// disconnect the rmoting client
remotingClient.disconnect();
@@ -244,7 +245,7 @@
// with a quoted empty string value, if in the corresponding WSDL description,
// the soapAction attribute of soapbind:operation is either not present, or
// present with an empty string as its value.
-
+
MimeHeaders mimeHeaders = reqMessage.getMimeHeaders();
String[] action = mimeHeaders.getHeader("SOAPAction");
if (action != null && action.length > 0)
@@ -266,6 +267,10 @@
reqMessage.saveChanges();
Map<String, Object> metadata = new HashMap<String, Object>();
+
+ // We need to unmarshall faults (HTTP 500)
+ metadata.put(HTTPMetadataConstants.NO_THROW_ON_ERROR, "true");
+
Properties props = new Properties();
metadata.put("HEADER", props);
Modified:
trunk/src/test/java/org/jboss/test/ws/jaxws/jsr181/webmethod/JSR181WebMethodTestCase.java
===================================================================
---
trunk/src/test/java/org/jboss/test/ws/jaxws/jsr181/webmethod/JSR181WebMethodTestCase.java 2006-11-06
19:21:25 UTC (rev 1405)
+++
trunk/src/test/java/org/jboss/test/ws/jaxws/jsr181/webmethod/JSR181WebMethodTestCase.java 2006-11-07
01:35:50 UTC (rev 1406)
@@ -116,9 +116,6 @@
"</env:Envelope>";
SOAPMessage reqMsg = msgFactory.createMessage(null, new
ByteArrayInputStream(reqEnv.getBytes()));
- System.out.println("FIXME: [JBREM-626] Allow unmarshalling of HTTP response
with error code 500");
- if (true) return;
-
URL epURL = new URL(endpointURL);
SOAPMessage resMsg = con.call(reqMsg, epURL);
SOAPFault soapFault = resMsg.getSOAPBody().getFault();
@@ -145,13 +142,10 @@
" <faultstring>Endpoint
{http://webmethod.jsr181.jaxws.ws.test.jboss.org/}TestEndpointPort does not contain
operation meta data for:
{http://webmethod.jsr181.jaxws.ws.test.jboss.org/}noWebMethod</faultstring>" +
"</env:Fault>";
- System.out.println("FIXME: [JBREM-626] Allow unmarshalling of HTTP response
with error code 500");
- if (true) return;
-
Service service = Service.create(wsdlURL, serviceName);
Dispatch dispatch = service.createDispatch(portName, StreamSource.class,
Mode.PAYLOAD);
StreamSource retObj = (StreamSource)dispatch.invoke(new StreamSource(new
StringReader(reqPayload)));
Element retEl = DOMUtils.parse(new InputSource(retObj.getReader()));
assertEquals(DOMUtils.parse(expPayload), retEl);
}
-}
+}
\ No newline at end of file
Modified:
trunk/src/test/java/org/jboss/test/ws/jaxws/wsaddressing/replyto/AddressingReplyToTestCase.java
===================================================================
---
trunk/src/test/java/org/jboss/test/ws/jaxws/wsaddressing/replyto/AddressingReplyToTestCase.java 2006-11-06
19:21:25 UTC (rev 1405)
+++
trunk/src/test/java/org/jboss/test/ws/jaxws/wsaddressing/replyto/AddressingReplyToTestCase.java 2006-11-07
01:35:50 UTC (rev 1406)
@@ -126,9 +126,6 @@
public void testInital() throws Exception
{
- System.out.println("FIXME: [JBREM-626] Allow unmarshalling of HTTP response
with error code 500");
- if (true) return;
-
String item = initial.addItem("Ice Cream");
assertNull("Expected null, but was: " + item, item);
@@ -138,18 +135,12 @@
public void testReplyTo() throws Exception
{
- System.out.println("FIXME: [JBREM-626] Allow unmarshalling of HTTP response
with error code 500");
- if (true) return;
-
String item = replyto.getLastItem();
assertEquals("Ice Cream", item);
}
public void testFaultTo() throws Exception
{
- System.out.println("FIXME: [JBREM-626] Allow unmarshalling of HTTP response
with error code 500");
- if (true) return;
-
String lastFault = faultto.getLastFault();
assertEquals("java.lang.IllegalArgumentException: Invalid Value",
lastFault);
}
Show replies by date