Xpath when calling from xml [message #665655] |
Fri, 15 April 2011 12:01 |
No real name 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">&?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>
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 |
Eric Rizzo 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>
>
>
>
|
|
|
|
Powered by
FUDForum. Page generated in 0.09191 seconds