Hi,
Check this buddy.
SOAPHeaderElement auth = new SOAPHeaderElement("http://localhost/services/Odds","Authentication");
auth.addChildElement("Username").addTextNode("xxxxx");
auth.addChildElement("Password").addTextNode("xxxxx");
call.addHeader(auth);
So the complete SOAP message will be as follows:
<?xml version="1.0" encoding="UTF-8"?>
<soapenv:Envelope
xmlns:soapenv = "http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsd = "http://www.w3.org/2001/XMLSchema"
xmlns:xsi = "http://www.w3.org/2001/XMLSchema-instance">
<soapenv:Header>
<ns1:Authentication
soapenv:actor = "http://schemas.xmlsoap.org/soap/actor/next"
soapenv:mustUnderstand = "0"
xmlns:ns1 = "http://localhost/services/Odds">
<ns1:Username>xxxxx</ns1:Username>
<ns1
asssword>xxxxx</ns1
asssword>
</ns1:Authentication>
</soapenv:Header>
<soapenv:Body>
<GetXMLRaggruppamentiEsiti soapenv:encodingStyle = "http://schemas.xmlsoap.org/soap/encoding/"/>
</soapenv:Body>
</soapenv:Envelope>
Hope this will solve the purpose.
raminder.s