You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@servicemix.apache.org by jb...@apache.org on 2009/10/20 16:15:23 UTC
svn commit: r827479 -
/servicemix/components/bindings/servicemix-http/trunk/src/main/java/org/apache/servicemix/http/endpoints/HttpSoapConsumerMarshaler.java
Author: jbonofre
Date: Tue Oct 20 14:15:23 2009
New Revision: 827479
URL: http://svn.apache.org/viewvc?rev=827479&view=rev
Log:
[SMXCOMP-659] Stick Content-Type in the HttpSoapConsumerMarshaler.
Modified:
servicemix/components/bindings/servicemix-http/trunk/src/main/java/org/apache/servicemix/http/endpoints/HttpSoapConsumerMarshaler.java
Modified: servicemix/components/bindings/servicemix-http/trunk/src/main/java/org/apache/servicemix/http/endpoints/HttpSoapConsumerMarshaler.java
URL: http://svn.apache.org/viewvc/servicemix/components/bindings/servicemix-http/trunk/src/main/java/org/apache/servicemix/http/endpoints/HttpSoapConsumerMarshaler.java?rev=827479&r1=827478&r2=827479&view=diff
==============================================================================
--- servicemix/components/bindings/servicemix-http/trunk/src/main/java/org/apache/servicemix/http/endpoints/HttpSoapConsumerMarshaler.java (original)
+++ servicemix/components/bindings/servicemix-http/trunk/src/main/java/org/apache/servicemix/http/endpoints/HttpSoapConsumerMarshaler.java Tue Oct 20 14:15:23 2009
@@ -114,6 +114,8 @@
public void sendOut(MessageExchange exchange, NormalizedMessage outMsg, HttpServletRequest request, HttpServletResponse response) throws Exception {
addResponseHeaders(exchange, request, response);
+ // the content type is specific to this marshaler
+ response.setContentType("application/soap+xml");
Message in = (Message) request.getAttribute(Message.class.getName());
Message msg = binding.createMessage(in);
OutputStream encodingStream = getResponseEncodingStream(request.getHeader(HttpHeaders.CONTENT_ENCODING), response.getOutputStream());
@@ -125,7 +127,6 @@
InterceptorChain phase = getChain(Phase.ServerOut);
phase.doIntercept(msg);
encodingStream.close();
- // TODO: handle http headers: Content-Type, ...
}
public void sendError(MessageExchange exchange, Exception error, HttpServletRequest request, HttpServletResponse response) throws Exception {
@@ -152,6 +153,8 @@
public void sendFault(MessageExchange exchange, Fault fault, HttpServletRequest request, HttpServletResponse response) throws Exception {
addResponseHeaders(exchange, request, response);
+ // the content type is specific to this marshaler
+ response.setContentType("application/soap+xml");
response.setStatus(HttpServletResponse.SC_INTERNAL_SERVER_ERROR);
Message in = (Message) request.getAttribute(Message.class.getName());
Message msg = binding.createMessage(in);
@@ -168,7 +171,6 @@
msg.setContent(Exception.class, soapFault);
phase.doIntercept(msg);
encodingStream.close();
- // TODO: handle http headers: Content-Type, ...
}
protected InterceptorChain getChain(Phase phase) {