PL/SQL using UTL_HTTP for calling one method other than POST, PUT or GET.

The UTL_HTTP. BEGIN_REQUEST function has the following parameters:

UTL_HTTP. BEGIN_REQUEST)

URL in VARCHAR2,

method in VARCHAR2 DEFAULT 'GET ',.

http_version IN VARCHAR2 DEFAULT NULL,

request_context IN request_context_key NULL by DEFAULT)

RETURN req;

I have a XML file: DataFile.XML

I have a web service: http://devweb/XferLocation/Xfer.asmx

I have a web service method: SaveDocument

The method has 2 parameters: path and name of file

I want to we the UTL_HTTP. Function BEGIN_REQUEST call the SaveDocument method in order to transfer the XML file at the location specified in the filepath parameter in the SaveDocument method.  Is this possible?  I have the following code, but when I run it I get the following response:

DECLARE

*

ERROR on line 1:

ORA-29273: HTTP request failed

ORA-06512: at "SYS." UTL_HTTP", line 1130

ORA-06502: PL/SQL: digital error or value

ORA-06512: at line 28

DECLARE

Resp_v UTL_HTTP. RESP;

Req_v UTL_HTTP. REQ;

CLOB ReadResp;

URL_v VARCHAR2 (500);

BOOLEAN FExist;

FLen NUMBER;

FName_v VARCHAR2 (500);

FName_full VARCHAR2 (500);

Method_v VARCHAR2 (500);

Dir_v VARCHAR2 (500);

FPath_v VARCHAR2 (500);

Directory of BSize;

Buffer_v VARCHAR2 (32767).

Milling BOOLEAN;

BEGIN

Dir_v: = 'DIR_PLSQL ';

FName_v: = 'DataFile ';

FName_full: = 'DataFile.XML;

  URL_v       := ' http://devweb/XferLocation/Xfer.asmx';

FPath_v: = '\\WebServer\Files\dev\utlfile\plsql\ ';

Method_v: = 'SaveDocument (FPath_v, FName_full)';

UTL_FILE. FGETATTR (Dir_v, FName_full, BSize, FLen, FExist);

IF FExist THEN

DBMS_OUTPUT. Put_line (' file name: ' |) FName_full | CHR (10) | "File size: '. FLen | CHR (10) | "Block size: '. BSize);

DBMS_OUTPUT. Put_line (' method: ' |) Method_v);

Req_v: = UTL_HTTP. BEGIN_REQUEST (url = > URL_v, method = > Method_v);

UTL_HTTP. SET_HEADER (' Req_v, 'Content-Type', ' text/xml; charset = utf-8 ');

UTL_HTTP. SET_HEADER (Req_v, "Content-Length", FLen);

UTL_HTTP. WRITE_TEXT (Req_v, Dir_v |) FName_full);

Resp_v: = UTL_HTTP. GET_RESPONSE (Req_v);

Milling: = FALSE;

LOOP

WHEN the EXIT milling;

BEGIN

UTL_HTTP. READ_LINE (Resp_v, Buffer_v);

IF LENGTH (Buffer_v) > 0 THEN

DBMS_LOB. WRITEAPPEND (ReadResp, LENGTH (Buffer_v), Buffer_v);

END IF;

EXCEPTION WHEN UTL_HTTP. END_OF_BODY THEN

Milling: = TRUE;

END;

END LOOP;

UTL_HTTP. END_RESPONSE (Resp_v);

DBMS_OUTPUT. Put_line (ReadResp);

UTL_FILE. FRENAME (Dir_v, FName_v: '.) XML', Dir_v, FName_v: '. OLD ");"

END IF;

END;

/

Thank you in advance,

Paul

Look at this example:

Call Web Services the easy way using the utl_http package

Name of the procedure and the parameters must be embedded in the url parameter.

example: http://devweb/XferLocation/Xfer.asmx/SaveDocument? FilePath =... & filename =...

Method parameter can accept POST, GET...

HTH

Thomas

Tags: Database

Similar Questions

  • Why Microsoft did remove the ability for Windows Vista to install on herself from one location other than being inside the BONE you want to fix it?

    No Option to install repair - SAD

    Hello

    Why Microsoft removed the ability for Windows Vista to install on herself from one location other than being inside the BONE you want to repair.

    I recently had a problem where Vista Business 64-bit would only boot to a black screen with a mobile cursor - KSOD.   Who, in searching the Web I found is a fairly common problem with Vista.  I discovered that my only option was about to reinstall Vista CLEAN and all the other programs I had installed under it.  I can't believe that Microsoft released the 'repair installation option"similar to that of Windows XP, where you can hit the"R"key during installation and we left with nothing but the"System Restore"options and"Startup Repair ".  Neither of which has helped in my situation.  Since then, this was a dual system boot with XP Pro, then any restore point has been removed from the partition to Vista anytime, I started another recognized problem, by Microsoft, which Microsoft has made no significant effort to fix, in addition to recommending that you hide the partion Vista in XP - a whole of XP.  That beats a little the entire purpose of dual boot.

    As I tried to start in safe mode, it left me at the same point as a normal boot - black screen with a cursor.  I tried ctrl + alt + delete and nothing. Two Windows RE options did not help me.  This left me no option but to the completely reinstall Vista.   Why Microsoft did remove the ability for Windows Vista to install on herself from one location other than being inside the BONE you want to repair.. Please don't tell me that it is because Vista uses an image file instead of an installation as XP system.   I see no other reason for not allowing the upgrade of outside BONE in addition to Microsofts greed and paranoia that he can transform the operating system easier to install illegally.  I hope that some third party has actually changed the Vista installation routine to allow you to install Vista on itself, because as it is, it's really hard for me to even recommend Vista as the operating system or install any where else, if not the only recourse after loading OS, is to reinstall completely.

    Adobe, Autodesk, and almost all other software publishers... allow you to perform a "REPAIR" of their software installation, if something prevents you to load after installation.  Even MS Office has a routine repair.  Ms has an internal version of the Setup routine which allows outside the OS upgrade option that you want to "Upgrade" / repair? ".  If not, why?

    -Todd w.

    "Why Microsoft removed the ability for Windows Vista to install on herself from one location other than being inside the BONE you want to repair."

    «.. . After using XP's repair function, the operating system itself would become less stable and frankly not in a good state of repair. »

    As Todd, is the answer.

    "This response does not hold water as on one of my computers I've been running Windows XP for about four years now, after a repair install.

    Then, you were lucky.  Try to replace the system files on a computer that does not start even at a desk or safe mode usually will get a return to office, but will probably repeat the same problem in a few weeks.  Tech professional would only use this function to retrieve the data before a complete reinstallation.

    "I thought that this area was a place to really get answers instead of the ole same"answers of bs that are on all the other forums."

    It is a place that will try to help you fix your computer if you have problems.  It has technicians in computing, no decision-makers, developers or executives.  We will try to answer technical questions about problems you might have with Windows Vista.

    If you want to have input on the future of Microsoft operating systems, then help you beta-test and provide feedback to the developers.  Windows 7 and IE 8 are currently in beta.

    Another possible place you could make suggestions which could see the developers would be:

    https://connect.Microsoft.com/default.aspx

    Brent
    Microsoft Answers Support Engineer
    Visit our Microsoft answers feedback Forum and let us know what you think.

  • How can you save an email in one file other than an email file?.

    E-mail - save in Word format

    How can you save an email in one file other than a gall email.  I could always save and send my Word with XP files.

    Help, please

    Thanks for your help.
    With windows XP, I could save my emails to my word files.  I use MSN as my source of e-mail.  Windows 7 doesn't have a "SAVE AS" function.  I was facing and paste but that takes a lot of time compared to a touch of "SAVE AS".

    I'm surprised that it is not available in Windows 7.

  • Is it possible to install windows applications on one drive other than C 8?

    I wonder if there is a way to install applications on one drive other than C? I have an SSD drive and I can't afford, space wise, to continue to install programs on my drive C. some applications seem to be useful, but if I'm forced to put on C, then I simply not going to use them.

    Some facts that you can easily check for yourself:

    Move your store of Windows Apps to another partition or a drive won't help you much. I just checked my test with 35 apps installed system, ranging from games to applications of online TV useless gadgets, taken solely on C:\Program Files\WindowsApps storage space total 2.6 GB.

    Move your desktop applications and programs won't you do much else. Check yourself how small correctly encoded software modern space takes. This test system has Office 2010 and Office 2013, two complete installation, two Professional versions, Media 6, Webmatrix and Visual Studio for coding, ten to twelve games etc etc, taken total storage on the HARD drive is only 9 GB (C:\Program Files 3.5 GB and C:\Program Files (x 86) 5.5 GB).

    This system of test of mine as stated above, so absolutely that each request, the office and the Windows store as could be moved completely to another disk it would free 11.6 GB of disk space.

    What could really help you instead is move / move your user folders or with sysprep move complete directory of main users with everything on it, including AppData. This is done by changing the values of a Windows Environment Variable and is a quick and simple procedure that puts all the future user records to a different location (http://www.eightforums.com/tutorials/4275-user-profiles-relocate-another-partition-disk.html). The users folder is normally much greater than the combined app and program folders.

    In a normal computer, the issue is not the space applications and programs. Check for yourself if you haven't already and you will be surprised how little space your need to file applications and programs.

    Kari

    EDIT: I did a typo which has now been fixed: I don't have 135 Windows installed Apps taking 2.6 GB, but 35 Apps. I'm sorry.

  • If I buy a T-Mobile unlocked iphone7, can I use the sim card by carrier other than T-mobile on the iphone7? Because I travel abroad from time to time, I wonder if the unlocked Tmobile iphone7 accept any sim card when I am abroad

    If I buy a T-Mobile unlocked iphone7, can I use the sim card by carrier other than T-mobile on the iphone7? Because I travel abroad from time to time, I need to use another sim card when I'm outside of US. So if I order a T-mobile unlocked iphone7, he will accept my sim card from a foreign carrier? In addition, he will accept my 2nd sim card which is Sprint (my sprint sim card is not related to a device)?

    An unlocked iPhone for use with any compatible GSM carrier.

    Sprint is NOT a GSM carrier. They are a CDMA carrier.

  • The pencil of Apple requires a port light to recharge.  Does anyone know a USB male to female adapter port lighteners that would load the pencil on one device other than the iPad?

    The pencil of Apple requires a port light to recharge.  Does anyone know a USB male to female adapter port lighteners that would load the pencil on one device other than the iPad?

    Apple pencil comes with its own map of woman to woman, so you can use a standard lightning cable USb and charger to charge

    Not sure there is no 3rd party yet.

  • PXI-8250 in one frame other than the 1042/1045 or PXI-1044?

    The PXI-8250 will work at any level in one frame other than the 1042/1045 or PXI-1044?

    Hi djfrye.

    The PXI-8250 can only be used in the 1042 / q 1042/1045.  It will not work in the PXI-1044.

    Good luck with your application!

  • Computer does not start up___Can I download this file from the Microsoft Web site. I put the XP CD in and it starts downloading files but it asks what windows installation I want to and don't gives me one option other than press "Enter" to abandon.

    My laptop does not start at the top. It indicates that the following file is missing or damaged WINDOWS\SYSTEM32\CONFIG\SYSTEM.

    Download this file from the Microsoft Web site. I put the XP CD in and it starts downloading files but it asks what windows installation I want to and don't gives me one option other than press "Enter" to abandon.

    See if anything here helps-

    How to recover a corrupted registry that prevents Windows XP startup
    http://support.Microsoft.com/kb/307545

    Install and use the Recovery Console in Windows XP
    http://support.Microsoft.com/kb/307654

    See also

    How to Troubleshoot Registry Corruption issues
    http://support.Microsoft.com/kb/822705

    How to fix a missing or corrupt Windows\System32\Config\System file
    http://xphelpandsupport.MVPs.org/how_do_i_repair_a_missing_or_cor1.htm

    TaurArian [MVP] 2005-2010 - Update Services

  • Will there be repercussions to Program Files on one partition other than the operating system of the installation?

    Will there be repercussions to Program Files on one partition other than the operating system of the installation?  Most if not all the software packages allow to customize the installation.  I had an experience with OFFICE 2013 and this allowed me to install on a separate partition.  After installation, I checked the menu START was 2013 OFFICE & I was able to launch PwrPt without complications.

    My motivation for doing this is that I have several versions of LabView which occupies the huge disk space.  So if I can separate the backup image of my OS program files is greatly reduced in size.  This allows me to record several images of my OS by dates without needlessly chewing my external hard drive.

    Anyone know this & if yes are there complications or questions?

    Appreciate any feedback

    I think I've found a more informative explanation via:

    http://www.SevenForums.com/general-discussion/221347-install-personal-programs-partition-separate-OS-partition.html

  • Route VPN site to site on one path other than the default gateway

    I want to route VPN site-to-site on one path other than the default gateway

    ASA 5510

    OS 8.0 8.3 soon

    1 (surf) adsl line interface default gateway

    line 1 interface SDSL (10 VPN site-to-site)

    1 LAN interface

    What's possible?

    Thank you

    Sorry for my English

    Here is the assumption that I will do:

    -Your IP SHDL is 200.1.1.1, and the next hop is 200.1.1.2

    -Your LAN-to-LAN ends on this interface (interface card crypto SHDL)

    -VPN peer 1 - 150.1.1.1 and LAN is 192.168.1.0/24

    -VPN peer 2 - 175.1.1.1 and LAN is 192.168.5.0/24

    This is the routing based on the assumption above:

    Route SHDL 150.1.1.1 255.255.255.255 200.1.1.2

    Route SHDL 175.1.1.1 255.255.255.255 200.1.1.2

    Route SHDL 192.168.1.0 255.255.255.0 200.1.1.2

    Route SHDL 192.168.5.0 255.255.255.0 200.1.1.2

    Hope that helps.

  • How to install photoshop and lightroom cc on one drive other than C:

    How to install photoshop and lightroom cc on one drive other than C:

    Change for Applications installation location

    With the application of CC open, select the gear icon in the upper right, and then choose Preferences.  In the preferences of the screen select creative cloud and then look for the drop-down list installation location

  • How can install in one location other than my C: drive?

    How can install in one location other than my C: drive?

    Change for Applications installation location

    With the application of CC open, select the gear icon in the upper right, and then choose Preferences.  In the preferences of the screen select creative cloud and then look for the drop-down list installation location

  • Can I install Adobe Reader on one drive other than the C: drive?

    Can I install Adobe Reader on one drive other than the C: drive?

    Hello

    Welcome to Adobe Community. Yes, it can be installed on a different drive. Although some of the files installed by this last will be always installed on the C: drive.

    When you run the Setup program, use "Change destination folder" at the bottom of the Panel

    If you have Adobe Reader is installed on the C: drive, you must uninstall it before installing a new version to a different location.

    Thank you!

  • How can I install Adobe Reader 11 to one drive other than C:\?

    I downloaded Reader 11, but at no time during the installation process I am invited for an installation location.  How can I install this on one drive other than the C:\?  I keep my C:\ drive and data storage separate so when the OS crashes I won't lose my data.  I have limited storage capacity because I am on a laptop so I don't have my very large C:\, whereas I would have more room for my D:\.  Any suggestions?

    Sincerely,

    LT Gannon

    having data on a different drive is a good idea.  install programs on a different disk you drive containing bones is generally not a good idea.  But if you have the expertise and you are sure of what you are doing:

    Mac: ftp://ftp.adobe.com/pub/adobe/acrobat/mac/11.x/11.0.00/misc/

    win: http://www.adobe.com/support/downloads/detail.jsp?ftpID=5515

  • How can one Reader > 9 v be installed on one volume other than c:?

    How can one Reader > 9 v be installed on one volume other than c:? as g:?

    and is there an available executable distrubution if the reader can be installed on a machine that is not connected to the Internet?

    Download the .exe of the ftp service and use it to target the installation directory:

    ERGO

    FTP://FTP.Adobe.com/pub/Adobe/Reader/

    and choose the operating system and version and language as well:

    FTP://ftp.adobe.com/pub/Adobe/Reader/Win/9.x/9.5.0/en_US/AdbeRdr950_en_US.exe

Maybe you are looking for