On 11/21/2011 3:03 PM, S P wrote:
> Hi,
>
> I want to have a web service so that each person can put his/her
> surname, firstName, and dateOfBirth
> and this information will be extended as a XML file (Person.xml) on
> our server.
Are you talking about XML based database ?
Any particular reason to store in an XML file rather than on RDBMS or
NO-SQL?
>
> I already put Person.xml (which has only one person - Bill Gates) on
> Tomcat server.
Does he know about this ? ;-)
> But now, I want to give other persons opportunity so they can also
> extend their information on our xml file ((Person.xml) as
> Bill Gates already did!
You can have a REST API (Axis2 provides it automatically) like below
axis2/PersonService/add?surename=Foo&firstName=ddd&dateOfbirth=somedata

Then you can have a simple service like below:

class MyService {

  void addPerson(String surename, String firstName, String dataOfBirth){
    updateXML()
 }

}

have a look at :

http://www.developer.com/services/article.php/10928_3613896_2/Writing-an-Axis2-Service-from-Scratch.htm
http://www.developer.com/db/article.php/3735771/Exposing-a-Database-as-a-Web-Service.htm


Deepal
>
> Please let me know how can I implement such a service. I am a beginner
> in web service field, so
> please share your knowledge.
>
> Person.xml:
>
> <?xml version="1.0" encoding="UTF-8"?>
>
> <Personxmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
> xsi:noNamespaceSchemaLocation="file:/C:/Tomcat/webapps/axis2/WEB-INF/services/Person.xsd"
> surname="Gates"
> firstName="Bill"
> dateOfBirth="1956-05-04"/>
>
>
> Looking forward for your response soon.
>
>
>
>
>

Reply via email to