100000380
Points
Questions
185
Answers
186
-
A WSDL document contains the following seven elements which are used to describe the services:
1. types – The types element defines the data types that are used in web services. The types element is a container for XML Schema type definitions.
2. message – The message element describes the data being exchanged between the web service and the client
3. operation – A message exchange is represented in the form of operation. It is an abstract description of an action. The operation refers to one or more messages.
4. portType – The portType elements refers to a collection of operations supported by one or more endpoints.
5. binding – The binding element specifies the concrete protocol and data format specification used by the service. The binding can be made with protocols like SOAP, HTTP GET and HTTP POST and they have the information on location of the web services.
6. port – The port elements defines a single communication endpoint for the binding. This provides the address for binding. The endpoint is a combination of a binding and an address
7. service – The service element is a collection of related endpoints (port).
This answer accepted by JavaNinja. on 18th September 2018 Earned 15 points.
- 1852 views
- 1 answers
- 0 votes
-
The Web Services Description Language (WSDL) is an XML-based interface description language that is used for describing the functionality offered by a web service. The WSDL file provides a machine-readable description of how the service can be called, what parameters it expects, and what data structures it returns.
This answer accepted by JavaNinja. on 18th September 2018 Earned 15 points.
- 1367 views
- 1 answers
- 0 votes
-
SOAP or Simple Object Access Protocol is a protocol specification for exchanging structured information in the implementation of web services. The SOAP specification defines the envelope structure, encoding rules, and conventions for representing web service invocations and responses. These calls and responses are transmitted as SOAP messages (XML files) over HTTP.
A sample SOAP message structure is presented below:
<?xml version="1.0"?> <soap:Envelope xmlns:soap="http://www.w3.org/2001/12/soap-envelope" soap:encodingStyle="http://www.w3.org/2001/12/soap-encoding"> <soap:Header> ... </soap:Header> <soap:Body> ... <soap:Fault> ... </soap:Fault> </soap:Body> </soap:Envelope></p>
This answer accepted by JavaNinja. on 18th September 2018 Earned 15 points.
- 1427 views
- 1 answers
- 0 votes
-
Java API for XML Web Services (JAX-WS) is a Java technology for building web services and clients that communicate using XML. JAX-WS allows developers to write message-oriented as well as Remote Procedure Call-oriented (RPC-oriented) web services.
In JAX-WS a Web Service invocation is represented by a SOAP message. On the server side the developer creates an interface for exposed methods and provides implementation for those methods in some classes. Client creates the proxy and simply invokes methods on the proxy. JAX-WS API completely hides the complexity of SOAP from the application developer. The developer does not generate or parse SOAP messages. The JAX-WS runtime system converts the API calls and responses to and from SOAP messages.
This answer accepted by JavaNinja. on 18th September 2018 Earned 15 points.
- 1430 views
- 1 answers
- 0 votes
-
Key elements of a Web Service include:
• XML – XML is the standard data interchange mechanism in a web service
• SOAP – Simple Object Access Protocol is a lightweight XML based protocol for communication between applications
• UDDI – Universal Description, Discovery and Integration is a XML based registry for registering and locating web services
• WSDL – Web Services Description Language is the standard meta language (XML) to describe the web servicesThis answer accepted by JavaNinja. on 18th September 2018 Earned 15 points.
- 1465 views
- 1 answers
- 0 votes
-
Web services are loosely coupled, reusable software components that semantically encapsulate discrete functionality and are distributed and programmatically accessed over standard internet protocols. Web services provide a standard means of interoperating between software applications running on a variety of platforms and frameworks. The public interfaces and bindings of Web Services are described using XML and this definition can be discovered by other software systems.
This answer accepted by JavaNinja. on 18th September 2018 Earned 15 points.
- 1235 views
- 1 answers
- 0 votes
-
Proxies are classes dynamically generated by Hibernate to help lazy loading. A proxy is a subclass implemented at runtime. Hibernate creates a proxy instead of querying the database directly and the proxy will load the ‘real’ object whenever one of its method is invoked.
This answer accepted by JavaNinja. on 18th September 2018 Earned 15 points.
- 1309 views
- 1 answers
- 0 votes
-
In Hibernate, session.save() method can be used to save a new object in the database. It will persist the given transient instance, first assigning a generated identifier. It returns the id of the entity created.
The session.saveOrUpdate() method will work for both new and old objects. This method calls save() or update() based on the operation. If the identifier exists, it will call update method else the save method will be called. If object is new, it will work like simple save method or if object is already persistent, it will work like update method.
This answer accepted by JavaNinja. on 18th September 2018 Earned 15 points.
- 1312 views
- 1 answers
- 0 votes
-
Projections API is introduced as part of Criteria API which is used to load partial object from database and to find the result of aggregate functions. Projection is an interface and Projections class is similar to Restrictions class and provides a set of static factory methods for producing Projection instances.
..... Criteria cr = session.createCriteria(Student.class); // To get total row count cr.setProjection(Projections.rowCount()); // To get distinct count of a property cr.setProjection(Projections.countDistinct("studentName")); .....
This answer accepted by JavaNinja. on 18th September 2018 Earned 15 points.
- 1402 views
- 1 answers
- 0 votes
-
Three basic inheritance mapping strategies supported in Hibernate are:
1. Table per class hierarchy strategy: A single table hosts all the instances of a class hierarchy. This table would include columns for all properties of all classes in the hierarchy. A discriminator is used as a key to uniquely identify the base type of the class hierarchy. This mapping strategy is preferred because of its performance and simplicity.
2. Table per concrete class strategy: One table per concrete class and subclass is present and each table persist the properties of the class and its superclasses. The main problem with this strategy is that it doesn’t support polymorphic associations very well.
3. Table per subclass strategy: One table per class and every subclass is present including abstract classes. Unlike the strategy that uses a table per concrete class, the table here contains columns only for each non-inherited property (each property declared by the subclass itself) along with a primary key that is also a foreign key of the superclass table. Even though this mapping strategy is deceptively simple, the performance may be problem for complex class hierarchies.
This answer accepted by JavaNinja. on 18th September 2018 Earned 15 points.
- 1382 views
- 1 answers
- 0 votes