<?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>Mathias Beldame</title>
	<atom:link href="http://planet.petalslink.com/home/mbeldame/feed/" rel="self" type="application/rss+xml" />
	<link>http://planet.petalslink.com/home/mbeldame</link>
	<description>Un blog utilisant Blog EBM WEBSOURCING</description>
	<lastBuildDate>Fri, 16 Oct 2009 07:29:39 +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>How to generate a unique id in soapui requests?</title>
		<link>http://planet.petalslink.com/home/mbeldame/2009/10/15/how-to-generate-a-unique-id-in-soapui-requests/</link>
		<comments>http://planet.petalslink.com/home/mbeldame/2009/10/15/how-to-generate-a-unique-id-in-soapui-requests/#comments</comments>
		<pubDate>Thu, 15 Oct 2009 12:53:08 +0000</pubDate>
		<dc:creator>mbeldame</dc:creator>
				<category><![CDATA[Non classé]]></category>

		<guid isPermaLink="false">http://blog.ebmwebsourcing.com/home/mbeldame/?p=22</guid>
		<description><![CDATA[During the performance tests of the notification implementation in Petals, I needed to send a large amount of ws requests containing a unique id. I couldn&#8217;t generate manually thousands of requests (each one with its unique id) before launching my soapui test case. The easiest way I found to solve it was to include a [...]]]></description>
			<content:encoded><![CDATA[<p>During the performance tests of the notification implementation in <a href="http://petals.ow2.org/" target="_blank">Petals</a>, I needed to send<br />
a large amount of ws requests containing a unique id. I couldn&#8217;t generate manually thousands<br />
of requests (each one with its unique id) before launching my soapui test case.</p>
<p>The easiest way I found to solve it was to include a groovy script in my soapui test case:</p>
<p>1) Add a &laquo;&nbsp;properties&nbsp;&raquo; step in the test case, and define a property. These property will be modified by the groovy script to be different for each request.</p>
<p><img class="alignnone size-full wp-image-26" src="http://blog.ebmwebsourcing.com/home/mbeldame/files/2009/10/prop.png" alt="prop" width="601" height="123" /></p>
<p>2) Add a groovy script in the test case, and write a script to modify your property. The value is generate using a timestamp, and the thread id, to be sure the id will be unique during the whole test, even with more than one thread launching the requests.</p>
<p><img class="alignnone size-full wp-image-24" src="http://blog.ebmwebsourcing.com/home/mbeldame/files/2009/10/groovy.png" alt="script groovy" width="696" height="158" /></p>
<p>3) In the requests of the test case, fill the correct element or attribute with ${property name}, which will be replaced at runtime by the property&#8217;s value.</p>
<p><img class="alignnone size-full wp-image-25" src="http://blog.ebmwebsourcing.com/home/mbeldame/files/2009/10/request.png" alt="request" width="702" height="175" /></p>
<p>4) All the requests of the test case have now the processPath attribute correctly set.</p>
<p>Mathias</p>
]]></content:encoded>
			<wfw:commentRss>http://planet.petalslink.com/home/mbeldame/2009/10/15/how-to-generate-a-unique-id-in-soapui-requests/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Using the WS-I Testing Tools to validate WSDLs</title>
		<link>http://planet.petalslink.com/home/mbeldame/2009/03/06/using-the-ws-i-testing-tools-to-to-validate-wsdls/</link>
		<comments>http://planet.petalslink.com/home/mbeldame/2009/03/06/using-the-ws-i-testing-tools-to-to-validate-wsdls/#comments</comments>
		<pubDate>Fri, 06 Mar 2009 14:03:27 +0000</pubDate>
		<dc:creator>mbeldame</dc:creator>
				<category><![CDATA[Non classé]]></category>

		<guid isPermaLink="false">http://blog.ebmwebsourcing.com/home/mbeldame/?p=15</guid>
		<description><![CDATA[The WS-I: The Web Services Interoperability Organization (WS-I) is an organization founded to write best practices about the web services interoperability. Its WS-Basic Profile and WS-Basic Security Profile documents deals with some specifications and recommendations to prevent interoperability problems. They provide a toolkit which can be used to check if the services are compliants with [...]]]></description>
			<content:encoded><![CDATA[<p><span style="text-decoration: underline">The WS-I:</span></p>
<p>The <a href="http://www.ws-i.org/about/Default.aspx" target="_blank">Web Services Interoperability Organization</a> (WS-I) is an organization founded to write best practices about the web services interoperability. Its <a href="http://www.ws-i.org/Profiles/BasicProfile-1.1.html" target="_blank">WS-Basic Profile</a> and WS-Basic Security Profile documents deals with some specifications and recommendations to prevent interoperability problems.</p>
<p>They provide a toolkit which can be used to check if the services are compliants with the basic profile or not.</p>
<p><span style="text-decoration: underline">The WS-I testing toolkit contains two tools:</span></p>
<p><span style="text-decoration: underline">The monitor: </span><br />
It works as a proxy for web services requests and responses. An interceptor looks at the messages, and sends some informations to a Logger which persists them.</p>
<p><span style="text-decoration: underline">The analyzer:</span><br />
It analyses the logs generated by the monitor and analyse the traffic between the ckient and the server to determine if it is compliant.<br />
It can analyse WSDLs to check thier compliance, and can even analyse an UDDI repository.</p>
<p>The tool which will interest us today is the WSDL Analyzer, and its ability to check a WSDL and generate a report about its compliance with the WSI-Basic Profile. The report contains the result of the test, and the uncompliant points if there are.</p>
<p>This analyzer can be integrated with Soapui, in order to validate the imported wsdls.</p>
<p><span style="text-decoration: underline">Integration in SOAP UI:</span><br />
Once you have downloaded <a href="http://www.soapui.org/" target="_blank">soapUI</a> and installed it, you can configure it to use the WS-I analyser to check your WSDL&#8217;s compliance with the WSI-Basic Profile.</p>
<p><span style="text-decoration: underline">Download the toolkit:</span><br />
Download the toolkit on the <a href="http://www.ws-i.org/deliverables/workinggroup.aspx?wg=testingtools" target="_blank">testing tool download page</a> of the WS-I. Install it by unzipping the zip file in a directory of your local disk.</p>
<p><span style="text-decoration: underline">Configure soapui:</span><br />
Launch soapUI, go to the &laquo;&nbsp;Preferences&nbsp;&raquo; box, and choose the &laquo;&nbsp;WS-I Settings&nbsp;&raquo; tab.<br />
Here, you can configure the path to the toolkit, and some options of the analyser.</p>
<p><a href="http://blog.ebmwebsourcing.com/home/mbeldame/files/2009/03/confwsitool.jpg"><img class="alignnone size-medium wp-image-18" src="http://blog.ebmwebsourcing.com/home/mbeldame/files/2009/03/confwsitool-300x241.jpg" alt="" width="300" height="241" /></a></p>
<p><span style="text-decoration: underline">Validate a wsdl:</span><br />
When it is configured, you are able to check the compliance of your WSDLs. To do it, rigth click on the WSDL you want to chack, and select &laquo;&nbsp;Chack WS-I Compliance&nbsp;&raquo;. Your WSDL will be analysed, and the report will be generated in the soapUI window.</p>
<p><a href="http://blog.ebmwebsourcing.com/home/mbeldame/files/2009/03/compliance.jpg"><img class="alignnone size-medium wp-image-16" src="http://blog.ebmwebsourcing.com/home/mbeldame/files/2009/03/compliance-300x300.jpg" alt="" width="300" height="300" /></a></p>
<p><span style="text-decoration: underline">The report:</span><br />
The report tells you if all the tests have passed, or if at least one of them has failed. You can find all the tests performed on your WSDL, and the assertions verified.<br />
If your WSDL is not compliant you can have look at the &laquo;&nbsp;Test Assertion Document&nbsp;&raquo; available on the <a href="http://www.ws-i.org/deliverables/workinggroup.aspx?wg=testingtools" target="_blank">testing tool download page</a> of the WSI to retrieve which recommendation your failed assertion is relating.</p>
<p><a href="http://blog.ebmwebsourcing.com/home/mbeldame/files/2009/03/compliance-result.jpg"><img class="alignnone size-medium wp-image-17" src="http://blog.ebmwebsourcing.com/home/mbeldame/files/2009/03/compliance-result-300x247.jpg" alt="" width="300" height="247" /></a></p>
<p>I found this tool very usefull&#8230;</p>
<p>Mathias</p>
]]></content:encoded>
			<wfw:commentRss>http://planet.petalslink.com/home/mbeldame/2009/03/06/using-the-ws-i-testing-tools-to-to-validate-wsdls/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Namespace customization in Java2easyWSDL ant task and PropertyException&#8230;</title>
		<link>http://planet.petalslink.com/home/mbeldame/2009/02/13/namespace-customization-in-java2easywsdl-ant-task-and-propertyexception/</link>
		<comments>http://planet.petalslink.com/home/mbeldame/2009/02/13/namespace-customization-in-java2easywsdl-ant-task-and-propertyexception/#comments</comments>
		<pubDate>Fri, 13 Feb 2009 14:20:42 +0000</pubDate>
		<dc:creator>mbeldame</dc:creator>
				<category><![CDATA[Non classé]]></category>
		<category><![CDATA[easyWSDL]]></category>

		<guid isPermaLink="false">http://blog.ebmwebsourcing.com/home/mbeldame/?p=9</guid>
		<description><![CDATA[The main goal of the modifications in easyWsdl previously described was to improve the WSDL generated by Java2easyWSDL, and its ant task. So, the Main class of Java2easyWSDL has been modified to used normalized namespaces, and to provide the possibility to use custom namespaces. These modifications have been exposed in the Java2WSDLTask class to be [...]]]></description>
			<content:encoded><![CDATA[<p>The main goal of the modifications in easyWsdl <a href="http://blog.ebmwebsourcing.com/home/mbeldame/2009/02/12/namespace-customization-in-easywsdl/" target="_blank">previously described</a> was to improve the WSDL generated by Java2easyWSDL, and its ant task.<br />
So, the Main class of Java2easyWSDL has been modified to used normalized namespaces, and to provide the possibility to use custom namespaces. These modifications have been exposed in the Java2WSDLTask class to be used from an ant build.</p>
<p>I tested it from eclipse, and it worked correctly, generating the WSDL with the customized namespaces.</p>
<p>When I tryied to use it in my ant builds, outside eclipse, it didn&#8217;t work anymore. I had the following error:</p>
<p><em>[Java2WSDL] org.ow2.easywsdl.wsdl.api.WSDLException: SchemaException: javax.xml.bind.PropertyException: name: com.sun.xml.bind.namespacePrefixMapper value: org.ow2.easywsdl.wsdl.util.CustomPrefixMapper@17d03c5: javax.xml.bind.PropertyException: name: com.sun.xml.bind.namespacePrefixMapper value: org.ow2.easywsdl.wsdl.util.CustomPrefixMapper@17d03c5<br />
[Java2WSDL]     at org.ow2.easywsdl.wsdl.impl.wsdl11.WSDLWriterImpl.useCustomNamespacesPrefixes(WSDLWriterImpl.java:105)[Java2WSDL]     at org.ow2.easywsdl.wsdl.impl.generic.WSDLWriterImpl.getConcreteWriter(WSDLWriterImpl.java:89)</em><br />
&#8230;</p>
<p>The marshaller returned me a PropertyException, meaning it didn&#8217;t accept the &laquo;&nbsp;com.sun.xml.bind.namespacePrefixMapper&nbsp;&raquo; property when I tryied to set it.</p>
<p>I used the same JDK for eclipse, and ant (1.6.0_11); So, I suspected a versionning problem in the jaxb2-impl library. After verification, the classes declared in the classpath of my task, and the ones in eclipse were the same.<br />
The main method of my task, called from a script (outside eclipse and ant) after setting the same classpath worked without error.</p>
<p>I found the solution after some tests and debugging&#8230;</p>
<p>The problem was caused by ant. It loaded the implementation of the marshaller from the jdk (in the rt.jar), instead of the one of the jaxb-impl-2.1.6.jar lib. And this implementation didn&#8217;t support the &laquo;&nbsp;com.sun.xml.bind.namespacePrefixMapper&nbsp;&raquo; property.</p>
<p>I solved it by putting explicitely jaxb-impl-2.1.6.jar at the beginning of the CLASSPATH used by ant, or by putting jaxb-impl-2.1.6.jar in the lib directory of ant.</p>
<p>I think it can be helpfull for the users of the Java2easyWSDL ant task&#8230;</p>
<p>Mathias</p>
]]></content:encoded>
			<wfw:commentRss>http://planet.petalslink.com/home/mbeldame/2009/02/13/namespace-customization-in-java2easywsdl-ant-task-and-propertyexception/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Namespace customization in easyWSDL&#8230;</title>
		<link>http://planet.petalslink.com/home/mbeldame/2009/02/12/namespace-customization-in-easywsdl/</link>
		<comments>http://planet.petalslink.com/home/mbeldame/2009/02/12/namespace-customization-in-easywsdl/#comments</comments>
		<pubDate>Thu, 12 Feb 2009 13:22:44 +0000</pubDate>
		<dc:creator>mbeldame</dc:creator>
				<category><![CDATA[Non classé]]></category>
		<category><![CDATA[easyWSDL]]></category>

		<guid isPermaLink="false">http://blog.ebmwebsourcing.com/home/mbeldame/?p=5</guid>
		<description><![CDATA[When using the easyWSDL toolbox, and specially the Java2easyWSDL tool provided, the namespaces prefixes are automatically generated (ns1, ns2, &#8230;). The second problem is that some namespaces, not declared in the root element are repeated in all the other elements. The generated wsdl was totally correct, but not human readable. It does not cause any [...]]]></description>
			<content:encoded><![CDATA[<p>When using the <a href="http://easywsdl.ow2.org/index.html" target="_blank">easyWSDL toolbox</a>, and specially the Java2easyWSDL tool provided, the namespaces prefixes are automatically generated (ns1, ns2, &#8230;). The second problem is that some namespaces, not declared in the root element are repeated in all the other elements.<br />
The generated wsdl was totally correct, but not human readable. It does not cause any problem when the wsdl is only read by a tool (to generate stub), but becomes problematic when people want to read it directly&#8230;</p>
<p>The solution proposed by jaxb2, is to extend the class com.sun.xml.bind.marshaller.NamespacePrefixMapper in a custom class.<br />
In this class, the following methods can be overwriten:<br />
<em>public String getPreferredPrefix(String namespaceUri, String suggestion,boolean requirePrefix)</em> -&gt; to return the prefered prefix for a particular namespace :</p>
<p><em>if (namespaceUri.equals(&laquo;&nbsp;http://schemas.xmlsoap.org/wsdl/soap12/&nbsp;&raquo;))<br />
return &laquo;&nbsp;soap12&#8243;;</em></p>
<p><em>public String[] getPreDeclaredNamespaceUris() </em>-&gt; to specify some couples of prefix/namespace to force jaxb to declared them in the root element of the generated XML:<br />
<em>return new String[] {&laquo;&nbsp;custNS&nbsp;&raquo;,&nbsp;&raquo;http://foo.bar/&nbsp;&raquo;};</em></p>
<p>I can now set an instance of this class as a Property of the marshaller used:</p>
<p><em>NamespacePrefixMapper mapper = new CustomPrefixMapper();<br />
marshaller.setProperty(&laquo;&nbsp;com.sun.xml.bind.namespacePrefixMapper&nbsp;&raquo;, mapper);</em></p>
<p>Each time the marshaller will need to get a prefix for a namespace, it will ask your CustomPrefixMapper. If this one returns a prefix, it will be used, in the other case, a generated prefix (<em>nsX</em>) will be used.</p>
<p>The end of the process was to integrate it in easyWSDL, and to provide the WSDLwriter two new methods taking avantage of this mechanism:</p>
<p><em>/**<br />
* Use normalized prefixes for namespace declaration. Add<br />
* some custom prefixes if needed.<br />
*<br />
* @param customPrefixes<br />
*            array containing custom prefixes and namespaces to use<br />
*            with the format : (prefix1,nsUri1,prefix2,nsUri2,&#8230;)<br />
*/<br />
public void useCustomNamespacesPrefixes(String[] customPrefixes)throws WSDLException ;</em></p>
<p><em>/**<br />
* Use normalized prefixes for namespace declaration.<br />
*/<br />
public void useNormalizedNamespacesPrefixes() throws WSDLException;</em></p>
<p>Mathias</p>
]]></content:encoded>
			<wfw:commentRss>http://planet.petalslink.com/home/mbeldame/2009/02/12/namespace-customization-in-easywsdl/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Who am I?</title>
		<link>http://planet.petalslink.com/home/mbeldame/2009/02/12/bonjour-tout-le-monde/</link>
		<comments>http://planet.petalslink.com/home/mbeldame/2009/02/12/bonjour-tout-le-monde/#comments</comments>
		<pubDate>Thu, 12 Feb 2009 09:19:15 +0000</pubDate>
		<dc:creator>mbeldame</dc:creator>
				<category><![CDATA[Non classé]]></category>

		<guid isPermaLink="false"></guid>
		<description><![CDATA[I&#8217;m working in EBM Websourcing since 2005, in the Petals team, or as consultant for some customers&#8230;]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m working in <a href="http://www.ebmwebsourcing.com/" target="_blank">EBM Websourcing</a> since 2005, in the <a href="http://petals.ow2.org/index.html" target="_blank">Petals</a> team, or as consultant for some customers&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://planet.petalslink.com/home/mbeldame/2009/02/12/bonjour-tout-le-monde/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

