This discussion is archived
3 Replies Latest reply: Dec 15, 2012 5:20 AM by Prabodh RSS

How to Exchange (Expose) My Data in apex to a third party

Mindmap Pro
Currently Being Moderated
Hello,
I need to provide my affiliate with Data from my DB. The Data should be in XML format.
I have this Query:
select
       XMLSERIALIZE (DOCUMENT     
       xmlelement(
         "LISTINGS",
         xmlagg(
           xmlelement(
             "LISTING",
             xmlforest(    
                    'RS-'||R."RES_ID" as "Property_Ref_No",
                    R."RES_SIZE" as "Unit_Builtup_Area",
                    R.BEDS as "Bedrooms",
                    R.bath as "No_of_Bathrooms",
                    R.VIDEO as "Web_Tour",
                    '04473572' as "Company_Number",
(
                 select xmlagg(
                          xmlelement(
                            "IMAGES",
                             xmlforest(
'http://thevillaproject.com/apex/erp/IMAGES/'||IMG.ID as "link"))) 
from fateh.images img where (IMG.RES_ID = R.RES_ID) ) IMAGE ))))) x 
from  fateh.res R where res_id < 100
How to make available for others ??
* I cannot use a normal query (without XML functions) in a report, then expose that report as RESTful service for I need some nested tags.
I am using APEX 4.2 .. Listener 2.0 EA. Oracle 11g R2 SOE.

Best Regards,
Fateh
  • 1. Re: How to Exchange (Expose) My Data in apex to a third party
    TimSt.H. Explorer
    Currently Being Moderated
    Is your question how to send the contents through something like a htp.p('<xml>') or do you have specific parameter and envelope requirements?
    It seems like you have the XML bit down.

    It can be setup as a page process and you can call the URL (page) with whatever type of prameters and pre-requisites to secure the package that you would like.

    --Tim St.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               
  • 2. Re: How to Exchange (Expose) My Data in apex to a third party
    Mindmap Pro
    Currently Being Moderated
    Thanks Tim,
    Do you mean something similar to this:
    htp.p('select
           XMLSERIALIZE (DOCUMENT     
           xmlelement(
             "LISTINGS",
             xmlagg(
               xmlelement(
                 "LISTING",
                 xmlforest(    
                        ''RS-''||R."RES_ID" as "Property_Ref_No",
                        R."RES_SIZE" as "Unit_Builtup_Area",
                        R.BEDS as "Bedrooms",
                        R.bath as "No_of_Bathrooms",
                        R.VIDEO as "Web_Tour",
                        ''04473572'' as "Company_Number",
    (
                     select xmlagg(
                              xmlelement(
                                "IMAGES",
                                 xmlforest(
    ''http://thevillaproject.com/apex/erp/IMAGES/''||IMG.ID as "link"))) 
    from fateh.images img where (IMG.RES_ID = R.RES_ID) ) IMAGE ))))) x 
    from  fateh.res R where res_id < 100')
    I put that code in PL/SQL Region and in a process After Header, but I got errors. I have been trying to accomplish this for more than one week... Can you please set it up for me ?

    http://fam-erp.com/apex/f?p=4550:1:0:::::
    workspace: test
    user: test
    pwd: test2


    Thanks in advance,
    Fateh
  • 3. Re: How to Exchange (Expose) My Data in apex to a third party
    Prabodh Guru
    Currently Being Moderated
    Fateh,

    Please see reply posted on earlier thread {thread:id=2466050}.

    Cheers,

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points