• Post Reply Bookmark Topic Watch Topic
  • New Topic

What are extensible elements in WSDL?

 
Chaitanya Rach
Greenhorn
Posts: 12
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi, I am new to web-services and started learning from basics. Currently I am going through the WSDL document at http://www.w3.org/TR/wsdl#_language, I came across the term - extensibility elements in WSDL, please help me in understanding this term.

What are these elements and why do we call them as extensibile? I have not seen any such element in XML concepts, do we have extensible elements in XML also?

Please provide your valuables answers.

Thanks!
 
Abhay Agarwal
Ranch Hand
Posts: 1376
Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Although I am sailing in same boat as yours (I am also learning Web Services) .. I think I can pour in my thoughts
WSDL elements (such as operation name, package name etc) can be extended (or I should say - overridden) through the use of JAX-WS bindings xml file.
Will be difficult to explain how JAX-WS binding xml works over this forum post, advise you to read about applying binding customizations features of WSDL.

~ abhay
 
Abhay Agarwal
Ranch Hand
Posts: 1376
Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Just to add on
For example, we use a web service from Amazon. So we have a WSDL from Amazon. But we want to change one operation name in Amazon web service. we cannot ask Amazon to change operation name in their WSDL (as their WSDL is being used by multiple clients... changing operation name shall break code of other clients).. there, binding customization xml comes to our rescue which allows us to change operation name. So when we generate client side artifacts using wsimport, we get new operation name
 
g tsuji
Ranch Hand
Posts: 696
3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Abhay Agarwal wrote:
WSDL elements (such as operation name, package name etc) can be extended (or I should say - overridden) through the use of JAX-WS bindings xml file.

This and, in fact, all the rest of the posts have nothing to do with the concept of extensibility elements as described in the w3c note on wsdl 1.1 referred to.

In the referred note on wsdl 1.1, it says...
w3c wsdl 1.1 note wrote:
2.1.3 Language Extensibility and Binding

In WSDL the term binding refers to the process associating protocol or data format information with an abstract entity like a message, operation, or portType. WSDL allows elements representing a specific technology (referred to here as extensibility elements) under various elements defined by WSDL. These points of extensibility are typically used to specify binding information for a particular protocol or message format, but are not limited to such use. Extensibility elements MUST use an XML namespace different from that of WSDL. The specific locations in the document where extensibility elements can appear are described in detail in section A3.

Extensibility elements are commonly used to specify some technology specific binding. To distinguish whether the semantic of the technology specific binding is required for communication or optional, extensibility elements MAY place a wsdl:required attribute of type boolean on the element. The default value for required is false. The required attribute is defined in the namespace "http://schemas.xmlsoap.org/wsdl/".

Extensibility elements allow innovation in the area of network and message protocols without having to revise the base WSDL specification. WSDL recommends that specifications defining such protocols also define any necessary WSDL extensions used to describe those protocols or formats.

See Sections 3, 4, and 5 for examples of extensibility elements defined as part of the base WSDL specification.

For instance, such extensibility element can appear in the wsdl:service/wsdl:port element. You can easily discover by inspecting some public services that the wsdl:service/wsdl:port often seen in this typical:

This element soap:address is the extensibility element in question. It has a namespace with prefix soap which is definitely different from that of wsdl as required in the wsdl 1.1 spec/note. It must be something of a namespace different from that of wsdl.

Now, if you can read w3 xml schema for wsdl in appendix A section 4.1, you will see these blocks describing the element in question.

The default namespace there is that of xs. In the schema language, the "extensibility element" is defined via xs:any element. The namespace of it is ##other which is the other way of saying it must be different from that of wsdl (the targetNamespace of the schema). The minOccurs="0" means it might be absent at all. But it must at most one, not more. If you know a bit of validation of xs:any, you will understand that it also means the validation is stict. Hence, not out of any fantasy.

I do not want to drag along with my time. I hope the above help the op to understand what the term means in word and in the exact meta-language and in practice.
 
Abhay Agarwal
Ranch Hand
Posts: 1376
Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanks for detailed explanation
~ abhay
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!