Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Newcomers » Newcomers » Xpath when calling from xml
Xpath when calling from xml [message #665655] Fri, 15 April 2011 12:01 Go to next message
No real name is currently offline No real nameFriend
Messages: 2
Registered: April 2011
Junior Member
Hi,

The problem I have is related to Eclipse Report Design (I don't know if I placed the topic correctly, but at least I am a new comer on the forum).

I have set up a datasource to a web service that is returning an xml file. When creating a dataset, I can see a column that has the xpath blank and contains all xml. If I want to set up a column that will return a value from the nodes of the xml, i get empty data.

The dataset is:

table0#-TNAME-#table0#:#[/SOAP-ENV:Envelope/SOAP-ENV:Body/Ge tEmployeeSalaryResponse/GetEmployeeSalaryResult]#:#{GetEmplo yeeSalaryResult;STRING;},{test;STRING;/Object/Employee/Attri but[@Nom='Societe']},{test2;STRING;/Object}#:#< "SOAP-ENV","http:%%schemas.xmlsoap.org%soap%envelope%";"xsd ","http:%%www.w3.org%2001%XMLSchema";"m","http:%%tempuri.org% ";"SOAP-ENC","http:%%schemas.xmlsoap.org%soap%encoding%"; "xsi","http:%%www.w3.org%2001%XMLSchema-instance">

and only GetEmployeeSalaryResult is bringing data, the 2 other columns are blank: test and test2

The xml returned from the webservice is:

<?xml version="1.0" encoding="utf-8"?>
<Object xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" Nom=
"GetEmployeeSalary">
<Employee>
<Attribut Nom="Societe">P5 RO</Attribut>
<Attribut Nom="Agence">Brasov</Attribut>
<Attribut Nom="Period">201001</Attribut>
<Attribut Nom="Devise">EUR</Attribut>
<Attribut Nom="WageBill">38.83</Attribut>
<Attribut Nom="GrossSalary">63.02</Attribut>
</Employee>
</Object>

If I create a new datasource with this xml, I can see the nodes with the information correctly, but I need to see it directly from the webservice and not save the output in a file and then create a new data source on it.

The xml of my report is:

<property name="dataSource">Data Source</property>
<list-property name="resultSet">
<structure>
<property name="position">1</property>
<property name="name">GetEmployeeSalaryResult</property>
<property name="nativeName">GetEmployeeSalaryResult</property>
<property name="dataType">string</property>
<property name="nativeDataType">12</property>
</structure>
<structure>
<property name="position">2</property>
<property name="name">test</property>
<property name="nativeName">test</property>
<property name="dataType">string</property>
<property name="nativeDataType">12</property>
</structure>
<structure>
<property name="position">3</property>
<property name="name">test2</property>
<property name="nativeName">test2</property>
<property name="dataType">string</property>
<property name="nativeDataType">12</property>
</structure>
</list-property>
<xml-property name="queryText"><![CDATA[<?xml version="1.0"?>
<SOAP-ENV:Envelope
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
<SOAP-ENV:Header>
<m:AuthenticationHeader xmlns:m="http://tempuri.org/">
<m:Username xsi:type="xsd:string">&amp;?Username?&amp;</m:Username >
<m:Password xsi:type="xsd:string">&amp;?Password?&amp;</m:Password >
<m:ClientIP xsi:type="xsd:string">&amp;?ClientIP?&amp;</m:ClientIP >
</m:AuthenticationHeader>
</SOAP-ENV:Header>
<SOAP-ENV:Body>
<m:GetEmployeeSalary xmlns:m="http://tempuri.org/">
<m:inputParameters xsi:type="xsd:string">&amp;?inputParameters?&amp;</m:inputParameters >
<m:resultType xsi:type="xsd:EmployeeSalaryResultTypes">&amp;?resultType?&amp; </m:resultType>
</m:GetEmployeeSalary>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>]]></xml-property>
<list-property name="privateDriverProperties">
<ex-property>
<name>xmlQueryText</name>
<value> table0#-TNAME-#table0#:#[/SOAP-ENV:Envelope/SOAP-ENV:Body/Ge tEmployeeSalaryResponse/GetEmployeeSalaryResult]#:#{GetEmplo yeeSalaryResult;STRING;},{test;STRING;/Object/Employee/Attri but[@Nom='Societe']},{test2;STRING;/Object}#:#&lt; "SOAP-ENV","http:%%schemas.xmlsoap.org%soap%envelope%";"xsd ","http:%%www.w3.org%2001%XMLSchema";"m","http:%%tempuri.org% ";"SOAP-ENC","http:%%schemas.xmlsoap.org%soap%encoding%"; "xsi","http:%%www.w3.org%2001%XMLSchema-instance"></value >
</ex-property>
<ex-property>
<name>operationTrace</name>
<value>GmsWS$-$GmsWSSoap$-$GetEmployeeSalary</value>
</ex-property>
<ex-property>
<name>xmlFileURI</name>
</ex-property>
<ex-property>
<name>xsdFileURI</name>
</ex-property>
</list-property>
</oda-data-set>
</data-sets>


Does anyone know what I am doing wrong?

Thanks alot in advance!

[Updated on: Fri, 15 April 2011 12:05]

Report message to a moderator

Re: Xpath when calling from xml [message #665687 is a reply to message #665655] Fri, 15 April 2011 13:52 Go to previous messageGo to next message
Eric Rizzo is currently offline Eric RizzoFriend
Messages: 3070
Registered: July 2009
Senior Member
On 4/15/11 8:01 AM, mirciu_andreea@yahoo.co.uk wrote:
> Hi,
>
> The problem I have is related to Eclipse Report Design (I don't know if
> I placed the topic correcctyl, but at least I ama new comer on the forum).

This sounds like it might be related to BIRT; is that correct?
If so, you should ask in the BIRT group instead; I don't see many of the
BIRT gurus hanging out in this newcomers group.

Eric


> I have set up a datasource to a web service that is returning an xml
> file. When creating a dataset, I can see a column that has the xpath
> blank and contains all xml. If I want to set up a column that will
> return a value from the nodes of the xml, i get empty data.
> The xml returned from the webservice is:
>
> <?xml version="1.0" encoding="utf-8"?>
> <Object xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xmlns:xsd="http://www.w3.org/2001/XMLSchema" Nom=
> "GetEmployeeSalary">
> <Employee>
> <Attribut Nom="Societe">P5 RO</Attribut>
> <Attribut Nom="Agence">Brasov</Attribut>
> <Attribut Nom="Period">201001</Attribut>
> <Attribut Nom="Devise">EUR</Attribut>
> <Attribut Nom="WageBill">38.83</Attribut>
> <Attribut Nom="GrossSalary">63.02</Attribut>
> </Employee>
> </Object>
>
> If I create a new datasource with this xml, I can see the nodes with the
> information correctly, but I need to see it directly from the webservice
> and not save the output in a file and then create a new data source on it.
>
> The xml of my report is:
>
> <property name="dataSource">Data Source</property>
> <list-property name="resultSet">
> <structure>
> <property name="position">1</property>
> <property name="name">GetEmployeeSalaryResult</property>
> <property name="nativeName">GetEmployeeSalaryResult</property>
> <property name="dataType">string</property>
> <property name="nativeDataType">12</property>
> </structure>
> <structure>
> <property name="position">2</property>
> <property name="name">test</property>
> <property name="nativeName">test</property>
> <property name="dataType">string</property>
> <property name="nativeDataType">12</property>
> </structure>
> <structure>
> <property name="position">3</property>
> <property name="name">test2</property>
> <property name="nativeName">test2</property>
> <property name="dataType">string</property>
> <property name="nativeDataType">12</property>
> </structure>
> </list-property>
> <xml-property name="queryText"><![CDATA[<?xml version="1.0"?>
> <SOAP-ENV:Envelope
> xmlns:xsd="http://www.w3.org/2001/XMLSchema"
> xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
> <SOAP-ENV:Header>
> <m:AuthenticationHeader xmlns:m="http://tempuri.org/">
> <m:Username xsi:type="xsd:string">&?Username?&</m:Username >
> <m:Password xsi:type="xsd:string">&?Password?&</m:Password >
> <m:ClientIP xsi:type="xsd:string">&?ClientIP?&</m:ClientIP >
> </m:AuthenticationHeader>
> </SOAP-ENV:Header>
> <SOAP-ENV:Body>
> <m:GetEmployeeSalary xmlns:m="http://tempuri.org/">
> <m:inputParameters
> xsi:type="xsd:string">&?inputParameters?&</m:inputParameters >
> <m:resultType xsi:type="xsd:EmployeeSalaryResultTypes">&?resultType?&
> </m:resultType>
> </m:GetEmployeeSalary>
> </SOAP-ENV:Body>
> </SOAP-ENV:Envelope>]]></xml-property>
> <list-property name="privateDriverProperties">
> <ex-property>
> <name>xmlQueryText</name>
> <value> table0#-TNAME-#table0#:#[/SOAP-ENV:Envelope/SOAP-ENV:Body/Ge
> tEmployeeSalaryResponse/GetEmployeeSalaryResult]#:#{GetEmplo
> yeeSalaryResult;STRING;},{test;STRING;/Object/Employee/Attri
> but[@Nom='Societe']},{test2;STRING;/Object}#:#<
> "SOAP-ENV","http:%%schemas.xmlsoap.org%soap%envelope%";"xsd
> ","http:%%www.w3.org%2001%XMLSchema";"m","http:%%tempuri.org%
> ";"SOAP-ENC","http:%%schemas.xmlsoap.org%soap%encoding%";
> "xsi","http:%%www.w3.org%2001%XMLSchema-instance"></value >
> </ex-property>
> <ex-property>
> <name>operationTrace</name>
> <value>GmsWS$-$GmsWSSoap$-$GetEmployeeSalary</value>
> </ex-property>
> <ex-property>
> <name>xmlFileURI</name>
> </ex-property>
> <ex-property>
> <name>xsdFileURI</name>
> </ex-property>
> </list-property>
> </oda-data-set>
> </data-sets>
>
>
>
Re: Xpath when calling from xml [message #665693 is a reply to message #665687] Fri, 15 April 2011 14:14 Go to previous message
No real name is currently offline No real nameFriend
Messages: 2
Registered: April 2011
Junior Member
Thanks. I have fwd it to the Birt forum
Previous Topic:how to modify my password ? control panel?
Next Topic:Remote Systems pops up console
Goto Forum:
  


Current Time: Thu Sep 19 13:18:49 GMT 2024

Powered by FUDForum. Page generated in 0.09191 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top