I am programming a simple proxy in java:
- Read XML File
- Send request to Web-Service
- Read Web-Service response
- Write response to file
My first attempt is using JAXB to read the xml-file and generating Java-Objects.
Then I send the objects with JAX-WS (IBM WebSphere).
I receive the response as a “ResponseObject” which is then generated into xml code. I write the XML-Code to a file.
This setup works good. But…
When sending the java objects to the WebService, xml is generated, and the response agains creates java objects. I really would not need those request and response objects.
Is there a way to directly invoke the WebService with plaintext xml? And to read the response as plaintext xml, instead of those response objects?
(Lets assume the xml files are always valid.)
Thank you
One could use SAAJ (SOAP with Attachments API for Java) which runs at a lower level than JAX-WS. I expect it to use less system resources than JAX-WS.
See the following example (copied from users.skynet.be/pascalbotte/rcx-ws-doc/saajpost.htm)