Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / October 2005

Tip: Looking for answers? Try searching our database.

SOAP in Java without any Frameworks or Libraries

Thread view: 
Abstract - 03 Oct 2005 18:08 GMT
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.
Harry Bosch - 03 Oct 2005 18:37 GMT
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.
Roedy Green - 03 Oct 2005 18:47 GMT
>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.
Signature

Canadian Mind Products, Roedy Green.
http://mindprod.com Again taking new Java programming contracts.



Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.