jax-ws change Content-type to Content-Type because server is hyper sensitive

Posted by EsbenP on Stack Overflow See other posts from Stack Overflow or by EsbenP
Published on 2010-03-03T15:08:20Z Indexed on 2010/03/12 11:47 UTC
Read the original article Hit count: 1258

Filed under:

I have to connect to a poorly implemented server that only understands Content-Type(capital-T) and not Content-type. How can I ask my jax-ws client to send Content-Type?

I've tried

Map<String, List<String>> headers = (Map<String, List<String>>)
((BindingProvider)port).getRequestContext().get(MessageContext.HTTP_REQUEST_HEADERS);

but headers is null. What am I doing wrong?

© Stack Overflow or respective owner

Related posts about jax-ws