• 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
  • Devaka Cooray
  • Tim Cooke
  • Jeanne Boyarsky
  • Ron McLeod
Sheriffs:
Saloon Keepers:
  • Piet Souris
Bartenders:

Java Web Service using XML example ?

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

Where can i find an example (or tutorial) of a java Web Service that receives and returns data ? For example i want to use a simple XML Schema with <name> and <age>, and just move around from a client to a web service.

Thanks.
 
Alex Parvan
Ranch Hand
Posts: 115
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Give me one word where to start, how do i get from a java client to a java webservice by using XML ?
 
Ranch Hand
Posts: 2187
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Where can i find an example (or tutorial) of a java Web Service that receives and returns data ?



A web service is an integration technology, not an implementation technology. It is used for connecting applications only. There is no "logic" besides what is needed to enable the applications to communicate.

There is much more than XML involved and there are different technologies for implementing web services.

For example, a SOAP-based web service uses a client SOAP Engine and a server SOAP Engine.

Application A wants to get data.

Application B has direct connection to database.

There is a web service which allows app A to get data using app B functionality.

The purpose of the web service is to allow two applications to communicate with each other. That is all.


There is a good tutorial in:
http://www.amazon.com/Building-Web-Services-Java-Making/dp/0672326418/ref=sr_1_1?ie=UTF8&s=books&qid=1263050542&sr=1-1
 
Alex Parvan
Ranch Hand
Posts: 115
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Definitely makes more sense now. I found that using jaxb i can "read" and "write" java data from/to xml, i'm guessing it's also possible to exchange that data between a client and a web service.

Thanks for your help.
 
Ranch Hand
Posts: 198
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Parvan Alexandru wrote:Definitely makes more sense now. I found that using jaxb i can "read" and "write" java data from/to xml, i'm guessing it's also possible to exchange that data between a client and a web service.

Thanks for your help.


XML data is just a string, hence sending it over web serivce is no different from sending string, primitives etc. See and example here Send XML data over web service.
 
reply
    Bookmark Topic Watch Topic
  • New Topic