<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Recent changes to plugins</title><link>https://sourceforge.net/p/tinywsdl/wiki/plugins/</link><description>Recent changes to plugins</description><atom:link href="https://sourceforge.net/p/tinywsdl/wiki/plugins/feed" rel="self"/><language>en</language><lastBuildDate>Wed, 01 Aug 2012 08:57:43 -0000</lastBuildDate><atom:link href="https://sourceforge.net/p/tinywsdl/wiki/plugins/feed" rel="self" type="application/rss+xml"/><item><title>WikiPage plugins modified by Ratoo</title><link>https://sourceforge.net/p/tinywsdl/wiki/plugins/</link><description>Extension mechanism
---

tinyWSDL supports standard WSDL 2.0 extensions defined in WSDL 2.0 Adjuncts (RPC, SOAP, HTTP).
Extensions are implemented through a Java 6 service-provider loading facility.
Using this mechanism it is easy to implement other than standard WSDL 2.0 extensions.

The extension class must implement an &lt;b&gt;ExtensionAdapter&lt;/b&gt; interface

~~~~~~
public class MyExtensionAdapter implements ExtensionAdapter&lt;ElementExtensible&gt; 
~~~~~~

and register it as a service in
&lt;b&gt;META-INF/services/org.inb.bsc.wsdl20.extensions.ExtensionAdapter&lt;/b&gt;
file by specifying the implementation adapter class:
*org.inb.bsc.wsdl20.impl.ext.my.MyExtensionAdapter # My WSDL 2.0 Extension*

&lt;br/&gt;

The implementation class implements three methods:

~~~~~~
public URI getElementExtensionURI()
~~~~~~
returns a namespace that this extension belongs to (for instance "http://www.w3.org/ns/wsdl/soap")

~~~~~~
public Element marshal(ElementExtensible extension) throws Exception
public ElementExtensible unmarshal(Element element) throws Exception
~~~~~~
these methods implement actual marshalling/unmarshalling of DOM elements.

Because tinyWSDL intensively uses JAXB API it is also possible to use an abstract &lt;b&gt;AbstractExtensionAdapter&lt;/b&gt; class.

~~~~~~
public class MyExtensionAdapter extends AbstractExtensionAdapter
~~~~~~

In this case instead of implementing marshalling/unmarshalling methods,

~~~~~~
protected JAXBContext getJAXBContext() throws JAXBException
~~~~~~
method must be implemented. This way marshalling/unmarshalling is done by JAXB and all extension elements must be annotated with JAXB annotations (take a look into &lt;b&gt;SOAPExtensionAdapter&lt;/b&gt; class).</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Ratoo</dc:creator><pubDate>Wed, 01 Aug 2012 08:57:43 -0000</pubDate><guid>https://sourceforge.net0fa7a18e118bc4ab6574e163955e1f7a815a0644</guid></item></channel></rss>