Top 34 Java Webservices Interview Questions
Q1. What Are The Differences Between Both Soap Ws And Restful Ws?
The SOAP WS helps both faraway system name (i.E. RPC) and message orientated middle-ware (MOM) integration styles. The Restful Web Service helps only RPC integration style.
The SOAP WS is trport protocol impartial. Supports a couple of protocols like HTTP(S), Messaging, TCP, UDP SMTP, and so forth. The REST is trport protocol specific. Supports simplest HTTP or HTTPS protocols.
The SOAP WS permits handiest XML statistics layout.You outline operations, which tunnels via the POST. The cognizance is on accessing the named operations and exposing the application logic as a service. The REST lets in more than one statistics formats like XML, JSON records, textual content, HTML, etc. Any browser may be used because the REST technique uses the same old GET, PUT, POST, and DELETE Web operations. The attention is on having access to the named resources and exposing the information as a carrier. REST has AJAX assist. It can use the XMLHttpRequest object. Good for stateless CRUD (Create, Read, Update, and Delete) operations.
GET - examine() POST - create() PUT - update() DELETE - delete()
SOAP primarily based reads cannot be cached. REST based totally reads can be cached. Performs and scales better.
SOAP WS supports both SSL protection and WS-protection, which adds some organization safety functions like maintaining safety proper up to the point wherein it is wished, retaining identities thru intermediaries and now not just factor to factor SSL handiest, securing extraordinary elements of the message with exceptional security algorithms, etc. The REST helps simplest point-to-factor SSL security. The SSL encrypts the whole message, whether all of it's far sensitive or now not.
The SOAP has complete aid for each ACID based traction management for short-lived tractions and repayment based traction management for lengthy-running tractions. It additionally supports -phase dedicate across distributed resources. The REST supports tractions, however it is neither ACID compliant nor can provide segment commit across disbursed tractional resources as it is constrained by way of its HTTP protocol.
The SOAP has achievement or retry common sense built in and offers cease-to-cease reliability even via SOAP intermediaries. REST does not have a popular messaging device, and expects customers invoking the provider to address communication failures through retrying.
Q2. Do You Know Jax-rpc?
JAX-RPC makes use of SOAP to call far flung procedures. JAX-RPC allows JAX-RPC clients to invoke web offerings developed across heterogeneous platform.
Q3. What Are Web Services?
Web services exposes functionality over net the use of protocol consisting of HTTP. Web services can be accessed by means of disparate applications from one of a kind structures as they use SOAP protocol to reveal the commercial enterprise capability. SOAP is a platform unbiased protocol, so the customer of the web offerings doesn’t have to understand any implementation detail of internet offerings based additives. This is the reason why web services hosted on windows may even be accessed by LINUX patron.
Q4. Explain Jax Pack?
A java API for xml percent that integrates all of the programming interfaces through SUN for one of a kind web services improvement. All these interfaces are made as a unmarried download. JAX PACK is a package deal of JAXB,JAXM,JAX-RPC,and JAXR. Jax % includes the documentations for aid for the SAX, DOM.SOAP, WSDL, XSLT, EBXML, UDDI requirements.
Q5. Explain The Web Services Architecture?
The operations between one-of-a-kind software program applications, which can be running on a variety of platforms and frameworks are supported by way of a wellknown referred to as Web services. The web offerings structure offers the ideas, version and understanding net offerings and relationships some of the additives.
The WSA specifies the minimum traits which can be very common for all internet services and some of characteristics to the wanted net offerings. WSA is known as interoperability architecture that me the global elements of a global web carrier community are diagnosed via this architecture as a way to carry out the interoperability among the internet services.
Q6. Explain The Technologies Included Within Jax Pack, I.E. Jaxp, Jaxb, Jaxm, Jax-rpc, Jaxr.
JAXP: Java API for xml processing. It affords the validation capability and parsing XML files. There are three simple parsing interfaces in JAXP are DOM, SAX and Straming API for XML STAX.
JAXB: Java Architecture for XML Binding: The java classes are mapped to XML representations. The two essential functions of JAXB are the capability to marshal Java gadgets into XML and unmarshal XML lower back to Java items.
The Java API for XML Messaging (JAXM) enables distributed software program programs to talk using XML (and SOAP). JAXM supports each asynchronous and synchronous messaging.
JAX-RPC: Java API for XML primarily based RPC. Allows a java based web carrier this is to be invoked by means of a Java software furnished the description, nevertheless being regular with WSDL description. This can resemble as Java RMI over web offerings.
Allowing an internet carrier to be carried out at server aspect as a servlet/jsp or EJB field is the advantage of JAX-RPC.
Q7. Explain Java Api For Xml Messaging (jaxm)?
JAXM is a SOAP 1.1 primarily based preferred to send XML files over the Internet from the Java platform.
JAXM may be extended to work with better degree messaging protocols through including the protocol functionality on top of SOAP.
Q8. What Is Jaxb?
Java Architecture for XML Binding: The java training are mapped to XML representations. The two primary capabilities of JAXB are the potential to marshal Java objects into XML and unmarshal XML lower back to Java gadgets.
The Java API for XML Messaging (JAXM) allows disbursed software program packages to speak the usage of XML (and SOAP). JAXM helps each asynchronous and synchronous messaging.
Q9. Explain Uddi Universal Discovery Description Integration?
To submit and find out the information approximately net services, UDDI is a specification. It is an XML primarily based trendy. This general is used for describing, publishing, and finding services. These offerings are found in a distributed surroundings through the use of a server referred to as registry server.
Q10. What Tools Do You Use To Test Your Web Services?
SoapUI device for SOAP WS and the Firefox "poster" plugin for RESTFul services.
Q11. Web Services When You Can Use Traditional Style Middle-ware Such As Rpc, Corba, Rmi And Dcom?
The conventional middle-wares tightly couple connections to the applications and it could break in case you make any modification to your utility. Tightly coupled packages are tough to maintain and much less reusable. Generally do now not help heterogeneity. Do not work across Internet. Can be extra luxurious and hard to use.
Web Services assist loosely coupled connections. The interface of the Web carrier offers a layer of abstraction among the consumer and the server. The loosely coupled applications reduce the value of maintenance and increases re-usability. Web Services gift a new shape of middle-ware based on XML and Web. Web services are language and platform impartial. You can expand a Web carrier the use of any language and install it on to any platform, from small tool to the largest supercomputer. Web carrier makes use of language impartial protocols together with HTTP and communicates between disparate programs by passing XML messages to each different through a Web API. Do paintings across internet, less luxurious and less complicated to apply.
Q12. What Is Jaxp?
Java API for xml processing. It gives the validation functionality and parsing XML files. There are 3 basic parsing interfaces in JAXP are DOM, SAX and Streaming API for XML STAX.
Q13. Explain Java Architecture For Xml Binding (jaxb)?
XML is a fashionable for replacing facts across heterogeneous structures. Java presents a platform for constructing transportable applications.
A aggregate of those two allows customers and alertness developers to application Web based totally capability on an platform.
Q14. Explain Electronic Business Using Xml?
EBXML is one from XML family that is primarily based at the standards of OASIS and UN/CEFACT. The assignment of this widespread is to provide an open xml-based infrastructure that may permit the worldwide use of e-commercial enterprise in an interoperable, cozy and steady way with the aid of all the partners of trading. This is a completely unique structure with unique principles which are component concept and part carried out inside the current EBXML standards.
Q15. Explain Each Web Service Technologies - Soap, Wsdl, Uddi, Ebxml And Jax Pack?
A Simple Object Access Protocol (SOAP) permits the heterogeneous working system to speak with each other by using Hypertext Trfer Protocol (HTTP) and its Extensible Markup Language (XML) as the mechanisms for facts exchange.
Web Services Description Language (WSDL) is an XML-based totally language used to describe the offerings business gives, which can be accessed electronically.
Universal Description Discovery and Integration (UDDI) is a specification for maintaining standardized directories of statistics about Web offerings in a universally recognized layout. It information their competencies, place and necessities.
The ebXML Messaging Service specification (ebMS) extends the SOAP specification. It gives the safety and reliability features. It is supported via a spread of industrial and open source software implementations.
Due to the interoperability of its implementations, ebMS is a robust complement or maybe opportunity to other internet service specifications.
The Java APIs for XML (JAX) Pack integrates all of Sun's programming interfaces for internet services improvement and makes them available as a unmarried download.
Q16. Explain Jaxm Messaging Models?
JAXM messaging models has varieties of messaging model, synchronous and asynchronous.
Synchronous messaging model
In this kind of version, customer directly interacts with the supply. The consumer sends a request and waits for the response.
Asynchronous messaging version
In this model, client sends message to the messaging provider and returns again. Messaging issuer then performs the routing of message to the end supply.
Q17. How Would You Decide What Style Of Web Service To Use? Soap Ws Or Rest?
In fashionable, a REST primarily based Web provider is preferred due to its simplicity, performance, scalability, and support for a couple of facts codecs. SOAP is favored where service calls for complete support for safety and trnational reliability.
Q18. What Is Soap?
SOAP is an XML-based protocol that permits 2 additives to communicate every other. It has the policies to trlate platform specific statistics into the XML format. Web offerings are primarily based on SOAP protocol so as to show their functionality to disparate software and platform.
Q19. What Are Smart Web Services?
A smart net provider understands the situational context and capable of sharing the context with different offerings. The result of this net carrier is based totally on the wishes like who, what, while, wherein it turned into called.
The purchaser’s identity, position of a client, security regulations, physical vicinity of a client, kind of patron device are some of the range of the situational instances of that a smart web provider is aware of.
Q20. Explain The Web Services Architecture.
The operations between exclusive software program applications, which can be running on a variety of platforms and frameworks are supported by way of a standard known as Web services. The internet services architecture presents the principles, version and understanding web services and relationships among the components.
The WSA specifies the minimum traits that are very not unusual for all web offerings and some of traits to the needed web offerings. WSA is called interoperability architecture that me the global factors of a global web provider network are diagnosed through this structure so as to carry out the interoperability between the internet services.
Q21. Can You Explain Soap?
SOAP is an XML-based protocol that permits 2 components to speak every different. It has the policies to trlate platform particular information into the XML format. Web offerings are based totally on SOAP protocol so as to show their capability to disparate software and platform.
Q22. Explain Java Api For Xml-based totally Rpc (jax-rpc)?
JAX-RPC task affords the code base for the Reference Implementation of JAX-RPC, the Java APIs for XML based RPC. JAX-RPC RI is a production-great implementation that is used at once in some of products with the aid of Sun and different companies.
Q23. Explain Each Web Service Technologies - Soap, Wsdl, Uddi, Ebxml And Jax Pack.
SOAP: Simple Object Access Protocol is a protocol that is used to exchange structured data on the time of enforcing a web service. SOAP is relied on XML. Message format of SOAP generally relies on every other protocol of different application layers. Among these the maximum tremendous software layer is Remote Procedure Call and HTTP. SOAP forms the inspiration layer for web offerings protocol stack. This stack offers the primary framework for messaging on which the net services are constructed.
WSDL: Web Service Definition Language is used to explain a web carrier based totally on XML. WSDL is used for describing Web Services and to find the offerings. WSDL includes the records on what the provider is all approximately, its living location and the way of invocation the provider.
UDDI Universal Discovery Description Integration: To post and discover the records about net offerings, UDDI is a specification. It is an XML based totally trendy. This standard is used for describing, publishing, and finding services. These offerings are determined in a allotted surroundings via the use of a server called registry server.
Electronic Business using XML: EBXML is one from XML own family that is based totally on the standards of OASIS and UN/CEFACT. The assignment of this preferred is to offer an open xml-based totally infrastructure that can allow the worldwide use of e-commercial enterprise in an interoperable, at ease and constant way via all the partners of trading. This is a unique structure with particular ideas that are element theory and component implemented in the current EBXML requirements.
JAX PACK: A java API for xml p.C. That integrates all the programming interfaces through SUN for specific web offerings development. All these interfaces are made as a unmarried down load. JAX PACK is a package of JAXB,J AXM, JAX-RPC, and JAXR. Jax percent consists of the documentations for assist for the SAX, DOM.SOAP, WSDL, XSLT, EBXML, UDDI requirements.
Q24. Explain Jaxr?
JARX is a fashionable API which might be used to get admission to XML registries (list of offerings available on the web) from the JAVA platform. Client software can use JARX API to query the registries. It acts as a pluggable layer that allows get entry to to registries implemented on exclusive standards including UDDI.
Q25. What Is Web Services?
Web Services are the additives that provide functionality through net, makes use of widespread protocol together with HTTP. Web services use SOAP to reveal functionality which is an XML-based totally protocol that enables 2 disparate additives to communicate. So net offerings hosted on windows platform can without problems be consumed Linux and UNIX platform.
Q26. Explain The Technologies Included Within Jax Pack, I.E. Jaxp, Jaxb, Jaxm, Jax-rpc, Jaxr?
Included inside the bundle are Java API for XML Processing (JAXP) JAXP enables programs to parse, trform, validate and query XML documents. It makes use of an API that is independent of a specific XML processor implementation.
JAXP permits companies to offer their very own implementations with out introducing dependencies in software code.
Q27. What Is The Difference Between Soa And A Web Service?
SOA is a software program layout principle and an architectural sample for implementing loosely coupled, reusable and coarse grained services. You can implement SOA the usage of any protocols such as HTTP, HTTPS, JMS, SMTP, RMI, IIOP (i.E. EJB uses IIOP), RPC etc. Messages can be in XML or Data Trfer Objects (DTOs).
Web carrier is an implementation technology and one of the ways to put in force SOA. You can build SOA based applications without using Web services – as an instance with the aid of the use of different traditional technology like Java RMI, EJB, JMS based messaging, and so on. But what Web offerings provide is the requirements based totally and platform-independent carrier through HTTP, XML, SOAP, WSDL and UDDI, as a result permitting interoperability between heterogeneous technologies which include J2EE and .NET.
Q28. What Are The Different Styles Of Web Services Used For Application Integration?
SOAP WS and Restful Web Service
Q29. Explain Java Api For Xml Registries (jaxr)?
JAXR offers you a uniform manner to use business registries which can be primarily based on open standards (ebXML) or enterprise consortium-led specs (UDDI).
Q30. What Are The Different Application Integration Styles?
There are some of one-of-a-kind integration patterns like
Shared database
batch file trfer
Invoking faraway processes (RPC)
Exchanging asynchronous messages over a message orientated center-ware (MOM).
Q31. What Is Jax-rpc?
Java API for XML primarily based RPC. Allows a java based internet provider this is to be invoked through a Java application furnished the outline, nonetheless being steady with WSDL description. This can resemble as Java RMI over internet services.
Allowing an internet carrier to be applied at server facet as a servlet/jsp or EJB box is the advantage of JAX-RPC.
Q32. Explain Wsdl?
Web Service Definition Language is used to explain an internet service based totally on XML. WSDL is used for describing Web Services and to find the services. WSDL includes the facts on what the carrier is all about, its dwelling region and the manner of invocation the carrier.
Q33. What Are The Different Approaches To Developing A Soap Based Web Service? A. 2 Approaches?
The settlement-first technique, where you define the agreement first with XSD and WSDL and the generate the Java instructions from the settlement.
The agreement-remaining approach wherein you outline the Java lessons first and then generate the contract, that is the WSDL report from the Java instructions.
Note: The WSDL describes all operations that the provider offers, locations of the endpoints (i.E.E wherein the offerings can be invoked), and simple and complicated factors that can be surpassed in requests and responses.
Q34. Explain Jax-rpc?
JAX-RPC makes use of SOAP to call far flung methods. JAX-RPC allows JAX-RPC clients to invoke net offerings developed across heterogeneous platform.
