Search code examples
soapjax-wssoapheader

What's the difference between receiving data by SOAP header and SOAP body?


I would like what happen when an web service receive part of data by SOAP header. What's the diference between receive data by SOAP header and SOAP body (Before the web service receive all of data by SOAP body)

I don't understand at all what are benefits of this new version.

PD: My web service is based on Java with JAX-WS

Thanks a lot.


Solution

  • Same as any request SOAP has header and body. generally SOAP has all data in body. Body is highly documented so you can not send additional data in SOAP body. If you are doing It may break the other end code(Implementation in different for different technologies). SO if you want to send additional data in SOAP without effecting the WSDL you can use SOAP header. Headers are like to send additional information. these header and values can be accessed from message context. to access these value code may vary from technology to technology