• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Help with SOAP

 
Ranch Hand
Posts: 280
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi All,

Please help me in writing a Simple SOAP example and running it. What all is required to run a SOAP example (Server, client). What are the environments required (i.e. Webserver Tomacat 5.5, Jboss, etc.) What are the jars required. How do I start writing a SOAP program in Eclipse.

String endpoint = "http://fabulous.com/gizmo/order"; SOAPMessage response = connection.call(request, endpoint);

What can be the endpoint here. If i am just making a basic sample program in Eclipse for my understanding and knowledge.

Please Help me ....

Thanks in advance.
[ November 15, 2008: Message edited by: Bear Bibeault ]
 
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
An easy starting point is to use Apache Axis 2, which is a web app that can be deployed in any standard servlet container like Tomcat. It has multiple examples, user guides, etc. both online and in the distribution file.

I think it may be easier not to use an IDE, but to deploy the services directly on Tomcat, and to run the clients using Ant scripts, but that's a personal preference.
 
Bartender
Posts: 2968
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Siddharth Bhargava:



That line is straight out of the The J2EE 1.4 Tutorial: Overview of SAAJ

If, for whatever reason, you have to use SAAJ then refer to "Java Web Services in a Nutshell" Sample: Chapter 3 SAAJ (PDF).

Starting with Java SE 5 SAAJ 1.3 is part of the JDK/JRE. SAAJ 1.3 is available separately for J2SE 1.4.

If you are simply looking for a simple and more up to date (but not necessarily production quality) example and you can use Java SE 6 then have a look at this topic and this topic.

And I would tend to agree with Ulf - initially keep the IDE out of it, otherwise its difficult to know what is going on - provided you can get it to work in the first place as that tends to be a challenge entirely on its own.
 
Siddharth Bhargava
Ranch Hand
Posts: 280
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

I have read the Axis documentation and samples. I couldn't understand the samples as I am just a beginner in SOAP. I am using Eclipse and unaware that what jars do we require, or which webserver to use and where and how to deploy the application in the webserver for a simple SOAP or SAAJ application. Please guide me....
 
Ulf Dittmer
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Like I said, don't use Eclipse, especially if you're a beginner.

Tomcat 5.5 will do nicely as a server. Then download Axis and follow the instructions on how to install it: http://ws.apache.org/axis2/1_4_1/installationguide.html#servlet_container Axis is a web app, so it's pretty straightforward to install in a servlet container.
 
Siddharth Bhargava
Ranch Hand
Posts: 280
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have already installed Axis2 and its running properly on Tomcat 5.5 webserver. Now what. How do I begin to write SOAP service and SOAP client.
 
Ulf Dittmer
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The http://ws.apache.org/axis2/1_4_1/quickstartguide.html lists all the steps; start with the "POJOs" variant (not AXIOM, JIBX, or XMLBeans). The source code for those examples is in the "samples" directory of the Axis download.

You may also want to work through the "JAXWS Guide" and "POJO Guide" pages. None of those is an introduction to web services (or SOAP or WSDL) in general, though, so a good book on SOAP web services will definitely help.
 
The first person to drink cow's milk. That started off as a dare from this tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic