1,105,406 Community Members

Webservice Url

Member Avatar
pucivogel
Junior Poster in Training
64 posts since Jan 2010
Reputation Points: 0 [?]
Q&As Helped to Solve: 0 [?]
Skill Endorsements: 0 [?]
 
0
 

Can anyone explain me better the conpcept of the webservice. I'm using wamp for a school project, i'm creating an adress-book with JSON and AJAX. The Deitel's one if you have encounteered it before. I have the deitel's code and simply want to implement it in my website. It's requesting webserviceurl. The site i want to create is in php. I have attached the script and highlighted the things i don't understand.

Attachments Document.rtf (17.1KB)
Member Avatar
gon1387
Posting Whiz in Training
242 posts since Jan 2011
Reputation Points: 22 [?]
Q&As Helped to Solve: 38 [?]
Skill Endorsements: 4 [?]
 
0
 

Hope this explains it:
In a simple sense, webservice is a standardized way for you to provide data and communication to your other software or a 3rd party software.
Like in your php code and your js code, how will the js code understand your php code?

Member Avatar
pucivogel
Junior Poster in Training
64 posts since Jan 2010
Reputation Points: 0 [?]
Q&As Helped to Solve: 0 [?]
Skill Endorsements: 0 [?]
 
0
 

So in this line i should provide the path of the php file, where i have done the connection with the database?
var webServiceUrl = '/AddressBookWebService/AddressService.asmx';

Member Avatar
gon1387
Posting Whiz in Training
242 posts since Jan 2011
Reputation Points: 22 [?]
Q&As Helped to Solve: 38 [?]
Skill Endorsements: 4 [?]
 
0
 

That specifically is just a declaration of a variable and assigning a string. But yes, if you're going to connect and fetch data to that webservice URL of yours. :)

Member Avatar
pucivogel
Junior Poster in Training
64 posts since Jan 2010
Reputation Points: 0 [?]
Q&As Helped to Solve: 0 [?]
Skill Endorsements: 0 [?]
 
0
 

One more thing please, what parameters should i pass here? Thanks in advance
** function callWebService( method, paramString, callBack )**

Member Avatar
gon1387
Posting Whiz in Training
242 posts since Jan 2011
Reputation Points: 22 [?]
Q&As Helped to Solve: 38 [?]
Skill Endorsements: 4 [?]
 
0
 

Based on the code you provided,

Method:

  • getAllnames
  • search
  • validateZip
  • validateTel
  • addEntry

Param:

  • Any array of an object with a param and value properties.

callBack:

  • Anonymous function

Note: Please do mark this as solved once you think your query's been answered.

Question Answered as of 1 Year Ago by gon1387
You
This question has already been solved: Start a new discussion instead
Post:
Start New Discussion
View similar articles that have also been tagged: