Extract method

Hello

I call a Web service and get a response like this
<?xml version="1.0" encoding="UTF-8"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
  <soap:Body>
    <ServiceRequest_CreateResponse xmlns="http://ABC/">
      <ServiceRequest_CreateResult xsi:type="xsd:string">&lt;?xml version=&quot;1.0&quot;?&gt;
&lt;ServiceRequest_CreateResult xmlns:xsi=&quot;http://www.w3.org/2001/XMLSchema-instance&quot; 
xmlns:xsd=&quot;http://www.w3.org/2001/XMLSchema&quot;&gt;
  &lt;Error 
xmlns=&quot;http://www.systems.com/ServiceRequestCreateResponse.xsd&quot;&gt;
    &lt;Description&gt;Object Property ExternalReference has not been 
provided&lt;/Description&gt;
  &lt;/Error&gt;
&lt;/ServiceRequest_CreateResult&gt;</ServiceRequest_CreateResult>
    </ServiceRequest_CreateResponse>
  </soap:Body>
</soap:Envelope>
In the XML GET the i preceding tags as gt and lt and not as true symbols, so I m extraction and then by doing an entity_decode,.

my statement stmt is like that
SOAP_RESPOND :=XMLTYPE(SOAP_RESPOND).EXTRACT('/soap:Envelope/soap:Body/ServiceRequest_CreateResponse/ServiceRequest_CreateResult/text()','xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/",xmlns="http://ABC/"').GETCLOBVAL();
and I m hurry of method argument NULL SELF is not allowed and I don't see where I m wrong.

so I want to decode like this
Xml_Result :=XMLTYPE(DBMS_XMLGEN.CONVERT (SOAP_RESPOND, DBMS_XMLGEN.ENTITY_DECODE));
to make me the real XML tags instead of lt and gt characters.

Can anyone tell me what the problem is in my snippet statement.

Thank you

S

Hello

Looks like one of those old (and weird) bugs related to mapping of namespace string :)
I'm always reproduce the problem on 11.2.

Try adding a space between declarations of namespace:

  soap_respond := XMLTYPE(soap_respond).extract(
                    '/soap:Envelope/soap:Body/ServiceRequest_CreateResponse/ServiceRequest_CreateResult/text()'
                  , 'xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/", xmlns="http://ABC/"'
                                                                /*          ^
                                                                            here */
                  ).getclobval();

Tags: Oracle Development

Similar Questions

  • reproduce the extraction method from page to page 5.0 09 image

    Hello

    (El Cap 10.11.3)

    In recent years, I supported pages 09 to my work as a storyboard artist. Now I would like to do some of my work on an ipad pro as well and this will require me to use the 5.0 instead Pages I need to used 5.0, even when working on my mackbook pro s think I canswitch between machines easily. Everything on the use of the pages 5.0 is great except one problem in my workflow that is as follows: I draw pictures on paper and scan them and make a folder of individual JPEG which I can plug into my model of Storyboard in Pages 09 (at this point, I can also type despcriptions and reorganize etc way Pages). Then (the important bit) when I need to see the images, I double click the cell 09 document containing the image that I need to change and appears as a jpeg icon in the settings window. I can then do it on the desktop and there in photoshop/manga studio where I do the modification. then save it, then copy paste image revised in place in the document.

    Could someone tell how can I reproduce it easily and quickly in Pages 5.0

    Above is Pages 09

    and even in the Pages of 5.0:

    Thanks for all the tips!

    In Pages v5, you click the image once and when selected, you can drag its icon on the desktop in the Image tab below.

  • Performance issue with the method extract in 11g

    I am new to Oracle XML DB. I'm having a problem with an example simple Java application designed to test the response time. I can't find an answer to this question.

    It takes about 1/2 second, whenever my Java client makes a call to the method "extract" of XMLType. Extract is called 3 times for each row returned in a result set. It takes 1 1/2 seconds to process 1 line. With a result set of 55 lines, it takes about 1 1/2 minutes to process the entire result set.

    It seems to me that an appeal must be get done to retrieve the data from the server to each snippet of time is called. This performance is unacceptable and will not evolve. This seems to be a lazy loading problem that could be treated with the configuration; but I still need to find something specific documented.

    Is there something that can be done to solve this problem or is it typical performance?

    I use a binary XML storage. I created a XMLIndex; but it made no difference. Does not seem like an indication that much of a difference, since the problem occurs when you access XML different values in the same line...

    The extract method is implemented in the classes of the JAVA API provided by the Oracle client installation.

    Just to clarify things, this forum is related to a feature in the Oracle database. The API you mentioned and you use are provided by another group within Oracle (I think). In addition, the used API .extract does its job fully without communicating with the DB. You can check this to hard code in an XML response and disconnect your computer from the network before you run the logic of analysis and it would continue to operate.

    The fact that this method is removed must have something to do with its inefficiency

    The disapproval that I mentioned is only in what regards the SQL in the Oracle DB. As noted above, the used API lives under a different set of rules, so I can't speak to that. There is probably a forum for the API, but I haven't been looking.

    Back on topic, a possible rewrite for your SQL statement is (untested)

    select aex.APPLICATION_NAME, aex.VERSION, aex.EVENT_TYPE, xt.sendingSite, xt.receivingSite, xt.eventID
      from AUDITED_EVENT_XML aex,
           XMLTable('/*/MSH'
                    PASSING aex.xml_event_content
                    COLUMNS
                    sendingSite   VARCHAR2(20)  PATH 'MSH.4/HD.2',
                    receivingSite VARCHAR2(20)  PATH 'MSH.6/HD.2',
                    eventID       VARCHAR2(20)  PATH 'MSH.10'
     where EVENT_TYPE = ?
    

    If you have problems with this, just after a small sample XML and someone can twist where I was wrong.

  • This extraction may take a while

    Usually completely load ps CS6 and said: extraction, this can take some time.  How long does that mean.

    About 15 minutes on a system of means. If it takes more time, something is wrong and you should maybe start again or use extraction methods alternative on the ways of WinZip or WinRar 7z file

    Mylenium

  • Burn a CD with Windows Media Player

    I tried to burn a cd with windows media player.  I think that it is version 11.   I put the songs I want to burn on the right side where it says to put them.  I use a cd cd - r Phillips.  He'll burn 3 or 4 songs, and then eject the disc.  I tried several times and it does every time.  Any advice on how to burn the entire list of songs.  There are 15 I wanted to put it on disk.  And it's an 80-minute drive, so there is a lot of time on them.  I lost a few disk already so any advice would be appreciated.

    Thank you

    Rita

    you have to 'turn off' the ' auto eject and auto burn / rip "feature for your cd device.

    in this way the cd will stay "unburn" and can accept more files.  later, when you have copied all the files on the cd, then you can manually run a ' burn / rip.

    try to go to the menu bar of media player file.  then, under Tools > options there should be a tab to customize the "rip" where you can change the ejection and extraction methods.

    regarding as to why you seem to only be able to copy multiple files at the same time, it is probably due to low resources on your system.  Maybe you are low on memory or disk space when you use the media player.

    so, you could try to just use the Explorer to transfer files on the cd.

    You can open the Explorer and then find the folder that contains your music / song files.   then as with any file, you can drag and drop them on the cd or use other methods that you want to copy files from one place to the other.

    also, most computer come with specialized software that is designed for your device to computer and cd model.  This software will be has features to copy files to the cd, and will also have the necessary controls to fine-tune the device cd and windows to play and the extraction of files.

    Finally, it has been my experience that about five years of cd home-made, even if you buy the best cd for recording as those made with layers of gold and those with false promises that they last forever...

    Unlike the cd music that we buy at the store, the method that we have with the computer is not industrial strength and something happens to the layers inside the House made conference that degrade over time.  I have studied this issue carefully and I just to let you know about the phenomena.  (I almost lost some one of a kind songs where the group no longer exists or their albums.  I actually have the only copies of these songs in particular in the world)

    in any case, certainly keep copies of your music on the hard disk. You can also store copies of your music on the site of skydrive from microsoft for free.

  • Do not open the compressed files

    Hello

    When I compress several files in a zip file and then try to open it, I get the following message:

    (Name) file cannot be opened because there are problems with the content.

    Then I click OK and get the following message:

    Word found unreadable content in (name).  You want to recover the contents of this document?  If you trust the source of this document, click Yes.

    Then, I click Yes and get the following message:

    (Name) file cannot be opened because there are problems with the content.

    I click on details and get the following message:

    Microsoft Office cannot open this file because some parts are missing or invalid.

    I was previously able to open the files zipped without any problem.

    Any help with this issue is appreciated.

    Thank you

    Candace

    You try to open the file generated with Word.  You must first extract the compressed file, and then open the file with Word.

    Method 1

    Double-click on the zip file.  This will display the contents of the zip file, which are probably more.doc files or Word *.docx files.

    Double click on whatever you want to work on files of words.

    Method 1 has

    Instead of double-clicking on one of the compressed files, drag ' not drop it on your desktop.  It is indeed 'an excerpt' rather than 'extract all' method 2.

    Method 2

    Right-click on the zip file and select "Extract all."  This will create a new folder (with the same name as the zip file).  All the files you have been compressed in the zip file will be in this new folder.  These are copies of compressed files (zipped).

    Double-click on according to files in the new folder that you want to use.

    The problem with all of these methods when you want to save your work.

    For method 1, you must use "save under" (rather than by clicking "Save" or by using the file > save) and don't forget to change the location (folder) where you save the document from the temporary directory that will be the default value to a more appropriate location, such as your desktop.

    For method 1, you can use the regular 'save' function.  The file will be saved whenever you dragged (for example, your desktop computer).

    For method 2, you can use the regular 'Save' function, but be aware that the file will be saved in the new folder created when you extracted all the files.

    In all of the above methods, the version of the file in your original zip file will not be changed.  Assuming that this is not the desired result, after you save the modified file, drag ' not drop it on the zip file.  You will get an offer from the window to "Copy and replace" or "Do not copy."  Choose "copy and replace".  Your modified file will be compressed and placed in the zip file at the original compressed file.

    You can then delete the file updated the registered (method 1 or 1 a) or the entire new folder with all the files extracted (method 2).

  • Reinstall Visio after upgrade to Windows 7 64 bit

    Hello everyone. I installed Windows 7-64 bit. My upgrade went without a hitch except to reinstall one of my Office programs. I am trying to reinstall Visio Professional 2003, however, my first legal installation disc is Visio 98. Windows 7-64 bit will not install this version, so I'm stuck without a track to upgrade in order to activate properly. How to work around this problem. I tried to join the team of Visio, but I see that they want to get my credit card on which I am not too happy to... Help... Please...

    Thank you.

    E-mail address is removed from the privacy *.

    I know it's late to this thread over 3 years, but I recently found this problem on the copy of my dad from win7 64.

    With success, I was able to install 4.5 Visio standard, Visio 5.0 update and upgrade Visio 2002.  Everything worked successfully on win7, but the older versions had some quirks to fix in the installation process for 2002 to see them on the hard drive and to recognize as valid evolutionary products.

    The main problem is that version visio 4.5 and 5.0 used an old 16-bit installshield Setup program.

    The applications themselves are 32-bit and will be running in compat for windows NT 4.0 mode in win7 64-bit.

    My solution was to get a program that will extract the old cab of installshield used on the cd files.

    The file to extract cd is called 'data.z' and you must check out it in a good location on your hard drive.

    I used the program Universal Extractor from the following site:

    http://legroom.NET/software/UniExtract

    the extraction method used was i3comp.

    Once the records from HD, I created a shortcut to the executable visio in the extracted folder, in the properties of the shortcut I went to the compatibility options and click on it to change the settings for all users.  Here, I did the program running under Windows NT 4.0 and run as administrator.

    I then tested successfully the Visio 4.5 and 5.0 with this method to ensure that any registry or ini file stuff needed by the installer of 2002 would be easier.

    After I checked they were running and working on win7 64, I put in the 2002 Update CD recently bought new by the amazon seller.

    Setup has found the copy to hard disk, and I told it to install over Visio 5.0 on hard disk folder.

    When I launched visio 2002, he asked to activate, I then just let my dad continue the activation process of Visio 2002 update because it was actually him who had bought and she belonged and was installed on his computer.

    He had worked for a couple of hours and finally had put on his machine virtual windows xp win7, but wanted on his real win7 64 bit installation.

    I had the chance to help her for about an hour, and it was enough time to understand the problem and get Visio 2002 working for him.

    I note that there is a point in the installation process when upgrade version wants to find the old copy to upgrade, he will try to get the hard disk and you will almost seem to be frozen, but the style hourglass turns the pointer of the mouse circle will be always moving.  As long as you wait outside it will be eventually find the older version installed.

    Finally, on my father's computer, there are more than 1 million files from different programs and documents to go, after about 5-6 minutes setup are the old copy and continued.

    After it's done only internet activation is required.

    Hope this helps someone.

  • DirectX 11 problems, please Help! :)

    Hey there,

    So I bought Total War: Shogun 2 on steam and downloaded the game... When I try to play the game I get the 'First time Installation' habit that steam works for any game, but when it comes to "installation of directx for windows" it crashed my laptop. After a hard reset it now always said the same thing when I try to run the game. When I run the install, but press cancel, it will pick up my system. When I go out to start the installation, it will sit for 5-10 minutes before closing the window itself, until the installation is complete. I tried using the web installer so the update of directx 11, both directions manual extraction method lead me to the message "internal error." I'll post the Directx and DXError logs at the end. I know for a fact Shogun 2 will support directx 11 as I played the game earlier on this laptop, but I ended up doing a restore of the system on my system. This becomes increasingly more aggravating that I'm trying to fix it and none of the forum posts I found here or elsewhere on the web helped me, so im hoping that someone who reads this can. Errors in the log file are as follows:
    DirectX.log
    16/12/12 23:20:08: dxupdate: ExecuteInf(): SetupInstallFromInfSection() failed, error = 1117.
    [16/12/12 23:20:08: dxupdate: ExecuteInf(): cannot install C:\Users\Walsh\AppData\Local\Temp\DX12D4.tmp\D3DX9_37_x86.inf:[x64_install]. The file is possibly corrupted.
    16/12/12 23:20:08: dxupdate: DirectXUpdateInstallPlugIn(): ExecuteInf() failed.
    16/12/12 23:20:08: dsetup32: CSetup::InstallPlugIn(): DirectXUpdateInstallPlugIn() failed.
    16/12/12 23:20:08: dsetup32: CSetup::SetupForDirectX(): InstallPlugIn() failed.
    16/12/12 23:20:08: dsetup32: launch the finalization: phase: 255-255, total: 0-191
    16/12/12 23:20:08: DXSetup: DSetupCallback(): Phase = 3, steps = 0
    16/12/12 23:20:08: dsetup32: Installation ended with the value-9 = internal or error not supported
    DXError.log
    --------------------
    [16/12/12 23:20:08] module: dxupdate (Mar 30 2011), file: dxupdate.cpp, line: 5871, function: DirectXUpdateInstallPlugIn
    ExecuteInf() failed.
    --------------------
    [16/12/12 23:20:08] module: dsetup32 (Mar 30 2011), file: dxupdate.cpp, line: 280, function: CSetup::InstallPlugIn
    DirectXUpdateInstallPlugIn() failed.
    --------------------
    [16/12/12 23:20:08] module: dsetup32 (Mar 30 2011), file: setup.cpp, line: 1727, function: CSetup::SetupForDirectX
    InstallPlugIn() failed.
    Any help would be appreciated! :)
    Thanks in advance,
    Sean.

    My understanding is Total War: Shogun 2 need a patch to run DX11, then you have to get the game installed first.

    I would first uninstall the game, or that the installation had apparently not finished, delete all files that have been installed, including those that may be in your - user-folders My Documents or User\ App Data (it may not be here if the game has finished installing).

    To have to do a hard reset can often cause problems if you do not restart from the menu start after Windows loads again. Restart via the start menu is recommended after uninstall or make changes to the system in all cases.

    Once the game is completely uninstalled to run the Web Direct X installation program or, as there may be a corrupted the DX file, run the Direct X Redistrubitable (June 2010) again because this will overwrite all of the Direct X files (Web Installer does not overwrite existing files). If there is still a problem safe mode installation-
    Press F8 (with most systems) during startup to access boot options.
    While you mentioned using the two options of installation/update DX I'll let links anyway, for others
    who can read it.

    Download details: DirectX end-user performance

    Download details - Microsoft Download Center - DirectX Redist (June 2010)

    Once the DX is sorted reinstall the game, but if it gives an option to install DX
    do not let the game to install DX-
    The error mentions a specific file - "D3DX9_37_x86.inf: [x64_install]." The file may be damaged. »
    Assuming that it is in the installer of the DX of games, it seems that the installer is corrupt (or the disc is scratched, etc.), so if you cannot stop the game to try to install DirectX you are between a rock...

    .

  • Printing with Windows 8 Pro for HP Photosmart 8150

    Since I installed Windows 8 Pro to my computer, I can't print to my HP Photosmart 8150 printer. Online "says" HP driver is up to date, but I deleted and reinstalled in any case. Still not printing. If anyone has had this problem and how solve you this problem?

    Hello

    As a last resort, try this with your CD original if possible... If not, download the newest and use the extraction method...

    There are at least two programs installation of HP (applications) and possibly a setup Windows that will need to be changed.

    I was able to get the printer to work in uninstalling and reinstalling the software... BUT.

    I found to do this, you must go to

    Control Panel... Devices and printers... Right-click on the printer, and then remove the system.

    Then, uninstall and reinstall the software.

    Also, be sure to set the Compatibility Mode of the installer for Win 7 or earlier. XP SP3 seems to be a good universal choice.

    IMPORTANT...

    You should be able to get the software to install Original function if it is fairly recent.

    If you are using the CD, you will not extract anything...

    If your drivers moved there not because of an error message... .not the correct operating system, you will need to EXTRACT the Setup program in a FOLDER, such as a .zip file. You will need a program like WinZip, WinRar, 7Zip, or even to do.

    VERY IMPORTANT...

    After extraction, if necessary, set the Compatibility Mode of the Installer file and any other application on the CD-ROM or in the file. There are usuallyat least three installers for an HP printer. Then double the installation program

  • SUCH VALUE

    I have the following:

    DECLARE

    v_schema_to_validate varchar2 (2000);

    v_request_type varchar2 (2000);

    v_property varchar2 (2000);

    v_room varchar2 (2000);

    v_id varchar2 (2000);

    x_htng CLOB: = ' <? XML version = "1.0" encoding = "UTF-8"? >

    " < HTNG_ReadRQ xmlns =" http://HTNG.org/2014B "

    " xmlns: ota = ' http://www.OpenTravel.org/OTA/2003/05 "" "

    " xmlns: xsi =" http://www.w3.org/2001/XMLSchema-instance "

    EchoToken = "6cfa1ea3-df0f-497f-9aaf-e927fc11affc".

    TimeStamp = "" 2010-02 - 12 T 12: 26:47 ""

    Version = "1.0".

    " xsi: schemaLocation =" http://HTNG.org/2014B ">

    < ReadRequests >

    < HotelReadRequest HotelCode = "LOL" >

    < audit >

    < room RoomID = "101" / >

    < / audit >

    < / HotelReadRequest >

    < / ReadRequests >

    < Type UniqueID = "14" ID = "123res" / >

    < POS >

    < ota: Source >

    < ota: RequestorID Type = "WIFI" ID_Context = "a" ID = "1" / >

    < / ota:Source >

    < / POS >

    < / HTNG_ReadRQ > ';

    l_xmltype XMLTYPE.

    BEGIN

    l_xmltype: = xmltype (x_htng);

    v_schema_to_validate: = l_xmltype.getRootElement () |'. XSD'.

    l_xmltype: = xmltype (x_htng) .createschemabasedxml (v_schema_to_validate);

    v_property: = l_xmltype.extract('//ReadRequests/HotelReadRequest/@HotelCode').getstringval ();

    v_room: = l_xmltype.extract('//ReadRequests/HotelReadRequest/Verification/Room/@RoomID').getstringval ();

    v_id: = l_xmltype.extract('//UniqueID/@Type').getstringval ();

    -v_request_type: = l_xmltype.extract('//POS/Source/RequestorID/@Type').getstringval ();

    Dbms_output.put_line (v_schema_to_validate |) »  '|| v_property | » '|| v_room | » '|| v_request_type | »  '|| v_id);

    -dbms_output.put_line (x_htng);

    END;

    I can't get the value v_request_type: = l_xmltype.extract('//POS/Source/RequestorID/@Type').getstringval ();   

    Several bad things here.

    (1), recently said here: Re: Re: no schema definition for 'HTNG_ReadRQ' (namespace ") in parent ' / ',.

    This is not correct:

    "" xsi: schemaLocation = "http://htng.org/2014B"

    It should be:

    "" xsi: schemaLocation = "http://htng.org/2014B HTNG_ReadRQ.xsd".

    in this way, you'll extract the element name root and need to do is:

    l_xmltype: = xmltype (x_htng)

    It will be automatically based on a schema, but be aware that it is not validating the document.

    You must explicitly call schemaValidate() method to do this.

    (2) all extraction methods are deprecated.

    Use XMLTABLE:

    Select HotelCode

    RoomID

    UniqueID_Type

    RequestorID_Type

    in...

    from xmltable)

    XmlNamespaces)

    default 'http://htng.org/2014B'.

    "http://www.opentravel.org/OTA/2003/05" as "ota")

    , ' / HTNG_ReadRQ'

    passage l_xmltype

    path of HotelCode varchar2 columns (30) "ReadRequests/HotelReadRequest/@HotelCode".

    , RoomID varchar2 (30) path 'ReadRequests/HotelReadRequest/Verification/Room/@RoomID '.

    , Path of varchar2 (30) UniqueID_Type 'UniqueID/@Type '.

    , Path of varchar2 (30) RequestorID_Type 'POS/ota:Source/ota:RequestorID/@Type '.

    ) ;

  • Refactoring code

    Refactoring code hell!

    I have inhirite a Java application that was written there are millions of 15 years lines of code

    The code has many problems, including some very basic as compare using the object is. But somehow, it works, and the company continues to use it

    The problem we have is that does not support the debug code. ALL methods are very limited the number of variables. Coders wrote something like this everywhere in places

    {if (getA () .getB () .getC () .getD () .getE () .getM (). {Equals (getA () .getB () .getC () .getD () .getE () .getN ())}

    getA () .getB () .getC () .getD () .getE () .getM () .setZ (getA () .getB () .getC () .getD () .getE () .getN () .getZ ());

    }

    int NB = getA () .getB () .getC () .getD () .getE () .getM () .getList () .size ();

    for (int i = 0; i < num; i ++) {}

    getA () .getB () .getC () .getD () .getE () .getM () .getList () .get (i) .setSomething ();

    }

    It's amazing, but it's true. Some of them have more than 10 get() on the same line

    I try to refactor, addition of locals in the methods, so that we can resuse objects instead of use the get() method lines

    This will also help debugging possible code because there are a lot of recursive calls, so the style above make it virtually impossible now. Whenever something happens, it took me days to understand what is the problem

    I don't want to break the chains get(), but given that the code base is huge, I don't know if we have a few tools available.

    If someone has solved the similar problem, please give me some advice.

    Thank you very much

    What see wee in yourr example is the violation of the right of Demeters and the code smell "want to have".

    I would like to start solving these chains of the Get accessor of the right:

    Select the left end of the string, including the latest getter of object: if (getA () .getB () .getC () .getD () .getE () .getM (){.equals (getA () .getB () .getC () .getD () .getE () .getN ())})

    apply automated refactoring "extract local variable (replace all) ' of your IDE (my example is taken from the eclipse, may have a different name in others):

    M m = getA().getB().getC().getD().getE().getM();
    if(m.equals(getA().getB().getC().getD().getE().getN()){
        m.setZ(getA().getB().getC().getD().getE().getN().getZ());
    }
    int num =m.getList().size();
    for(int i = 0; i
    

    do the same at the next Get accessor string:

    M m = getA().getB().getC().getD().getE().getM();
    N n = getA().getB().getC().getD().getE().getN();
    if(m.equals(n){
        m.setZ(n.getZ());
    }
    int num =m.getList().size();
    for(int i = 0; i
    

    Select the lines after the new variable, and then use the refactoing "extract method" of your IDE:

    M m = getA().getB().getC().getD().getE().getM();
    N n = getA().getB().getC().getD().getE().getN();
    Z z = m.getZ();
    aGoodNameFrorWhatMeigthBeDoneInBusinessTerms(m,n);
    
    //later in this class
    private void aGoodNameFrorWhatMeigthBeDoneInBusinessTerms(M m, N n, Z z){
    if(m.equals(n){
        m.setZ(z);
    }
    int num =m.getList().size();
    for(int i = 0; i
    

    Then, apply the method refactoring "move" to move the new method to the class that is referenced in it:

    M m = getA().getB().getC().getD().getE().getM();
    N n = getA().getB().getC().getD().getE().getN();
    Z z = m.getZ();
    m.aGoodNameForWhatMeigthBeDoneInBusinessTerms(n, z);
    
    // in class M
    public void aGoodNameForWhatMeigthBeDoneInBusinessTerms( N n, Z z){
    if(equals(n){
      setZ(z);
    }
    int num =getList().size();
    for(int i = 0; i
    

    None of the refactorings will change the business logic (as long as you rely on the IDEs automated refactorings).

    But it meigt help you to give your code a better structure.

    also, you must create UnitTest for the new created the best code once you understand what business rules it supports.

    good luck;

    Good bye

    DPT

  • "a regular basis" to run a report form 11g

    I'm migration 6i c/s to 11g web app.

    I will have some difficulty in understanding how reports work now:

    In 6i, I used to code calls with run_report_object or even run_product built-ins, and the report went straight to the user's screen or printer.

    (Now I have seen that you can not send it directly to the printer, but we can live with that).

    Now I use the solutions I've read discussions like this:

    https://community.Oracle.com/thread/2184172

    My work is as follows:

    PROCEDURE Pf_Run_Report_Object (p_report_id REPORT_OBJECT) IS
    
      l_report_server varchar2(100);
      l_rep_out   VARCHAR2(100); 
      l_report_job_id VARCHAR2(100);
      l_report_status varchar2(100);
      l_wait date := sysdate + (5/1440);
      Begin
       tool_env.getvar('REPORTS_SERVER_NAME', l_report_server);
       IF l_report_server IS NULL THEN
        Raise Form_Trigger_Failure;
       END IF;
    
    
       Set_report_object_property(p_report_id, REPORT_SERVER, l_report_server);
    
      Set_Application_Property(CURSOR_STYLE, 'BUSY');
      l_rep_out := RUN_REPORT_OBJECT(p_report_id); 
    
      l_report_job_id := Substr(l_rep_out, instr(l_rep_out,'_',-1)+1);
    
      l_report_status := REPORT_OBJECT_STATUS(l_rep_out);
    
      WHILE sysdate < l_wait AND l_report_status IN ('RUNNING','OPENING_REPORT','ENQUEUED') 
      LOOP
           l_report_status := REPORT_OBJECT_STATUS(l_rep_out);
      END LOOP;
    
    
      IF l_report_status = 'FINISHED' THEN
      WEB.SHOW_DOCUMENT('/reports/rwservlet/getjobid='||l_report_job_id||'?server='|| l_report_server,'_blank');
      ELSE
      MESSAGE('Report error: '||l_report_status);
      END IF;
    
      Set_Application_Property(CURSOR_STYLE, 'DEFAULT');
    
      End Pf_Run_Report_Object;
    

    All hardcoded that names of statutes and the property url... seem like a bug ticking. Also the loop 5 min... Don't like.

    It works... but it seems so crappy that I can't believe this is the usual way to simply run a report:

    How do you call a report in form 11g?

    I would recommend that you start here:

    http://www.Oracle.com/technetwork/Developer-Tools/Forms/documentation/integrating-forms11g-and-reports11g-1905204.PDF

    Here's what happens:

    1. your forms application requests that a report (rdf, rep, etc.) is executed. (Running is not identical to present)

    2. once the report is run and the data has been retrieved, the output is stored on the file system of the server in the format that you define (html, pdf, etc.)

    3. your Forms application can now retrieve the complete report when desired using the JobID reports.  WEB. SHOW_DOCUMENT is most often used, but other extraction methods are possible.

    As to why you coded a timer in the code, I can't speak for it, but you don't need.  Yet once again, refer to the doc above and it will explain how to launch and retrieve a report.

  • How to get the Date format for a specific date?

    May be it is inept to ask, but I'm aware of the Date.
    which appear on client - it's just that the average customer treats the date.
    Right?
    So what happens if a need to check the format to set the server to date.
    Or need to write common code indicating the date format
    on the server, it is running.

    This requirement came into my mind while using the extract method.
    Actually, I wanted to date of manipulation of the side back end.
    Let's say the time is 04:12:2012 03:05:16.
    Now, if I add 100 minutes, the result will be.
    04:12:2012 04:45:16.

    It's the requirement. Maybe there may be best way to do
    but it's the way I think now.

    Thank you.

    It's something that you don't need to know:
    you have a string containing a date or timestamp, and then he must know the format of this string and not the fornat date used by the server.
    or you have a date or timestamp, and then you can add minutes to it without knowing the format as described before.

  • How to create a search field to search for keywords in the XML through AS3 file?

    Hello world.

    I am trying to create a field of research in AS3 to search for keywords in a dynamic text field of the same flash movie, where the text is loaded from an XML file.

    Kind regards

    Kartik.P

    Look in the String class and its methods, specifically the indexOf() (to find) and substr() (of extraction) methods.

  • Audio latency AS3 solution?

    Hi all

    I have a large MP3 file (about 2 minutes), I load dynamically. I can play the sound very well, except that:

    I need to play pieces of sound, IE from 2 to 5 seconds and later from 6 to 10 seconds, etc.. Using the sound.play(2 * 1000) and sound.play(6 * 1000) I really high latencies, causing the first second or so to not be played.

    I came up with a class that feeds samples to the sampledata event. Browsing the internet told me that a buffersize of 2048 will reduce latency to 30ms on average, which is fine.

    package

    {

    import flash.events.SampleDataEvent;

    import flash.media.Sound;

    import flash.media.SoundChannel;

    import flash.utils.ByteArray;


    public class PlaySound

    {

    private var _sound:Sound = new Sound();

    private var _originalSound:Sound = new Sound();

    private var _samples:ByteArray;

    private var _startTime:Number;

    private var _endTime:Number;

    private var _position:Number;

    private var _bufferSize:int = 2048;

    private var _soundChannel:SoundChannel;

        

    public function {PlaySound(sound:Sound):void}

    _originalSound = a;

         }


    public void play (startTime:Number, endTime:Number):void { }

    _startTime = startTime * 1000;

    _position = _startTime;

    _endTime = endTime * 1000;

    _sound.addEventListener(SampleDataEvent.SAMPLE_DATA,onSampleDataEvent);

    _soundChannel = _sound.play (_startTime);

         }


    public function stop():void {}

    If (_soundChannel! = null) { }

    _sound.removeEventListener(SampleDataEvent.SAMPLE_DATA,onSampleDataEvent);

    _soundChannel.stop ();

    _soundChannel = null;

              }

    }


    public void onSampleDataEvent(event:SampleDataEvent):void {}

    var bytes: ByteArray = new ByteArray();

    var len:int = _originalSound.extract (bytes, _bufferSize, event.position);

    event.data.writeBytes (bytes);

              _position += len;

         }

    }

    }

    So I spend the (big) mp3 original sound in the constructor and then use this noise to feed the _sound who plays.

    (1) does it matter what are the original specifications of MP3 sound, or must they be 44 kHz/128 Kbps? When I use the sound.extract method, flash converts spec another 44 kHz/128 kbit/s or * must * I also pass in a mp3 player with the same features?
    I wish I could load an original mp3 with any record and therefore consume less bandwidth.

    (2) I can't convert the start/end time of the right position on the right position in the bytearray stream. Does anyone have a solution? How is it calculated? (Even if the original sound is not 44 kHz/128 kbit/s)?

    If someone has another solution to play the pieces on a bigger file mp3 without latency, please tell me

    Thank you!

    Ronaldo

    (1) according to the documentation, Flash will be resample files to these specifications, if they do not already exist. I have weirdness with bit depths that are not powers of two, but that might have been something in my code.

    (2) basically you just multiply by the sampling rate to get the shift of position. He is always 44100, as extraction converts the sampling frequency. So if your MP3 is 60 seconds and you want to extract the mid-point, the offset would be 30 * 44100.

    There will always be a latency, but you can calculate and make adjustments to offset according to the needs.

Maybe you are looking for