0% found this document useful (0 votes)
11 views

Soap

The document contains a series of questions and answers related to SOAP (Simple Object Access Protocol) concepts, including fault handling, message structure, and XML schema. Key topics include the handling of SOAP faults, the use of attributes like 'mustUnderstand', and the representation of arrays in SOAP messages. It also covers encoding styles, data types, and the implications of version mismatches between SOAP 1.1 and SOAP 1.2.

Uploaded by

evisa
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
11 views

Soap

The document contains a series of questions and answers related to SOAP (Simple Object Access Protocol) concepts, including fault handling, message structure, and XML schema. Key topics include the handling of SOAP faults, the use of attributes like 'mustUnderstand', and the representation of arrays in SOAP messages. It also covers encoding styles, data types, and the implications of version mismatches between SOAP 1.1 and SOAP 1.2.

Uploaded by

evisa
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 14

19. Which of the following is correct regarding SOAP Faults?

 a. ✅ They communicate information about errors that may have occurred during the processing
of a SOAP message
 b. They generate a fault during the processing of a SOAP message
 c. They describe those faults which are not handled
 d. None of the above

20. When a SOAP message is sent from one application to another, there is an implicit requirement
that the recipient must know how to process that message. If the recipient does not understand the
message, the recipient must reject the message and explain the problem to the sender. Which of the
following attributes fulfills this requirement?
 a. ✅ mustUnderstand
 b. mustBeKnown
 c. understandable
 d. understand
 e. unKnownMessage
 f. mustMatch

22. Which of the following represents an array in SOAP messages?


 a.
xml
CopyEdit
<person>
<firstname>Joe</firstname>
<lastname>Smith</lastname>
</person>
 b.
xml
CopyEdit
<people>
<person name="joe smith"/>
<person name="john doe"/>
</people>
 c. ✅
xml
CopyEdit
<people>
<person name="joe smith">
<designation/>
</person>
<person name="john doe">
<designation/>
</person>
</people>
 d. None of the above
23. You are designing an XML Schema and you want to prohibit line feeds, carriage returns, tabs,
leading and trailing spaces, and multiple spaces from an element. Which of the following datatypes
will you use?
 a. String
 b. normalizedString
 c. ✅ token
 d. trimmedString

24. Fill in the blank: A ______________ Array is a type of array in which only a part of the array is
serialized into the SOAP envelope.
 a. Half Serialized
 b. ✅ Partially Serialized
 c. Partially Transmitted
 d. Half Transmitted

25. Read the following snippet:


xml
CopyEdit
<!-- Version 1.2 SOAP Envelope -->
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
<s:Body>
<n:getQuote xmlns:n="urn:QuoteService">
<symbol xsi:type="xsd:string">IBM</symbol>
</n:getQuote>
</s:Body>
</s:Envelope>
What is the problem in the code?
 a. The header is missing
 b. ✅ The envelope namespace is incorrect
 c. The symbol element is not allowed in a version 1.2 SOAP envelope
 d. xsi:type is incorrect

27. Read the following statements:


xml
CopyEdit
<Person>
<Address href="address1" />
</Person>
<Address id="address1" />
The above code has stored the data using a multiple-referenced accessor. Which of the following is the
exact problem in the code?
 a. The href value must be prefixed with a *
 b. The id value must be prefixed with a *
 c. ✅ The href value must be prefixed with a #
 d. The id value must be prefixed with a #
28. An XML schema describes the structure of an XML document. The purpose of an XML Schema is to
define the legal building blocks of an XML document. Which of the following are true about an XML
Schema?
 a. It defines elements that can appear in a document
 b. It defines attributes that can appear in a document
 c. It defines the order of child elements
 d. It defines default and fixed values for elements and attributes
 e. ✅ All of the above are true

29. A subroutine call is going to be XML encoded for SOAP by passing two parameters using the same
memory location. How will this be implemented?
 a. By using a single-referenced accessor with id and href
 b. By using a single-referenced accessor without id and href
 c. ✅ By using a multi-referenced accessor with id and href
 d. By using a multiple-referenced accessor without id and href

30. Which of the following attributes manages an array in a SOAP message?


 a. SOAP:array
 b. ✅ SOAP-ENC:arrayType
 c. SOAP-ENC:arrayElement
 d. SOAP:arrayElement

31. Which of the following are true for packaging an RPC request in a SOAP envelope?
 a. ✅ The method call is represented as a single structure with each in or in-out parameter
modeled as a field in that structure
 b. ✅ The names and physical order of the parameters must correspond to the names and
physical order of the parameters in the method being invoked
 c. The SOAP RPC conventions require the use of the SOAP Section 5 encoding style
 d. ✅ The SOAP RPC conventions require the xsi:type explicit data typing

34. You can specify time zones in an XML Schema. Which of the following are specifying a time zone
along with date?
 a. ✅ <start>2002-09-24Z</start>
 b. <start type="zone">2002-09-24</start>
 c. ✅ <start>2002-09-24+06:00</start>
 d. ✅ <start>2002-09-24-06:00</start>
1. Which of the following attributes indicates whether an accessor contains a null value?
a. xsi:nil ✅
b. xsi:null
c. xsi:nilValue
d. xsi:nullValue

2. Which of the following is the correct position of the header in a SOAP message?
a. Only before the body
b. Only after the body
c. Only before the envelope
d. Anywhere in the message ✅
**3. A SOAP message may travel from a sender to a receiver by passing different endpoints along the
message path. Not all parts of the SOAP message may be intended for the ultimate endpoint of the
SOAP message but instead, it may be intended for one or more of the endpoints on the message path.
Which of the following attributes may be used to address the Header element to a particular endpoint?
**
a. AuthHeader
b. Actor ✅
c. Destination
d. Path

**4. PremiumSoft Web Service provides financial quotes. Function getQuote() returns a financial
quote for a QuoteID. The message returned in getQuote contains invalid authentication credentials.
Which of the following type of SOAP Faults occur in this scenario?**
a. MustUnderstand
b. Server
c. Client ✅
d. VersionMismatch
e. None of the above

5. Read the following statement regarding arrays in SOAP:


 Statement 1: A single-referenced accessor doesn’t have an identity except as a child of its
parent element.
 Statement 2: A multi-referenced accessor uses id to give an identity to its value. Other accessors
can use the src attribute to refer to their values.
Which of the following is correct?
a. Statement 1 is true but statement 2 is false
b. Statement 1 is false but statement 2 is true
c. Both statements are true ✅
d. Both statements are false

6. Which of the following are basic parts of the SOAP message architecture?
a. Envelope
b. Header
c. Body
d. Footer
e. All of the above ✅

7. Which of the following contains valid syntax for typing values?


a. <SOAP-ENC:int>36</SOAP-ENC:int>
b. <value xsi:type="xsd:int">36</value>
c. <value xsi:type="int">36</value>
d. All of the above ✅

**8. SOAP has become a new medium of method invocation. Business transactions are widely using
SOAP to provide business information.
Which of the following are correct about data types in SOAP?**
a. Any data type of any programming language is supported in SOAP
b. Datatypes are specified in the XML Schema specification
c. Datatypes can be derived from the datatypes specified in the XML Schema specification
d. All of the above ✅

9. Read the following snippet:


xml
CopyEdit
<xs:element name="person">
<xs:complexType>
<xs:sequence>
<xs:element name="firstname" type="xs:string"/>
<xs:element name="lastname" type="xs:string"/>
<xs:any minOccurs="0"/>
</xs:sequence>
</xs:complexType>
</xs:element>
What does the ‘any’ tag do in the above code?
a. All child elements of the person element may have any type of value
b. The sequence of child elements of person may be in any order
c. Any number of elements can be added after the lastname element ✅
d. None of the above

10. Which of the following namespaces is used for messages in SOAP version 1.2?
a. http://schemas.xmlsoap.org/soap/envelope/
b. http://schemas.xmlsoap.org/soap-envelope
c. http://schemas.xmlsoap.org/2001/06/soap/envelope/ ✅
d. http://schemas.xmlsoap.org/2001/06/soap-envelope

11. Read the following statements:


 Statement 1: Encoding styles define how applications on different platforms share information,
even though they may not have common data types or representations.
 Statement 2: The approach that the SOAP Section 5 encoding styles takes is just one possible
mechanism for providing this, but it is not suitable in every situation.
Which of the following is correct?
a. Statement 1 is true but statement 2 is false
b. Statement 2 is true but statement 1 is false
c. Both statements are true ✅
d. Both statements are false

12. (S’ka)

13. Which of the following is an example of a sparse array in SOAP messages?


a. (Sparse array with SOAP-ENC:position) ✅
b. (Array with SOAP-ENC:offset)
c. (Standard array)
d. None of the above

14. (S’ka)
15. Which of the following is the exact error in the following SOAP code snippet?
a. The namespace is incorrect ✅
b. The position of the Header is wrong
c. The Body cannot contain the symbol element
d. mustUnderstand is not an attribute of the transaction element

**16. SOAP defines four standard types of faults that belong to the
http://www.w3.org/2001/06/soap-envelope namespace.
Which of the following is an incorrect Fault code?**
a. VersionMismatch
b. MustUnderstand
c. InvalidMessage ✅
d. Server
e. Client
f. None of the above

17. (S’ka)

18. What will be the result when PremiumSoft (SOAP 1.2) sends a message to ABC Corp. (SOAP 1.1)?
a. The message will be received successfully
b. It will either process it according to the SOAP Version 1.1 specifications or trigger a 'Version
mismatch' error ✅
c. An 'Invalid message' error will be triggered
d. A partial message will be received

29. A subroutine call is going to be XML encoded for SOAP by passing two parameters using the same
memory location. How will this be implemented?
a. By using a single-referenced accessor with id and href
b. By using a single-referenced accessor without id and href
c. By using a multi-referenced accessor with id and href ✅
d. By using a multiple-referenced accessor without id and href

1. Which of the following datatypes will you use to prohibit line feeds, carriage returns, tabs,
leading and trailing spaces, and multiple spaces from an element?
o a. String
o b. normalizedString ✅
o c. token
o d. trimmedString
2. Which of the following child elements of a Fault element is used to express application-
specific details about the error that occurred?
o a. Details
o b. Description
o c. Detail ✅
o d. Comment
3. What is the problem in the given SOAP code snippet?
o a. The header is missing
o b. The envelope namespace is incorrect ✅
o c. The symbol element is not allowed in a version 1.2 SOAP envelope
o d. xsi:type is incorrect
4. How will you serialize the given objects in SOAP?
o a. ✅
o b.
o c.
o d.
5. Which of the following is correct regarding extensibility of SOAP standard fault types?
o a. Standard faults can be extended ✅
o b. Standard faults cannot be extended
o c. Standard faults must be extended
o d. None of the above
6. Which of the following can the header of a SOAP message contain?
o a. Data that by default is intended for the final destination
o b. Information to specify the contextual ID
o c. Authentication information
o d. All of the above ✅
7. Which of the following are incorrect elements in the given SOAP message?
o a. faultcode
o b. faultstring
o c. detail
o d. Faults ✅
8. Which type of array in SOAP messages represents a grid of values with specified dimensions
that may or may not contain any data?
o a. Partially Transmitted Array
o b. Sparse Array ✅
o c. Incomplete Array
o d. Typed Array ?
9. What does the Upgrade header block do in the given SOAP code?
o a. It upgrades the version of the SOAP specification at the client side
o b. It upgrades the version of the SOAP specification at the server side
o c. It tells the sender which version of SOAP it supports
o d. All of the above ✅
10. Which of the following statements about SOAP datatypes is correct?
 a. Statement 1 is true but statement 2 is false
 b. Statement 2 is true but statement 1 is false
 c. Both statements are true ✅
 d. Both statements are false
11. Which of the following are valid encoding styles in SOAP?
 a. RPC
 b. Document
 c. Both a and b ✅
 d. None of the above
12. Which of the following are valid locations for encoding style implementation?
 a. Anywhere in the document
 b. Only in the body ✅
 c. Only in the header
 d. Only before the body
13. Which of the following represents a structure in SOAP messages?
 a. ✅
 b.
 c.
 d. None of the above
14. What happens when SOAP 1.2 sends a message to a SOAP 1.1 receiver?
 a. The message is received successfully
 b. An 'Invalid message' error is triggered
 c. A 'Version mismatch' error is triggered ✅
 d. A partial message is received
15. Which of the following is the correct format of the date datatype in an XML Schema?
 a. MM-DD-YYYY
 b. DD-MM-YYYY
 c. YYYY-MM-DD ✅
 d. YYYY-DD-MM
16. Which of the following attributes prohibit line feeds, carriage returns, and tab characters?
 a. String
 b. normalizedString ✅
 c. TrimmedString
 d. OnlyString
17. What fundamental issue must SOAP address?
 a. The types of information to be exchanged
 b. How the information is expressed as XML
 c. How to actually send that information
 d. All of the above ✅
18. Which of the following shows the correct implementation of a single-dimension array?
 a. ✅
 b.
 c.
 d.
19. Which attributes are used for data representation in multiple-referenced accessors?
 a. id ✅
 b. href ✅
 c. name
 d. description
19. Which of the following are valid encoding styles in SOAP?
 a. RPC
 b. Document
 c. Both a and b ✅
 d. None of the above
20. Which of the following are valid locations for encoding style implementation?
 a. Anywhere in the document
 b. Only in the body ✅
 c. Only in the header
 d. Only before the body
21. Which of the following represents a structure in SOAP messages?
 a. ✅
 b.
 c.
 d. None of the above
22. What happens when SOAP 1.2 sends a message to a SOAP 1.1 receiver?
 a. The message is received successfully
 b. An 'Invalid message' error is triggered
 c. A 'Version mismatch' error is triggered ✅
 d. A partial message is received
23. Which of the following is the correct format of the date datatype in an XML Schema?
 a. MM-DD-YYYY
 b. DD-MM-YYYY
 c. YYYY-MM-DD ✅
 d. YYYY-DD-MM
24. Which of the following attributes prohibit line feeds, carriage returns, and tab characters?
 a. String
 b. normalizedString ✅
 c. TrimmedString
 d. OnlyString
25. What fundamental issue must SOAP address?
 a. The types of information to be exchanged
 b. How the information is expressed as XML
 c. How to actually send that information
 d. All of the above ✅
26. Which of the following shows the correct implementation of a single-dimension array?
 a. ✅
 b.
 c.
 d.
27. Which attributes are used for data representation in multiple-referenced accessors?
 a. id ✅
 b. href ✅
 c. name
 d. description
28. Which of the following represents an XML Schema element substitution?
 a. <xs:element name="name" type="xs:string"/>
<xs:element name="navn" substitutionGroup="name"/> ✅
 b. <xs:element name="name" type="xs:string"/>
<xs:element name="navn" substitution="name"/>
 c. <xs:element name="name" type="xs:string"/>
<xs:element name="navn" Group="name"/>
 d. <xs:element name="name" type="xs:string"/>
<xs:element name="navn" type="xs:string"/>
29. When a SOAP message is sent, which attribute ensures the recipient understands the message or
must reject it?
 a. mustUnderstand ✅
 b. mustBeKnown
 c. understandable
 d. understand
30. What does the Upgrade header block do in a SOAP message?
 a. It upgrades the version of the SOAP specification at the client side
 b. It upgrades the version of the SOAP specification at the server side
 c. It tells the sender which version of SOAP it supports
 d. All of the above ✅
21. Which of the following represents a structure in SOAP messages?
 a.
xml
CopyEdit
<person>
<firstname>Joe</firstname>
<lastname>Smith</lastname>
</person>

 b.
xml
CopyEdit
<people>
<person name="joe smith"/>
<person name="john doe"/>
</people>
 c. ?
xml
CopyEdit
<people>
<person name="joe smith">
<designation/>
</person>
<person name="john doe">
<designation/>
</person>
</people>
 d. None of the above

26. Which of the following shows the correct implementation of a single-dimension array?
 a.
xml
CopyEdit
<names xsi:type="SOAP-ENC:Array" SOAP-ENC:arrayType="xsd:string(4)">
<name xsi:type="xsd:string">a1d1</name>
<name xsi:type="xsd:string">a2d1</name>
</names>

 b.
xml
CopyEdit
<names xsi:type="SOAP-ENC:Array" SOAP-ENC:arrayType="xsd:string(4)">
<name xsi:type="xsd:string">a1d1</name>
<name xsi:type="xsd:string">a2d1</name>
</names>
 c.
xml
CopyEdit
<names>
<name xsi:type="xsd:string">a1d1</name>
<name xsi:type="xsd:string">a2d1</name>
</names>
 d.
xml
CopyEdit
<names xsi:type="SOAP-ENC:Array" SOAP-ENC:arrayType="xsd:string[4]">
<name xsi:type="xsd:string">a1d1</name>
<name xsi:type="xsd:string">a2d1</name>
</names>
31. Which of the following are true about an XML Schema?
 a. It defines elements that can appear in a document
 b. It defines attributes that can appear in a document
 c. It defines the order of child elements
 d. It defines default and fixed values for elements and attributes
 e. All of the above ✅

32. Identify the error in the SOAP code snippet:


 a. The namespace is incorrect
 b. The body cannot contain a symbol element
 c. The position of the Body element is wrong ✅
 d. mustUnderstand is not an attribute of the transaction element

33. Which of the following is an example of referring an external document through a SOAP envelope?
 a.
xml
CopyEdit
<person name="joe smith">
<address href="http://acme.com/data.xml#joe_smith" />
</person>
 b.
xml
CopyEdit
<person name="joe smith">
<address extern="http://acme.com/data.xml#joe_smith" />
</person>
 c.
xml
CopyEdit
<person name="joe smith">
<address doc="d:\HR\person\address\joesmith.xml" />
</person>
 d.
xml
CopyEdit
<person name="joe smith">
<address extern="d:\HR\person\address\joesmith.xml" />
</person>
 Përgjigja e saktë: a. ✅

34. Which of the following represents a structure in SOAP messages?


 a.
xml
CopyEdit
<person>
<firstname>Joe</firstname>
<lastname>Smith</lastname>
</person>

 b.
xml
CopyEdit
<people>
<person name="joe smith"/>
<person name="john doe"/>
</people>
 c. ?
xml
CopyEdit
<people>
<person name="joe smith">
<designation/>
</person>
<person name="john doe">
<designation/>
</person>
</people>
 d. None of the above

35. ABC Corp., a client of PremiumSoft, uses SOAP 1.2 specifications whereas PremiumSoft uses SOAP
1.1 specifications. What will be the result when PremiumSoft sends a message to ABC Corp.?
 a. The message will be received successfully
 b. An 'Invalid message' error will be triggered
 c. A 'Version mismatch' error will be triggered ✅
 d. A partial message will be received

36. Which of the following is the correct format of the date datatype in an XML Schema?
 a. MM-DD-YYYY
 b. DD-MM-YYYY
 c. YYYY-MM-DD ✅
 d. YYYY-DD-MM

37. You have an element named ‘comments’. You want to prohibit all line feeds, carriage returns, and
tab characters. Which of the following will do it?
 a.
xml
CopyEdit
<xs:element name="comments" type="xs:String"/>
 b.
xml
CopyEdit
<xs:element name="comments" type="xs:normalizedString"/>

 c.
xml
CopyEdit
<xs:element name="comments" type="xs:TrimmedString"/>
 d.
xml
CopyEdit
<xs:element name="comments" type="xs:OnlyString"/>

38. What fundamental issue must SOAP address?


 a. The types of information to be exchanged
 b. How the information is to be expressed as XML
 c. How to actually go about sending that information
 d. All of the above ✅

39. Which of the following shows the correct implementation of a single-dimension array?
 a.
xml
CopyEdit
<names xsi:type="SOAP-ENC:Array" SOAP-ENC:arrayType="xsd:string(4)">
<name xsi:type="xsd:string">a1d1</name>
<name xsi:type="xsd:string">a2d1</name>
</names>

 b.
xml
CopyEdit
<names xsi:type="SOAP-ENC:Array" SOAP-ENC:arrayType="xsd:string(4)">
<name xsi:type="xsd:string">a1d1</name>
<name xsi:type="xsd:string">a2d1</name>
</names>
 c.
xml
CopyEdit
<names>
<name xsi:type="xsd:string">a1d1</name>
<name xsi:type="xsd:string">a2d1</name>
</names>
 d.
xml
CopyEdit
<names xsi:type="SOAP-ENC:Array" SOAP-ENC:arrayType="xsd:string[4]">
<name xsi:type="xsd:string">a1d1</name>
<name xsi:type="xsd:string">a2d1</name>
</names>

40. Which of the following are used for data representation in multiple-referenced accessors?
 a. id ✅
 b. href ✅
 c. name
 d. description

You might also like