Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.


#593 Multiple Content-Type headers sent


I'm using soapUI v3.6 on win7.

I'm suffering from an odd problem with exchange web services, namely that the default Content-Type header is rejected:

HTTP/1.1 415 Cannot process the message because the content type 'text/xml;charset=UTF-8' was not the expected type 'text/xml; charset=utf-8'.

(Yes, it just wants a space in the middle, and it's been driving me mad).

So I thought I could easily override the Content-Type in soapUI. Unfortunately though it just adds another Content-Type header! If I look in the raw request view after a request, any headers I try to change are just duplicated. The server responds with:

HTTP Error 400. The request has an invalid header name.

The raw request looks like:

POST https://....lan/EWS/exchange.asmx HTTP/1.1
Accept-Encoding: gzip,deflate
Content-Type: text/xml;charset=UTF-8
SOAPAction: ""
Content-Type: text/xml; charset=UTF-8
User-Agent: Jakarta Commons-HttpClient/3.1
Host: ...
Content-Length: 728

xml here...


  • Ole Lensmar
    Ole Lensmar


    thanks for reporting.. problem is that soapUI allows multiple headers with the same name, so in your case that is going to mix things up.. we'll what can be done!



  • Ole Lensmar
    Ole Lensmar


    this should be fixed in the upcoming nightly build of 3.6.1-snapshot



  • codemonkey233

    I just want to thank you for realizing that the SPACE was the problem here. I was about to shoot myself, because I was trying everything to figure out how to make SOAPUI talk to Exchange Web Services, and couldn't understand why the content-header message kept coming back as bad.

    By the way, and intermediate solution here is to use Burp, Intercept the request, and add a space to the header. Obviously not ideal.... but it works.

  • I can't tell you how long it took of bashing my head against various things to figure that out - for unknown reasons the java managed api I was trying to use sent the same header that was getting rejected.

    I hope you have more fun developing with the exchange api than I did - it was a bit of a nightmare!