Thanks Amila. It work. But the result of this type of query is something
like this:

 

<usuarios xmlns="http://cdae.uci.cu/usuarios";>

 

//this part is from query 1

   <usuarios>

      <usuario>

         <id>1</id>

         <nombre>xxx</nombre>

         <apellidos>xxx1</apellidos>

      </usuario>

   </usuarios>

 

//this part is from query 2

   <usuarios>

      <usuario>

         <id>1</id>

         <nombre>yyy</nombre>

         <apellidos>yyy1</apellidos>

      </usuario>

      <usuario>

         <id>2</id>

         <nombre>ccc</nombre>

         <apellidos>ccc2</apellidos>

      </usuario>

   </usuarios>

</usuarios>

 

And I need something like this:

 

<usuarios xmlns="http://cdae.uci.cu/usuarios";>

      <usuario>

         <id>1</id>

         <nombre>xxx</nombre>

         <apellidos>xxx1</apellidos>

      </usuario>

      <usuario>

         <id>1</id>

         <nombre>yyy</nombre>

         <apellidos>yyy1</apellidos>

      </usuario>

      <usuario>

         <id>2</id>

         <nombre>ccc</nombre>

         <apellidos>ccc2</apellidos>

      </usuario>

</usuarios>

 

Do you have another trick  in this issue? :-D

 

 

 

Saludos,

Ing. Jorge Infante Osorio.

J´Dpto Soluciones SOA.

CDAE.

Fac. 5.

UCI.

 

De: [email protected] [mailto:[email protected]] En
nombre de Amila Suriarachchi
Enviado el: viernes, 17 de febrero de 2012 23:39
Para: [email protected]
Asunto: Re: [Carbon-dev] combining two query result

 

 

On Sat, Feb 18, 2012 at 2:10 AM, Jorge Infante Osorio <[email protected]>
wrote:

You don´t have a similar configuration but for queries? My idea is to use 1
query that expose the results of two queries.

 

My scenario:

 

I have a query that return a set of 

<Persons>

<person>

<id></id>

<name></name>

<Area>

<id></id>

<nameArea></nameArea>

</Area>

</person>

</Persons>

 

I extract the area from another query, a subquery,  passing the user ID, but
the areas are in two differents queries so I need first to combine the
results of this queries in another query.

 

 

With this configuration, it´ss possible to do that?


I did this trick some similar case.

for this you can define a dummy combine query. eg.

 <query id="combineQuery" useConfig="mysqldatasource"> 
      <sql>select 1</sql> 
      <result element="CombinedElements" rowName="CombinedElement"> 
         <call-query href="areaQuery1"  /> 
         <call-query href="areaQuery2" /> 
      </result> 
   </query> 

within your Persons query you can refer to this query.

thanks,
Amila.
 

 

 

Saludos,

Ing. Jorge Infante Osorio.

J´Dpto Soluciones SOA.

CDAE.

Fac. 5.

UCI.

 

De: [email protected] [mailto:[email protected]] En
nombre de Anjana Fernando
Enviado el: miércoles, 15 de febrero de 2012 22:23
Para: [email protected]
Asunto: Re: [Carbon-dev] combining two query result

 

Hi Jorge,

We do have an unofficial functionality to do this, it is not in the UI
wizard, basically in the data service configuration, in the operation, use
the syntax in the following way:

<operation name="...">
  <call-query-group>
    <call-query href="q1"/>
    <call-query href="q2"/>
  </call-query-group>
</operation>

Cheers,
Anjana.

On Thu, Feb 16, 2012 at 7:37 AM, Jorge Infante Osorio <[email protected]>
wrote:

Hi folks.

 

In DSS, it´s possible to combine two query result  into the result of
another query?

 

In query X I have the result of a SELECT in one DB/table in server X, and in
query Y I have the result of another SELECT in another DB/table in server Y.


Both DB have a table with the same fields.

 

I think in something similar to UNION in SQL. :-D

 

It could be possible??

 

Saludos,

Ing. Jorge Infante Osorio.

J´Dpto Soluciones SOA.

CDAE.

Fac. 5.

UCI.

 

 

 <http://www.antiterroristas.cu/>  

 <http://www.antiterroristas.cu/> 



 <http://www.antiterroristas.cu/>
_______________________________________________
Carbon-dev mailing list
[email protected]
http://mail.wso2.org/cgi-bin/mailman/listinfo/carbon-dev

 

 <http://www.antiterroristas.cu/> 


-- 
Anjana Fernando
Senior Software Engineer

 <http://www.antiterroristas.cu/> WSO2 Inc. | http://wso2.com

 <http://www.antiterroristas.cu/> lean . enterprise . middleware

 

 <http://www.antiterroristas.cu/> 
_______________________________________________
Carbon-dev mailing list
[email protected]
http://mail.wso2.org/cgi-bin/mailman/listinfo/carbon-dev

 <http://www.antiterroristas.cu/> 


-- 
Amila Suriarachchi

Software Architect
WSO2 Inc. ; http://wso2.com
lean . enterprise . middleware

phone : +94 71 3082805




Fin a la injusticia, LIBERTAD AHORA A NUESTROS CINCO COMPATRIOTAS QUE SE 
ENCUENTRAN INJUSTAMENTE EN PRISIONES DE LOS EEUU!
http://www.antiterroristas.cu
http://justiciaparaloscinco.wordpress.com

_______________________________________________
Carbon-dev mailing list
[email protected]
http://mail.wso2.org/cgi-bin/mailman/listinfo/carbon-dev

Reply via email to