Hi!
Nitin Gaur wrote:But I wonder how would I generate the XML just by looking at the schema (if available). I must generate JAXB bindings from WSDL, populate them and then do marshaling to generate the XML SOAP message. Right?
Well, you can write code that expects certain XML data using, for instance, the SAAJ API. This is of course much more work than using JAXB, but it is still an available option.
The motivation to process raw XML is to provide uniform processing at server side that defines XML as common input format to integrate through any type of communication medium e.g. SOAP/HTTP or JMS or RMI (rare case)
Well again, what is stopping you from using JAXB independent of the transport medium?
If you use the XJC JAXB schema compiler, generating JAXB classes, then you can write your own code that uses these JAXB classes, regardless of whether the XML data is received over HTTP, JMS, RMI or even in an email.
Of course you can still use the JAXB classes generated by wsimport in your own code.
Best wishes!