SOAP Flashcards

1
Q
\_\_\_\_\_\_\_ types describe how elements are organized and nested. \_\_\_\_\_\_ types are the primitive data types contained by elements and attribute
Select one:
a. Simple, Complex
b. Complex, Simple 
c. Simple, Simple
d. Complex, Complex
A

b. Complex, Simple

In XML Schema, there is a basic difference between complex types which allow elements in their content and may carry attributes, and simple types which cannot have element content and cannot carry attributes.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

“Contract First” web services are:
Select one:
a. The WSDL is written before the Java classes.
b. The same as the “Bottom-Up” approach
c. The binding and support classes are automatically generated with a SOAP tool instead of manually written by the developer.
d. Made with the JAX-RS API

A

a. The WSDL is written before the Java classes.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Are SOAP messages delivered using HTTP GET method or POST method?
Select one:
a. GET
b. POST

A

b. POST

Standard SOAP services are using only HTTP POST because they require complex SOAP request (XML) which cannot be included in query string.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

How are exceptions handled in SOAP?
Select one:
a. Throwing the Exception object to the client JVM
b. Changing the HTTP error code in the HTTP response
c. None of the above
d. SOAP Fault is sent in SOAP message when exception is thrown, and includes fault code, reason, etc.

A

d. SOAP Fault is sent in SOAP message when exception is thrown, and includes fault code, reason, etc.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

How are modeled faults mapped in the WSDL?
Select one:
a. The WSDL does not contain modeled faults
b. The portType tag contains all of the corresponding fault tags
c. The type tag contains a model of the Exception object, and the operation defines the fault
d. The message tag contains a part element mapped to the corresponding fault tag within the operation tag

A

d. The message tag contains a part element mapped to the corresponding fault tag within the operation tag

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

How do you consume a SOAP-based Web Service?
Select one:
a. Sending a raw XML document to the endpoint URL
b. Using the wsimport JDK command to generate the client stubs and invoke the service implementation
c. Neither of these
d. Both of these

A

b. Using the wsimport JDK command to generate the client stubs and invoke the service implementation

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

How do you expose a SOAP-based Web Service?
Select one:
a. Using wsgen tool in JDK and invoking Endpoint.publish(endpointURL, new ServiceImplementation( ) )
b. Both of these
c. Using Axis Web Service Deployment Descriptor (WSDD) format
d. Neither of these

A

b. Both of these

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q
In what language is the SOAP message written?
Select one:
a. JSON
b. Plain Text
c. SOAP
d. XML
A

d. XML

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q
In what protocol are SOAP messages bound?
Select one:
a. HTTPS
b. HTTP
c. SMXP
d. Any of the above
e. BEEP
A

d. Any of the above

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Is SOAP a stateless or a stateful protocol?
Select one:
a. Stateless
b. Stateful

A

a. Stateless

Stateful means that server stores information about the client and uses that information over a series of requests. So performing one request is dependant upon the state of some other request (e.g. previous).

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Regarding the WSDL:

Select one:

a. It is a properties file
b. It is an xml document describing a web service
c. It is located in the ejb-jar.xml

A
b. It is an xml document describing a web service. 
It is a binding class generated with JAX-B
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

Soap is…

Select one:

a. White box
b. Lightweight
c. Only written in Java
d. Contract based

A

d. Contract based

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q
SOAP messages contain \_\_\_\_\_\_\_\_\_; and REST messages contain \_\_\_\_\_\_\_\_\_\_\_.
Select one:
a. XML, XML
b. XML, XML or JSON 
c. XML, JSON
d. XML or JSON, XML or JSON
A

b. XML, XML or JSON

SOAP internally uses XML to send data back and forth. SOAP messages have rigid structure and the response XML then needs to be parsed. WSDL is a specification of what requests can be made, with which parameters, and what they will return.

RESTful web-services use standard URIs and methods to make calls to the web service. When you request a URI, it returns the representation of an object, that you can then perform operations upon (e.g. GET, PUT, POST, DELETE). You are not limited to picking XML to represent data, you could pick anything really (JSON included)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q
The \_\_\_\_\_ element of a WSDL defines an individual endpoint by specifying a single address for a binding.
Select one:
a. service
b. portType
c. binding
d. port
A

d. port

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q
The \_\_\_\_\_ element of the WSDL defines where to access the service, through which port to access the web service, and how the communication messages are defined.
Select one:
a. definitions
b. service 
c. portType
d. binding
A

b. service

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q
The \_\_\_\_\_ element of the WSDL describes the data being exchanged between the web service providers and the consumers, including input and output for each Web Service (each denoted with the  tag).
Select one:
a. message 
b. types
c. binding
d. portType
A

a. message

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
17
Q
The \_\_\_\_\_ element of the WSDL provides specific details on how an operation will actually be transmitted over the wire (the message transport protocol) and the messaging mode.
Select one:
a. portType
b. service
c. binding 
d. operation
A

c. binding

18
Q
The \_\_\_\_\_ element of the WSDL takes care of defining the data types that are used by the web service.
Select one:
a. binding
b. portType
c. types 
d. service
A

c. types

19
Q
The \_\_\_\_\_\_ element of the WSDL defines the Web Service operations and the message exchange pattern.
Select one:
a. portType 
b. binding
c. service
d. message
A

a. portType

20
Q
The \_\_\_\_\_\_\_\_ is a mandatory element that contains the application-defined XML data being exchanged in the SOAP message.
Select one:
a. Envelope
b. Stamp
c. Body 
d. Header
A

c. Body

21
Q

The ___________ approach involves creating the Web Service then the WSDL.
Select one:
a. Contract Last
b. Contract First

A

a. Contract Last

22
Q

The ___________ approach involves creating the WSDL then the Web service.
Select one:
a. Contract First
b. Contract Last

A

a. Contract First

23
Q

The envelope portion of the SOAP message:
Select one:
a. Is a mandatory part of SOAP message
b. Is the root of every SOAP message
c. Must contain exactly one Body element.
d. All of the above

A

d. All of the above

24
Q

The Java API used for implementing SOAP web services is:

Select one:

a. JAX-P
b. JAX-RMI
c. None of these
d. JAX-RS
e. JAX-B

A

c. None of these

Java API for XML Web Services (JAX-WS) is a fundamental technology for developing SOAP (Simple Object Access Protocol)

25
Q

The root tag of a SOAP 1.1 message is?

Select one:

a. soap:Envelope
b. soap:Fault
c. soap:Header
d. soap:Body

A

a. soap:Envelope

26
Q

True or False. SOAP can transport messages over HTTP, SMTP, and FTP. REST can also do the same.
Select one:
a. True
b. False

A

b. False

SOAP is a messaging protocol and in a nutshell is just another XML language.
Its purpose is the data exchange over networks. Its concern is the encapsulation of these data and the rules for transmitting and receiving them.

HTTP is an application protocol and SOAP messages are placed as the HTTP payload.

SOAP messages are usually exchanged via HTTP. Although it is possible to use other (application) protocols, e.g. SMTP or FTP

REST supports HTTP Transport only and does not maintain state

27
Q

What are the different types of web services?

Select one or more:

a. Remote
b. Soap
c. Rest
d. Soa

A

b. Soap

c. Rest

28
Q

What is a WSDL?
Select one:
a. Used to specify the exact message format, Internet protocol, and address that a client must use to communicate with a particular Web Service
b. A method to avoid element naming conflicts between XML fragments
c. A plain XML document that is used to wrap request and response data as it passes between client and service
d. None of the above

A

a. Used to specify the exact message format, Internet protocol, and address that a client must use to communicate with a particular Web Service

A WSDL is an XML document that describes a web service. It actually stands for Web Services Description Language. SOAP is an XML-based protocol that lets you exchange info over a particular protocol (can be HTTP or SMTP, for example) between applications

29
Q

What is not true about the header element of the SOAP message?
Select one:
a. The header is encoded as the first immediate child element of the SOAP envelope
b. Headers are intended to add new features and functionality
c. It is a required part of a SOAP message
d. Header elements can occur multiple times

A

c. It is a required part of a SOAP message

The optional SOAP Header element contains application-specific information (like authentication, payment, etc) about the SOAP message. The attributes defined in the SOAP Header defines how a recipient should process the SOAP message.

30
Q

What is not true about the SOAP fault block?
Select one:
a. A SOAP message can carry multiple fault blocks
b. SOAP Fault is linked to the 500 to 599 range of status codes
c. Fault is an optional part of a SOAP message
d. For HTTP binding, a successful response is linked to the 200 to 299 range of status codes

A

a. A SOAP message can carry multiple fault blocks

A SOAP message can carry only one fault block.

Fault is an optional part of a SOAP message.

For HTTP binding, a successful response is linked to the 200 to 299 range of status codes.

SOAP Fault is linked to the 500 to 599 range of status codes.

31
Q

What is the root element of a WSDL?

Select one:

a. definitions
b. envelope
c. soap
d. service
e. wsdl

A

a. definitions

Definition : It is the root element of all WSDL documents. It defines the name of the web service, declares multiple namespaces used throughout the remainder of the document, and contains all the service elements described here.

32
Q
What is the root tag of the WSDL?
Select one:
a. message
b. definitions
c. types
d. service
A

b. definitions

33
Q
Which is not a basic part of a SOAP message?
Select one:
a. Body
b. Stamp 
c. Header
d. Envelope
A

b. Stamp

A SOAP message is encoded as an XML document, consisting of an Envelope element, which contains an optional Header element, and a mandatory Body element. The Fault element, contained in Body, is used for reporting errors.

34
Q
Which is an advantage SOAP has when compared to REST?
Select one:
a. XML message encryption 
b. Simple data manipulation
c. HTTP transport only
A

a. XML message encryption

A SOAP message MUST be encoded using XML

35
Q
Which is not a sub-element of the SOAP fault block in the SOAP message?
Select one:
a. faultString 
b. faultMessage
c. faultActor
d. faultCode
A

b. faultMessage

faultCode: It is a text code used to indicate a class of errors. See the next Table for a listing of predefined fault codes.

faultString: It is a text message explaining the error.

faultActor: It is a text string indicating who caused the fault. It is useful if the SOAP message travels through several nodes in the SOAP message path, and the client needs to know which node caused the error. A node that does not act as the ultimate destination must include a faultActor element.

detail: It is an element used to carry application-specific error messages. The detail element can contain child elements called detail entries.

36
Q
Which WSDL element defines the service endpoint URL?
Select one:
a. definitions
b. portType
c. service 
d. binding
A

c. service

37
Q

Which WSDL tag specifies the class name?

Select one:

a. class
b. package
c. binding
d. portType
e. operation

A

d. portType

38
Q

Which WSDL tag specifies the endpoint url?

Select one:

a. message
b. portType
c. binding
d. operation
e. service

A

e. service

39
Q
With \_\_\_\_\_ messaging mode, the SOAP body element contains an XML document fragment, a well-formed XML element that contains arbitrary application data that belongs to an XML schema and namespace. Furthermore, the body contents should conform to a user-defined XML-schema (XSD) structure.
Select one:
a. Document/Encoded
b. Document/Literal 
c. RPC/Literal
d. RPC/Encoded
A

b. Document/Literal

40
Q
With \_\_\_\_\_ messaging mode, the structure of the SOAP request body must contain both the operation name and the set of method parameters. Furthermore, the message has to use XSD datatypes, but the structure of the message need not conform to any user-defined XML schema.
Select one:
a. RPC/Literal 
b. RPC/Encoded
c. Document/Encoded
d. Document/Literal
A

b. RPC/Encoded

41
Q

SOAP supports JSON to structure and send messages.

Select one:

a. True
b. False

A

b. False

42
Q

To construct a SOAP client all the developer needs is the WSDL for the web service.

Select one:
a. True
b, False

A

a. True