Deck 28: Web Services in Java

ملء الشاشة (f)
exit full mode
سؤال
Using a web service from a client application is known as ________ a web service.

A) accessing.
B) serving.
C) consuming.
D) publishing.
استخدم زر المسافة أو
up arrow
down arrow
لقلب البطاقة.
سؤال
A Java client application can consume a web service by adding a ________ to the application, which defines the proxy class that allows the client to access the web service.

A) client reference
B) web client reference.
C) web service client.
D) web service reference.
سؤال
The ________ annotation indicates that a class represents a web service.

A) @WebService.
B) @WebMethod.
C) @WebParam.
D) None of the above.
سؤال
The ________ annotation indicates the names of a method's parameters that will be exposed to a client calling one of the web service's methods.

A) @WebService.
B) @WebMethod.
C) @WebParam.
D) None of the above.
سؤال
The ________ annotation indicates the URI for accessing the web service.

A) @Location.
B) @URI.
C) @Path.
D) @URL.
سؤال
Each request and response is packaged in a ________ (also known as a ________)-an XML "wrapper" containing the information that a web service requires to process the message.

A) SOAP message, SOAP envelope.
B) message, envelope.
C) SOAP message, SOAP package.
D) None of the above.
سؤال
Each new web service class created with the JAX-WS APIs is a ________- you do not need to extend a class or implement an interface to create a Web service.

A) Class.
B) Object.
C) POJO.
D) None of the above.
سؤال
Each method in a RESTful web service is identified by a unique ________.

A) URL.
B) data format.
C) HTTP method (GET, POST, etc.).
D) cache.
سؤال
To create a web service in NetBeans, you first create a project of type________.

A) Web Service Application.
B) Web Application.
C) Service Application.
D) Web Service.
سؤال
The ________ annotation indicates that a method can be called remotely.

A) @WebService.
B) @WebMethod.
C) @WebParam.
D) None of the above.
سؤال
________ is an XML-based protocol that allows web services and clients to communicate, even if the client and the web service are written in different languages.

A) SOAP.
B) REST.
C) TCP.
D) UDP.
سؤال
To convert a POJO to XML, use the ________ method of the javax.xml.bind.JAXB class.

A) serialize.
B) convert.
C) convertToXML.
D) marshal.
سؤال
The protocol that transmits request-and-response messages is known as the web service's ________ or ________.

A) format, protocol.
B) wire format, wire protocol.
C) web format, web protocol.
D) None of the above.
سؤال
Making a web service available to receive client requests is known as ________ a web service.

A) accessing.
B) serving.
C) consuming.
D) publishing.
سؤال
JSON does not have a built-in way to represent ________.

A) strings.
B) arrays.
C) dates.
D) objects.
سؤال
To bind URL parameters to method parameters, use the ________ annotation.

A) @PathParam.
B) @marshal.
C) @Produces.
D) @BindParam.
سؤال
A ________ is a software component stored on one computer that can be accessed via method calls by an application (or other software component) on another computer over a network.

A) web method.
B) web service.
C) web object.
D) None of the above.
سؤال
REST returns data in the ________ format.

A) XML.
B) plain text.
C) HTML.
D) all of the above.
سؤال
The computer on which a web service resides is referred to as a ________.

A) server.
B) client.
C) web service host.
D) service repository.
سؤال
JAX-WS uses ________ to describe web services in a platform-independent manner.

A) XML.
B) SOAP.
C) WSDL.
D) HTML.
سؤال
The ________ annotation enables session tracking in a web service.

A) @SessionScoped.
B) @HttpSessionScope.
C) @HttpSession.
D) None of the above.
سؤال
To retrieve data from a URL, create a URL object and then call its ________ method.

A) getData.
B) openStream.
C) getReader.
D) openReader.
سؤال
Which of the following is true

A) Only desktop applications can consume web services.
B) Only web applications can consume web services.
C) Desktop and web applications can both consume web services.
D) A web service client must be written in the same programming language
سؤال
For an object to be serialized and unserialized, what must be true about the class definitions on the server and client

A) They must have identical definitions, with the same class name and package.
B) The class names and definitions must match, but the packages may differ.
C) The class definitions must match, but the class name and package may differ.
D) The classes must have the same set of public properties, but the classes may have additional methods that differ and class name and package do not matter.
سؤال
The top level of a JSON text cannot be a(n) ________.

A) number.
B) object.
C) string.
D) both a and c.
سؤال
A ________ enables the client to manipulate the request information that will be sent to the server when invoking a web service method.

A) WebServiceProvider.
B) Provider.
C) Binder.
D) BindingProvider.
سؤال
The unmarshal method of the JAXB class takes ________.

A) a String indicating the URL or path of the XML document and a Class< T > indicating the class to convert to.
B) an InputStream indicating the URL or path of the XML document and an object of the appropriate class to store the data.
C) a Reader indicating the URL or path of the XML document; JAXB determines the type of the object from the XML data.
D) a Scanner containing the XML document and a Class< T > indicating the class to convert to.
فتح الحزمة
قم بالتسجيل لفتح البطاقات في هذه المجموعة!
Unlock Deck
Unlock Deck
1/27
auto play flashcards
العب
simple tutorial
ملء الشاشة (f)
exit full mode
Deck 28: Web Services in Java
1
Using a web service from a client application is known as ________ a web service.

A) accessing.
B) serving.
C) consuming.
D) publishing.
C
2
A Java client application can consume a web service by adding a ________ to the application, which defines the proxy class that allows the client to access the web service.

A) client reference
B) web client reference.
C) web service client.
D) web service reference.
D
3
The ________ annotation indicates that a class represents a web service.

A) @WebService.
B) @WebMethod.
C) @WebParam.
D) None of the above.
A
4
The ________ annotation indicates the names of a method's parameters that will be exposed to a client calling one of the web service's methods.

A) @WebService.
B) @WebMethod.
C) @WebParam.
D) None of the above.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 27 في هذه المجموعة.
فتح الحزمة
k this deck
5
The ________ annotation indicates the URI for accessing the web service.

A) @Location.
B) @URI.
C) @Path.
D) @URL.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 27 في هذه المجموعة.
فتح الحزمة
k this deck
6
Each request and response is packaged in a ________ (also known as a ________)-an XML "wrapper" containing the information that a web service requires to process the message.

A) SOAP message, SOAP envelope.
B) message, envelope.
C) SOAP message, SOAP package.
D) None of the above.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 27 في هذه المجموعة.
فتح الحزمة
k this deck
7
Each new web service class created with the JAX-WS APIs is a ________- you do not need to extend a class or implement an interface to create a Web service.

A) Class.
B) Object.
C) POJO.
D) None of the above.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 27 في هذه المجموعة.
فتح الحزمة
k this deck
8
Each method in a RESTful web service is identified by a unique ________.

A) URL.
B) data format.
C) HTTP method (GET, POST, etc.).
D) cache.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 27 في هذه المجموعة.
فتح الحزمة
k this deck
9
To create a web service in NetBeans, you first create a project of type________.

A) Web Service Application.
B) Web Application.
C) Service Application.
D) Web Service.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 27 في هذه المجموعة.
فتح الحزمة
k this deck
10
The ________ annotation indicates that a method can be called remotely.

A) @WebService.
B) @WebMethod.
C) @WebParam.
D) None of the above.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 27 في هذه المجموعة.
فتح الحزمة
k this deck
11
________ is an XML-based protocol that allows web services and clients to communicate, even if the client and the web service are written in different languages.

A) SOAP.
B) REST.
C) TCP.
D) UDP.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 27 في هذه المجموعة.
فتح الحزمة
k this deck
12
To convert a POJO to XML, use the ________ method of the javax.xml.bind.JAXB class.

A) serialize.
B) convert.
C) convertToXML.
D) marshal.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 27 في هذه المجموعة.
فتح الحزمة
k this deck
13
The protocol that transmits request-and-response messages is known as the web service's ________ or ________.

A) format, protocol.
B) wire format, wire protocol.
C) web format, web protocol.
D) None of the above.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 27 في هذه المجموعة.
فتح الحزمة
k this deck
14
Making a web service available to receive client requests is known as ________ a web service.

A) accessing.
B) serving.
C) consuming.
D) publishing.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 27 في هذه المجموعة.
فتح الحزمة
k this deck
15
JSON does not have a built-in way to represent ________.

A) strings.
B) arrays.
C) dates.
D) objects.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 27 في هذه المجموعة.
فتح الحزمة
k this deck
16
To bind URL parameters to method parameters, use the ________ annotation.

A) @PathParam.
B) @marshal.
C) @Produces.
D) @BindParam.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 27 في هذه المجموعة.
فتح الحزمة
k this deck
17
A ________ is a software component stored on one computer that can be accessed via method calls by an application (or other software component) on another computer over a network.

A) web method.
B) web service.
C) web object.
D) None of the above.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 27 في هذه المجموعة.
فتح الحزمة
k this deck
18
REST returns data in the ________ format.

A) XML.
B) plain text.
C) HTML.
D) all of the above.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 27 في هذه المجموعة.
فتح الحزمة
k this deck
19
The computer on which a web service resides is referred to as a ________.

A) server.
B) client.
C) web service host.
D) service repository.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 27 في هذه المجموعة.
فتح الحزمة
k this deck
20
JAX-WS uses ________ to describe web services in a platform-independent manner.

A) XML.
B) SOAP.
C) WSDL.
D) HTML.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 27 في هذه المجموعة.
فتح الحزمة
k this deck
21
The ________ annotation enables session tracking in a web service.

A) @SessionScoped.
B) @HttpSessionScope.
C) @HttpSession.
D) None of the above.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 27 في هذه المجموعة.
فتح الحزمة
k this deck
22
To retrieve data from a URL, create a URL object and then call its ________ method.

A) getData.
B) openStream.
C) getReader.
D) openReader.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 27 في هذه المجموعة.
فتح الحزمة
k this deck
23
Which of the following is true

A) Only desktop applications can consume web services.
B) Only web applications can consume web services.
C) Desktop and web applications can both consume web services.
D) A web service client must be written in the same programming language
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 27 في هذه المجموعة.
فتح الحزمة
k this deck
24
For an object to be serialized and unserialized, what must be true about the class definitions on the server and client

A) They must have identical definitions, with the same class name and package.
B) The class names and definitions must match, but the packages may differ.
C) The class definitions must match, but the class name and package may differ.
D) The classes must have the same set of public properties, but the classes may have additional methods that differ and class name and package do not matter.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 27 في هذه المجموعة.
فتح الحزمة
k this deck
25
The top level of a JSON text cannot be a(n) ________.

A) number.
B) object.
C) string.
D) both a and c.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 27 في هذه المجموعة.
فتح الحزمة
k this deck
26
A ________ enables the client to manipulate the request information that will be sent to the server when invoking a web service method.

A) WebServiceProvider.
B) Provider.
C) Binder.
D) BindingProvider.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 27 في هذه المجموعة.
فتح الحزمة
k this deck
27
The unmarshal method of the JAXB class takes ________.

A) a String indicating the URL or path of the XML document and a Class< T > indicating the class to convert to.
B) an InputStream indicating the URL or path of the XML document and an object of the appropriate class to store the data.
C) a Reader indicating the URL or path of the XML document; JAXB determines the type of the object from the XML data.
D) a Scanner containing the XML document and a Class< T > indicating the class to convert to.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 27 في هذه المجموعة.
فتح الحزمة
k this deck
locked card icon
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 27 في هذه المجموعة.