<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Christophe Hamerling [Archive] &#187; soa</title>
	<atom:link href="http://planet.petalslink.com/home/chamerling/category/soa/feed/" rel="self" type="application/rss+xml" />
	<link>http://planet.petalslink.com/home/chamerling</link>
	<description>Things around SOA, Web Services, Open Source and more...</description>
	<lastBuildDate>Wed, 07 Oct 2009 13:16:14 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1.2</generator>
		<item>
		<title>EasyWSDL 1.2 is out</title>
		<link>http://planet.petalslink.com/home/chamerling/2009/07/09/easywsdl-12-is-out/</link>
		<comments>http://planet.petalslink.com/home/chamerling/2009/07/09/easywsdl-12-is-out/#comments</comments>
		<pubDate>Thu, 09 Jul 2009 07:26:20 +0000</pubDate>
		<dc:creator>Christophe Hamerling</dc:creator>
				<category><![CDATA[soa]]></category>
		<category><![CDATA[WebService]]></category>
		<category><![CDATA[easywsdl]]></category>
		<category><![CDATA[release]]></category>
		<category><![CDATA[wsdl]]></category>

		<guid isPermaLink="false">http://blog.ebmwebsourcing.com/home/chamerling/?p=138</guid>
		<description><![CDATA[OW2 EasyWSDL WSDL manipulation library has just been released. This release fix many bugs and introduces some new tooling such as java2wsdl (create WSDL from Java interfaces) and xsd2xml (create XML from XSD definition). EasyWSDL is easy since you can manipulate both WSDL 1.1 and WSDL 2.0 with the same object model. // Read a [...]]]></description>
			<content:encoded><![CDATA[<p>OW2 EasyWSDL WSDL manipulation library has just been released. This release fix many bugs and introduces some new tooling such as java2wsdl (create WSDL from Java interfaces) and xsd2xml (create XML from XSD definition).</p>
<p>EasyWSDL is easy since you can manipulate both WSDL 1.1 and WSDL 2.0 with the same object model.</p>

<div class="wp_syntax"><div class="code"><pre class="java" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">// Read a WSDL 1.1 or 2.0</span>
WSDLReader reader <span style="color: #339933;">=</span> WSDLFactory.<span style="color: #006633;">newInstance</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>.<span style="color: #006633;">newWSDLReader</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
Description desc <span style="color: #339933;">=</span> reader.<span style="color: #006633;">readWSDL</span><span style="color: #009900;">&#40;</span><span style="color: #000000; font-weight: bold;">new</span> URI<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;http://file/path/document.wsdl&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #666666; font-style: italic;">// Write a WSDL 1.1 or 2.0 (depend of desc version)</span>
<span style="color: #003399;">Document</span> doc <span style="color: #339933;">=</span> WSDLFactory.<span style="color: #006633;">newInstance</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>.<span style="color: #006633;">newWSDLWriter</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>.<span style="color: #006633;">getDocument</span><span style="color: #009900;">&#40;</span>desc<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #666666; font-style: italic;">// Create a WSDL 1.1 or 2.0</span>
Description desc11 <span style="color: #339933;">=</span> WSDLFactory.<span style="color: #006633;">newInstance</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>.<span style="color: #006633;">newDescription</span><span style="color: #009900;">&#40;</span>WSDLVersionConstants.<span style="color: #006633;">WSDL11</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
Description desc20 <span style="color: #339933;">=</span> WSDLFactory.<span style="color: #006633;">newInstance</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>.<span style="color: #006633;">newDescription</span><span style="color: #009900;">&#40;</span>WSDLVersionConstants.<span style="color: #006633;">WSDL20</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>Once the Description object is loaded from the WSDL document, you can maniulate all parts of the service description. Let&#8217;s look at endpoints :</p>

<div class="wp_syntax"><div class="code"><pre class="java" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">// Endpoints take place in services.</span>
<span style="color: #666666; font-style: italic;">// Select a service</span>
Service service <span style="color: #339933;">=</span> desc.<span style="color: #006633;">getServices</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>.<span style="color: #006633;">get</span><span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">0</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #666666; font-style: italic;">// List endpoints</span>
<span style="color: #003399;">List</span> endpoints <span style="color: #339933;">=</span> service.<span style="color: #006633;">getEndpoints</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> 
&nbsp;
<span style="color: #666666; font-style: italic;">// Read specific endpoint</span>
Endpoint specificEndpoint <span style="color: #339933;">=</span> service.<span style="color: #006633;">getEndpoint</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;endpointName&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #666666; font-style: italic;">// Add endpoint to service</span>
service.<span style="color: #006633;">addEndpoint</span><span style="color: #009900;">&#40;</span>specificEndpoint<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #666666; font-style: italic;">// Remove a specific enpoint</span>
service.<span style="color: #006633;">removeEndpoint</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;endpointName&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #666666; font-style: italic;">// Create endpoint</span>
Endpoint createdEndpoint <span style="color: #339933;">=</span> service.<span style="color: #006633;">createEndpoint</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
service.<span style="color: #006633;">addEndpoint</span><span style="color: #009900;">&#40;</span>createdEndpoint<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>Easy!</p>
]]></content:encoded>
			<wfw:commentRss>http://planet.petalslink.com/home/chamerling/2009/07/09/easywsdl-12-is-out/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

