Friday, October 1, 2010

Test your WSDL skills

I have compiled a list of WSDL question which can be used to test one's WSDL understanding. These questions may not cover each area in depth, but can be used to enhance basic understanding of WSDL.

1. What are the extensibilty element required to be added as WSDL extension in case of SOAP binding?

SOAP:Binding > messaging style and transport,
SOAP:Operation> SOAP action and SOAP message style(RPC/Document),
SOAP:body/SOAP:Header/SOAP:Fault > talks about message encoding style(encoded/literal), namespace of elements in body in case of SOAP encoded style,
SOAP:address > tells about web service end point

2. Which elements of WSDL take targetnamespace of WSDL definition?
message, portType, binding

3. Which elements of WSDL doesn't support extension?
message, portType

4. Can I define a schema in types element without targetNamespace?
No, TargetNamespace has to be not null.

5. Can I define targetNamespace of schema in types element different from targetNamespace of WSDL?
Yes, its perfectly legal as long as targetNamespace of schema is specified in definition or in definition of one of the imported WSDL.

6. What the WSDL imports used for?
WSDL import are meant only to import other WSDL and not for importing XML schema.

7. Can I have targetnamespace of imported WSDL different from namespace attribute of import element?

No, It must be same and namespace and location field of import element is mandatory.

8. What should be the sequence for WSDL types and WSDL import element?

Import element is present it should precedes types element.

9. Can I use xml schema import definition to import XML schema form types element of some other WSDL?

No, its not possible.

10. What are the message exchange pattern that an endpoint can support?

Request: endpoint receives a message
Request-Response: Endpoint receives message and send a correlated message.
Solicit-Response: Endpoint send a message and receives a correlated message.
Notification: Endpoint send a message.

11. Can request (one way) MEP send back fault?


12. Part definition refers to which part of fault message?


13. Webservice server could not process soap message due to incorrect header, should it send back fault message with fault:detail populated?

No, Fault detail should be populated only if SOAP:Body element of incoming message has invalid data.

14. Can we have more than one binding for given portType?


15. Can binding element provide address information?


16. What are the different type of bindings supported in WSDL?

SOAP, HTTP, MIME. Though BP prohibits use of HTTP and MIME.

17. SOAP:body element has defined namespace attribute, can I tell which style of service it represents?


18. What is default style, in case style attribute is not mentioned in WSDL?


19. Can fault message can have multiple parts?

Fault message must have single part. Message style of soap fault is always assumed to be "Document" since fault don't contain parameters.

No comments:

Post a Comment