Hi Daniel, I looked into both ways of creating header but I didnt see any difference.Below is the request created the way you suggested...
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"><soap:Header><wsse:Security xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" SOAP-ENV:mustUnderstand="1"><wsse:UsernameToken><wsse:Username>TestUser</wsse:Username><wsse:Password>TestPassword</wsse:Password></wsse:UsernameToken></wsse:Security></soap:Header><soap:Body><ns1:sendNotification xmlns:ns1="http://webservice.oasys.ets.org"><EventNotificationInfo_1 xmlns:ns2="http://webservice.oasys.ets.org/types"><sourceName>IBIS</sourceName><sourceType>ITEM BANK</sourceType><eventType>ADMIN_FINALIZED</eventType><xmlData><questestinterop><qticomment>Event Notification XML</qticomment> <context> <generic_identifier> <type_label>TestProgramCode</type_label> <identifier_string>GRI</identifier_string> </generic_identifier> <generic_identifier> <type_label>TestSubjectCode</type_label> <identifier_string>GEN</identifier_string> </generic_identifier><generic_identifier> <type_label>TestAdminCode</type_label> <identifier_string>20100917A</identifier_string> </generic_identifier></context></questestinterop></xmlData></EventNotificationInfo_1></ns1:sendNotification></soap:Body></soap:Envelope> And here is the request created using SOAPFactory... <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"><soap:Header><wsse:Security xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" SOAP-ENV:mustUnderstand="1"><wsse:UsernameToken><wsse:Password xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">TestPassword</wsse:Password><wsse:Username xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">TestUser</wsse:Username></wsse:UsernameToken></wsse:Security></soap:Header><soap:Body><ns1:sendNotification xmlns:ns1="http://webservice.oasys.ets.org"><EventNotificationInfo_1 xmlns:ns2="http://webservice.oasys.ets.org/types"><sourceName>IBIS</sourceName><sourceType>ITEM BANK</sourceType><eventType>ADMIN_FINALIZED</eventType><xmlData><questestinterop><qticomment>Event Notification XML</qticomment> <context> <generic_identifier> <type_label>TestProgramCode</type_label> <identifier_string>GRI</identifier_string> </generic_identifier> <generic_identifier> <type_label>TestSubjectCode</type_label> <identifier_string>GEN</identifier_string> </generic_identifier><generic_identifier> <type_label>TestAdminCode</type_label> <identifier_string>20100917A</identifier_string> </generic_identifier></context></questestinterop></xmlData></EventNotificationInfo_1></ns1:sendNotification></soap:Body></soap:Envelope> anything in this request which may be missing and needed for binding....in CXF or in WSS4jInInterceptor... Nidhi -- View this message in context: http://cxf.547215.n5.nabble.com/UsernameToken-Credentials-not-coming-to-Server-side-Wss4jInInterceptor-tp5726797p5726914.html Sent from the cxf-user mailing list archive at Nabble.com.
