I have a web service where the customer sends the http header with the SOAP action with single quotes (...;action='myServiceOp'). We used traditional Websphere application server 8, but migrated to Websphere Liberty. Now Liberty does not like this single quotes and responds with
The given SOAPAction 'myServiceOp' does not match an operation.
So I thought I use a handler to modify this parameter and did the following in the handleMessage method:
Map<String, List<String>> requestHeaders = (Map<String, List<String>>) ctx.get(MessageContext.HTTP_REQUEST_HEADERS);
if(requestHeaders.get("Content-Type") != null) {
List<String> cleanedContentType = requestHeaders.get("Content-Type");
String cleanedString = requestHeaders.get("Content-Type").get(0).replace("'", "");
cleanedContentType.clear();
cleanedContentType.add(cleanedString);
requestHeaders.put("Content-Type", cleanedContentType);
}
In my logs I can see that the request headers were set accordingly, but my web service still answers with the above error.
Liberty uses CXF and we had already a lot of issues with that, so I suspect that this is somehow interfering.
Is there maybe a Liberty configuration in the server.xml?
If an interceptor is needed (or something CXF specific), do I need an extra feature? Because I get ClassNotFound errors when I tried that the last time.
Kind regards