I have to send the tokens through header. This is the code I am trying.
ServiceClient _serviceClient = new ServiceClient();
SOAPHeaderBlock header = new SOAP11HeaderBlockImpl();
header.addAttribute("Content-Type", "text/xml; charset=utf-8", null);
header.addAttribute("LocationToken", "vdsadfafdasfsdas==", null);
header.addAttribute("AccessToken", "zxfadfasfasdfasdfsadf", null);
header.addAttribute("Content-Length", String.valueOf(input), null);
header.addAttribute("SOAPAction","http://example.com/CalculateOrder",null);
_serviceClient.addHeader(header);
owesbservice._setServiceClient(_serviceClient);
I get NullpoinException in the response.
CalculateOrderResponseDocument responseDoc = null;
responseDoc = owesbservice.calculateOrder(calculateOrder8);
How to fix this? Apart from this I need to specifiy POST/GET