• 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

One WS question from questionnaire

 
Ranch Hand
Posts: 66
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I was just doing some questions for Web Services certification. I have answer for the below question but I didn't get the logic. Can anybody help?

A company is refactoring an existing website to use Web services clients. The application retrieves lists
of parts and displays them to the users in a browser window. Previously, the data was stored as files on
the web server and, in order to access the files, the user would simply click on a hyperlink. Now the data
must be dynamically generated via a service that another developer has created. They want the easiest
way to refactor their website to use Web services. Which three client-side technologies should they use.?
(Choose three.)
A. SOAP
B. REST
C. Javascript
D. XML
E. JSON
F. JAVA

The answer is given B,C,E. But why? Please explain.

Thanks.
 
Ranch Hand
Posts: 1376
Eclipse IDE Java
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
normally web server resources are accessed by HTTP URL. Therefore, for this scenario, REST based web services shall be better (if not best) to implement.
 
Rancher
Posts: 43081
77
  • Likes 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

normally web server resources are accessed by HTTP URL. Therefore, for this scenario, REST based web services shall be better (if not best) to implement.


SOAP also works via HTTP; as does any other JavaScript-in-a-browser based approach, so that is not a differentiating criterion.

Using REST, JSON and JavaScript would in most cases be the standard approach, assuming that the "service that another developer has created" is in fact a REST WS. If it is a SOAP WS, then the choices would be SOAP, XML and JavaScript.

REST is more easily processed than SOAP in a JavaScript environment. A library like jQuery can make that 4 lines of code. And JSON -being based on JavaScript- is a natural fit for a browser client - it can be converted back to JavaScript with one method call. Processing XML in JavaScript is much harder, as is sending and receiving SOAP requests.
 
Vicky Roy
Ranch Hand
Posts: 66
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks for the clearcut explanation. If you don't mind then please look for other queries also.

https://coderanch.com/t/635450/Web-Services/java/SOAPFault-handler-mapped-wsdl#2912160
https://coderanch.com/t/635321/Web-Services/java/SEI-class-client-side-dynamic#2911489

Thanks a lot.
 
I am not young enough to know everything. - Oscar Wilde This tiny ad thinks it knows more than Oscar:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic