I need to somehow include in my soap service envelope a header whose values are "Authorization"
and "Bearer xXsomeCode123xX"
, this is the part of the code I need to edit with the new header, which then returns me an xml document with some data requested through the soap web service.
//SERVICE
Service service = new Service();
Call call = (Call) service.createCall();
call.setTargetEndpointAddress(new java.net.URL(endPointURL));
call.setSOAPActionURI(soapActionURI);
//INVOKE
SOAPEnvelope response = (SOAPEnvelope) call.invoke(new Message(soap.asXML()));
Document doc = new DOMReader().read(response.getAsDocument());
return doc;
This is what i see in SoapUI (and works with the header set like that)
I know the question is confusing, and I am, I've researched on the internet but almost every header is made of username:password fields, while i only have this "Authorization" to work on