Home
Analytics
create soapui/wsdl/webservices data sources and dataset in birt
Arif shah
<p>Hi,</p>
<p> </p>
<p>Can someone kindly provide a brief step by step guide on how to create a web services based data source and data set in birt. I am trying to create one but nothing is working for me. There is an example on web but it does not explain how the data source and dataset has been created</p>
<p> </p>
<p>Shah</p>
Find more posts tagged with
Comments
JFreeman
<p>Which version of BIRT are you using?</p>
<p> </p>
<p>Take a look a this DevShare on using the Web Service ODA: <a data-ipb='nomediaparse' href='
http://developer.actuate.com/community/forum/index.php?/files/file/656-birt-web-service-oda-article/'>http://developer.actuate.com/community/forum/index.php?/files/file/656-birt-web-service-oda-article/</a></p>
;
<p> </p>
<p>Also, take a look at this documentation on using a Web Service Data Source with the commercial version of the designer: <a data-ipb='nomediaparse' href='
http://developer.actuate.com/be/documentation/ihub31-dev/DAG/index.html#page/DAG/accessing-data-webservice.html'>http://developer.actuate.com/be/documentation/ihub31-dev/DAG/index.html#page/DAG/accessing-data-webservice.html</a></p>
;
Arif shah
<p>Hi,</p>
<p> </p>
<p>I am using open source eclipse birt 4.2</p>
<p> </p>
<p>Arif</p>
JFreeman
<p>Read through the DevShare document I posted first. This has a good write up of using the Web Service ODA with instructions for creating one.</p>
<p> </p>
<p>The commercial link should still be helpful as well. The majority of the information within that document should still pertain to OS 4.2.</p>
Arif shah
<p>Hi,</p>
<p> </p>
<p>Many thanks for the help. It has helped me understand how to add web services data source. Here is a bit of a problem. The web services that I use, when I create the soap request in soapui, I get the list of columns for mapping. However in Birt, I do not get the list of columns.</p>
<p> </p>
<p>Attached are the birt and soapui responses for the same request. My question is how can I get the columns list for mapping</p>
<p> </p>
<p>Syed</p>
<p> </p>
<p> </p>
<div> </div>
<p>
</p>
JFreeman
<p>The first thing I would check is that the SOAP request that is being generated/sent from the designer matches the soap request generated/sent from SOAP UI.</p>
<p> </p>
<p>I have seen situations where the auto generated SOAP request needs to be modified to properly align with a specific environment.</p>
Arif shah
<p>Hi,</p>
<p> </p>
<p>I have again come across this requirement and again stuck at this point. The soap request is not generating the column list for me. If I use soapui, it gives me the list of columns but the birt is not generating the column list. I have also pasted the soap request from ui into birt as suggested above but that is also not working</p>
<p> </p>
<p>I will appreciate if someone can please suggest me a solution.</p>
Arif shah
<p>This is a sample wsdl content</p>
<p> </p>
<p> <message name="listingQuestionIn"><br>
<part name="key" type="xsd:string"/><br>
<part name="qt_id" type="xsd:int"/><br>
<part name="qm_id" type="xsd:int"/><br>
<part name="gr_id" type="xsd:int"/><br>
<part name="dateStart" type="xsd:string"/><br>
<part name="dateEnd" type="xsd:string"/><br>
<part name="sg_id" type="xsd:string"/><br>
</message><br>
<message name="listingQuestionOut"><br>
<part name="return" type="soap-enc:Array"/><br>
</message><br>
</p>
<p> </p>
<p>A soapui request, response as well as Birt column mapping window snapshot is attached here</p>
<p> </p>
<p>I need to see proper column mappings here</p>
Arif shah
<p>Further update.</p>
<p> </p>
<p>The birt returns an xml output. How to convert them into columns now?</p>
<p> </p>
<p> </p>
JFreeman
<p>You could use computed columns to parse the XML output into your desired columns. It's not ideal but it should work.</p>
Arif shah
<p>Hi,</p>
<p> </p>
<p>Can you give me a short example on how could the xml be parsed into columns. Suppose I have the following xml retunred as a string</p>
<pre class="_prettyXprint">
<?xml version="1.0" encoding="utf-8"?>
<response><items><item><nv_id>1</nv_id><nv_id_parent>0</nv_id_parent><nv_label>Satisfactory</nv_label></item><item><nv_id>2</nv_id><nv_id_parent>1</nv_id_parent><nv_label>Niveau admin</nv_label></item><item><nv_id>3</nv_id><nv_id_parent>2</nv_id_parent><nv_label>Enseigne</nv_label></item><item><nv_id>4</nv_id><nv_id_parent>3</nv_id_parent><nv_label>Magasin</nv_label></item></items></response></pre>
<p>How can I parse this ino columns and values of columns?<br>
<br><br><br>
</p>
Arif shah
<p>I have used below code to parse the above xml and create a column.</p>
<pre class="_prettyXprint">
importPackage(Packages.org.apache.xerces.parsers);
importPackage(Packages.org.xml.sax);
importPackage(Packages.java.io);
var parser = new DOMParser();
parser.parse(new InputSource(new StringReader(dataSetRow["return"])));
var nodelist = parser.getDocument().getElementsByTagName('nv_label');
var entry = nodelist.item(0).getFirstChild().getNodeValue();
entry;</pre>
<p>Now the problem is that the xml is returned as a single row string. The xml string contains a lot of rows and I would like to fetch all those rows for the column. How can I do that?</p>
<p> </p>
<p>Arif</p>
JFreeman
<p>Computed columns are not going to work if there are multiple rows of data within the single row that is returned.</p>
<p> </p>
<p>I can think of a couple of options for going forward.</p>
<p> </p>
<p>1. You could create a second data source/set that is scripted and configure the report so that the web service data source/set runs first then the scripted data source/set. When the web service data set runs, push the XML response into a persistent global variable(PGV). Then in the scripted data source/set, read the XML from the PGV and parse it into the desired columns/rows. Then you would use the scripted data source/set for your report content.</p>
<p> </p>
<p>2. Instead of having 2 different data sources as I described above, you can do the entire thing with a scripted data source/set. </p>
gangadhar15
<p>Hi,</p>
<p> </p>
<p> I have started working on webservice integration , while taking the data single row is coming correctly, how to take multiple row. Say for example if i want to show all the cities that is coming in the xml tag , how can i achieve that?</p>
<p><city>A</city></p>
<p><city>B</city></p>
<p>How can i both A and B , please chare me if you have any example, I am trying with below service.</p>
<p><a data-ipb='nomediaparse' href='
http://www.webservicex.net/uszip.asmx?WSDL'>http://www.webservicex.net/uszip.asmx?WSDL</a></p>
;