This is my SOAP request.
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
<SOAP-ENV:Header>
<Security>
<UsernameToken>
<SiteId>testlab1</SiteId>
<Password>abcd1234</Password>
</UsernameToken>
</Security>
</SOAP-ENV:Header>
<SOAP-ENV:Body
xmlns:ns3="http://www.foo.bar/ws"
xmlns:ns5="http://http://www.foo.bar.com"
xmlns:ns4="http://schemas.xmlsoap.org/soap/envelope">
<ns5:RequestObject>
<ns3:Header>
<AccountNo>4353454543</AccountNo>
<CustomerId>534534</CustomerId>
<SiteId>testlab1</SiteId>
<RegisterId>0</RegisterId>
<SequenceNumber>1</SequenceNumber>
<Retry>0</Retry>
</ns3:Header>
</ns5:RequestObject>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
It works with the SOAP UI tool. But when it is automatically generated using spring-ws WebServiceTemplate, it does not include:
<Security>
<UsernameToken>
<SiteId>testlab1</SiteId>
<Password>abcd1234</Password>
</UsernameToken>
</Security>
part c <SOAP-ENV:Header>. Can I include this authentication data through my code? Any help would be appreciated !!
source
share