Author: alessio.soldano(a)jboss.com
Date: 2009-12-04 11:11:11 -0500 (Fri, 04 Dec 2009)
New Revision: 11196
Modified:
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/client/SOAPProtocolConnectionJMS.java
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/client/UnMarshaller.java
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/client/transport/NettyClient.java
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/client/transport/NettyTransportHandler.java
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/client/transport/WSResponseHandler.java
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxws/binding/HTTPMessageUnMarshaller.java
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxws/binding/JsonMessageUnMarshaller.java
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxws/client/ClientImpl.java
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/soap/SOAPMessageUnMarshaller.java
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/soap/SOAPMessageUnMarshallerHTTP.java
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/extensions/wsrm/transport/RMMessageAssembler.java
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/extensions/wsrm/transport/RMMetadata.java
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/extensions/wsrm/transport/RMSender.java
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/extensions/wsrm/transport/RMUnMarshaller.java
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/extensions/wsrm/transport/backchannel/RMRequestHandlerImpl.java
Log:
[JBWS-2849] Separating http headers from netty client props, renaming those props and
refactoring marshallers/rm-stuff for using separate maps
Modified:
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/client/SOAPProtocolConnectionJMS.java
===================================================================
---
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/client/SOAPProtocolConnectionJMS.java 2009-12-04
13:01:13 UTC (rev 11195)
+++
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/client/SOAPProtocolConnectionJMS.java 2009-12-04
16:11:11 UTC (rev 11196)
@@ -146,7 +146,7 @@
}
ByteArrayInputStream bais = new
ByteArrayInputStream(responseListener.resMessage.getBytes());
- resMessage = (MessageAbstraction)getUnmarshaller().read(bais, null);
+ resMessage = (MessageAbstraction)getUnmarshaller().read(bais, null, null);
}
con.stop();
Modified:
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/client/UnMarshaller.java
===================================================================
---
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/client/UnMarshaller.java 2009-12-04
13:01:13 UTC (rev 11195)
+++
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/client/UnMarshaller.java 2009-12-04
16:11:11 UTC (rev 11196)
@@ -44,5 +44,5 @@
* @return
* @throws IOException all specific i/o exceptions need to be thrown as this.
*/
- Object read(InputStream inputStream, Map<String, Object> metadata) throws
IOException;
+ Object read(InputStream inputStream, Map<String, Object> metadata,
Map<String, Object> headers) throws IOException;
}
Modified:
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/client/transport/NettyClient.java
===================================================================
---
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/client/transport/NettyClient.java 2009-12-04
13:01:13 UTC (rev 11195)
+++
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/client/transport/NettyClient.java 2009-12-04
16:11:11 UTC (rev 11196)
@@ -27,6 +27,7 @@
import java.net.MalformedURLException;
import java.net.URL;
import java.nio.channels.ClosedChannelException;
+import java.util.HashMap;
import java.util.Map;
import java.util.concurrent.ExecutionException;
import java.util.concurrent.Future;
@@ -74,9 +75,10 @@
*/
public class NettyClient
{
- public static final String RESPONSE_CODE = "ResponseCode";
- public static final String RESPONSE_CODE_MESSAGE = "ResponseCodeMessage";
- public static final String PROTOCOL = "Protocol";
+ public static final String RESPONSE_CODE =
"org.jboss.ws.core.client.transport.NettyClient#ResponseCode";
+ public static final String RESPONSE_CODE_MESSAGE =
"org.jboss.ws.core.client.transport.NettyClient#ResponseCodeMessage";
+ public static final String PROTOCOL =
"org.jboss.ws.core.client.transport.NettyClient#Protocol";
+ public static final String RESPONSE_HEADERS =
"org.jboss.ws.core.client.transport.NettyClient#ResponseHeaders";
private static Logger log = Logger.getLogger(NettyClient.class);
private Marshaller marshaller;
@@ -147,6 +149,7 @@
NettyTransportHandler transport = NettyTransportHandler.getInstance(target,
NettyHelper.getChannelPipelineFactory(getSSLHandler(target, callProps)));
Channel channel = null;
Map<String, Object> resHeaders = null;
+ Map<String, Object> resMetadata = null;
try
{
setActualTimeout(callProps);
@@ -186,13 +189,14 @@
throw t != null ? t : ee;
}
resHeaders = result.getResponseHeaders();
- Object resMessage = oneway ? null : unmarshaller.read(result.getResponse(),
resHeaders);
+ resMetadata = result.getMetadata();
+ Object resMessage = oneway ? null : unmarshaller.read(result.getResponse(),
resMetadata, resHeaders);
//Update props with response headers (required to maintain session using
cookies)
callProps.clear();
- if (resHeaders != null)
- {
- callProps.putAll(resHeaders);
+ callProps.put(RESPONSE_HEADERS, resHeaders != null ? resHeaders : new
HashMap<String, Object>());
+ if (resMetadata != null) {
+ callProps.putAll(resMetadata);
}
return resMessage;
@@ -233,7 +237,7 @@
{
NettyHelper.clearResponseHandler(channel);
}
- transport.finished(resHeaders);
+ transport.finished(resMetadata, resHeaders); //provide both headers and metadata
to the transport to allow for proper keepAlive checks
}
}
Modified:
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/client/transport/NettyTransportHandler.java
===================================================================
---
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/client/transport/NettyTransportHandler.java 2009-12-04
13:01:13 UTC (rev 11195)
+++
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/client/transport/NettyTransportHandler.java 2009-12-04
16:11:11 UTC (rev 11196)
@@ -180,9 +180,9 @@
*
* @param headers The received message's headers
*/
- public void goOn(Map<String, Object> headers)
+ public void goOn(Map<String, Object> metadata, Map<String, Object>
headers)
{
- checkKeepAliveHeaders(headers);
+ checkKeepAliveHeaders(metadata, headers);
}
@@ -195,9 +195,9 @@
* @param headers The received message's headers
*
*/
- public void finished(Map<String, Object> headers)
+ public void finished(Map<String, Object> metadata, Map<String, Object>
headers)
{
- checkKeepAliveHeaders(headers);
+ checkKeepAliveHeaders(metadata, headers);
keepAliveConnections--;
if (keepAliveConnections > 0 && isKeepingAlive())
{
@@ -217,9 +217,9 @@
*
* @param headers The received message's headers
*/
- protected void checkKeepAliveHeaders(Map<String, Object> headers)
+ protected void checkKeepAliveHeaders(Map<String, Object> metadata,
Map<String, Object> headers)
{
- if (headers == null) return;
+ if (headers == null || metadata == null) return;
keepAliveConnections = -1;
keepAliveTimeout = 0;
try
@@ -248,7 +248,7 @@
}
}
}
- else if
(HttpVersion.HTTP_1_1.toString().equals(NettyHelper.getFirstHeaderAsString(headers,
NettyClient.PROTOCOL)))
+ else if
(HttpVersion.HTTP_1_1.toString().equals(NettyHelper.getFirstHeaderAsString(metadata,
NettyClient.PROTOCOL)))
{
//Consider the only valid value for Connection in responses is
"close"
keepAliveConnections = (connectionHeader == null) ? DEFAULT_KEEP_ALIVE_CONS :
1;
Modified:
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/client/transport/WSResponseHandler.java
===================================================================
---
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/client/transport/WSResponseHandler.java 2009-12-04
13:01:13 UTC (rev 11195)
+++
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/client/transport/WSResponseHandler.java 2009-12-04
16:11:11 UTC (rev 11196)
@@ -37,6 +37,7 @@
import org.jboss.netty.channel.MessageEvent;
import org.jboss.netty.channel.SimpleChannelUpstreamHandler;
import org.jboss.netty.handler.codec.http.HttpResponse;
+import org.jboss.netty.handler.codec.http.HttpVersion;
/**
* A Netty channel upstream handler that receives MessageEvent
@@ -71,10 +72,11 @@
{
HttpResponse response = (HttpResponse)e.getMessage();
+ Map<String, Object> metadata = result.getMetadata();
+ metadata.put(NettyClient.PROTOCOL, response.getProtocolVersion());
+ metadata.put(NettyClient.RESPONSE_CODE, response.getStatus().getCode());
+ metadata.put(NettyClient.RESPONSE_CODE_MESSAGE,
response.getStatus().getReasonPhrase());
Map<String, Object> responseHeaders = result.getResponseHeaders();
- responseHeaders.put(NettyClient.PROTOCOL, response.getProtocolVersion());
- responseHeaders.put(NettyClient.RESPONSE_CODE, response.getStatus().getCode());
- responseHeaders.put(NettyClient.RESPONSE_CODE_MESSAGE,
response.getStatus().getReasonPhrase());
for (String headerName : response.getHeaderNames())
{
responseHeaders.put(headerName, response.getHeaders(headerName));
@@ -220,12 +222,15 @@
public InputStream getResponse();
public Map<String, Object> getResponseHeaders();
+
+ public Map<String, Object> getMetadata();
}
private class ResultImpl implements Result
{
private InputStream is;
private Map<String, Object> responseHeaders = new HashMap<String,
Object>();
+ private Map<String, Object> metadata = new HashMap<String, Object>();
public InputStream getResponse()
{
@@ -243,5 +248,9 @@
{
this.responseHeaders = responseHeaders;
}
+ public Map<String, Object> getMetadata()
+ {
+ return metadata;
+ }
}
}
\ No newline at end of file
Modified:
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxws/binding/HTTPMessageUnMarshaller.java
===================================================================
---
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxws/binding/HTTPMessageUnMarshaller.java 2009-12-04
13:01:13 UTC (rev 11195)
+++
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxws/binding/HTTPMessageUnMarshaller.java 2009-12-04
16:11:11 UTC (rev 11196)
@@ -53,7 +53,7 @@
validResponseCodes.add(HttpServletResponse.SC_INTERNAL_SERVER_ERROR);
}
- public Object read(InputStream inputStream, Map<String, Object> metadata) throws
IOException
+ public Object read(InputStream inputStream, Map<String, Object> metadata,
Map<String, Object> headers) throws IOException
{
if (log.isTraceEnabled())
{
@@ -65,7 +65,7 @@
if (resCode != null && validResponseCodes.contains(resCode) == false)
throw new WSException("Invalid HTTP server response [" + resCode +
"] - " + resMessage);
- MimeHeaders mimeHeaders = getMimeHeaders(metadata);
+ MimeHeaders mimeHeaders = getMimeHeaders(headers);
HTTPMessageImpl soapMsg = new HTTPMessageImpl(mimeHeaders, inputStream);
return soapMsg;
}
Modified:
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxws/binding/JsonMessageUnMarshaller.java
===================================================================
---
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxws/binding/JsonMessageUnMarshaller.java 2009-12-04
13:01:13 UTC (rev 11195)
+++
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxws/binding/JsonMessageUnMarshaller.java 2009-12-04
16:11:11 UTC (rev 11196)
@@ -43,7 +43,7 @@
// Provide logging
private static Logger log = Logger.getLogger(JsonMessageUnMarshaller.class);
- public Object read(InputStream inputStream, Map<String, Object> metadata) throws
IOException
+ public Object read(InputStream inputStream, Map<String, Object> metadata,
Map<String, Object> headers) throws IOException
{
if (log.isTraceEnabled())
{
Modified:
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxws/client/ClientImpl.java
===================================================================
---
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxws/client/ClientImpl.java 2009-12-04
13:01:13 UTC (rev 11195)
+++
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxws/client/ClientImpl.java 2009-12-04
16:11:11 UTC (rev 11196)
@@ -1,6 +1,6 @@
/*
* JBoss, Home of Professional Open Source.
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * Copyright 2009, Red Hat Middleware LLC, and individual contributors
* as indicated by the @author tags. See the copyright.txt file in the
* distribution for a full listing of individual contributors.
*
@@ -49,7 +49,7 @@
import javax.xml.ws.soap.SOAPBinding;
import javax.xml.ws.soap.SOAPFaultException;
-import org.jboss.util.NotImplementedException;
+import org.jboss.logging.Logger;
import org.jboss.ws.core.CommonBindingProvider;
import org.jboss.ws.core.CommonClient;
import org.jboss.ws.core.CommonMessageContext;
@@ -63,8 +63,8 @@
import org.jboss.ws.core.soap.MessageContextAssociation;
import org.jboss.ws.extensions.addressing.AddressingClientUtil;
import org.jboss.ws.extensions.wsrm.RMAddressingConstants;
+import org.jboss.ws.extensions.wsrm.RMClientSequence;
import org.jboss.ws.extensions.wsrm.RMConstant;
-import org.jboss.ws.extensions.wsrm.RMClientSequence;
import org.jboss.ws.extensions.wsrm.api.RMException;
import org.jboss.ws.extensions.wsrm.common.RMHelper;
import org.jboss.ws.extensions.wsrm.protocol.RMConstants;
@@ -88,6 +88,7 @@
*/
public class ClientImpl extends CommonClient implements
org.jboss.ws.extensions.wsrm.api.RMProvider, BindingProvider
{
+ private static Logger log = Logger.getLogger(ClientImpl.class);
// the associated endpoint meta data
private final ClientEndpointMetaData epMetaData;
@@ -222,11 +223,19 @@
// [JBREM-728] Improve access to HTTP response headers
Map<String, List> headers = new HashMap<String, List>();
- for (Map.Entry en : remotingMetadata.entrySet())
+ Map<String, Object> metadataHeaders = (Map<String,
Object>)remotingMetadata.get(NettyClient.RESPONSE_HEADERS);
+ if (metadataHeaders != null)
{
- if (en.getKey() instanceof String && en.getValue() instanceof List)
- headers.put((String)en.getKey(), (List)en.getValue());
+ for (Map.Entry en : metadataHeaders.entrySet())
+ {
+ if (en.getKey() instanceof String && en.getValue() instanceof
List)
+ headers.put((String)en.getKey(), (List)en.getValue());
+ }
}
+ else
+ {
+ log.info("Cannot find response headers");
+ }
msgContext.put(MessageContext.HTTP_RESPONSE_HEADERS, headers);
}
}
Modified:
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/soap/SOAPMessageUnMarshaller.java
===================================================================
---
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/soap/SOAPMessageUnMarshaller.java 2009-12-04
13:01:13 UTC (rev 11195)
+++
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/soap/SOAPMessageUnMarshaller.java 2009-12-04
16:11:11 UTC (rev 11196)
@@ -41,7 +41,7 @@
// Provide logging
private static Logger log = Logger.getLogger(SOAPMessageUnMarshaller.class);
- public Object read(InputStream inputStream, Map<String, Object> metadata) throws
IOException
+ public Object read(InputStream inputStream, Map<String, Object> metadata,
Map<String, Object> headers) throws IOException
{
if (log.isTraceEnabled())
log.trace("Read input stream with metadata=" + metadata);
Modified:
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/soap/SOAPMessageUnMarshallerHTTP.java
===================================================================
---
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/soap/SOAPMessageUnMarshallerHTTP.java 2009-12-04
13:01:13 UTC (rev 11195)
+++
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/soap/SOAPMessageUnMarshallerHTTP.java 2009-12-04
16:11:11 UTC (rev 11196)
@@ -56,7 +56,7 @@
validResponseCodes.add(HttpServletResponse.SC_INTERNAL_SERVER_ERROR);
}
- public Object read(InputStream inputStream, Map<String, Object> metadata) throws
IOException
+ public Object read(InputStream inputStream, Map<String, Object> metadata,
Map<String, Object> headers) throws IOException
{
if (log.isTraceEnabled())
log.trace("Read input stream with metadata=" + metadata);
@@ -70,7 +70,7 @@
resCode = HttpServletResponse.SC_OK;
}
- String resMessage = (String)metadata.get("ResponseCodeMessage");
+ String resMessage = (String)metadata.get(NettyClient.RESPONSE_CODE_MESSAGE);
if (validResponseCodes.contains(resCode) == false)
throw new WSException("Invalid HTTP server response [" + resCode +
"] - " + resMessage);
@@ -78,7 +78,7 @@
SOAPMessage soapMsg = null;
if (resCode != HttpServletResponse.SC_NO_CONTENT)
{
- MimeHeaders mimeHeaders = getMimeHeaders(metadata);
+ MimeHeaders mimeHeaders = getMimeHeaders(headers);
//[JBWS-2651] modify the ignoreParseError to false
soapMsg = getMessageFactory().createMessage(mimeHeaders, inputStream,
false);
}
Modified:
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/extensions/wsrm/transport/RMMessageAssembler.java
===================================================================
---
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/extensions/wsrm/transport/RMMessageAssembler.java 2009-12-04
13:01:13 UTC (rev 11195)
+++
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/extensions/wsrm/transport/RMMessageAssembler.java 2009-12-04
16:11:11 UTC (rev 11196)
@@ -1,6 +1,6 @@
/*
* JBoss, Home of Professional Open Source.
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * Copyright 2009, Red Hat Middleware LLC, and individual contributors
* as indicated by the @author tags. See the copyright.txt file in the
* distribution for a full listing of individual contributors.
*
@@ -21,12 +21,15 @@
*/
package org.jboss.ws.extensions.wsrm.transport;
-import static org.jboss.ws.extensions.wsrm.transport.RMChannelConstants.*;
+import static
org.jboss.ws.extensions.wsrm.transport.RMChannelConstants.INVOCATION_CONTEXT;
+import static org.jboss.ws.extensions.wsrm.transport.RMChannelConstants.MARSHALLER;
+import static
org.jboss.ws.extensions.wsrm.transport.RMChannelConstants.REMOTING_INVOCATION_CONTEXT;
+import static
org.jboss.ws.extensions.wsrm.transport.RMChannelConstants.SERIALIZATION_CONTEXT;
+import static org.jboss.ws.extensions.wsrm.transport.RMChannelConstants.UNMARSHALLER;
import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
import java.io.InputStream;
-import java.util.Map;
import org.jboss.ws.core.MessageAbstraction;
import org.jboss.ws.core.client.Marshaller;
@@ -76,11 +79,8 @@
byte[] payload = rmResponse.getPayload();
InputStream in = (payload == null) ? null : new
ByteArrayInputStream(rmResponse.getPayload());
UnMarshaller unmarshaller =
(UnMarshaller)rmMetadata.getContext(SERIALIZATION_CONTEXT).get(UNMARSHALLER);
- response = (MessageAbstraction)unmarshaller.read(in,
rmResponse.getMetadata().getContext(REMOTING_INVOCATION_CONTEXT));
+ response = (MessageAbstraction)unmarshaller.read(in,
rmMetadata.getContext(INVOCATION_CONTEXT),
rmMetadata.getContext(REMOTING_INVOCATION_CONTEXT));
}
- Map<String, Object> invocationContext =
rmMetadata.getContext(INVOCATION_CONTEXT);
- invocationContext.clear();
- invocationContext.putAll(rmMetadata.getContext(REMOTING_INVOCATION_CONTEXT));
return response;
}
Modified:
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/extensions/wsrm/transport/RMMetadata.java
===================================================================
---
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/extensions/wsrm/transport/RMMetadata.java 2009-12-04
13:01:13 UTC (rev 11195)
+++
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/extensions/wsrm/transport/RMMetadata.java 2009-12-04
16:11:11 UTC (rev 11196)
@@ -63,12 +63,14 @@
setContext(RMChannelConstants.REMOTING_INVOCATION_CONTEXT,
remotingInvocationContext);
}
- public RMMetadata(Map<String, Object> remotingInvocationContext)
+ public RMMetadata(Map<String, Object> invocationContext, Map<String,
Object> remotingInvocationContext)
{
if (remotingInvocationContext == null)
throw new IllegalArgumentException("Remoting invocation context cannot be
null");
setContext(RMChannelConstants.REMOTING_INVOCATION_CONTEXT,
remotingInvocationContext);
+
+ setContext(RMChannelConstants.INVOCATION_CONTEXT, invocationContext);
}
void setContext(String key, Map<String, Object> ctx)
Modified:
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/extensions/wsrm/transport/RMSender.java
===================================================================
---
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/extensions/wsrm/transport/RMSender.java 2009-12-04
13:01:13 UTC (rev 11195)
+++
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/extensions/wsrm/transport/RMSender.java 2009-12-04
16:11:11 UTC (rev 11196)
@@ -121,7 +121,7 @@
endTime = System.currentTimeMillis();
if (result.getResponse() != null)
{
- Map<String, Object> remotingCtx =
result.getResponse().getMetadata().getContext(RMChannelConstants.REMOTING_INVOCATION_CONTEXT);
+ Map<String, Object> remotingCtx =
result.getResponse().getMetadata().getContext(RMChannelConstants.INVOCATION_CONTEXT);
if (remotingCtx != null)
{
if
(Integer.valueOf(HttpServletResponse.SC_INTERNAL_SERVER_ERROR).equals(remotingCtx.get(NettyClient.RESPONSE_CODE)))
Modified:
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/extensions/wsrm/transport/RMUnMarshaller.java
===================================================================
---
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/extensions/wsrm/transport/RMUnMarshaller.java 2009-12-04
13:01:13 UTC (rev 11195)
+++
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/extensions/wsrm/transport/RMUnMarshaller.java 2009-12-04
16:11:11 UTC (rev 11196)
@@ -47,10 +47,10 @@
return instance;
}
- public Object read(InputStream is, Map metadata) throws IOException
+ public Object read(InputStream is, Map<String,Object> metadata, Map<String,
Object> headers) throws IOException
{
if (is == null)
- return RMMessageFactory.newMessage(null, new RMMetadata(metadata)); // TODO:
investigate why is == null (WSAddressing reply-to test)
+ return RMMessageFactory.newMessage(null, new RMMetadata(metadata, headers)); //
TODO: investigate why is == null (WSAddressing reply-to test)
ByteArrayOutputStream baos = new ByteArrayOutputStream();
byte[] buffer = new byte[1024];
@@ -61,7 +61,7 @@
baos.write(buffer, 0, count);
count = is.read(buffer);
}
- return RMMessageFactory.newMessage(baos.toByteArray(), new RMMetadata(metadata));
+ return RMMessageFactory.newMessage(baos.toByteArray(), new RMMetadata(metadata,
headers));
}
}
Modified:
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/extensions/wsrm/transport/backchannel/RMRequestHandlerImpl.java
===================================================================
---
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/extensions/wsrm/transport/backchannel/RMRequestHandlerImpl.java 2009-12-04
13:01:13 UTC (rev 11195)
+++
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/extensions/wsrm/transport/backchannel/RMRequestHandlerImpl.java 2009-12-04
16:11:11 UTC (rev 11196)
@@ -78,7 +78,7 @@
try
{
String requestPath = new URL(request.getUri()).getPath();
- RMMessage message =
(RMMessage)RMUnMarshaller.getInstance().read(content.readable() ? new
ChannelBufferInputStream(content) : null, requestHeaders);
+ RMMessage message =
(RMMessage)RMUnMarshaller.getInstance().read(content.readable() ? new
ChannelBufferInputStream(content) : null, null, requestHeaders);
handle(requestPath, message);
}
catch (Throwable t)