Get a file of 1 MB to a web service

Hello

I'm trying to get a file of 1 MB, call a web service from a 10.2.0.5. Everything works well except the conversion of the SOAP to an XMLTYPE response. I get the error ORA-00932-> ERRO:-ORA-00932: inconsistent data types: expects a return value is an instance of a user defined class Cabriolet Java to an Oracle type got an object that cannot be converted. When I get a smaller file conversion works perfectly. No idea how to solve this problem?

Here is my code:
DECLARE
sys l_service. UTL_DBWS.service;
sys l_call. UTL_DBWS. Call;

l_wsdl_url VARCHAR2 (32767).
l_namespace VARCHAR2 (32767).
sys l_service_qname. UTL_DBWS. QName;
sys l_port_qname. UTL_DBWS. QName;
sys l_operation_qname. UTL_DBWS. QName;

l_xmltype_in SYS. XMLTYPE;
l_xmltype_out SYS. XMLTYPE;
-retx ANYDATA;
l_return CLOB.
W_log VARCHAR2 (4000);
BEGIN

DBMS_JAVA. SET_OUTPUT (2000000);

l_wsdl_url: = ' http://10.250.41.206:8082 / ConversionService? WSDL ";
l_namespace: = "http://tempuri.org/";

l_service_qname: = SYS. UTL_DBWS.to_qname (l_namespace, "ConverterClassServImplementation");
l_port_qname: = SYS. UTL_DBWS.to_qname (l_namespace, "BasicHttpBinding_IConverterClassService");
l_operation_qname: = SYS. UTL_DBWS.to_qname (l_namespace, "ConvertDocument");



l_service: =.
SYS. () UTL_DBWS.create_service
wsdl_document_location = > urifactory.geturi (l_wsdl_url).
service_name = > l_service_qname);

l_call: =.
SYS. UTL_DBWS.create_call (service_handle = > l_service,)
port_name = > l_port_qname,
operation_name = > l_operation_qname);

SYS. UTL_DBWS. SET_PROPERTY (l_call, 'SOAPACTION_USE', 'TRUE');
SYS. UTL_DBWS. SET_PROPERTY (l_call, 'SOAPACTION_URI', 'http://tempuri.org/IConverterClassService/ConvertDocument');
SYS. UTL_DBWS. SET_PROPERTY (l_call, 'ENCODINGSTYLE_URI', "http://schemas.xmlsoap.org/soap/encoding/");
SYS. UTL_DBWS. SET_PROPERTY (l_call, 'OPERATION_STYLE', 'cpp');


l_xmltype_in: =.
sys. XmlType ("<?") XML version = "1.0" encoding ="utf - 8"? >
< ConvertDocument xmlns = "http://tempuri.org/" >
< convert_pipe xmlns: a = "http://schemas.datacontract.org/2004/07/Glintths.Files.ReportConverter.Task.ConverterClassService" xmlns:i = "http://www.w3.org/2001/XMLSchema-instance" >
< a: ConversionType > Xml2Doc < / a: ConversionType >
< / convert_pipe >
<binaryDataToConvert>PD94bWwgdmVyc2lvbj0iMS4wIj8+DQo8UmVwb3J0RGF0YSB4bWxuczp4c2k9Imh0dHA6Ly93d3cudzMub3JnLzIwMDEvWE1MU2NoZW1hLWluc3RhbmNlIiB4bWxuczp4c2Q9Imh0dHA6Ly93d3cudzMub3JnLzIwMDEvWE1MU2NoZW1hIj4NCiAgPERlYnVnPmZhbHNlPC9EZWJ1Zz4NCiAgPEhhc0F1ZGlvPmZhbHNlPC9IYXNBdWRpbz4NCiAgPENhblNpZ24+ZmFsc2U8L0NhblNpZ24+DQogIDxQYXJhbWV0ZXJzPg0KICAgIDxTaW1wbGVQYXJhbWV0ZXI+DQogICAgICA8VHlwZT5DT05URU5UPC9UeXBlPg0KICAgICAgPExhYmVsPlRpcG9Eb2VudGU8L0xhYmVsPg0KICAgICAgPEluZGV4PjA8L0luZGV4Pg0KICAgICAgPFZhbHVlPm9sYW11bmRvPC9WYWx1ZT4NCiAgICA8L1NpbXBsZVBhcmFtZXRlcj4NCiAgPC9QYXJhbWV0ZXJzPg0KPC9SZXBvcnREYXRhPg==</binaryDataToConvert>
< dicExtraIfno xmlns: a = "http://schemas.datacontract.org/2004/07/Glintths.Files.ReportConverter.Task.ConverterClassService" xmlns:i = "http://www.w3.org/2001/XMLSchema-instance" >
< a: DictionaryInstance xmlns: b = "http://schemas.microsoft.com/2003/10/Serialization/Arrays" >
< b:KeyValueOfstringstring >
< b:Key > DOC_TEMPLATE_PATH < / b:Key >
< b: Value > C:\Interfaces\WindowsService\Tasks\Files\Glintths.Files.ReportConverter\Glintths.Files.RC.Tests\Glintths.Files.RC.Tests\bin\Debug\tpl_doc.doc < / b: Value >
< / b:KeyValueOfstringstring >
< / a: DictionaryInstance >
< / dicExtraIfno >
< / ConvertDocument >
');


W_log: = "INVOKE";
l_xmltype_out: = SYS. UTL_DBWS. Invoke (call_handle = >, l_call = > l_xmltype_in);


W_log: = 'CRY of RELEASE. "
SYS. UTL_DBWS.release_call (call_handle = > l_call);
W_log: = 'SERVICE RELEASE ';
SYS. UTL_DBWS.RELEASE_SERVICE (service_handle = > l_service);



Thank you
Good bye

I'm not familiar with the UTL_DBWS package myself. I use the UTL_HTTP to make Web services.

I think your problem is probably the answer is greater than 32K and therefore must be obtained in pieces. In my code, it's a bit like this...

  PROCEDURE p_soap_request(p_username IN VARCHAR2, p_password IN VARCHAR2, p_proxy IN VARCHAR2) IS
    soap_request  VARCHAR2(30000);
    soap_respond  CLOB;
    http_req      utl_http.req;
    http_resp     utl_http.resp;
    resp          XMLType;
    soap_err      exception;
    v_code        VARCHAR2(200);
    v_msg         VARCHAR2(1800);
    v_len number;
    v_txt Varchar2(32767);
  BEGIN
    IF p_proxy IS NOT NULL THEN
      UTL_HTTP.SET_PROXY(p_proxy);
    END IF;
    -- Define the SOAP request according the the definition of the web service being called
    soap_request:= ''||
                   ''||
                   '  '||
                   '    '||
                   '      '||p_username||''||
                   '      '||p_password||''||
                   '    '||
                   '  '||
                   '';
    http_req:= utl_http.begin_request
              ( 'http://www.website.net/webservices/GetDetailsService.asmx'
              , 'POST'
              , 'HTTP/1.1'
              );
    utl_http.set_header(http_req, 'Content-Type', 'text/xml');
    utl_http.set_header(http_req, 'Content-Length', length(soap_request));
    utl_http.set_header(http_req, 'Download', ''); -- header requirements of particular web service
    utl_http.write_text(http_req, soap_request);
    http_resp:= utl_http.get_response(http_req);
    utl_http.get_header_by_name(http_resp, 'Content-Length', v_len, 1); -- Obtain the length of the response
    FOR i in 1..CEIL(v_len/32767) -- obtain response in 32K blocks just in case it is greater than 32K
    LOOP
        utl_http.read_text(http_resp, v_txt, case when i < CEIL(v_len/32767) then 32767 else mod(v_len,32767) end);
        soap_respond := soap_respond || v_txt; -- build up CLOB
    END LOOP;
    utl_http.end_response(http_resp);
    resp:= XMLType.createXML(soap_respond); -- Convert CLOB to XMLTYPE
  END;

Tags: Database

Similar Questions

  • [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

  • Firefox Help my firefox top bar has been changed, I used to be able to get the file to bookmarks Format printed, and other services that I have found useful when you take information from the internet, where they went, I want them back?

    Firefox help

       Search
    

    "Found 0 results for" my firefox top bar has been changed, I used to be able to get the bookmarks printed Format file, and other services that I have found useful when taking information from the internet, I found bookmarks to the right of the new game to the top, but it seems not instantly friendly where they went, I want that they come back? »

    See:

  • IPod Classic 160GB - stays corrupt, tried everything I can find online. I was told if I can find the manual restore of Apple file, that can solve my problem, anyone know where I can get this file?

    IPod Classic 160GB - stays corrupt, tried everything I can find online. STIL reformatted to Fat32, says that it is corrupted. Windows 10. I was told if I can find the manual restore of Apple file, that can solve my problem, anyone know where I can get this file?

    See corrupted iPod Classic. What are the stats from HARD drive?

    TT2

  • I get a file (pixel.cgi) who wants to download when I use certain sites (Groupon / Thomas Cook).

    I get a file (pixel.cgi) who wants to download when I use certain sites (Groupon / Thomas Cook). I scanned my mac for the virus, but none can be found.

    The page has at least 3 forms invisible that automatically submit to securepaths. com which is probably some sort of tracking site. The site sends answers normally capable of managing internal Firefox, so I don't know why you're getting invited to record in the form of a download.

    The standard approach to download actions wrong is to be wary of corruption of the settings file that stores these settings. You can rename the file and Firefox to regenerate to see if that solved the problem. (You will need to review the Applications section of the Preferences dialog box to reselect the default preferences, such as your favorite email client and the PDF Viewer).

    Here's how:

    Open the settings folder (AKA Firefox profile) current Firefox help

    • button "3-bar" menu > "?" button > troubleshooting information
    • (menu bar) Help > troubleshooting information
    • type or paste everything: in the address bar and press enter/return

    In the first table in the page, click the "Show in Finder" button (in Windows: "Show the file")

    Leave this window open, switch back to Firefox and output, either:

    • "3-bar" menu button > button "power".
    • (menu bar) File > exit/Quit

    Pause while Firefox finishing his cleaning, then rename the mimeTypes.rdf to something like mimeTypes.old

    Launch Firefox back up again. Any improvement in the research Manager pixel.cgibar?

    In case they are of some interest, I have attached the screenshots showing:

    (1) the web console (command + Alt + k) - showing that the request to this site is a PUBLICATION, which generally indicates a sending a form or submission script

    (2) source of the generated page (select all, right click, view selection source, find pixel.cgi, select all)

    (3) the network tab of the web console, indicating the nature of the data being sent back to the site after the POST

  • Is it possible to plug a USB to my new iPad Pro, to transfer PDF files and some Jpeg files from the USB key with an adapter of lightning? If there is NO adapter, how can I get these files on the USB key and my iPad pro?

    Is it possible to plug a USB to my new iPad Pro, to transfer PDF files and some Jpeg files from the USB key with an adapter of lightning? If there is NO adapter, how can I get these files on the USB key and my iPad pro? I need these PDF files transferred my I touch pro. Any suggestions?  Please

    Thank you

    Mike Tingey

    The iPad does not support USB keys. There are some wireless flash drives that can be used, but not the classical records. I suggest you transfer files to a computer and their synchronization then back to the iPad via iTunes.

  • When I export my bookmarks to an html file, I get a file json instead. How to make a html file that I can import into safari?

    When I export my bookmarks as an html file, I get a file json instead. How to make a html file that I can import into Safari?

    Use bookmarks > organize bookmarks > import and backup > export HTML and make sure that you give the file an extension of .html file.

    See also:

  • GET the file of cRIO using WebDAV - error (363510)

    Hi all

    Hoping for a little help with an error I can't cross. I am trying to get a file off my cRIO and onto my PC using the webDAV Protocol. I know there are other ways to do this, but really, Ide like to this way of working. I am sure that this is not a problem with my path of the file. The error says "Error writing to the socket" which makes me think maybe Windows prevents LabView to write the file on my local computer? I tried using the HTTPS protocol on port 443 so with the same result. One thing I am suspicious of is that I am connected directly to my cRIO on my secondary ethernet card and windows it is considering a "public network". I can't change that, but I have disabled the windows firewall, thinking that perhaps that had something to do with it.

    Thank you

    Corey

    I got it to work. Turns out that "local file path" needs the full path, including the name of the file that will be written. This is in contradiction with the help file for the VI GET of WebDAV. The help file says that simply give the path of the directory that is written to the file.

    Corye

  • If my computer breaks down how am I supposed to get my files that are saved back.

    If my computer breaks down how am I supposed to get my files that are saved back.

    Barjakes

    What operating system are you currently using?
    If you use Windows 7 try from here.
  • Is it possible to get the files for windows vista, so I can reinstall my system?

    Hello

    Im a user of linux on one machine HP Pavilion dv5-1095eo leisure. IM tired to restart my machine to run a windows OS, so is possible for me to get the files for windows vista. I got the windows key attached under the computer and I don't have any windows CD when I brought the machine.

    Hello:

    You can do your own installation disc Vista too if you wish.

    If you can read your 25-character product key MS, you can make your own Windows Vista installation disc. You just download the 3 files you need on the link below and read all the instructions to create a Setup bootable DVD disk using imageburn.

    When I went to compile the ISO file, ImageBurn gave a message on a WIM file, file and ISO, and if I wanted to burn it in a different format.

    I selected no, make the ISO file.

    It was not so hard to do. I burned both the disk of 64-bit and 32-bit disk in case I ever need them.

    I tested both of them (just before going forward with the actual facility) and they seem to work perfectly.

    Apparently, when you enter the product key, he knows which version of Vista you have.

    http://en.community.Dell.com/support-forums/software-OS/w/microsoft_os/3317.2-3-Microsoft-Windows-VI...

    After you have successfully installed vista, you can download the drivers you need your PC support and driver page.

    Paul

  • How can I delete the file on my hard drive RT after getting the file to the PC host using FTP Get file vi?

    I want to get a file on my hard drive of the cRIO to my host PC. I did it by using the FTP Get file vi. After you save this file in my host PC, I want to delete the file on the cRIO. Is there a direct way to transfer the file to the host PC cRIO or do I have to manually delete the file.

    Concerning

    Dude

    Hello

    You must manually delete the file.

    Concerning

    Visuman

  • I am trying to reinstall windows xp from disk but it only gets up to this request then for service pack 1 disc when I press on enter I get the file 'asms' on windows xp pro Service Pack1 necessary

    I am trying to reinstall windows xp from disk but it only gets up to this request then for service pack 1 disc when I press on enter I get the file 'asms' on windows xp pro service pack 1 cd needed someone had this problem and managed to solve it thanks a lot

    Hello

    Thanks for joining us on the Microsoft Community.

    According to the description of the problem you are facing problems with reinstalling Windows XP Professional, and you are to be invited to insert the Service Pack 1 drive to complete the installation.

    To help you to propose measures to solve the problem, I would appreciate if you could answer the following questions:

    1. did you uninstall Windows XP Service Pack 1 prior to reinstalling Windows XP?

    2. what was the installed Service Pack earlier?

    You may need to uninstall Windows XP Service Pack 1 first and then perform the reinstallation of Windows XP and to check if the installation goes smoothly.

    Please see the following articles for more information about uninstalling Windows XP Service Pack 1:

    How to manually remove Windows XP Service Pack 1

    http://support.Microsoft.com/kb/329015

     

    How to remove folders from Windows XP Service Pack 1

    http://support.Microsoft.com/kb/329260?WA=wsignin1.0

    Hope this information helps. Please come back for any clarification on this or any issue of Windows. We will be happy to help you.

  • I get a file sorttbls.nip on my desktop at startup is not found

    I get a file sorttbls.nip on my desktop at startup is not found

    Hi, Steviecaca,

    See the solution given here: file sorttbls.nip

    http://social.msdn.Microsoft.com/forums/en/Vsexpressinstall/thread/c32e9822-Edde-4407-804B-77ef77cefaf2

  • where can I get .flv file type just to play videos?

    Download a youtube with a video. FLV file type.  My Player multimedia c. 11 does not recognize this file type.  Do other players.  Where can I get this file type?

    12/04/2012: downloaded the vlc media player and a youtube converter.  All right.  Thank you community.

    I suggest you download a to convert flv to wmv video format.

  • I get a file opening called installer_msi_win.msi popping up randomly

    For the last 2 weeks I get a file opening called installer_msi_win.msi popping up at random, now here is the best, it opens and asks me what program I want to open it with, I usually click on cancel, but it is, I've used several programs thinking it was a virus until I searched for Microsofts database and found that it is not , but I have not installed or uninstalled anything in 2 weeks when it appeared suddenly, it's boring because it appears while I do things and it slows down my pc, how can I prevent that from happening.

    My pc is running xp 32 b, I just installed the new thought available updates which could set, but he did not.
    Concerning
    Dray

    I found what was causing the problem, it was a program that I downloaded from CNET that detects programs on my PC and lets me know if there are updates for them. I disabled and uninstalled the program and now I only get the file installer_msi_win.msi popping up. Follow this link, it helped me when I was able to track down the installed program...

    http://support.Microsoft.com/kb/331796
    Hope this helps
    Concerning
    Dray

Maybe you are looking for

  • mini screen iPad issue 2

    model of mini iPad 2 16 GB Wifi has horizontal lines on the screen. They disappear sometimes, but mostly it is a. iPad is very well supported and never let down. Running latest OS only been like this since yesterday. The lines move with the apps and

  • Search for Windwos not capable of search text blocks

    Origanal title: indexing Hello. I'm a translator so text searches are important. for some reason, the search for th does not locate certain blocks of text. files and file types seem to be included in the index. Why could this be? Thank you GJH

  • Dell Inspiron 1526 won't start. Error - "Bootmgr missing".

    Ctrl-alt-del does not work and I don't have the vista boot cd. If I'm doomed?

  • Windows 7 Build 7601 Windows is not genuine

    I know I'm not the one with this problem.  Unfortunately, I do not yet have the solution.  My laptop was purchased new directly from Dell with Windows already installed.  I bought it in 2010 and Windows worked fine up until now.  If checked.  I'm com

  • Tandberg TMS v13.2.1 - Activation of Windows problem

    Hey all,. Recently, we had a few problems with our TMS where we tried to RDP to it, he would immediately start us and we couldn't get in. We then tried KVM to the machine, there is no possibility to connect (screen, keyboard, and mouse were unrespons