I have a SOAP message call that is working on my soapUI
<soapenv:Envelope xmlns:cen="http://netadmin.ghl.com/centralizedconfig" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Header>
<wsse:Security soapenv:mustUnderstand="1" xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
<wsse:UsernameToken wsu:Id="UsernameToken-21">
<wsse:Username>admin</wsse:Username>
<wsse:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText">secret</wsse:Password>
<wsse:Nonce EncodingType="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-soap-message-security-1.0#Base64Binary">xo6ADfFZ5aqvukQZjUb6IQ==</wsse:Nonce>
<wsu:Created>2013-10-01T06:59:20.202Z</wsu:Created>
</wsse:UsernameToken>
<wsu:Timestamp wsu:Id="TS-20">
<wsu:Created>2013-10-01T06:58:47.521Z</wsu:Created>
<wsu:Expires>2013-10-01T07:10:47.521Z</wsu:Expires>
</wsu:Timestamp>
</wsse:Security>
</soapenv:Header>
<soapenv:Body>
<cen:GetXMLRequest>
<cen:IpAddress>10.36.28.211</cen:IpAddress>
</cen:GetXMLRequest>
</soapenv:Body>
</soapenv:Envelope>
whenever I run this on my SOAP UI to test my web service, its perfectly working just fine, I am having a difficulty translating this soap message with my webServiceTemplate.sendSourceAndReceiveToResult call, I am new to web service and I dont know how would I get to incorporate the header messages on my code. can someone help me with this?
client call:
webServiceTemplate.sendSourceAndReceiveToResult (url,source, result);
i cant seem to include the security headers on the source parameter
I have added an interceptor on my spring clients application context
<bean id="wss4jSecurityInterceptor"
class="org.springframework.ws.soap.security.wss4j.Wss4jSecurityInterceptor">
<property name="securementActions" value="UsernameToken" />
<property name="securementUsername" value="user" />
<property name="securementPassword" value="password" />
<property name="validationCallbackHandler" ref="callbackHandler" />
</bean>