Win a copy of The Way of the Web Tester: A Beginner's Guide to Automating Tests this week in the Testing forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

help needs to build this web service and do this exercise

Ushan Adikaram
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i'm a newbie to java. can anybody give me a help here.

Exercises :

1) Develop customer profile web service as below: which having two methods saveCustomer and retrieveCustomer

Customer infomation data structure as follows

CustomerID :string
Name :string
phoneNumber : int
Address : Object which contain(home number(int), street(string), town(string))- Complex type object
Age: int
LastBalance: double

you send the SOAP request (in your web service call) with customer id or phone number the web service should return customer information and display as system out.

Note Just hard code customer dummy data inside web service method call getCustomerData which return the customer object.


Compose customer object (java object) in client side and send via web service using web service save method to write to a data to text file in server side (in your case same machine , but it create by customer profile web service not the web service client)

Objective of this exercise is to understand web service / soap complex and simple variable types and how to exchange those with SOAP request and response.

Exercise 3:

send some wrong customer id or phone number as input to webservice method "retrieveCustomer" and generate error and send it via SOAP fault to client and display it

if someone can give me a complete answer or a link to an example just like this one it would be a great help. please be kind enough to consider that i'm a newbie to java.
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic