On Sat February 20 2010 2:36:35 am Lalit Kapoor wrote:
> I am using CXF 2.2.3 so things may be a little different for you. I don't
> know if the following workaround is acceptable, but it works.
> 
> I modified org.apache.cxf.jaxws.AbstractJAXWSMethodInvoker by adding this
> to the updateWebServiceContext method:
> 
> sm.setVersion(((SoapMessage)exchange.getInMessage()).getVersion());
> 
> I did this right after the soap message was created:
> SoapMessage sm = (SoapMessage) createResponseMessage(exchange);
> 
> I tested sending messages with soap 1.1 and soap 1.2 and with WS-Reliable
> Messaging for both against my endpoint.
> 
> Hope it helps.

The "problem" with this solution is this is exactly what the SoapBinding is 
supposed to be doing.  If you look into SoapBinding.createMessage, you see:
if (m.getExchange().getInMessage() instanceof SoapMessage) {
    
soapMessage.setVersion(((SoapMessage)m.getExchange().getInMessage()).getVersion());
} 

Thus, I'm really curious as to why this would be needed.   Is there any way 
you could put a break point on:

1) The SoapMessage constructor - I'd like to see if a SoapMessage is being 
created outside the SoapBinding.   It shouldn't be.

2) SoapMessage.setVersion(..) call to see if it's being called with 1.1 or of 
it's not being called at all (and thus defaulting to 1.1).

Thanks!

-- 
Daniel Kulp
[email protected]
http://www.dankulp.com/blog

Reply via email to