Free Essay

Testing

In:

Submitted By ag88
Words 12773
Pages 52
10 XML Interview questions and answers for Java Programmer by Javin Paul on January 27th, 2013 | Filed in: Core Java Tags: XML
XML Interview questions are very popular in various programming job interviews, including Java interviews for web developer. XML is a matured technology and often used as standard for transporting data from one platform other. XML Interview questions contains questions from various XML technologies like XSLT which is used to transform XML files, XPATH, XQuery and fundamentals of XML e.g. DTD or Schema.
In this article we will see 10 frequently asked XML Interview questions and answersfrom above topics. These questions are mostly asked in various Java interviews but they are equally useful in other programming interviews like C, C++, Scala or any other programming language. Since XML is not tied with any programming language and like SQL its one of the desired skill in programmer, it make sense to practice some XML questions before appearing in any technical job interview.
XML Interview Questions and Answers
Here is my list of some common and frequently asked Interview questions on XML technologies. Questions on this list is not very tough but touches some important areas of XML technologies e.g. DTD, XML Schema, XSLT transformations, XPATH evaluation, XML binding, XML parsers and fundamentals of XML e.g. namespace, validation, attribute, elements etc.
Question 1: What is XML ?
Answer : XML stands for Extensible Markup language which means you can extend XML based upon your needs. You can define custom tags like <books>, <orders> etc in XML easily as opposed to other mark-up language like HTML where you need to work with predefined tags e.g. <p> and you can not use user defined tag. Though structure of XML can be standardize by making use of DTD and XML Schema. XML is mostly used to transfer data from one system to another e.g. between client and server in enterprise applications.
Question 2: Difference between DTD and XML Schema?
Answer : There are couple of differences between DTD and XML Schema e.g. DTD is not written using XML while XML schema are xml documents in itself, which means existing XML tools like XML parsers can be used to work with XML schema. Also XML schema is designed after DTD and it offer more types to map different types of data in XML documents. On the other hand DTD stands for Document Type definition and was a legacy way to define structure of XML documents.
Question 3: What is XPath ?
Answer : XPath is an XML technology which is used to retrieve element from XML documents. Since XML documents are structured, XPath expression can be used to locate and retrieve elements, attributes or value from XML files. XPath is similar to SQL in terms of retrieving data from XML but it has it’s own syntax and rules. See here to know more about How to use XPath to retrieve data from XML documents.
Question 4: What is XSLT?
Answer : XSLT is another popular XML technology to transform one XML file to other XML, HTML or any other format. XSLT is like a language which specifies its own syntax, functions and operator to transform XML documents. Usually transformation is done by XSLT Engine which reads instruction written using XSLT syntax in XML style sheets or XSL files. XSLT also makes extensive use of recursion to perform transformation. One of the popular example of using XSLT is for displaying data present in XML files as HTML pages. XSLT is also very handy to transforming one XML file into another XML document.
Question 5: What is element and attribute in XML?
Answer : This can be best explained by an example. let’s see a simple XML snippet 1 | <Orders> | 2 | <Order id="123"> |

3 | <Symbol> 6758.T</Symbol> | 4 | <Price> 2300</Price> |

5 | <Order> | 6 | <Orders> |
In this sample XML id is an attribute of element. Here , and are also other elements but they don’t have any attribute.
Question 6: What is meaning of well formed XML ?
Answer : Another interesting XML interview question which most appeared in telephonic interviews. A well formed XML means an XML document which is syntactically correct e.g. it has a root element, all open tags are closed properly, attributes are in quotes etc. If an XML is not well formed, it may not be processed and parsed correctly by various XML parsers.
Question 7: What is XML namespace? Why it’s important?
Answer : XML namespace are similar to package in Java and used to provide a way to avoid conflict between two xml tags of same name but different sources. XML namespace is defined using xmlns attribute at top of the XML document and has following syntax xmlns:prefix=’URI’. later that prefix is used along with actual tag in XML documents. Here is an example of using XML namespace : 1 | <root xmlns:inst="http://instruments.com/inst" | 2 | <inst:phone> |

3 | <inst:number>837363223</inst:number> | 4 | </inst:phone> |

5 | </root> |
Question 8: Difference between DOM and SAX parser ?
Answer : This is another very popular XML interview question, not just in XML world but also on Java world. Main difference between DOM and SAX parser is the way they parse XML documents. DOM creates an in memory tree representation of XML documents during parsing while SAX is a event driven parser. See Difference between DOM and SAX parser for more detailed answer of this question.
Question 9: What is a CDATA section in XML?
Answer : I like this XML Interview questions for its simplicity and importance, yet many programmer doesn’t know much about it. CDATA stands for character data and has special instruction for XML parsers. Since XML parser parse all text in XML document e.g. <name>This is name of person</name> here even though value of tag <name> will be parsed because it may contain XML tags e.g. <name><firstname>First Name</firstname></name>. CDATA section is not parsed by XML parser. CDATA section starts with “<![CDATA[" and finishes with "]]>”.
Question 10: What is XML data Binding in Java?
Answer : XML binding in Java refers to creating Java classes and object from XML documents and then modifying XML documents using Java programming language. JAXB , Java API for XML binding provides convenient way to bind XML documents with Java objects. Other alternatives for XML binding is using open source library e.g. XML Beans. One of the biggest advantage of XML binding in Java is to leverage Java programming capability to create and modify XML documents.
This list of XML Interview questions and answers are collected from programmers but useful to anyone who is working in XML technologies. Important of XML technologies like XPath, XSLT, XQuery is only going to increase because of platform independent nature of XML and it’s popularity of transmitting data over cross platform. Though XML has disadvantage like verbosity and size but its highly useful in web services and transmitting data from one system to other where bandwidth and speed is of secondary concern.

Oracle Interview Question and Answer

Question 1: Oracle version 9.2.0.4.0 what does each number refers to?
Answer : oracle version number refers 9-Major database release number 2-Database Maintenance release number 0-Application server release number 4-Component Specific release number 0-Platform specific release number

Question 2: How do you find current date and time in oracle?
Answer: This is one of the frequently asked Oracle Interview questions. I have seen this question every now and then. By the way SYSDATE function is used in oracle to find current date and time of operating system on which the database is running return type of function is DATE

Syntax: SELECT TO_CHAR (SYSDATE, 'MM-DD-YYYY HH24:MI:SS') "Current_Date" FROM DUAL.

Question 3: Write the syntax to find current date and time in format “YYYY-MM-DD”.

Answer: SELECT TO_CHAR (SYSDATE, 'YYYY-MM-DD HH24:MI:SS') "Current_Date" FROM DUAL

Question 4: How will you convert a date to char in Oracle give one example

Answer : Similar to previous Oracle Interview question, this is also one of the popular question in various Oracle Interviews. to_char() function is used to convert date to character we can specify format also in which we want the output.

SELECT to_char( to_date('11-01-2012', 'DD-MM-YYYY') , 'YYYY-MM-DD') FROM dual;

or

SELECT to_char( to_date('11-01-2012, 'DD-MM-YYYY') , 'DD-MM-YYYY') FROM dual;

Question 5: What is bulk copy or BCP in oracle?
Answer: BCP or bulk copy tool is one type of command line tool for unload data from database came into existence after oracle 8 .it is used to import or export data from tables and views but it will not copy structure of data same. Main advantage is fast mechanism for copying data and we can take backup of important data easily.

Question 6: What are the extensions used by oracle reports
Answer : Oracle reports are used to make business enable to provide information of all level within or outside in secure way. REP file and RDF file extensions are used by oracle report.

Question 7: What is Save Points in Oracle database?
Answer : SAVE POINTS are used to divide a transaction into smaller parts. It enables rolling back part of a transaction. Maximum of five save points are allowed. Whenever we encounter error we can rollback from the point where we set our SAVEPOINT.This is useful for multistage transaction and conditional transaction where commit and rollback depend on certain condition. This is another commonly asked Oracle Interview Question and since save points are also available in other database e.g. SQL Server, some time Interviewer follow up with differences with other database as well.

Question 8: How will you convert string to a date in oracle database?
Answer : This Oracle Interview questions is some time asked as follow up of previous Oracle Interview questions related to converting date to char in Oracle. By the way to_ date function is used to convert string to a date function.

Syntax : to_date(string, format)
Example: to_date('2012/06/12', 'yyyy/mm/dd') It will return June 12, 2012

Question 9: What is hash cluster in Oracle?
Answer : This is one of my favorite Oracle Interview question. Hash cluster is one of the techniques to store the table in a hash cluster to improve the performance of data retrieval .we apply hash function on the table row’s cluster key value and store in the hash cluster. All rows with the same hash key value are stores together on disk.key value is same like key of index cluster ,for data retrieval Oracle applies the hash function to the row's cluster key value.

Question 10: What is Snap shot in Oracle database?
Answer : Snapshots are read-only copies of a master table located on a remote node which is periodically refreshed to reflect changes made to the master table.

Read more: http://javarevisited.blogspot.com/2012/12/top-10-oracle-interview-questions-and-answers-database-sql.html#ixzz2ld2ADZky

op 10 Interview Questions for XML Developers
Read feature on XML.com Dakota Systems is continuously evaluating developers with skills relating to XML and DITA. We have found expertise in XSL, XSL-FO, XPath and/or XQuery to be particularly valuable in recent implementations as well as client staffing needs.
As XML becomes more pervasive, hiring managers won't have to look very hard to find candidates claiming to have experience working on projects involving XML. Despite this trend, it is still not an easy task to find a truly skilled XML developer. This fact, combined with the increasing compensation awarded to job candidates, makes hiring the right people one of the most important parts of any IT project. The list of questions below is intended to be a guide for managers faced with the task of filling positions within their organizations that require a solid understanding of the foundations of XML-related technologies.
1. Describe the differences between XML and HTML.
It's amazing how many developers claim to be proficient programming with XML, yet do not understand the basic differences between XML and HTML. Anyone with a fundamental grasp of XML should be able describe some of the main differences outlined in the table below: Differences Between XML and HTML | Table 1. |

XML | HTML | User definable tags | Defined set of tags designed for web display | Content driven | Format driven | End tags required for well formed documents | End tags not required | Quotes required around attributes values | Quotes not required | Slash required in empty tags | Slash not required |
2. Describe the role that XSL can play when dynamically generating HTML pages from a relational database.
Even if candidates have never participated in a project involving this type of architecture, they should recognize it as one of the common uses of XML. Querying a database and then formatting the result set so it can be validated as an XML document allows developers to translate the data into an HTML table using XSLT rules. Consequently, the format of the resulting HTML table can be modified without changing the database query or application code since the document rendering logic is isolated to the XSLT rules.
3. Give a few examples of types of applications that can benefit from using XML.
There are literally thousands of applications that can benefit from XML technologies. The point of this question is not to have the candidate rattle off a laundry list of projects that they have worked on, but rather explain the rationale for choosing XML using a few real world examples. For instance, one appropriate answer is XML allows content management systems to store documents independently of their format thereby reducing data redundancy. Another answer relates to B2B exchanges or supply chain management systems. In these instances, XML provides a mechanism for multiple companies to exchange data according to an agreed upon set of rules. A third common response involves wireless applications that require WML to render data on hand held devices.
4. What is DOM and how does it relate to XML?
The Document Object Model (DOM) is an interface specification maintained by the W3C DOM Workgroup that defines application independent mechanism to access, parse or update XML data. In simple terms it is hierarchical model that allows developers to easily manipulate XML documents. Any developer that has worked extensively with XML should be able to discuss the concept and use of DOM objects freely. Additionally, it is not unreasonable to expect advanced candidates to thoroughly understand its internal workings and be able to explain how DOM differs from event based interface specifications such as SAX.
5. What is SOAP and how does it relate to XML?
The Simple Object Access Protocol (SOAP) uses XML to define a protocol for the exchange of information in distributed computing environments. SOAP consists of three components: an envelope, a set of encoding rules, and a convention for representing remote procedure calls. Unless experience with SOAP is a direct requirement for the open position, knowing the specifics of the protocol or how it can be used in conjunction with HTTP is not as important as identifying it as a natural application of XML.
6. Walk through the steps necessary to parse XML documents?
Superficially, this is a fairly basic question. However, the point is not to determine whether candidates understand the concept of a parser but rather have them walk through the process of parsing XML documents step-by-step. Determining whether a non-validating or validating parser is needed, choosing the appropriate parser and handling errors are all important aspects to this process that should be included in the candidate's response.
7. Give some examples of XML DTD's or schemas that you have worked with.
Although XML does not require data to be validated against a DTD, many of the benefits of using the technology are derived from being able to validate XML documents against business or technical architecture rules. Polling for the list of DTD's that developers have worked with provides insight to their general exposure to the technology. The ideal candidate will have knowledge of several of the commonly used DTD's such as DITA, DocBook, FpML, ebML, HRML and RDF, as well as experience designing a custom DTD for a particular project where no standard existed.
8. Using XSLT, how would you extract a specific attribute from an element in an XML document?
Successful candidates should recognize that this one of the most basic applications of XSLT. If they are not able to construct a reply similar to the example below, they should at least be able to identify the components necessary for this operation: xsl:template to match the appropriate XML element, xsl:value-of to select the attribute value and the optional xsl:apply-templates to continue processing the document. Extract Attributes from XML Data | Example 1. | <xsl:template match='element-name'> Attribute Value: <xsl:value-of select='attribute'/> <xsl:apply-templates/> </xsl:template>
9. When constructing an XML DTD, how do you create an external entity reference in an attribute value?
Every interview session should have at least one trick question. Although possible when using SGML, XML DTD's don't support defining external entity references in attribute values. It's not as important that the candidates catch this somewhat obscure point as it is that they respond to the question in a logical fashion.
10. How would you build a search engine for large volumes of XML data?
The way candidates answer this question provides considerable insight to their view of XML data. For those who view XML primarily as a way to denote structure for text files, a common answer is to build a full-text search and handle the data similarly to the way internet portals handle HTML pages. Others consider XML as a standard way of transferring fielded data between disparate systems. These candidates often describe some scheme of importing XML into a relational or object database and relying on the database's engine for searching. Lastly, candidates that have worked with vendors specializing in this area often cite that the best way the handle this situation is to use a third party software package optimized for XML data.
Obviously, some important areas of XML technologies were not included in this list (namespaces, XPointer, XLink, etc.) and should be added to the interviewer's set of questions if applicable to the particular position that the candidate is seeking. However, these questions in conjunction with others to assess soft skills (communication skills, ability to work on teams, leadership ability, etc.) will help determine how well candidates understand the fundamental principles of XML.

SOAP
1. What is a Web service, and how does it relate to SOAP? (Hint: SOAP is the protocol.)

2. What is a common transport for SOAP messages? (Hint: HTTP )

3. What is WSDL? How would you use a WSDL file? (Hint: XML description of Web Service: interface and how to bind to it. )

4. With new J2EE SOAP support what is: JAXR, JAX-RPC, and SAAJ? (Hint: registry, rpc, attachments) REST
1. What is differences between RESTful web services and SOAP web services ?
Ans:Though both RESTful web series and SOAP web service can operate cross platform they are architecturally different to each other, here is some of differences between REST and SOAP:
1) REST is more simple and easy to use than SOAP. REST language is based on use of nouns and verbs (better readability)
2) REST uses HTTP protocol for producing or consuming web services while SOAP uses XML.

* The SOAP WS is transport protocol neutral. Supports multiple protocols like HTTP(S), Messaging, TCP, UDP SMTP, etc. * The REST is transport protocol specific. Supports only HTTP or HTTPS protocols.
3) REST is lightweight as compared to SOAP and preferred choice in mobile devices and PDA's. REST does not need XML parsing, no message header (to and from), hence less bandwidth
4) REST supports different format like text, JSON and XML while SOAP only support XML.

* The SOAP WS permits only XML data format.You define operations, which tunnels through the POST. The focus is on accessing the named operations and exposing the application logic as a service. * The REST permits multiple data formats like XML, JSON data, text, HTML, etc. Any browser can be used because the REST approach uses the standard GET, PUT, POST, and DELETE Web operations. The focus is on accessing the named resources and exposing the data as a service. REST has AJAX support. It can use the XMLHttpRequest object. Good for stateless CRUD (Create, Read, Update, and Delete) operations. GET - represent() POST - acceptRepresention() PUT - storeRepresention() DELETE - removeRepresention()
5) SOAP based reads cannot be cached. REST based reads can be cached. Performs and scales better.
6) Different error handling: REST: requires HTTP error handling SOAP: can have user defined error
7) REST only supports synchronous message because of its reliance of HTTP and HTTPS
8) SOAP WS supports both SSL security and WS-security, which adds some enterprise security features like maintaining security right up to the point where it is needed, maintaining identities through intermediaries and not just point to point SSL only, securing different parts of the message with different security algorithms, etc.
The REST supports only point-to-point SSL security. The SSL encrypts the whole message, whether all of it is sensitive or not.
9) The SOAP has comprehensive support for both ACID based transaction management for short-lived transactions and compensation based transaction management for long-running transactions. It also supports two-phase commit across distributed resources.
The REST supports transactions, but it is neither ACID compliant nor can provide two phase commit across distributed transactional resources as it is limited by its HTTP protocol.
10) The SOAP has success or retry logic built in and provides end-to-end reliability even through SOAP intermediaries. REST does not have a standard messaging system, and expects clients invoking the service to deal with communication failures by retrying.

2. What is REST and RESTful web services?
Ans:This is the first REST interview question on most of interviews as not everybody familiar with REST and also start discussion based on candidates response. Anyway REST stands for REpresentational State Transfer (REST) its a relatively new concept of writing web services which enforces a stateless client server design where web services are treated as resource and can be accessed and identified by there URL unlike SOAP web services which were defined by WSDL.
Web services written by apply REST Architectural concept are called RESTful web services which focus on System resources and how state of Resource should be transferred over http protocol to a different clients written in different languages. In RESTful web services http methods like GET, PUT, POST and DELETE can can be used to perform CRUD operations.

3.What is difference between top-down and bottom-up approach of developing web services ?
Ans:In top-down approach first WSDL document is created and than Java classes are developed based on WSDL contract, so if WSDL contract changes you got to change your Java classes while in case of bottom up approachof web service development you first create Java code and then use annotations like @WebService to specify contract or interface and WSDL field will be automatically generated from your build.

4.What happens if RestFull resources are accessed by multiple clients ? do you need to make it thread-safe?
Ans:Since a new Resource instance is created for every incoming Request there is no need to make it thread-safe or add synchronization. Multiple clients can safely access RestFull resources concurrently.

5.What will you do when an error code has to be returned to the client
OR
How will you handle application error scenarios in RESTful web service?

6.What is a web service?
Ans:A Web service is a method of communication between two electronic devices over the Web (Internet). The W3C defines a "Web service" as "a software system designed to support interoperable machine-to-machine interaction over a network". It has an interface described in a machine-processable format (specifically Web Services Description Language, known by the acronym WSDL). Other systems interact with the Web service in a manner prescribed by its description using SOAP messages, typically conveyed using HTTP with an XMLserialization in conjunction with other Web-related standards."

7.Can I use GET request instead of PUT to create resources?
Ans:No, you are supposed to use PUT or POST. GET operations should only have view rights.

8.What all kind of output formats can one generate using RESTful web service?

9.What all tools have you used to write RESTful web service?

10.What is meant by JAX-WS and JAX-RS?
Ans:Java API for XML Web Services(JAX-WS) Java API for RESTful Web Services (JAX-RS)

11.What are the different application integration styles?
Ans. There are a number of different integration styles like
1. Shared database
2. batch file transfer
3. Invoking remote procedures (RPC)
4. Exchanging asynchronous messages over a message oriented middle-ware (MOM).

12.What are the different styles of Web Services used for application integration?
Ans. SOAP WS and RESTful Web Service

13.How would you decide what style of Web Service to use? SOAP WS or REST?
Ans. In general, a REST based Web service is preferred due to its simplicity, performance, scalability, and support for multiple data formats. SOAP is favored where service requires comprehensive support for security and transactional reliability.
The answer really depends on the functional and non-functional requirements. Asking the questions listed below will help you choose.

* Does the service expose data or business logic? (REST is a better choice for exposing data, SOAP WS might be a better choice for logic).Do the consumers and the service providers require a formal contract? (SOAP has a formal contract via WSDL) * Do we need to support multiple data formats? * Do we need to make AJAX calls? (REST can use the XMLHttpRequest) * Is the call synchronous or asynchronous? * Is the call stateful or stateless? (REST is suited for stateless CRUD operations) * What level of security is required? (SOAP WS has better support for security) * What level of transaction support is required? (SOAP WS has better support for transaction management) * Do we have limited band width? (SOAP is more verbose) * What’s best for the developers who will build clients for the service? (REST is easier to implement, test, and maintain)

14. What tools do you use to test your Web Services?
Ans:SoapUI tool for SOAP WS and the Firefox "poster" plugin for RESTFul services.

15.What is the difference between SOA and a Web service?
Ans:SOA is a software design principle and an architectural pattern for implementing loosely coupled, reusable and coarse grained services. You can implement SOA using any protocols such as HTTP, HTTPS, JMS, SMTP, RMI, IIOP (i.e. EJB uses IIOP), RPC etc. Messages can be in XML or Data Transfer Objects (DTOs).
Web service is an implementation technology and one of the ways to implement SOA. You can build SOA based applications without using Web services – for example by using other traditional technologies like Java RMI, EJB, JMS based messaging, etc. But what Web services offer is the standards based and platform-independent service via HTTP, XML, SOAP, WSDL and UDDI, thus allowing interoperability between heterogeneous technologies such as J2EE and .NET.

16.Web services when you can use traditional style middle-ware such as RPC, CORBA, RMI and DCOM?
Ans:The traditional middle-wares tightly couple connections to the applications and it can break if you make any modification to your application. Tightly coupled applications are hard to maintain and less reusable. Generally do not support heterogeneity. Do not work across Internet. Can be more expensive and hard to use.
Web Services support loosely coupled connections. The interface of the Web service provides a layer of abstraction between the client and the server. The loosely coupled applications reduce the cost of maintenance and increases re-usability. Web Services present a new form of middle-ware based on XML and Web. Web services are language and platform independent. You can develop a Web service using any language and deploy it on to any platform, from small device to the largest supercomputer. Web service uses language neutral protocols such as HTTP and communicates between disparate applications by passing XML messages to each other via a Web API. Do work across internet, less expensive and easier to use.

17.What are the different approaches to developing a SOAP based Web service?
Ans. Following are the two approaches.

* The contract-first approach, where you define the contract first with XSD and WSDL and the generate the Java classes from the contract. * The contract-last approach where you define the Java classes first and then generate the contract, which is the WSDL file from the Java classes.
Note: The WSDL describes all operations that the service provides, locations of the endpoints (i.e. where the services can be invoked), and simple and complex elements that can be passed in requests and responses.

18.What are the pros and cons of each approach, and which approach would you prefer?
Ans:
Contract-first Web service
PROS:

* Clients are decoupled from the server, hence the implementation logic can be revised on the server without affecting the clients. * Developers can work simultaneously on client and server side based on the contract both agreed on. * You have full control over how the request and response messages are constructed -- for example, should "status" go as an element or as an attribute? The contract clearly defines it. You can change OXM (i.e. Object to XML Mapping) libraries without having to worry if the "status" would be generated as "attribute" instead of an element. Potentially, even Web service frameworks and tool kits can be changed as well from say Apache Axis to Apache CXF, etc CONS:

* More upfront work is involved in setting up the XSDs and WSDLs. There are tools like XML Spy, Oxygen XML, etc to make things easier. The object models need to be written as well. * Developers need to learn XSDs and WSDLs in addition to just knowing Java.
Contract-last Web service
PROS:

* Developers don't have to learn anything related to XSDs, WSDLs, and SOAP. The services are created quickly by exposing the existing service logic with frameworks/tool sets. For example, via IDE based wizards, etc. * The learning curve and development time can be smaller compared to the Contract-first Web service.
CONS:

* The development time can be shorter to initially develop it, but what about the on going maintenance and extension time if the contract changes or new elements need to be added? In this approach, since the clients and servers are more tightly coupled, the future changes may break the client contract and affect all clients or require the services to be properly versioned and managed. * In this approach, The XML payloads cannot be controlled. This means changing your OXM libraries could cause something that used to be an element to become an attribute with the change of the OXM.

19.So, which approach will you choose?
Ans:The best practice is to use "contract-first", and here is the link that explains this much better with examples --> contract-first versus contract-last web services In a nutshell, the contract-last is more fragile than the "contract-first". You will have to decide what is most appropriate based on your requirements, tool sets you use, etc. 20.How will you migrate from SOAP web service to RESTfull web service?

21.Can you describe any one RESTful web service you have written?

22.Is it mandatory to use HTTP protocol for performing CRUD operations by a REST based web service?

23.Can one RESTful web service be a client to another RESTful web service for performing business operations? Describe with example?

24.Can you generate HTML output from a RESTful web service? How?

25.Can a RESTful web service generate output in various formats based on some parameter received from the client.

26.With a RESTful web service, whose state is getting transferred and how?

27.Who owns the specification for REST web services and how does it get updated to newer versions?

Also refer: http://java-success.blogspot.com.au/2012/11/soap-versus-restful-web-service.html SOA
1.What are the main benefits of SOA ?
Ans:

* SOA helps create greater alignment between IT and line of business while generating more flexibility - IT flexibility to support greater business flexibility. Your business processes are changing faster and faster and global competition requires the flexibility that SOA can provide. * SOA can help you get better reuse out of your existing IT investments as well as the new services you’re developing today. SOA makes integration of your IT investments easier by making use of well-defined interfaces between services. SOA also provides an architectural model for integrating business partners’, customers’ and suppliers’ services into an enterprise’s business processes. This reduces cost and improves customer satisfaction

2.What is a reusable Service?
Ans:

* It is an autonomous, reusable, discoverable, stateless functionality that has the necessary granularity, and can be part of a composite application or a composite service. * A reusable service should be identified with a business activity described by the service specifications (design-time contract). * A service’s constraints, including security, QoS, SLA, usage policies, may be defined by multiple run-time contracts, multiple interfaces (the WSDL for a SOAP Web Service), and multiple implementations (the code). * A reusable service should be governed at the enterprise level throughout its entire lifecycle, from design-time through run-time. Its reuse should be promoted through a prescriptive process, and that reuse should be measured.

3.Talking about Service identification, which approach between top-down and bottom-up methodologies encourages re-use and mantainance ?
Ans:Since the top-down approach is business-driven it can be practical to separate the different concerns of business and IT on different plans, providing a common ground in between. So in most situations it the most appropriate if you want to improve reuse and ROI in the medium/long term. Anyway

4.How can you achieve loose coupling in a soa ?
Ans:One strategy for achieving loose coupling is to use the service interface (the WSDL for a SOAP Web Service) to limit this dependency, hiding the service implementation from the consumer. Loose coupling can be addressed by encapsulating the service functionalities in a manner that limits the impact of changes to the implementation on the service interface. However, at some point you will need to change the interface and manage versioning without impacting service consumers, in addition to managing multiple security constraints, multiple transports, and other considerations

5.Do you recall any pattern which could be used to leverage loose coupling ?
Ans:The Mediation pattern, using an enterprise service bus (ESB), will help in achieving this. Mediation will take loose coupling to the highest level. It will establish independence between consumers and providers on all levels, including message formats, message types (including SOAP, REST, XML, binary) and transport protocols (including HTTP, HTTPS, JMS). Architecturally speaking this means the separation of concerns between consumers and providers on the transport, message type, and message format levels.

6.The Service of a SOA should be engineered as stateless or stateful ?
Ans:Service should be stateless. It may have a context within its stateless execution, but it will not have an intermediary state waiting for an event or a call-back. The retention of state-related data must not extend beyond a request/response on a service. This is because state management consumes a lot of resources, and this can affect the scalability and availability that are required for a reusable service.

7.What is composition of a Service ?
Ans:Composition is the process by which services are combined to produce composite applications or composite services. A composite application consists of the aggregation of services to produce an enterprise portal or enterprise process. A composite service consists of an aggregation of services that produces another reusable service. It’s just like combining electronic components to create a computer motherboard, and then using that motherboard in a computer. Think of the motherboard as a reusable composite service that is a component of the computer, and of the computer as the composite application.

8.How do I integrate my Legacy applications with SOA ?
Ans:Legacy applications are frequently at the core of your IT environment. With the right skills and tools, you need to identify discrete elements within your legacy applications and “wrap” them in standards-based interfaces and use them as services within your SOA.

9.How does the ESB fits in this picture ?
Ans:The Enterprise Service Bus is a core element of any SOA. ESBs provide the “any to any” connectivity between services within your own company, and beyond your business to connect to your trading partners. But SOA does not stop at just implementing an ESB. Depending on what your goals are, you may want to use an ESB to connect other services within your SOA such as information services, interaction services and business process management services. Additionally, you will need to consider development services and IT service management services. The SOA reference architecture can help you lay out an SOA environment that meets your needs and priorities. The ESB is part of this reference architecture and provides the backbone of an SOA but it should not be considered an SOA by itself.

10.What are the common pitfalls of SOA ?
Ans:One of the most common pitfalls is to view SOA as an end, rather than a means to an end. Developers who focus on building an SOA solution rather than solving a specific business problem are more likely to create complex, unmanageable, and unnecessary interconnections between IT resources. Another common pitfall is to try to solve multiple problems at once, rather than solving small pieces of the problem. Taking a top-down approach—starting with major organization-wide infrastructure investments—often fails either to show results in a relevant timeframe or to offer a compelling return on investment.

11.What’s the difference between services and components?
Ans:Services are logical grouping of components to achieve business functionality. Components are implementation approaches to make a service. The components can be in JAVA, C#, C++ but the services will be exposed in a general format like Web Services.

12.What are ends, contract, address, and bindings?
Ans:These three terminologies on which SOA service stands. Every service must expose one or more ends by which the service can be available to the client. End consists of three important things where, what and how:- * Contract is an agreement between two or more parties. It defines the protocol how client should communicate with your service. Technically, it describes parameters and return values for a method. * An Address indicates where we can find this service. Address is a URL, which points to the location of the service. * Bindings determine how this end can be accessed. It determines how communications is done. For instance, you expose your service, which can be accessed using SOAP over HTTP or BINARY over TCP. So for each of these communications medium two bindings will be created.
Below figure, show the three main components of end. You can see the stock ticker is the service class, which has an end hosted on www.soa.com with HTTP and TCP binding support and using Stock Ticker interface type.

13.The concept of SOA is nothing new, however why everyone started to talk about SOA only in the last years ?
Ans:Yes I agree the basic concept of SOA aren’t new, however some technology technology changes in the last 10 years made service-oriented architecture more practical and applicable to more organizations than it was previously. Among this: * Universally-accepted industry standards such as XML, its many variants, and Web-services standards have contributed to the renewed interest in SOA. * Data governance frameworks, which are important to a successful SOA implementation, have well test and refined over the years. * A variety of enabling technologies and tools (e.g., modeling, development, infrastructure/middleware, management, and testing) have matured. * Understanding of business and business strategies has grown, shifting attention from technology to the people, cultural changes, and process that are key business success factors.

14.What is the most important skill you need to adopt SOA ? technical or cultural ?
Ans:Surely cultural. SOA does require people to think of business and technology differently. Instead of thinking of technology first (e.g., If we implement this system, what kinds of things can we do with it?), practitioners must first think in terms of business functions, or services (e.g., My company does these business functions, so how can I set up my IT system to do those things for me most efficiently?).It is expected that adoption of SOA will change business IT departments, creating service-oriented (instead of technology-oriented) IT organizations.

15.Is SOA really needed on your opinion?
Ans:SOA is not for everyone. While SOA delivers significant benefits and cost savings, SOA does require disciplined enforcement of centralized governance principals to be successful. For some organizations, the cost of developing and enforcing these principals may be higher than the benefits realized, and therefore not a sound initiative.

http://www.tutorialspoint.com/listtutorial/REST-and-SOAP-web-service-Interview-Questions-for-prep/3827

REST Web Service Interview Questions
Important REST & SOAP Web Service Interview Questions that one should be aware of :

Why to create Web Service / Whats the benefit of Web Service ? Web Services are easier to communicate between applications running on different platform and build on different language. It allows easy integration with other applications.

What are the different standards protocols for Web Service ?
XML-RPC is a remote procedure call (RPC) protocol which uses XML to encode its calls and HTTP as a transport mechanism. In XML-RPC objects or structures are exchanged between 2 applications.

JAX-RPC : Java API for XML-based RPC, JAX-RPC refers to Java API for XML-based RPC. It specify java technology for for web-based services and clients using RPC or remote procedure calls which are based on XML based protocol like SOAP.

JAX-WS : Java API for XML Web Services, which is part of Java EE Platform & Glassfish Project.It also provides annotation based Web Service.

JAX-RPC Vs JAX-WS: JAX-WS replaced the JAX-RPC API in Java Platform, Enterprise Edition 5.It provides enhancement over JAX-RPC.

What is REST ?
REST is architectural style for building web service using HTTP protocol, where web services are treated as resources and some basic HTTP methods like GET, POST, DELETE are used to identify standard action on resources.RESTful web API (also called a RESTful web service) is a web API implemented using HTTP and the REST principles.

What is SOAP ?
SOAP, originally defined as Simple Object Access Protocol, is a protocol specification for exchanging structured information in XML form.

What are the underlying protocol over which you can send SOAP request ?
You can send SOAP message via Hypertext Transfer Protocol (HTTP), Simple Mail Transfer Protocol (SMTP), HTTPS(Secured HTTP).

What is WSDL ? What does WSDL Contains ? WSDL(Web Services Description Language) is an XML grammar for specifying a public interface for a Web service.
WSDL contains following key information : Information on all publicly available functions, set of operations(through <operation> Tag in WSDL). Information about messages exchanges using <input> & <output> tag in operation & Message definition using <element> Binding information which provides information about how those messages can be exchanged, more specifically in that you need to specify transport protocol(HTTP/SMTP) and binding style(RPC or Document). Address information for locating the specified service etc.

What is UDDI ?
UDDI is used for publishing and finding businesses and Web services.

What are Tools/API are there for developing/testing web service?
Testing Tools for Web Service : SoapUI for SOAP Web Service, Firefox plugin for testing RESTFul Services.
REST APIs : Spring REST Web Service using MVC, Jersey API, CFX, Axis, Restlet etc.
SOAP APIs : Axis, Spring Web Service etc

Discuss various approaches to develop SOAP based web service ?
There are 2 approaches : Contract-first & Contract-last.
Contract-first starts with defining first XML schema / WSDL and then creating the Java classes based on them. In Contract-last approach Java classes are defined first than WSDL is generated from that.

What is differences between RESTful web services and SOAP web services ?
Check this post REST Vs SOAP, When To Use What ?

What is the difference between HTTP POST and PUT requests in REST ?
POST is used to create where as PUT is used to (update , if does not exist create it)/ Replace.

What are the different formats supported by REST API?
As it runs on HTTP , it will support formats supported by HTTP like HTML, JSON, AMF, IMAGE etc.

What is difference between RPC or Document Style Web Service ? How you decide to which one to choose ?

In Document Style Web service we can send the XML message as part of SOAP request which is not possible in RPC Style Web Service. Document Style Web Service is most suitable in some application where XML message is treated as document and content of that document can change and intention of web service does not depend on content of XML message.
For example in most of financial application Trade is represented as XML document for which document style is most preferred.

Question | : | What is a Web service? | Answer | : | Many people and companies have debated the exact definition of Web services. At a minimum, however, a Web service is any piece of software that makes itself available over the Internet and uses a standardized XML messaging system.
XML is used to encode all communications to a Web service. For example, a client invokes a Web service by sending an XML message, then waits for a corresponding XML response. Because all communication is in XML, Web services are not tied to any one operating system or programming language–Java can talk with Perl; Windows applications can talk with Unix applications.
Beyond this basic definition, a Web service may also have two additional (and desirable) properties:
First, a Web service can have a public interface, defined in a common XML grammar. The interface describes all the methods available to clients and specifies the signature for each method. Currently, interface definition is accomplished via the Web Service Description Language (WSDL). (See FAQ number 7.)
Second, if you create a Web service, there should be some relatively simple mechanism for you to publish this fact. Likewise, there should be some simple mechanism for interested parties to locate the service and locate its public interface. The most prominent directory of Web services is currently available via UDDI, or Universal Description, Discovery, and Integration. (See FAQ number 8.)
Web services currently run a wide gamut from news syndication and stock-market data to weather reports and package-tracking systems. For a quick look at the range of Web services currently available, check out the XMethods directory of Web services. | | | | Question | : | What is new about Web services? | Answer | : | People have been using Remote Procedure Calls (RPC) for some time now, and they long ago discovered how to send such calls over HTTP.
So, what is really new about Web services? The answer is XML.
XML lies at the core of Web services, and provides a common language for describing Remote Procedure Calls, Web services, and Web service directories.
Prior to XML, one could share data among different applications, but XML makes this so much easier to do. In the same vein, one can share services and code without Web services, but XML makes it easier to do these as well.
By standardizing on XML, different applications can more easily talk to one another, and this makes software a whole lot more interesting. | | | | Question | : | I keep reading about Web services, but I have never actually seen one. Can you show me a real Web service in action? | Answer | : | If you want a more intuitive feel for Web services, try out the IBM Web Services Browser, available on the IBM Alphaworks site. The browser provides a series of Web services demonstrations. Behind the scenes, it ties together SOAP, WSDL, and UDDI to provide a simple plug-and-play interface for finding and invoking Web services. For example, you can find a stock-quote service, a traffic-report service, and a weather service. Each service is independent, and you can stack services like building blocks. You can, therefore, create a single page that displays multiple services–where the end result looks like a stripped-down version of my.yahoo or my.excite. | | | | Question | : | What is the Web service protocol stack? | Answer | : | The Web service protocol stack is an evolving set of protocols used to define, discover, and implement Web services. The core protocol stack consists of four layers:
Service Transport: This layer is responsible for transporting messages between applications. Currently, this includes HTTP, SMTP, FTP, and newer protocols, such as Blocks Extensible Exchange Protocol (BEEP).
XML Messaging: This layer is responsible for encoding messages in a common XML format so that messages can be understood at either end. Currently, this includes XML-RPC and SOAP.
Service Description: This layer is responsible for describing the public interface to a specific Web service. Currently, service description is handled via the WSDL.
Service Discovery: This layer is responsible for centralizing services into a common registry, and providing easy publish/find functionality. Currently, service discovery is handled via the UDDI.
Beyond the essentials of XML-RPC, SOAP, WSDL, and UDDI, the Web service protocol stack includes a whole zoo of newer, evolving protocols. These include WSFL (Web Services Flow Language), SOAP-DSIG (SOAP Security Extensions: Digital Signature), and USML (UDDI Search Markup Language). For an overview of these protocols, check out Pavel Kulchenko’s article, Web Services Acronyms, Demystified, on XML.com.
Fortunately, you do not need to understand the full protocol stack to get started with Web services. Assuming you already know the basics of HTTP, it is best to start at the XML Messaging layer and work your way up. | | | | Question | : | What is XML-RPC? | Answer | : | XML-RPC is a protocol that uses XML messages to perform Remote Procedure Calls. Requests are encoded in XML and sent via HTTP POST; XML responses are embedded in the body of the HTTP response.
More succinctly, XML-RPC = HTTP + XML + Remote Procedure Calls.
Because XML-RPC is platform independent, diverse applications can communicate with one another. For example, a Java client can speak XML-RPC to a Perl server.
To get a quick sense of XML-RPC, here is a sample XML-RPC request to a weather service (with the HTTP Headers omitted):
<?xml version=”1.0″ encoding=”ISO-8859-1″?>
<methodCall>
<methodName>weather.getWeather</methodName>
<params>
<param><value>10016</value></param>
</params>
</methodCall>
The request consists of a simple element, which specifies the method name (getWeather) and any method parameters (zip code).Here is a sample XML-RPC response from the weather service:<?xml version=”1.0″ encoding=”ISO-8859-1″?>
<methodResponse>
<params>
<param>
<value><int>65</int></value>
</param>
</params>
</methodResponse>
The response consists of a single element, which specifies the return value (the current temperature). In this case, the return value is specified as an integer.
In many ways, XML-RPC is much simpler than SOAP, and therefore represents the easiest way to get started with Web services.
The official XML-RPC specification is available at XML-RPC.com. Dozens of XML-RPC implementations are available in Perl, Python, Java, and Ruby. See the XML-RPC home page for a complete list of implementations. | | | | Question | : | What is SOAP? | Answer | : | SOAP is an XML-based protocol for exchanging information between computers. Although SOAP can be used in a variety of messaging systems and can be delivered via a variety of transport protocols, the main focus of SOAP is Remote Procedure Calls (RPC) transported via HTTP. Like XML-RPC, SOAP is platform independent, and therefore enables diverse applications to communicate with one another.To get a quick sense of SOAP, here is a sample SOAP request to a weather service (with the HTTP Headers omitted):<?xml version=’1.0′ encoding=’UTF-8′?>
<SOAP-ENV:Envelope
xmlns:SOAP-ENV=”http://www.w3.org/2001/09/soap-envelope” xmlns:xsi=”http://www.w3.org/2001/XMLSchema-instance” xmlns:xsd=”http://www.w3.org/2001/XMLSchema”>
<SOAP-ENV:Body>
<ns1:getWeather xmlns:ns1=”urn:examples:weatherservice” SOAP-ENV:encodingStyle=” http://www.w3.org/2001/09/soap-encoding
<zipcode xsi:type=”xsd:string”>10016</zipcode>
</ns1:getWeather>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
As you can see, the request is slightly more complicated than XML-RPC and makes use of both XML namespaces and XML Schemas. Much like XML-RPC, however, the body of the request specifies both a method name (getWeather), and a list of parameters (zipcode).Here is a sample SOAP response from the weather service:<?xml version=’1.0′ encoding=’UTF-8′?>
<SOAP-ENV:Envelope
xmlns:SOAP-ENV=”http://www.w3.org/2001/09/soap-envelope” xmlns:xsi=”http://www.w3.org/2001/XMLSchema-instance” xmlns:xsd=”http://www.w3.org/2001/XMLSchema”>
<SOAP-ENV:Body>
<ns1:getWeatherResponse xmlns:ns1=”urn:examples:weatherservice” SOAP-ENV:encodingStyle=”http://www.w3.org/2001/09/soap-encoding”>
<return xsi:type=”xsd:int”>65</return>
</ns1:getWeatherResponse>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>The response indicates a single integer return value (the current temperature).
The World Wide Web Consortium (W3C) is in the process of creating a SOAP standard. The latest working draft is designated as SOAP 1.2, and the specification is now broken into two parts. Part 1 describes the SOAP messaging framework and envelope specification. Part 2 describes the SOAP encoding rules, the SOAP-RPC convention, and HTTP binding details. | | | | Question | : | What is WSDL? | Answer | : | The Web Services Description Language (WSDL) currently represents the service description layer within the Web service protocol stack.
In a nutshell, WSDL is an XML grammar for specifying a public interface for a Web service. This public interface can include the following:
Information on all publicly available functions.
Data type information for all XML messages.
Binding information about the specific transport protocol to be used.
Address information for locating the specified service.
WSDL is not necessarily tied to a specific XML messaging system, but it does include built-in extensions for describing SOAP services.Below is a sample WSDL file. This file describes the public interface for the weather service used in the SOAP example above. Obviously, there are many details to understanding the example. For now, just consider two points.
First, the <message> elements specify the individual XML messages that are transferred between computers. In this case, we have a getWeatherRequest and a getWeatherResponse. Second, the element specifies that the service is available via SOAP and is available at a specific URL.<?xml version=”1.0″ encoding=”UTF-8″?>
<definitions name=”WeatherService” targetNamespace=”http://www.ecerami.com/wsdl/WeatherService.wsdl” xmlns=”http://schemas.xmlsoap.org/wsdl/” xmlns:soap=”http://schemas.xmlsoap.org/wsdl/soap/” xmlns:tns=”http://www.ecerami.com/wsdl/WeatherService.wsdl” xmlns:xsd=”http://www.w3.org/2001/XMLSchema”> <message name=”getWeatherRequest”>
<part name=”zipcode” type=”xsd:string”/>
</message>
<message name=”getWeatherResponse”>
<part name=”temperature” type=”xsd:int”/>
</message><portType name=”Weather_PortType”>
<operation name=”getWeather”>
<input message=”tns:getWeatherRequest”/>
<output message=”tns:getWeatherResponse”/>
</operation>
</portType><binding name=”Weather_Binding” type=”tns:Weather_PortType”>
<soap:binding style=”rpc” transport=”http://schemas.xmlsoap.org/soap/http”/> <operation name=”getWeather”>
<soap:operation soapAction=”"/>
<input>
<soap:body encodingStyle=”http://schemas.xmlsoap.org/soap/encoding/” namespace=”urn:examples:weatherservice” use=”encoded”/> </input>
<output>
<soap:body encodingStyle=”http://schemas.xmlsoap.org/soap/encoding/” namespace=”urn:examples:weatherservice” use=”encoded”/> </output>
</operation>
</binding><service name=”Weather_Service”>
<documentation>WSDL File for Weather Service</documentation>
<port binding=”tns:Weather_Binding” name=”Weather_Port”>
<soap:address
location=”http://localhost:8080/soap/servlet/rpcrouter”/>
</port>
</service>
</definitions>
Using WSDL, a client can locate a Web service, and invoke any of the publicly available functions. With WSDL-aware tools, this process can be entirely automated, enabling applications to easily integrate new services with little or no manual code. For example, check out the GLUE platform from the Mind Electric.
WSDL has been submitted to the W3C, but it currently has no official status within the W3C. See this W3C page for the latest draft. | | | | Question | : | What is UDDI? | Answer | : | UDDI (Universal Description, Discovery, and Integration) currently represents the discovery layer within the Web services protocol stack.
UDDI was originally created by Microsoft, IBM, and Ariba, and represents a technical specification for publishing and finding businesses and Web services.
At its core, UDDI consists of two parts.
First, UDDI is a technical specification for building a distributed directory of businesses and Web services. Data is stored within a specific XML format, and the UDDI specification includes API details for searching existing data and publishing new data.
Second, the UDDI Business Registry is a fully operational implementation of the UDDI specification. Launched in May 2001 by Microsoft and IBM, the UDDI registry now enables anyone to search existing UDDI data. It also enables any company to register themselves and their services.
The data captured within UDDI is divided into three main categories:
White Pages: This includes general information about a specific company. For example, business name, business description, and address.
Yellow Pages: This includes general classification data for either the company or the service offered. For example, this data may include industry, product, or geographic codes based on standard taxonomies.
Green Pages: This includes technical information about a Web service. Generally, this includes a pointer to an external specification, and an address for invoking the Web service.
You can view the Microsoft UDDI site, or the IBM UDDI site. The complete UDDI specification is available at uddi.org.
Beta versions of UDDI Version 2 are available at:
Hewlett Packard
IBM
Microsoft
SAP | | | | Question | : | How do I get started with Web Services? | Answer | : | The easiest way to get started with Web services is to learn XML-RPC. Check out the XML-RPC specification or read my book, Web Services Essentials. O’Reilly has also recently released a book on Programming Web Services with XML-RPC by Simon St.Laurent, Joe Johnston, and Edd Dumbill.
Once you have learned the basics of XML-RPC, move onto SOAP, WSDL, and UDDI. These topics are also covered in Web Services Essentials. For a comprehensive treatment of SOAP, check out O’Reilly’s Programming Web Services with SOAP, by Doug Tidwell, James Snell, and Pavel Kulchenko. | | | | Question | : | Does the W3C support any Web service standards? | Answer | : | The World Wide Web Consortium (W3C) is actively pursuing standardization of Web service protocols. In September 2000, the W3C established an XML Protocol Activity. The goal of the group is to establish a formal standard for SOAP. A draft version of SOAP 1.2 is currently under review, and progressing through the official W3C recommendation process.
On January 25, 2002, the W3C also announced the formation of a Web Service Activity. This new activity will include the current SOAP work as well as two new groups. The first new group is the Web Services Description Working Group, which will take up work on WSDL. The second new group is the Web Services Architecture Working Group, which will attempt to create a cohesive framework for Web service protocols. |

http://www.javatechinfo.com/2013/06/web-services-interview-questions-and.html

Java Web Services Interview Questions and Answers: Overview | Q. What are the different application integration styles?

A. There are a number of different integration styles like

1. Shared database
2. batch file transfer
3. Invoking remote procedures (RPC)
4. Exchanging asynchronous messages over a message oriented middle-ware (MOM). |

Q. What are the different styles of Web Services used for application integration?
A. SOAP WS and RESTful Web Service

Q. What are the differences between both SOAP WS and RESTful WS?
A.
* The SOAP WS supports both remote procedure call (i.e. RPC) and message oriented middle-ware (MOM) integration styles. The Restful Web Service supports only RPC integration style. * The SOAP WS is transport protocol neutral. Supports multiple protocols like HTTP(S), Messaging, TCP, UDP SMTP, etc. The REST is transport protocol specific. Supports only HTTP or HTTPS protocols. * The SOAP WS permits only XML data format.You define operations, which tunnels through the POST. The focus is on accessing the named operations and exposing the application logic as a service. The REST permits multiple data formats like XML, JSON data, text, HTML, etc. Any browser can be used because the REST approach uses the standard GET, PUT, POST, and DELETE Web operations. The focus is on accessing the named resources and exposing the data as a service. REST has AJAX support. It can use the XMLHttpRequest object. Good for stateless CRUD (Create, Read, Update, and Delete) operations.

GET - read() POST - create() PUT - update() DELETE - delete() * SOAP based reads cannot be cached. REST based reads can be cached. Performs and scales better. * SOAP WS supports both SSL security and WS-security, which adds some enterprise security features like maintaining security right up to the point where it is needed, maintaining identities through intermediaries and not just point to point SSL only, securing different parts of the message with different security algorithms, etc. The REST supports only point-to-point SSL security. The SSL encrypts the whole message, whether all of it is sensitive or not. * The SOAP has comprehensive support for both ACID based transaction management for short-lived transactions and compensation based transaction management for long-running transactions. It also supports two-phase commit across distributed resources. The REST supports transactions, but it is neither ACID compliant nor can provide two phase commit across distributed transactional resources as it is limited by its HTTP protocol. * The SOAP has success or retry logic built in and provides end-to-end reliability even through SOAP intermediaries. REST does not have a standard messaging system, and expects clients invoking the service to deal with communication failures by retrying.

Q. How would you decide what style of Web Service to use? SOAP WS or REST?
A. In general, a REST based Web service is preferred due to its simplicity, performance, scalability, and support for multiple data formats. SOAP is favored where service requires comprehensive support for security and transactional reliability.

The answer really depends on the functional and non-functional requirements. Asking the questions listed below will help you choose. * Does the service expose data or business logic? (REST is a better choice for exposing data, SOAP WS might be a better choice for logic).Do the consumers and the service providers require a formal contract? (SOAP has a formal contract via WSDL) * Do we need to support multiple data formats? * Do we need to make AJAX calls? (REST can use the XMLHttpRequest) * Is the call synchronous or asynchronous? * Is the call stateful or stateless? (REST is suited for statless CRUD operations) * What level of security is required? (SOAP WS has better support for security) * What level of transaction support is required? (SOAP WS has better support for transaction management) * Do we have limited band width? (SOAP is more verbose) * What’s best for the developers who will build clients for the service? (REST is easier to implement, test, and maintain)

Q. What tools do you use to test your Web Services?
A. SoapUI tool for SOAP WS and the Firefox "poster" plugin for RESTFul services.

Q. What is the difference between SOA and a Web service?
A.

SOA is a software design principle and an architectural pattern for implementing loosely coupled, reusable and coarse grained services. You can implement SOA using any protocols such as HTTP, HTTPS, JMS, SMTP, RMI, IIOP (i.e. EJB uses IIOP), RPC etc. Messages can be in XML or Data Transfer Objects (DTOs).

Web service is an implementation technology and one of the ways to implement SOA. You can build SOA based applications without using Web services – for example by using other traditional technologies like Java RMI, EJB, JMS based messaging, etc. But what Web services offer is the standards based and platform-independent service via HTTP, XML, SOAP, WSDL and UDDI, thus allowing interoperability between heterogeneous technologies such as J2EE and .NET.

Q. Web services when you can use traditional style middle-ware such as RPC, CORBA, RMI and DCOM?
A.

The traditional middle-wares tightly couple connections to the applications and it can break if you make any modification to your application. Tightly coupled applications are hard to maintain and less reusable. Generally do not support heterogeneity. Do not work across Internet. Can be more expensive and hard to use.

Web Services support loosely coupled connections. The interface of the Web service provides a layer of abstraction between the client and the server. The loosely coupled applications reduce the cost of maintenance and increases re-usability. Web Services present a new form of middle-ware based on XML and Web. Web services are language and platform independent. You can develop a Web service using any language and deploy it on to any platform, from small device to the largest supercomputer. Web service uses language neutral protocols such as HTTP and communicates between disparate applications by passing XML messages to each other via a Web API. Do work across internet, less expensive and easier to use.

Q. What are the different approaches to developing a SOAP based Web service? A. 2 approaches. * The contract-first approach, where you define the contract first with XSD and WSDL and the generate the Java classes from the contract. * The contract-last approach where you define the Java classes first and then generate the contract, which is the WSDL file from the Java classes.

Note: The WSDL describes all operations that the service provides, locations of the endpoints (i.e.e where the services can be invoked), and simple and complex elements that can be passed in requests and responses.

Q. What are the pros and cons of each approach, and which approach would you prefer?

A.

Contract-first Web service

PROS: * Clients are decoupled from the server, hence the implementation logic can be revised on the server without affecting the clients. * Developers can work simultaneously on client and server side based on the contract both agreed on. * You have full control over how the request and response messages are constructed -- for example, should "status" go as an element or as an attribute? The contract clearly defines it. You can change OXM (i.e. Object to XML Mapping) libraries without having to worry if the "status" would be generated as "attribute" instead of an element. Potentially, even Web service frameworks and tool kits can be changed as well from say Apache Axis to Apache CXF, etc CONS: * More upfront work is involved in setting up the XSDs and WSDLs. There are tools like XML Spy, Oxygen XML, etc to make things easier. The object models need to be written as well. * Developers need to learn XSDs and WSDLs in addition to just knowing Java.

Contract-last Web service PROS: * Developers don't have to learn anything related to XSDs, WSDLs, and SOAP. The services are created quickly by exposing the existing service logic with frameworks/tool sets. For example, via IDE based wizards, etc. * The learning curve and development time can be smaller compared to the Contract-first Web service. CONS: * The development time can be shorter to initially develop it, but what about the on going maintenance and extension time if the contract changes or new elements need to be added? In this approach, since the clients and servers are more tightly coupled, the future changes may break the client contract and affect all clients or require the services to be properly versioned and managed. * In this approach, The XML payloads cannot be controlled. This means changing your OXM libraries could cause something that used to be an element to become an attribute with the change of the OXM.

So, which approach will you choose?

The best practice is to use "contract-first", and here is the link that explains this much better with examples --> contract-first versus contract-last web services In a nutshell, the contract-last is more fragile than the "contract-first". You will have to decide what is most appropriate based on your requirements, tool sets you use, etc.

Note: More Java Web Services interview questions and answers including WSDL, SOAP, UDDI, JAXR, SAAJ, etc are covered in Java/J2EE Job Interview Companion with diagrams.

Web Service Interview Questions and Answers
What is a Web service?
Many people and companies have debated the exact definition of Web services. At a minimum, however, a Web service is any piece of software that makes itself available over the Internet and uses a standardized XML messaging system.
XML is used to encode all communications to a Web service. For example, a client invokes a Web service by sending an XML message, then waits for a corresponding XML response. Because all communication is in XML, Web services are not tied to any one operating system or programming language--Java can talk with Perl; Windows applications can talk with Unix applications.
Beyond this basic definition, a Web service may also have two additional (and desirable) properties:
First, a Web service can have a public interface, defined in a common XML grammar. The interface describes all the methods available to clients and specifies the signature for each method. Currently, interface definition is accomplished via the Web Service Description Language (WSDL). (See FAQ number 7.)
Second, if you create a Web service, there should be some relatively simple mechanism for you to publish this fact. Likewise, there should be some simple mechanism for interested parties to locate the service and locate its public interface. The most prominent directory of Web services is currently available via UDDI, or Universal Description, Discovery, and Integration. (See FAQ number 8.)
Web services currently run a wide gamut from news syndication and stock-market data to weather reports and package-tracking systems. For a quick look at the range of Web services currently available, check out the XMethods directory of Web services.
What is new about Web services?
People have been using Remote Procedure Calls (RPC) for some time now, and they long ago discovered how to send such calls over HTTP.
So, what is really new about Web services? The answer is XML.
XML lies at the core of Web services, and provides a common language for describing Remote Procedure Calls, Web services, and Web service directories.
Prior to XML, one could share data among different applications, but XML makes this so much easier to do. In the same vein, one can share services and code without Web services, but XML makes it easier to do these as well.
By standardizing on XML, different applications can more easily talk to one another, and this makes software a whole lot more interesting.
I keep reading about Web services, but I have never actually seen one. Can you show me a real Web service in action?
If you want a more intuitive feel for Web services, try out the IBM Web Services Browser, available on the IBM Alphaworks site. The browser provides a series of Web services demonstrations. Behind the scenes, it ties together SOAP, WSDL, and UDDI to provide a simple plug-and-play interface for finding and invoking Web services. For example, you can find a stock-quote service, a traffic-report service, and a weather service. Each service is independent, and you can stack services like building blocks. You can, therefore, create a single page that displays multiple services--where the end result looks like a stripped-down version of my.yahoo or my.excite.
What is the Web service protocol stack?
The Web service protocol stack is an evolving set of protocols used to define, discover, and implement Web services. The core protocol stack consists of four layers:
Service Transport: This layer is responsible for transporting messages between applications. Currently, this includes HTTP, SMTP, FTP, and newer protocols, such as Blocks Extensible Exchange Protocol (BEEP).
XML Messaging: This layer is responsible for encoding messages in a common XML format so that messages can be understood at either end. Currently, this includes XML-RPC and SOAP.
Service Description: This layer is responsible for describing the public interface to a specific Web service. Currently, service description is handled via the WSDL.
Service Discovery: This layer is responsible for centralizing services into a common registry, and providing easy publish/find functionality. Currently, service discovery is handled via the UDDI.
Beyond the essentials of XML-RPC, SOAP, WSDL, and UDDI, the Web service protocol stack includes a whole zoo of newer, evolving protocols. These include WSFL (Web Services Flow Language), SOAP-DSIG (SOAP Security Extensions: Digital Signature), and USML (UDDI Search Markup Language). For an overview of these protocols, check out Pavel Kulchenko's article, Web Services Acronyms, Demystified, on XML.com.
Fortunately, you do not need to understand the full protocol stack to get started with Web services. Assuming you already know the basics of HTTP, it is best to start at the XML Messaging layer and work your way up.
What is XML-RPC?
XML-RPC is a protocol that uses XML messages to perform Remote Procedure Calls. Requests are encoded in XML and sent via HTTP POST; XML responses are embedded in the body of the HTTP response.
More succinctly, XML-RPC = HTTP + XML + Remote Procedure Calls.
Because XML-RPC is platform independent, diverse applications can communicate with one another. For example, a Java client can speak XML-RPC to a Perl server.
To get a quick sense of XML-RPC, here is a sample XML-RPC request to a weather service (with the HTTP Headers omitted):
<?xml version="1.0" encoding="ISO-8859-1"?>
<methodCall>
<methodName>weather.getWeather</methodName>
<params>
<param><value>10016</value></param>
</params>
</methodCall>
The request consists of a simple element, which specifies the method name (getWeather) and any method parameters (zip code).

Here is a sample XML-RPC response from the weather service:

<?xml version="1.0" encoding="ISO-8859-1"?>
<methodResponse>
<params>
<param>
<value><int>65</int></value>
</param>
</params>
</methodResponse>
The response consists of a single element, which specifies the return value (the current temperature). In this case, the return value is specified as an integer.
In many ways, XML-RPC is much simpler than SOAP, and therefore represents the easiest way to get started with Web services.
The official XML-RPC specification is available at XML-RPC.com. Dozens of XML-RPC implementations are available in Perl, Python, Java, and Ruby. See the XML-RPC home page for a complete list of implementations.

Similar Documents

Premium Essay

Testing

...Impact of Inspection and Testing on Quality of Software; a Comparison Naila Bashir Awan, Tooba Ahmad and Mehreen Ahmed KEYWORDS: Quality Assurance, Software testing, Inspection, testing. comparison. The methodology being used is empirical research. This research paper will answer the following questions. • • Are both testing and inspection necessary for software quality assurance? Which Technique (testing or inspection) is better for checking the quality of code? Abstract---Developing software systems involves a series of activities where there are many possibilities to make errors. Thus, software development should always be accompanied by quality assurance (QA) activities. Inspection and testing are two common QA activities, which are often used in different phases of the software development life cycle (SDLC). This research addresses the basic question that which technique is better and are both necessary. But we come to know that both testing and inspection are important defect removal activities and equally effective. 1. INTRODUCTION Quality means the degree to which a system, component, or process meets customer or user needs or expectations. [1] Quality Assurance is set of activities designed to evaluate the process by which products are developed or manufactured. [3]All major software developers stress software quality assurance and try to remove bugs before release. It’s easy to review code but fail to notice significant errors. Thus, software development should...

Words: 3074 - Pages: 13

Premium Essay

Testing

...Non-Functional Testing and Security Testing in Mobile Application Development Abstract Smart-phones have become part of human life. As smartphones become more powerful and usage rises, Smartphone makers have a much wider range of innovation possibilities than their PC counterparts. The personal nature and pocket size of mobile phones and their potential offer a wide scope for developing distinctive handset models targeted at a specific segment of the smart-phone market. The mobile application market’s growth is driven by the widespread push of advanced handset capabilities by the mobile industry and the increasingly-connected global consumer base. Progress of network technologies, restructuring of revenue-sharing pattern, lowering of mobile data usage cost, growing adoption of smart phones, and increase in application usability have contributed to the growth of mobile application adoption globally. This trend has led to substantial surge in the dependence and usage of the mobile Internet, specifically mobile applications. Mobile Application Development is the method by which application software is produced for low power handling devices, mobile devices, and other small digital equipment. As this technological development continues to gain momentum, it's quickly turning into one of the most powerful industries in the world. Majority of the mobile application testers tend to focus more on testing the product against client requirements – Functional testing and pay less attention...

Words: 10078 - Pages: 41

Premium Essay

Testing

...test testtest testtest testtest testtest testtest testtest testtest testtest testtest testtest testtest testtest testtest testtest testtest testtest testtest testtest testtest testtest testtest testtest testtest testtest testtest testtest testtest testtest testtest testtest testtest testtest testtest testtest testtest testtest testtest testtest testtest testtest testtest testtest testtest testtest testtest testtest testtest testtest testtest testtest testtest testtest testtest testtest testtest testtest testtest testtest testtest testtest testtest testtest testtest testtest testtest testtest testtest testtest testtest testtest testtest testtest testtest testtest testtest testtest testtest testtest testtest testtest testtest testtest testtest testtest testtest testtest testtest testtest testtest testtest testtest testtest testtest testtest testtest testtest testtest testtest testtest testtest testtest testtest testtest testtest testtest testtest testtest testtest testtest testtest testtest testtest testtest testtest testtest testtest testtest testtest testtest testtest testtest testtest testtest testtest testtest testtest testtest testtest testtest testtest testtest testtest testtest testtest testtest testtest testtest testtest testtest testtest testtest testtest testtest testtest testtest testtest testtest testtest testtest testtest testtest testtest testtest testtest testtest testtest testtest testtest testtest testtest testtest testtest testtest testtest testtest testtest testtest...

Words: 1101 - Pages: 5

Free Essay

Testing

...your reference in testing services Test Coördinatie Introductie 1 Gent, 4 april 2011 Wat denken jullie? Inleiding Kick off Teststrategie Testaanpak Testbegroting Organisatie Beheren Rapporteren Evaluatie Ondersteuning Wat verstaan jullie onder testen? En testcoördinatie? Hoe zien jullie het? 2 Wat is testen? Inleiding Testen bestaat uit activiteiten die uitgevoerd worden om één of meerdere kenmerken van een product, proces of dienst vast te stellen volgens een gespecifieerde methode Testen is een proces dat inzicht geeft in- en adviseert over de kwaliteit en de daaraan gerelateerde risico‟s Kick off Teststrategie Testaanpak Testbegroting Organisatie Beheren Rapporteren Evaluatie Ondersteuning 3 Definities volgens TMAP Next® Wat is een test level? Inleiding Kick off Teststrategie Testaanpak Testbegroting Organisatie Beheren Rapporteren Evaluatie Ondersteuning Een test level is een groep van testactiviteiten die gezamenlijk worden uitgevoerd en aangestuurd 4 Definities volgens TMAP Next® Wat is coördinatie? Johan Symons, “Introductie tot de psychomotoriek” coördinatie = het harmonisch en economisch samenwerken van spieren, zenuwen en zintuigen om doelgerichte, stabiele bewegingsakties en snelle situatie - aangepaste reacties (reflex) tot stand te brengen. Voor een optimale samenwerking dienen volgende aspecten in acht te worden genomen : ‣ ‣ ‣ een juiste krachtmaat (bewegingsomvang en snelheid) een juiste spierkeuze...

Words: 3788 - Pages: 16

Premium Essay

Introduction to Testing

...IBM, Bangalore A White Paper Challenges of Managing a Testing Project: (A White Paper) A White Paper Page 1 of 20 Vinod Kumar Suvarna IBM, Bangalore A White Paper Introduction Testing is expected to consume 30 – 50 % of the Project Effort, Still properly managing testing project is not considered seriously. Project Managers always undermine the impact the testing activity has on the Project Cost and Schedule. Hence the testing activity is usually unplanned and uncontrollable. As the project manager assumes that the main focus of the testing activity in the project is not to meet the project schedule. But Its is a reality that a thorough and close monitoring of the Testing project is required to increase productivity, reduce cycle -time and improve quality. Below pie chart depicts the Project effort distribution by phase for a development project, where independent testing team performs the testing activity. Project Effort Distribution by Phase 21 35 Requirement Design Code & Unit testing Testing 25 19 A White Paper Page 2 of 20 Vinod Kumar Suvarna IBM, Bangalore A White Paper The Problem / Issues / Improvement Opportunity in Hand: Ask a Tester ‘Why he/she needs to burn midnight oil to churn a Quality Product?’ Answer is obvious ‘Needs to put extra time and effort to overcome the Project schedule slippage ‘ Ask a Project Manager ‘Why the Project is in trouble during the last phase?’ Answer is obvious ‘Not Sure, Did not anticipate...

Words: 2954 - Pages: 12

Premium Essay

Animal Testing

...Animal Testing Over 70 million animals die each year from animal testing. Although many animals have died during the course of animal testing, many things have been improved or have benefitted from animal testing including medicine. Animal testing also affects everyone in more than one way. Animals are not just used for testing in the United States; they are used all over the world for animal testing. Animal testing is a social justice issue that has improved medical research, but has resulted in the killing of many animals. Animal testing is the testing of cosmetic products, cleaning products, agricultural research, dog and cat food trials, weapons tests, aerospace studies, and car crash simulations (PETA). One might feel animal testing is cruel, but almost the whole world has benefitted from vaccines. It has also led to the treatment of some diseases. Animal testing can sometimes end with mixed outcomes. Many people have died because drugs or treatments that have successfully passed tests conducted on animals have failed on humans. Many alternatives to animal testing exist. Some alternatives include using computer models and using tissue cultures in research. During some of the experiments, some animals are given medicine so the animals do not feel pain or distress. However, thousands are not. The experiments preformed can be painful, damaging, and deadly to the animals used (B 5-9). Animal testing is an issue all around the world. In Great Britain, more than 2.5 million...

Words: 913 - Pages: 4

Premium Essay

Agile Testing

...Traditionally, efforts to improve the quality have centered on the end the product development cycle by emphasizing the detection and correction of defects. There are two types of software testing that people usually refer to. The first one is through Waterfall Model and the second one is Agile Testing. Both of these models have their own advantages and disadvantages. By weighting the advantages and disadvantages between these two concepts, we will then be able to decide on which one that we can use as a referral to do software testing. Before we begin to decide on which concepts that we can refer to, let’s take a look at each of the concepts. Waterfall Model Waterfall model is known as a sequential model. Once the stage has completed then developers can move on to the next step. This model requires an extensive plan so that we can minimize the error of going back to the previous stage. To be able to complete the project using the Waterfall method, both sides should be able the requirements and able to present what is should look like after completing the project in the beginning. Waterfall model consist of eight stages. They are: System requirement, Software requirement, Analysis, Design, Coding, Test and Use. Figure 1.0 – Waterfall Model The real purpose of software testing is to verify whether the completed software package functions according to the expectations defined by the requirements/specifications. The objective is not to find every software bug...

Words: 3602 - Pages: 15

Premium Essay

Psychological Testing

...Psychological Testing PSY/475 Psychological Testing In this paper the subject is to summarize the major assumptions and fundamental questions associated with psychological testing. The author begins by defining the term test. Next, the author describes the major categories of tests and identifies the major uses and users of these tests. Last the paper compares and contrasts the concepts of reliability and validity and discusses how they affect the field of psychological testing. The Standards for Education and Psychological Testing defines test as, “An evaluative device or procedure in which a sample of an examinee’s behavior (is) evaluated and scored using a standardized process” (Hogan, 2007, pg. 38). Anastasi and Cronbach, both traditional textbook authors, define the term test as, “an objective and standardized measure of a sample of behavior” and “a systematic procedure for observing behavior and describing it with the aid of numerical scales or fixed categories” (Hogan, 2007, pg. 38). In psychology, tests are used to make important decisions about an individual. Testing samples a person’s behavior, creates a standardized measure, and contributes in making important decisions about the individual taking the test. Testing is used in many different areas and is used to sample a person behavior, create a standardize measure, and contribute in making important decisions. For example, college admissions officers consult test score before admitting or rejecting...

Words: 853 - Pages: 4

Premium Essay

Animal Testing

...Animal Testing: Pros and Cons An Exploratory Research Paper Dallin P. Curtis Arizona State University Main Body "There will come a day when such men as myself will view the slaughter of innocent creatures as horrible a crime as the murder of his fellow man- Our task must be to free ourselves- by widening our circle of compassion to embrace all living creatures and the whole nature and its beauty." -Albert Einstein (1879-1955). Animal testing is an issue in today's general public that, regardless if anybody understands it, does influence each of us. Is some some testing needed by law? Medical advances, for example, transplants, antibodies, and drugs were all tried on animals before they were utilized on people. However, does government law guarantee that creatures utilized as a part of examination and testing are dealt with compassionately? Today there are a lot of individuals who are against animal testing in lab research. Frequently asking what are other options for utilizing animals as a part of therapeutic studies? Animal testing is expected to advance the wellbeing of people, yet the procedures often include hurting innocent creatures. The individuals who are for animal testing for the most part bolster investigative examination and medical advancement. The two principle ideals with respect to animal testing is that it is heartless and oppressive to creatures, while others feel that there are insufficient willing individuals that organizations need to better help...

Words: 1636 - Pages: 7

Free Essay

Genetic Testing

...E Poole Beecham English 101 10059 19 April 2010 Genetic Testing Imagine choosing your daughter to have high intelligence. No one would fault the parents for giving their daughter this advantage for life. Parents can make the decision to use any safe drug or therapy to enhance their future children to make them smarter, better, stronger, to increase their intelligence, height, or other traits (Zane). Testing for medical tendencies to screen and reduce the possibility of future illness or diseases is now feasible. Genetic testing can enhance and improve lives with immeasurable benefits. The rewards of this testing outweigh any reservations. Genetic testing are examinations of blood and other tissues of the body that doctors in the medical field prepare to test for possible defects of the body. These DNA based tests generally involves direct examination of the DNA molecule itself and are very sophisticated techniques of testing genetic disorders in the bodies of human beings. Prenatal genetic testing with the procedure of pre-implantation genetic diagnosis, or PGD is a technique whereby testing is performed of an approximate three-day-old embryo to confirm that it does not carry a particular disease or diseases (Naik). The test predicts, with variable confidence, what the possible medical problems will be in the future. Then the doctor implants this embryo, which is free of that syndrome, in the mother's womb. It appears to be relatively easy to check the DNA and eliminate...

Words: 2704 - Pages: 11

Premium Essay

Software Testings

...Software Testing Types: Black box testing – Internal system design is not considered in this type of testing. Tests are based on requirements and functionality. White box testing – This testing is based on knowledge of the internal logic of an application’s code. Also known as Glass box Testing. Internal software and code working should be known for this type of testing. Tests are based on coverage of code statements, branches, paths, conditions. Unit testing – Testing of individual software components or modules. Typically done by the programmer and not by testers, as it requires detailed knowledge of the internal program design and code. may require developing test driver modules or test harnesses. Incremental integration testing – Bottom up approach for testing i.e continuous testing of an application as new functionality is added; Application functionality and modules should be independent enough to test separately. done by programmers or by testers. Integration testing – Testing of integrated modules to verify combined functionality after integration. Modules are typically code modules, individual applications, client and server applications on a network, etc. This type of testing is especially relevant to client/server and distributed systems. Functional testing – This type of testing ignores the internal parts and focus on the output is as per requirement or not. Black-box type testing geared to functional requirements of an application. System testing – Entire system is...

Words: 6035 - Pages: 25

Premium Essay

Animal Testing

...Imagine this situation: a new company is testing an eye care product on a subject. In the test, a substance is placed in one eye of the subject, with the other eye serving as a control. The subjects are restrained, preventing them from responding naturally to the irritation, and their eyes are evaluated after one hour and then at 24-hour intervals for up to 14 days. Some continue to be evaluated up to three weeks later. The level of irritation to the eyes is scored numerically by observation of the three major tissues of the eye (cornea, conjunctiva, and iris). The subjects suffer from redness, bleeding, ulcers, and even blindness, and are likely killed upon completion of the experiment. The subjects were in fact rabbits in tests called “animal testing.” Animal testing has raised huge debates worldwide that has raised many questions. How important is animal testing for us humans? Are the results going to be the same? Most importantly, should we ban animal testing for the sake of the animals? Animal testing is a phrase that most people have heard but are perhaps still unsure of exactly what is involved. Whether it is called animal testing, animal experimentation or animal research, it refers to the experimentation carried out on animals. It is used to assess the safety and effectiveness of everything from medication to cosmetics, as well as understanding how the human body works. Animal testing, also known as animal research, plays a crucial role in scientists' understanding of...

Words: 1467 - Pages: 6

Premium Essay

Animal Testing

...English 240 December 16, 2011 Should Animals be used for Research During the past ten years, a major controversy over the use of animals in biomedical and behavioral research has arisen. The debate about using animals for medical testing has been ongoing for years. The struggle is usually between animal rights activists and scientist. I believe that animal testing is imperative to the progression of medical cures, procedures and drugs. Scientists have been solving medical problems, developing new techniques and treatments, and curing diseases by using animals in biomedical research. Animal rights advocates believe that animals should not be exploited by humans, and that animals have the same rights as humans. Anti-vivisectionists oppose the use of animals in medical research. They believe that medical researchers are cruel and inhumane. Animal Welfare does not oppose all use of animals in research. They oppose inhumane and unnecessary use of animals and fight to eliminate pain and suffering of animals. On the Contrary, scientists argue that animal research is necessary because it helps them develop medications, vaccines, or new procedures to treat or prevent diseases for both humans and animals. Most research projects either do not involve pain or the pain is alleviated with analgesic or anesthetic drugs. They understand that pain causes stress for the animals, and this stress can seriously affect the results of the study. With all these controversies about this...

Words: 2692 - Pages: 11

Premium Essay

Software Testing

...Software Testing Techniques Manpreet Kaur1 and Rupinder Singh2 1 Department of CSE CGC, Gharuan Mohali, India 2 CSE CGC, Gharuan Mohali, India Abstract Software testing is important to reduce errors, maintenance and overall software costs. One of the major problems in software testing area is how to get a suitable set of test cases to test a software system. We identify a number of concepts that every software engineering student and faculty should have learned. There are now many testing techniques available for generating test cases. This set should ensure maximum effectiveness with the least possible number of test cases. The main goal of this paper is to analysed and compare the testing technique to find out the best one to find out the error from the software. Keywords: Software testing; process model; testing techniques; 1. Introduction Software testing is a process or a series of processes designed to verify computer code does what it was designed to do. According to ANSI/IEEE 1059 standard [1, 2], Testing can be defined as ―A process of analyzing a software item to detect the differences between existing and required conditions (that is defects/errors/bugs) and to evaluate the features of the software item. Another more appropriate definition is this: [3] Testing is the process of executing a program with the intent of finding errors. The concept of testing is as old as coding and is change along with time. Gelperin and Hetzel [4] proposed the concept of the testing process...

Words: 4928 - Pages: 20

Premium Essay

Animal Testing

...Humans have used animals for different uses. They have been used for food, clothing farm work and a variety of other uses. So using them to test new medical advances is different. Animal testing for medical purpose help saves lives and future generations. Animal testing should be continued for the use within the medical field. The ancient Greeks believed that animals were created by the gods to be used however people wish. The Bible says God gave man dominions “over the fish of the sea, over the birds of the air, and over the cattle, over all the earth and over every creeping things that creeps on the earth” (Genesis 9:1-3). The ancient Greeks and Romans influenced the laws of western civilization. The western civilization had no laws saying what you could not do to an animal no matter how cruel or unnecessary the act was (Thorburn). To some people animals have no rights at all while to others animals have rights and should not fell unnecessary pain and suffering. The people who believe animals have no rights; and use them just for their benefits but there is a line that should not be crossed animals do have feelings and some rights. The new movement of animal right groups has some good points like human like primates should not be used in testing like chimpanzees. The first law put in place by western civilizations was in the Massachusetts Bay colony. The law states that it is illegal to exercise any tyranny or cruelty towards any animal which are kept for use by humans...

Words: 1491 - Pages: 6