SOAP in Java without any Frameworks or Libraries

A

Abstract

I am wondering how I can manually process SOAP requests without using
the SOAP or Axis frameworks for Apache. That is, I would like to parse
the SOAP request myself, and construct the entire SOAP response myself.
Any links to relevant resources is appreciated.
 
H

Harry Bosch

Well, basically, you create the XML-based soap request to the server,
and you get a soap-response back. This can be quite tedious and this
is why you use the frameworks.

But, basically, you will want to read up on the format of the SOAP XML
document structure. Here a primer explaining the SOAP/XML-RPC specs...

http://www.w3.org/TR/2003/REC-soap12-part0-20030624/

So, after you understand the document type you basically:

1) Create a SOAP request (xml document)
2) open a socket to the server that handles the request
3) get the writer of the socket and write the XML document to the
stream
4) get a reponse
5) read the contents of that response (via the reader on the socket)
which is an XML document
6) close socket
7) interrogate the xml file you received for your data you were asking
for

That is a high level approach. If you are using HTTP, you can just
post your data to the server and get the response.

But actually, you wanted the reverse (get a request, and send a
response) ... so just do the opposite.

1) wait for a request, if HTTP really easy... implement in a servlet
and wait for a post.
2) the post should contain an XML document, read it.
3) create a response and write it back to the stream.

Again, go to:

http://www.w3.org/TR/2003/REC-soap12-part0-20030624/


Have fun.
 
R

Roedy Green

I am wondering how I can manually process SOAP requests without using
the SOAP or Axis frameworks for Apache. That is, I would like to parse
the SOAP request myself, and construct the entire SOAP response myself.
Any links to relevant resources is appreciated.

see http://mindprod.com/jgloss/soap.html

This sort of documentation tends to suffer from assuming you already
know everything, and just need brushing up on some minor detail.

Your best defense is to scour for real world examples.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,768
Messages
2,569,574
Members
45,049
Latest member
Allen00Reed

Latest Threads

Top