Which of the following xml instances satisfies this xml schema?
<xsd:complexType name="purchaseorder">
<xsd:sequence>
<xsd:element name="client" type="xsd:string"/>
<xsd:element name="totalprice" type="xsd:decimal"/>
<xsd:element name="ordernumber">
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:pattern value="\d{4}"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
-
<purchaseorder>
<client>Grover</client>
<totalprice>100</totalprice>
<ordernumber>1234</ordernumber>
</purchaseorder>
-
<purchaseorder>
<totalprice>100</totalprice>
<client>Grover</client>
<ordernumber>1234</ordernumber>
</purchaseorder>
-
<purchaseorder>
<client>Grover</client>
<totalprice>100</totalprice>
<ordernumber>ABCD</ordernumber>
</purchaseorder>
-
<purchaseorder client="Grover" totalprice="100" ordernumber="ABCD"/>
-
<purchaseorder client="Grover" totalprice="100" ordernumber="1234"/>
In XML, a namespace is declared using
- the
xmlns
attribute.
- the
namespace
attribute.
- the
nmspace
attribute.
- the
DOCTYPE
element.
- the
?xml
element.
Which one of the following is not a type offered by the XML Schema definition?
- URL
- string
- time
- float
- decimal
Which one of the following is a correct way to represent a "subject, verb, object" triple in RDF?
-
<Description about="subject">
<verb>object</verb>
</Description>
-
<Triple about="subject">
<verb>object</verb>
</Triple>
-
<Sentence about="subject">
<verb>object</verb>
</Sentence>
-
<subject verb="object"/>
-
<subject>
<verb>object</verb>
</subject>
What does the following mean?
<owl:Class rdf:ID="Person">
<rdfs:subClassOf rdf:resource="#Mammal"/>
<rdfs:subClassOf>
<owl:Restriction>
<owl:onProperty rdf:resource="#hasParent"/>
<owl:toClass rdf:resource="#Reptile"/>
</owl:Restriction>
</rdfs:subClassOf>
</owl:Class>
- A person is a mammal. The parent of a person is a reptile.
- A person is a mammal. A person is cannot have a parent that is a reptile.
- A person is either a mammal or has a parent that is a reptile.
- A person is either a mammal with not parent or a reptile with a parent.
- A person is both a mammal and a reptile.
What does OWL stand for?
- Web Ontology Language
- Obvious Web Language
- Obfuscated Web Language
- Original Web Language
- Object-oriented Web Language
What is an ontology?
- An attempt to list the entities and relationships in some domain.
- An API for Web services.
- A semantic-level inference engine.
- A language for communicating among asynchronous distributed processes.
- A method for integrating semantics into a workflow process.
Whats does the owl:Restriction
element do?
- It creates an anonymous class.
- It limits the range of a given class.
- It limits the number of properties that can be assigned to a given elements.
- It restricts the usage of the ontology to the given domains.
- It restricts the domain of the parent class.
The three OWL sub-languages have different levels of
- expressiveness.
- neutrality.
- standards-compliance.
- syntactic sugar.
- parseability.
The main difference between the SAX and DOM APIs is that
- DOM creates an in-memory data structure out of the whole XML document, SAX does not.
- DOM uses a context-free grammar parser implementation, SAX does not.
- DOM must be used with an XML Schema definition, unlike SAX.
- SAX is much slower than DOM.
- SAX uses a factory pattern for the generation of parsers, DOM does not.
If you needed to read a very large XML document from a file, make a
small change to it, and write it back to a file; would you prefer to
use SAX or DOM? why?
- DOM, because it makes it easy to write back the document.
- DOM, because it supports making changes directly to the file.
- DOM, because it uses the factory pattern.
- SAX, because it has callbacks.
- SAX, because it can make quick changes to the document.
If you have an XML document that is well-formed but is not valid, what could be the problem with it?
- It does not obey its schema.
- There is a missing close tag.
- One of the values is not within quotes.
- It closes tags in the wrong order.
- It contains invalid characters.
What is the DOCTYPE in an XML document for?
- It tells the parsers where to find the schema for that document.
- It tells us the purpose of the document: imperative, informational, or declarative.
- It tells the data encoding used in the document: ASCII, ISO, Unicode, etc.
- It is placed there by the editor (program) to store any editor-specific information.
- It reveals the history of the document.
If the mustUnderstand
attribute is set to true
in a SOAP header block, what does it mean?
- That the receiver must understand that particular header block.
- That the receiver must understand the whole header of the message.
- That the receiver must understand the body of the message.
- That the particular header block is part of the standard SOAP set.
- That the sender did not understand that particular header block, so send a different one.
What is the role that all SOAP receivers must play?
- next
- actor
- receiver
- dictator
- police
A soap Fault contains the following elements:
- faultcode and faultstring.
- errornumber, documentation, and message.
- header and body.
- suspense and disbelief.
- passport and id.
An array of 10 different integers is encoded in SOAP as
- 10
val
elements.
- one
array
element with 10 attributes.
- 10
el
attributes.
- 10
int
attributes.
- 10 integers in a row.
How does SOAP encode sparse arrays?
- By only sending the elements and their offsets.
- By using data compression before sending.
- By sending the whole array, with a 0 for the empty slots.
- By sending the data twice.
- By reverse-discrete inversion coding.
When encoding data, SOAP uses the id
attribute as a way to
- refer to structures it has already encoded.
- distinguish between two or more instances of the same class.
- enhance the readability of the document.
- allow discretization and subdivision of the message.
- eliminate unholy alliances.
If, using SOAP RPC, you send a SOAP message with the body element
calculatePrice
you will, by convention, receive a
response with a body element
- calculatePriceResponse
- calculatePrice
- reply
- return
- hello
Why is it easy to transport SOAP messages in so many underlying protocols (HTTP, FTP, SMTP, Jabber, etc.)?
- Because it is just XML.
- Because it divides messages into header and body.
- Because it follows a hierarchical encoding method.
- Because it is a binary encoding.
- It is not. SOAP only works over HTTP.
In Axis, when you change the scope of a web service, you are changing
- when the remote object is to be created and destroyed.
- the namespace used by the SOAP client.
- the namespace used by the SOAP server.
- the availability of the object server under various conditions.
- the class that the web service extends.
Say you want to deploy some of the methods in class
FinanceServices
as web services, what would you need to do
differently if you were using Axis versus MS VS .NET?
- In .NET you comment each method that should be exported while in Axis all methods in the class are exported.
- In .NET you just need to click on the compile button while in Axis you need to run the java2ws program.
- In .NET you just need to click on the compile button, same as in Axis.
- In .NET you need to make sure the methods have the same signature as provided by your WSDL file, while AXIS can create the WSDL file with the java2wsdl program.
- In .NET there is no way to do this.
Once you have deployed a web service using Axis, you can get its WSDL description by
- adding "?WSDL" to its URL and loading it with a browser.
- running the jws2wsdl program.
- writing it by hand.
- invoking the
getWSDL()
method on it.
- you cannot.
WSDL is a language that can be used to describe a web service's
- interfaces.
- semantic description.
- language requirements.
- owner.
- cost.
Which one of the following is not one of the elements used in a WSDL document?
- class
- message
- portType
- operation
- binding
Which one of the following is a type of operation that you
cannot define in WSDL? Assume that A is the web service being
described by the WSDL document.
- You can define all of these.
- A sends a message to B.
- A sends a message to B, B sends back a reply.
- A receives a message from B, A sends back a reply.
- A receives a message from B.
What does the WSDL port element represent?
- The network location where the web service is implemented.
- The port number for accessing the web service.
- The soap version implemented by the web service.
- The encoding used by the web service.
- The message format and protocol details for operations and messages defined by a particular portType.
What is the goal of UDDI?
- To provide a way for customers to find the web services they need.
- To enable inter-operation among the various SOAP vendor implementations.
- To distribute web service load among a set of cooperating machines.
- To provide a common platform on which all web service implementation can run.
- To provide a distributed workflow implementation.
If you have a WSDL file that describes your web service and you want to use UDDI, what to you have to do?
- Divide the file into interface and implementation descriptions. Register the first as a TModel and the second as an instance of that TModel.
- Send the WSDL file to the UDDI registry.
- Send the WSDL file to the UDDI registry along with a new mapping file from the WSDL portTypes to UDDI TModels.
- Use the portType definitions from the WSDL as a template for the UDDI definitions.
- Add information about the service provider, the company, the owner, etc., to the WSDL file and send it to the UDDI registry.
What are the three main parts of an OWL-S Service description?
- ServiceProfile, ServiceModel, ServiceGrounding.
- interface, semantics, encoding.
- subject, object, verb.
- Classes, Properties, Exceptions.
- sequence, flow, pick.
Why are OWL-S' IOPEs important?
- They tell us what a web service does.
- They describe the signature of a web service.
- They facilitate inter-operation between web services and legacy distributed object systems like CORBA and RMI.
- They provide comic relief.
- They ensure that the language is computationally tractable.
The OWL-S ServiceModel and the BPEL4WS activities are very similar to
each other. They are also both
- akin to simple programming languages.
- subsets of WSDL functionality.
- incompatible with semantic markup.
- used by UDDI.
- limited in that they can only represent sequential processes.
What does the following OWL-S process description describe?
<process:AtomicProcess rdf:ID="BuyBook">
<process:hasInput>
<process:Input rdf:ID="ISBN">
<process:parameterType rdf:resource="&xsd;#string"/>
</process:Input>
</process:hasInput>
<process:hasPrecondition rdf:resource="#AcctExists"/>
<process:hasPrecondition rdf:resource="#CreditExists"/>
- The BuyBook operation which takes as input and ISBN number and requires that the caller have an account and credit before it can be invoked.
- The BuyBook operation which takes as input an ISBN number and returns an account and credit report.
- The ISBN operation which is part of the BuyBook service. The BuyBook service requires callers to have an account and credit.
- The BuyBook service which has operations ISBN, AcctExists, and CreditExists.
- The ISBN operation which is part of the BuyBook service and takes as input AcctExists and CreditExists.
The W3C Web Services Architecture document defines a message exchange pattern. This message exchange pattern idea is similar to
- FIPA's interaction protocols.
- SOAP's RPC mechanism.
- HTTP.
- UDDI.
- a workflow language.
The W3C Web Services Architecture document defines a policy to have two types of constraints:
- obligation and permission.
- necessary and optional.
- limited and unlimited.
- deterministic and probabilistic.
- enforceable and optional.
In BPEL4WS, the partners
sections contains
- a list of the web services invoked by the workflow.
- the other business partners that own part of this workflow.
- the list of all the web services provided by this workflow.
- a list of other workflows which deliver a similar service to this one.
- a list of all the soap messages received by this workflow.
In BPEL4WS, the element that we use to signify that we are calling another web service, is called
- invoke
- execute
- call
- do
- sequence
What is the createInstance
attribute used for in BPEL4WS?
- To denote the activities which result in the creation of a new instance of the workflow.
- To denote the messages that result in the creation of new web service instances.
- To specify the need to create a new instance of a message in case the previous one was lost.
- To specify the need to create a new instance of a stub for some remote web service which the workflow needs to invoke.
- To force the enactment engine to only have one instance of the workflow running at any one time.
What are the BPEL4WS link
s used for?
- To specify temporal precedence.
- To link returned values with the variables on which they must be stored.
- To declare semantic connections.
- To establish a payment audit trail.
- To load in extra workflows.