I have made webservice client with NetBeans 8.2 wizard from an existing WSDL document. Java8 and JAX-WS 2.2.9 is used.
As far as I understand everything works with the wizard created code as expected but the query is missing value from "SOAPAction" header which is requirement to have value for the query to work. The header key exists but value is empty string: SOAPAction: ""
when it should be SOAPAction = "SendReports"
I have tried using this:
Map<String, List<String>> requestHeaders = new HashMap<>();
requestHeaders.put("SOAPAction", Arrays.asList("sendReports"));
sourceDispatch.getRequestContext().put(MessageContext.HTTP_REQUEST_HEADERS, requestHeaders);
-> which results also in empty value. If I put "SOAPAction_2" & "sendReports", that header works correct but obviously the header key is wrong and wont solve my problem. Something overwrites my value afterwards?
The webservice method has annotation:
@WebMethod(operationName = "SendReports", action = "SendReports")
Any tips on what could I try next?
I saw many posts suggesting using BindingProvider but I cannot use com.sun.* packages for reasons left unexplained.