Web Service pulling back a clob to see as BLOB

Hi all

Thanks in advance for any help.

My current project I have to use a web service in the Apex to display a document of our database manageable.

With the help of webservices is new to me, so I'm struggling with this one.

I got the webservice installed in the APEx and am able to back up some data using a collection but I ran to the top on the question with the clob field.

so far, I have this in the source of the region

select dbms_xmlgen.convert(xtab.fileContent.getClobVal (), 1 ) as filecontent
     , xtab."fileName"
  from apex_collections c,
          XMLTable(XMLNAMESPACES(DEFAULT 'http://www.stellent.com/Services/'),'//Get_FileResponse/Get_FileResult/downloadFile' passing xmltype001
            COLUMNS filecontent xmltype path 'filecontent/text()'
                  , "fileName" PATH 'fileName'
          ) xtab
where c.collection_name = 'P10_GET_FILE_RESULTS'

The name of the file is returned, but I don't know how to get the filecontent to be regarded as a BLOB from the results of the collection that is returned as below:

<idc:Get_FileResponse xmlns:idc="http://www.stellent.com/Services/"> <idc:Get_FileResult> <idc:downloadFile> <idc:fileName>000_002075.pdf</idc:fileName> 
<idc:fileContent>JVBERi0xLjQKJefzz9MKMTYgMCBvYmoKPDwvTiAyCi9UIDEyOTY5OAovTyAxOAovSCBbIDEwNzYKMjIzCl0KL0wgMTMwMDYxCi9MaW5lYXJpemVkIDEKL0UgODgwNjEKPj4KZW5kb2JqCiAgICAgICB4cmVmCjE2IDM1CjAwMDAwMDAwMTUgMDAwMDAgbiAKMDAwMDAwMTAwOSAwMDAwMCBuIAowMDAwMDAxMjk5IDAwMDAwIG4gCjAwMDAwMDE0NzEgMDAwMDAgbiAKMDAwMDAwMTU1MSAw....etc

Thank you

You would be better of trying to convert the Clob into a Blob, before adding the data to the collection.

(IE store the BLOB file in the field of the BLOB001 in the Collection)

From there on, APEX has a number of ways to view the files.

It seems that is Base64 encoding... (including a standard way for the transfer of BLOB on SOAP/REST/text)

APEX_WEB_SERVICE. CLOBBase642BLOB() comes to mind.

MK

Tags: Database

Similar Questions

  • [SOLVED] - how to invoke Web service through backing bean

    Hi all

    I'm new to the web service. I need to implement a web service in my application.

    I already posted my request in the forum

    [SOLVED] - how to invoke Web service through backing bean

    [SOLVED] New Web Services - need your help

    Please someone knows the solution means the poster.


    Thanks and greetings
    VB

    Published by: malek Balan on June 17, 2009 01:28

    Large. Yes, take the code of the main as entry point method, IE

    QuoteServiceSoapHttpPortClient myPort = new QuoteServiceSoapHttpPortClient();
    myPort.myMethod ();

    Be sure to include the customer file in your binaries.
    -olaf

    PS: Please rate the answer.

  • How to use generated code of &amp; quot; Import Web Services &amp; quot; with Cairngorm framework

    I recently downloaded Flex Builder 3 beta 2 and try the wizard that allows you to import web services. The code that is automatically generated makes it so simple to consume web services using the types of objects defined in the WSDL file. Is no longer the developer don't need decode the XML load! The only problem I have is how you integrate the code automatically generated with the Cairngorm framework? This seems to be a huge issue for those who would exploit Cairngorm and code the proxy generated automatically in the same project (like me).

    Here are the problems I see so far.

    (1) how to configure the service generated class to work with the Cairngorm service locator? The service constructor only accepts a 'destination displays LCD chain' which means that you must use life cycle data services. Unfortunately, the project that I am in the process of renovation currently uses a Web service and does not use data services. All I really need to do is change the URL of the endpoint (that is, from the local level to a development server). This issue is noted in the bug https://bugs.adobe.com/jira/browse/FB-8456. I think there is a way to put the endpointURI in the Services.mxml file.
    (2) even if I come with a hack autour #1, I do not get a reminder for my same IResponder if I save it immediately after the method call. I can record and function of earphone within my business delegate and receive the reminder, but my command object that implements IResponder, did not call back even if it is registered. From what I've read in the ASDocs should be, but this isn't for me!

    These are the questions that I have observed in 3 hours to play with this. I hope this makes sense. I would like to integrate automatically generated in Cairngorm web service proxies, but I don't see a right lane to the front without redesign of Cairngorm. Has anyone else encountered this problem? If so, do you have any ideas on how to proceed? Any help is appreciated.

    Hi guys,.

    Now we focus on the generated code the right way and try to make it work for as many cases as possible. As soon as we receive some time we will try to see what is the best way to use Cairngrom.

    In the meantime, if you find a way or a great idea do not hesitate to post here.

    Thank you
    Cristian

  • Web service SOAP of the access of LabView?

    I like to connect to a service-based SOAP from my code Labview (PC), or at least to understand if it is possible and how it will be.

    Just googling "Labview SOAP" gives a few hits, so it seems that people do, but I've found any way white paper or examples yet.

    Can someone ligh to the top of my darkness on SOAP web services and Labview?

    I also understand that web services is often described in wsdl (web service description language) files. A wsdl file completely describes a feature of web services, and in some languages, you can import such a file and say "give me the skeleton code to access this web service. Can do something like this in Labview?

    OLA (Just installed LV2015)

    Thank you Sam!

    It was the last piece that I needed! Now it works!

    I got the url, headers and body of the SoapUI test case as in my previous post. See the photos and the attachment.

    That means this vi:

    She calls the web service GuestManagementService on my local server (see url)

    It performs the getGuestDetails of action SOAP (see header)

    The guestName is Ola4 (see the body)

    In the body of the result, you can find (with difficulty)

    address = the nest, Norrland

    age = 467

    name = Ola4

    Totally cool! But a lot of work for a simple database search.

    Thanks for all the help.

    My next step is to understand what labview tools exist to help me create and manipulate xml files, but that's for next week.

  • Web Service SOAP returned XML data are unreadable

    Hello

    I hope someone with some experience of SOAP could help me find a solution for which XML data coming out of a Web Service (SAP production) are illegible.

    In the attached file is the Web Service response, and as you can see in the header of the request is OK. (request to pass a serialized PCB of a 'tail' to 'work'). Request is successful (I manually check by directly connecting the SAP web service and check), but also the data on the printed circuit should be returned (edge stock code, etc...).

    My request and response with the XML data returned works very well in SoapUI.

    Any help would be appreciated.

    Darin.K wrote:

    I agree with Phillip (except that you want to "inflate" the payload).  You can simply post a VI with full response defined as default in a string control/indicator and I am betting we could get it sorted.

    Thanks Darin, I think acompress and after reading an article google re: SAP NetWeaver, who used the terms inflate and deflate, I confused my prefixes. I also regularly exchange numbers when transcribing the long numbers. Dyslexic, I am.

    JonnyR - please use the uncompress function I've included on the same link as soon as possible. You will need to remove the header HTML of the string portion. If you do not, unzip it will interpret the header as compressed data and you will get jumbled as output data.

  • Widget to the Web service, parsing XML

    I worked on the communication with my web services and back to my widget.

    By using the code below, I was able to perform a GET and repay the XML, but I can't find data where I expect it to be node-wise when parsing XML. I return an object with 3 variables attached to it. I expect to be child nodes 1, 2, and 3. They proved to be 1, 3 and 5 nodes.

    Any ideas on why or how? I feel I'm missing just a simple thing in all of this.

    XML response

    
    - http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://tempuri.org/">
      1000
      Test Station
      105.285
      
    

    The widget code

    //****************** Ajax Logic ******************
    var xmlHttp;
    function getStationUpdate() {
    
        alert("in station update");
        xmlHttp = new XMLHttpRequest();
    
        var Posturl = "http://MachineIPGoesHERE:51107/Service1.asmx/HelloWorld2?";
        alert("after post url");
        xmlHttp.onreadystatechange = updateData;
        alert("after onReadyStateChange");
        xmlHttp.open("GET", Posturl, true);
        alert("after GET");
    
        xmlHttp.send(null);
    }
    
    function updateData() {
        if (xmlHttp.readyState == 4) {
            alert(xmlHttp.responseText);
            parser = new DOMParser();
            var xmlDoc = parser.parseFromString(xmlHttp.responseText, "text/xml");
    
            alert(xmlDoc.documentElement.childNodes[1].tagName + " " + xmlDoc.documentElement.childNodes[1].childNodes[0].nodeValue);
            //alert(xmlDoc.documentElement.childNodes[1].childNodes.length);
            //alert(xmlDoc.documentElement.childNodes[1].hasChildNodes());
            //alert(xmlDoc.documentElement.childNodes[2].hasChildNodes());
            //alert(xmlDoc.documentElement.childNodes[2].tagName + " " + xmlDoc.documentElement.childNodes[2].childNodes[0].nodeValue);
            alert(xmlDoc.documentElement.childNodes[3].tagName + " " + xmlDoc.documentElement.childNodes[3].childNodes[0].nodeValue);
            alert(xmlDoc.documentElement.childNodes[5].tagName + " " + xmlDoc.documentElement.childNodes[5].childNodes[0].nodeValue);
    
            alert(xmlDoc.documentElement.childNodes.length);
        }
    

    Web service

    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Web;
    using System.Web.Services;
    using System.Xml.Serialization;
    
    namespace WebService1
    {
        /// 
        /// Summary description for Service1
        /// 
        [WebService(Namespace = "http://tempuri.org/")]
        [WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
        [System.ComponentModel.ToolboxItem(false)]
        // To allow this Web Service to be called from script, using ASP.NET AJAX, uncomment the following line.
         [System.Web.Script.Services.ScriptService]
        public class Service1 : System.Web.Services.WebService
        {
    
            [WebMethod]
            public string HelloWorld()
            {
                return "Hello World";
            }
    
            [WebMethod]
            public myTestObj HelloWorld2()
            {
                myTestObj test = new myTestObj();
                return test;
            }
        }
    
        [Serializable]
        public class myTestObj
        {
            private int _StationID;
            private string _StationName;
            private double _Volume;
    
            [XmlElementAttribute(Order = 0)]
            public int StationID
            {
                get
                {
                    return this._StationID;
                }
                set
                {
                    this._StationID = value;
                }
            }
    
            [XmlElementAttribute(Order = 1)]
            public string StationName
            {
                get
                {
                    return this._StationName;
                }
                set
                {
                    this._StationName = value;
                }
            }
    
            [XmlElementAttribute(Order = 2)]
            public double Volume
            {
                get
                {
                    return this._Volume;
                }
                set
                {
                    this._Volume = value;
                }
            }
    
            public myTestObj()
            {
                StationID = 1000;
                StationName = "Test Station";
                Volume = 105.285;
            }
        }
    }
    

    > Any ideas on why or how? I feel I'm missing just a simple thing in all of this.

    White space nodes?

  • jDeveloper WebService package installed, but the Web Service features are not available in the application wizard

    Hello

    I installed jDeveloper (Studio Edition Version 12.1.3.0.0) and also I installed some packages, for example the Web Service package. But when I create a new application project / I can't select for example of Web Service Client / Proxy and others. See photo:

    jdeveloper_webservices.png

    Do you know why? How can I make available?


    THX!

    Milan

    OK, I found it

    I created an application (Custom Java) with the empty project, and then I was able to add the web service client project (right click on the 'project' and select 'of the Gallery"). The same window appears as in my first post, but all features are available

    Thank you!

    Milan

  • [ADF, JDev 12.1.3] Pop-up window to see the or download a PDF file that is returned by a Web service method

    Hallo,

    in a page of my web application, I need to add a button that when clicked shows a PDF in a pop-up window which enables the user to download on the PC.

    To get the file PDF, the application must call a Web service method that returns the contents of the file encoded in base64 in the body of the response. If the request does not get the file, but a stream that must be dealt with to get the file.

    Could you kindly advice me a good approach/tutorial to create this feature?

    Thank you and best regards,

    Federico

    Call your servlet ws, then convert bytes of payload in base64 and returns this as a binary stream.

    Client side, you can use af:inlineFrame component inside the af: popup to call your servlet.

    Here is example of servlet/inlineFrame part: https://technology.amis.nl/2011/07/28/adf-11g-show-pdf-in-a-popup/

    Dario

  • Web services and ADF 11 g - get result from backing bean

    I will carry out a backup action bean (Web service call that returns complex data types)

    BindingContainer links = getBindings();
    OperationBinding operationBinding = bindings.getOperationBinding("unesiPonudu");
    Object result = operationBinding.execute ();

    instance of oracle.adf.model.adapter.dataformat.XMLHandler$ DataCollection result but DataCollection is not accessible.

    How to get the results of the method?

    TNX,

    Andreja

    Hello

    There should be a result iterator in the executable files of the article that cotnains the result. If this isn't the case, create from the result WS entry in the palette of DC. Once this iterator is updated, you get this iterator data as is the case of a table goes backwards

    Frank

  • Value of clob in wwv_flow_collections of reconciliation after the call to the web service

    After making a call to a web service (created with web service process call assistant), how can I delete the clob001 value in the wwv_flow_collections?

    I created the web service using the [manually create web service tutorial | http://download.oracle.com/docs/cd/E10513_01/doc/appdev.310/e10497/web_serv.htm#CHDEFEGH].

    Thanks in advance,

    Gus...

    Gus,

    You can also remove the collection completely for good measure:

    apex_collection.delete_collection ('MY_COLLECTION_NAME');

    http://download.Oracle.com/docs/CD/E10513_01/doc/AppDev.310/e10499/advnc.htm#BABGGIDG

    Kind regards

    Jason

  • ADF Mobile | call web service from Java. non-reflecting values in the AMX page

    Hi all

    I am using JDEv11124 with ADF Mobile extensions39.62.64.

    My use case is as follows.

    1. my application has 2 Pages a. Login home b.

    2. in the user login Page between user name and click on the "submit" button.

    3. on the homepage I displayed the company they joined.

    4. in the "submit" button is clicked, action defined in the support bean method will be called.

    5. by supporting the action bean method, I'll call the method of the Web Service to validate the entered user name, if the entered user name is valid, that I have to post its company name in the home page.

    6. I am moving back from the web service of datacontrol in Home.amx page

    7. calling web services from Java as follows:

    GenericType = result

    (GenericType) AdfmfJavaUtilities.invokeDataControlMethod ("Comp", null, "getCompany",

    pNames, params,

    PTypes);

    System.out.println ("after the call to the service" + result.getAttributeCount ());

    8. in the Java class, I get the response correctly (as the company designating the username entered as 'SOCIETY'), where when I navigate to the home page, I don't see any results for the method return (name of the company that dropped like OutputText in Home.amx)

    Did I miss something for this. or something more that I need to do to make it work?

    Please suggest.

    Thank you

    Vieira

    Hi all

    I was able to achieve this by executing my method in bean support.

    This code is as follows:

    AdfELContext adfELContext = AdfmfJavaUtilities.getAdfELContext ();

    MethodExpression me =.

    () AdfmfJavaUtilities.getMethodExpression

    "#{bindings.retreiveLocationInformation.execute}".

    (, Object.class, Class [] {}) new;

    me. Invoke (adfELContext, new Object [] {});

    Thanks to Luc Bors WebLog Luc Bors Weblog: ADF Mobile: implementation of "Pull to refresh" model

    Kind regards

    Vieira

  • M176n MFP: MFP M176n will not activate Web Services

    I bought two MFP176n and tried to activate Web Services to print remotely. It does not work. The computer, I have access to the Services Web page on the unit IP address and use the button 'enable '. It run and run, but nothing happens. I see by a few points running on the screen on the printer. They're going to infinity.

    As part of attempts, I've updated the firmware of the device - it's now at 20150228. This has not changed the behavior anyway.

    BTW, I also tried DNS manuals with addresses 8.8.8.8 and 8.8.4.4 as suggested in a previous post. No change.

    EPrint from mobile devices (Android and Ipad) worked on the first day, but only when she is on the LAN...

    Hello @andershl,

    Welcome to the HP support forums.

    I understand that your M176n will not allow Web Services.

    I would like to help.

    Personally, I found that the Google DNS works best with inkjet printers.

    For LaserJet, I use DNS of Level3 address.

    Primary: 209.244.0.3

    Secondary: 209.244.0.4

    If Web Services are still not allowing, turn the printer off and disconnect the power supply to the router for about a minute.

    Plug everything back in and turn the printer.

    When the network has emerged again, try to enable Web Services.

  • Web Service with Laserjet 200 M251nw connection error

    I searched other messages here and tried everything.  I can't get the Web Service works with this printer.  It works fine connected locally.  It has a fixed local IP address.   I put the printer in the DMZ router.  I put the DNS settings to Google's servers.  I checked the firmware, and this is the last 20121026.

    Enable Web Services.  Then he comes back and says success is waiting for the briefing, but he never comes.  I go to the HP ePrint tab and I see it has an e-mail address assigned, but when I ask another information paper, the 'connection error' returns.  I sent by email to the address and nothing happens.

    I bought my son a chromebook for Christmas and I would like for him to be able to print to it.  Help!

    I finally got this working.   I ended up buying a new router, but I was ready to be upgraded in all cases.  It works very well with this new router (D-Link DIR - 860L).

    Before I had a router ASUS RT - N16 running DD - WRT, but I loaded the latest firmware ASUS when I couldn't get this to work.  It did not matter.  The router seems to hang after the registration of the printer with another firmware, so I decided it was the router as well as the HP support line.

    Now everything works such as documented.

  • CAN; t enable web service on HP Officejet Pro 8600 N911a

    N911a HP Officejet Pro 8600 that we have installed this printer as a network printer.  Everything works fine except that I can't activate the Web service to printing or scanning to an e-mail.  He says that the printer is unable to access the internet.

    Hello. Power cycle the printer and the router to see if that will clear up the error message. Do disconnect the router and then turn the printer off using the power button. Then plug the router back in and once it is up a running, turn on the printer and try to reconnect to the web services

    Then, if he is still unable to connect, I would set a static DNS on the printer. To set a static DNS, you must Access the built-in web server (EWS). Do so you by entering the IP address of the printer in the address bar of the browser of your choice.

    Once it opens your Officejet EWS, locate the tab titled 'network '. From there, look in the left column on the new page that will pop up and select IPv4, wired or wireless will depend on how the printer is connected to the network. That will bring up the page set static DNS. This will be the 2nd part of this page.

    Set the radial dial to the manual. Then, for the favorite/Primary manual DNS, set it to 8.8.8.8 and the manual Alternative/secondary to 8.8.4.4; then click on apply.
    NOTE: If another message with an option to click on 'OK' is displayed, read this message. Most of the time there is an option to cancel the change you did right and you want to avoid to click on this message. Just sail away this page by clicking on another tab.
    Power cycle the printer. Once the printer is upward and through calibrations to turn on. Try again to connect to web services by touching the icon.

  • Web services do not work little matter what I do

    receive a new laserjet MFP M127FW and so far, everything works except eprint.

    IF I can get it to turn on, it only after that I reboot (power cycle) of the printer.

    If I try to activate it via the web management, he will never say that it has been activated, it comes from the clocks (icon of spinning that says connection)

    so SOMETIMES the web interface will tell his licence and SOMETIMES I can see the generated email in a random way, it gives me, BUT it only lasts for about 5 minutes, then Web Services turns off again.

    I have passed everyport listed in this forum and the how to created by a person here.

    I even put the printer in the demilitarized zone - still does not work.

    N-O-T-H-I-N-G fact work of Web services... period.

    I flashed the firmware to the last (has that right out of the box)

    There is nothing more for me that the user do... eprint/WebServices is broken. period.

    I saw someone say that the code that is supposed to print is the name in the generated randomly by e-mail you are given.

    and I tried to use it to register it on hpconnect but it just says: "unexpected error".

    also when I try to do things on the LCD, such as printouts of information, enable/disable web services, see e-mail, he just clocks (endless spinning icon... I left it like this the day after and it never stopped.

    IF I'm quick enough to see the generated email at random in the Web UI and then try to use the LCD screen to print the code or do something outside of via e-mail (which it appears if the web GUI shows) it is said that the services are not available

    still, I spent the last 2 days, for a total of more than 10 hours to try to make this work and IF it is enabled, I think it's just a false positive, even if enamel randomly does not appear, it does not work and then in 5 minutes, web services will be deactivated again.

    I'm not an average user, I am a veteran of 20 years of PC/MAC/setting in network, and I've never seen a printer to do that was not flat broke.

    but since this is the only thing that doesn't work do not, so far, I think that it is simply a problem of firmware.

    Finally... when trying to activate the web services the lights of the NETWORK card on the back of the printer are flashing 100% non-stop, for ever and ever... until I power cycle.

    its as if the web service is locked or stuck in a loop.

    also restore the default of the LCD or web GUI does nothing... nothing changed... and I am never presented with the initial start-up, as one might expect.

    is there a way to force the printer to one out of the box State serving anything and everything back to a factory State? (where I have to go through the initial Setup again?

    p. s.

    network settings are fine, I can print to the printer of the iPad, iphone, pc and MAC so all side 2 network works... but not Web services

    I could talk to a fantastic tech in cloud services who recalled a nun fix documented

    USE THE DNS SERVERS OF LEVEL 3! No other DNS server doesn't work
    Literally within 10 seconds does HP Web Services work!

    209.244.0.3
    209.244.0.4

    I changed my entire network in this

    Huge congratulations to cloud services!

Maybe you are looking for