Diffference between reading from URL and reading using Sockets

Hi,
For my AJAX call, if the URL is out side my domain, then I am not able to get the js and css for that url.
what can be the other approaches to resolve this issue?
again, what is the difference between reading from URL / reading from a socket connection?
Does AJAX call through socket solve my problem??
Your input is appreciated.
Thank you,
Regards,
Chintan

Converting Between a Filename Path and a URL
Copying One File to Another

Similar Messages

  • Need to read Email from Lotusnotes and Outlook using Oracle

    Dear All,
    My database version Oracle 10.2
    I need to read Email from Lotusnotes and Outlook using Oracle.
    I have tried with below link
    http://sourceforge.net/projects/plsqlmailclient/The problem is i am getting some java error.
    Can anyone suggest me to proceed further.
    Cheers,
    San

    I am using the another function to read an email from pop3 server
    create or replace
    FUNCTION pop3 (
       username   VARCHAR2,
       PASSWORD   VARCHAR2,
       msgnum     NUMBER
       RETURN tstrings PIPELINED
    IS
       --POP3_SERVER             constant varchar2(19) := '127.0.0.1';
       pop3_server   CONSTANT VARCHAR2 (100)     := 'xxxxxx';
       pop3_port     CONSTANT NUMBER             := 110;
       --POP3_TIMEOUT            constant number := 10;
       pop3_ok       CONSTANT VARCHAR2 (10)      := '+OK';
       e_pop3_error           EXCEPTION;
       --E_READ_TIMEOUT  exception;
       --pragma exception_init( E_READ_TIMEOUT, -29276 );
       socket                 UTL_TCP.connection;
       line                   VARCHAR2 (30000);
       BYTES                  INTEGER;
       -- send a POP3 command
       -- (we expect each command to respond with a +OK)
       FUNCTION writetopop (command VARCHAR2)
          RETURN VARCHAR2
       IS
          len    INTEGER;
          resp   VARCHAR2 (30000);
       BEGIN
          len := UTL_TCP.write_line (socket, command);
          UTL_TCP.FLUSH (socket);
          -- using a hack to check the popd response
          len := UTL_TCP.read_line (socket, resp);
          IF SUBSTR (resp, 1, 3) != pop3_ok
         THEN
           RAISE e_pop3_error;
          END IF;
          RETURN (resp);
       END;
    BEGIN
    --UTL_TCP.CLOSE_CONNECTION (SOCKET);
       PIPE ROW ('pop3:' || pop3_server || ' port:' || pop3_port);
       -- Just to make sure there are no previously opened connections
       UTL_TCP.close_all_connections;
       -- open a socket connection to the POP3 server
       socket :=
          UTL_TCP.open_connection (remote_host      => pop3_server,
                                   remote_port      => pop3_port,
                                   --tx_timeout => POP3_TIMEOUT,
                                   CHARSET          => 'US7ASCII'
       -- read the server banner/response from the pop3 daemon
       PIPE ROW (UTL_TCP.get_line (socket));
       -- authenticate with the POP3 server using the USER and PASS commands
       PIPE ROW ('USER ' || username);
       PIPE ROW (writetopop ('USER ' || username));
       PIPE ROW ('PASS ' || PASSWORD);
       PIPE ROW (writetopop ('PASS ' || PASSWORD));
       -- retrieve the specific message
       PIPE ROW ('RETR ' || msgnum);
       PIPE ROW (writetopop ('RETR ' || msgnum));
       --PIPE ROW( 'LIST '||msgNum ); PIPE ROW( WriteToPop('LIST '||msgNum) );
       PIPE ROW ('*** START OF INTERNET MESSAGE BODY ***');
       LOOP
       dbms_output.put_line('entering');
          BYTES := UTL_TCP.available (socket);
         IF BYTES > 0
          THEN
             BYTES := UTL_TCP.read_line (socket, line);
             line := REPLACE (line, CHR (13) || CHR (10), '');
             -- WILL HAVE TO USE PLSQL FUNCTIONS (HAVE BOOKMARKED) TO GET THE MAIL
             -- IN THE PREFERRED FORMAT. CAN USE "REPLACE()"
             IF LENGTH (line) = 1 AND line = '.'
             THEN
                PIPE ROW ('*** END OF INTERNET MESSAGE BODY ***');
             ELSE
                PIPE ROW (line);
             end if;
         END IF;
          EXIT when length (LINE) = 1 and LINE = '.';
          -- PIPE ROW (line);
       END LOOP;
       --PIPE ROW( '*** END OF INTERNET MESSAGE BODY ***' );
       -- close connection
       PIPE ROW ('QUIT');
       PIPE ROW (writetopop ('QUIT'));
       UTL_TCP.CLOSE_CONNECTION (SOCKET);
    EXCEPTION
       WHEN e_pop3_error
       THEN
          PIPE ROW ('There are no mails !');
    END;I am getting the below output .
    21     pop3:sbssld1 port:110
    75     "+OK Lotus Notes POP3 server version Release 8.0.1 ready on SBSSLD1/SBPSS.
    47     USER [email protected]
    69     "+OK [email protected], your papers please.
    13     PASS password
    63     "+OK [email protected] has 1 message.
    6     RETR 1
    17     "+OK 1546 octets
    38     *** START OF INTERNET MESSAGE BODY ***
    9     Subject:
    48     X-KeepSent: A231D6D0:8485FE4B-65257AB1:0022E60F;
    23      type=4; name=$KeepSent
    46     To: [email protected]
    53     X-Mailer: Lotus Notes Release 8.0.1 February 07, 2008
    95     Message-ID: <[email protected]mbnpparibasfs.in>
    48     From: [email protected]
    36     Date: Fri, 9 Nov 2012 11:51:14 +0530
    90     X-MIMETrack: Serialize by POP3 Server on SBSSLD1/SBPSS(Release 8.0.1|February 07, 2008) at
    23      11/09/2012 11:51:21 AM
    17     MIME-Version: 1.0
    37     Content-type: multipart/alternative;
    68     "     Boundary="0__=EABBF022DFB16ED68f9e8a93df938690918cEABBF022DFB16ED6""
    27     Content-Disposition: inline
    (null)     (null)
    58     --0__=EABBF022DFB16ED68f9e8a93df938690918cEABBF022DFB16ED6
    39     Content-type: text/plain; charset=UTF-8
    33     Content-transfer-encoding: base64
    (null)     (null)
    (null)     (null)
    76     DQoNCg0KUmVnYXJkcywNClNoYW5tdWdhbSBOYXRhcmFqYW4uDQpNb2IgOiA5NjI5MjUyNDI1DQpP
    76     ZmYgOiAwNDQgMjI1MDQ3MDAgRXh0biA0Nzc5DQoNCiB+SWYgdGhlIGZhY3RzIGRvbuKAmXQgZml0
    68     IHRoZSB0aGVvcnksIGNoYW5nZSB0aGUgZmFjdHMu4oCdIC0gQWxiZXJ0IEVpbnN0ZWlu
    (null)     (null)
    58     --0__=EABBF022DFB16ED68f9e8a93df938690918cEABBF022DFB16ED6
    38     Content-type: text/html; charset=UTF-8
    27     Content-Disposition: inline
    33     Content-transfer-encoding: base64
    (null)     (null)
    76     PGh0bWw+PGJvZHk+DQo8cD5SZWdhcmRzLDxicj4NClNoYW5tdWdhbSBOYXRhcmFqYW4uPGJyPg0K
    76     TW9iIDogOTYyOTI1MjQyNTxicj4NCk9mZiA6IDA0NCAyMjUwNDcwMCBFeHRuIDQ3Nzk8YnI+DQo8
    76     YnI+DQogfklmIHRoZSBmYWN0cyBkb27igJl0IGZpdCB0aGUgdGhlb3J5LCBjaGFuZ2UgdGhlIGZh
    60     Y3RzLuKAnSAtIEFsYmVydCBFaW5zdGVpbjxicj4NCjwvYm9keT48L2h0bWw+
    (null)     (null)
    60     --0__=EABBF022DFB16ED68f9e8a93df938690918cEABBF022DFB16ED6--
    (null)     (null)
    36     *** END OF INTERNET MESSAGE BODY ***
    4     QUIT
    42     "+OK Lotus Notes POP3 server signing off.
    "Now pls suggest me how can i store the sender mail id, receiver mail id, subject and body of the mail in a table.
    So that i can display the saved data in the above table as a mail in my separate application.
    Thanks in advance.
    Cheers,
    San

  • Difference between Web Service URL and Report Manager URL

    What is the difference between Web Service URL and Report Manager URL in Reporting Service configuration manager in SQl Server 2008 Reporting Setrvices

    Another way to put it is the Web Service URL is just that, its used for services that are connecting to issue API calls.  The Report Manager URL is the nice GUI that users should use.  If you click the links, you should see the difference.  I
    am sure you have likely done that, but functionally one is for programmatic purposes and the other to be the front end graphical user interface.
    Sometimes pictures help as well...
    http://bretstateham.com/reporting-services-architecture-diagram%E2%80%A6/

  • How to get rid of /j2ee prefix from URL when I use the OC4J via Oracle HTTP server

    In 9iAS 9.0.2 Oracle HTTP Server (OHS) is pre-configured to assign requests to the Home OC4J instance via the URL-prefix "/j2ee"/
    For example, the TEST servlet under OC4J would be passed through OHS using:
    http://urmachine:urApachePort/j2ee/TEST
    whereas in the standlone OC4J version, this URL works:
    http://urmachine:urOC4JPort/TEST
    How to get rid of /j2ee prefix from URL when I use the OC4J via Oracle HTTP Server?

    It is getting the url prefix from mod_oc4j.conf
    under /ora9ias/Apache/Apache/conf
    You can read more on this at
    http://otn.oracle.com/docs/products/ias/doc_library/90200doc_otn/web.902/a92173/confmods.htm#1008977
    -Prasad

  • Communication between Windows 7 and Windows 8(and above) using Sockets(TCP and UDP)

    I need to use TCP and UDP using Sockets to communicate between two(or more) applications installed in Windows 7 and Windows 8.
    Is it possible.? I tried within a LAN, but in vain. If needed I would post the appropriate code.
    Note: I only tried running exe(s) in these machines and not with installation.

    Hello Prabodh.Minz,
    >>Is it possible.?
    It is not clear what develop language you are using, here are examples which uses the C# based on .NET. It created the communition between two machines by using sockets with TCP protocol, a server and a client:
    Synchronous example:
    Client and
    Server.
    Asynchronous example:
    Client and
    Server.
    Multi-client per one server - socket programming in .net(C#)
    >>Note: I only tried running exe(s) in these machines and not with installation.
    There are all .exe.
    Regards.
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • I already have an iPhone with Verizon, my upgrade isn't until next June 2014. Can I buy the iPhone 5s from Apple and still use it with verizon?

    I dropped my phone in some water and I don't have apple care. It's been about a week and I'd rather put the money into fixing my iPhone 4 to an iPhone 5s. But I'm not sure if I can just buy the phone from Apple and still use it with verizon. Can someone help?

    Yes, Apple will sell you an iPhone you can use with Verizon.

  • To fetch from CDHDR and CDPOS using FM CHANGEDOCUMENT_READ_RANGES

    Hi all,
    Please let me know how to fetch the Details from  CDHDR and CDPOS using Function Module  CHANGEDOCUMENT_READ_RANGES. If possible Clear me with an Example. It has to fetch the datas of Table KNVV
    KNV1 etcc.... Separately for the Corresponding Table Selected In Report..
    With regards,
    Sudhakar Govndaraj.

    Hi Sudhakar,
    cdhdr-objectclas = 'MATERIAL'.
      cdhdr-objectid   = t_mara-matnr.
      CALL FUNCTION 'CHANGEDOCUMENT_READ_HEADERS'
        EXPORTING
          date_of_change    = cdhdr-udate
          objectclass       = cdhdr-objectclas
          objectid          = cdhdr-objectid
          time_of_change    = cdhdr-utime
          username          = cdhdr-username
        TABLES
          i_cdhdr           = icdhdr
        EXCEPTIONS
          no_position_found = 1
          OTHERS            = 2.
      CHECK sy-subrc EQ 0.
      DELETE icdhdr WHERE change_ind EQ 'I'.
      CHECK NOT icdhdr[] IS INITIAL.
      LOOP AT icdhdr.
        CHECK icdhdr-udate IN period.
        CHECK icdhdr-username IN name.
        CALL FUNCTION 'CHANGEDOCUMENT_READ_POSITIONS'
          EXPORTING
            changenumber      = icdhdr-changenr
          IMPORTING
            header            = cdhdr
          TABLES
            editpos           = icdshw
          EXCEPTIONS
            no_position_found = 1
            OTHERS            = 2.
        CHECK sy-subrc EQ 0.
        LOOP AT icdshw.
          CHECK icdshw-text_case EQ space.
          MOVE-CORRESPONDING icdshw TO itab.
          MOVE-CORRESPONDING icdhdr TO itab.
          MOVE icdshw-tabkey+3 TO itab-matnr.
          APPEND itab.
        ENDLOOP.
      ENDLOOP.
    Please refer the blog
    /people/erwan.lebrun/blog/2007/03/09/documents-how-to-track-changes-through-abap
    Edited by: Rahul Babukuttan on Nov 26, 2010 11:38 AM

  • Read file from URL and save to FTP

    Hi,
    I have worked in java few years back, now I am out of touch. My friend asked me to create an applet program for him which he can use to download a file from remote location to his ftp server.
    For e.g.
    File
    http://www.demo.com/filename.avi
    Saved to
    ftp://username:password@ftpsite_address/foldername
    I was searching for the classes which I can use to achieve this functionality.
    To save to FTP
    URL url = new URL("ftp://username:[email protected]/folder/filename");
    URLConnection urlconnection = url.openConnection();
    long l = urlconnection.getContentLength();
    OutputStream outputstream = null;
    outputstream = urlconnection.getOutputStream();Using the above code I can get the outputstream to which I can write.
    I am now stuck here, have some doubts.
    What all classes should I use to read a file like
    http://www.demo.com/filename.avi
    I know I can use URL to open connection to URLS and then streams to read the url.
    I am interested in knowing the class which I should use to read any type of file. File can be zip/avi/rar or anything else.
    What all method of the class should I use to read the file which will support all type of files.
    Which classes should I use to write the files. The files are going to be huge in terms of size.
    I have searched everywhere but every place different classes are used.
    Any help is appreciated.

    Ok now I have started coding but facing a problem.
    [PHP]try {
         URL url = new URL("http://url_to_file/test.txt");
         URLConnection urlconnection = url.openConnection();
         long l = urlconnection.getContentLength();
         fTextArea.append("Content Length = " + l);
         BufferedReader in = new BufferedReader(new InputStreamReader(url.openStream()));
         String line;
         while ((line = in.readLine()) != null)
              fTextArea.append("\n"+line);
         in.close();
    } catch (Exception e) {
    fTextArea.append(e);
    return;
    [PHP]
    When I run this code locally it works fine but when run in browser it shows security exception
    java.security.AccessControlException: access denied (java.net.SocketPermission site:80 connect,resolve)
    What should I do to resolve this error. Sorry for being such a noob but do not have much info about this.

  • How can i remove my phone number from imessage and just use email address ?

    Hi all
    I've searched all the forums and still can't find an answer for what i need (what i think i need!)
    I have an iphone without a data plan so whenever anybody who is registered with imessage sends me a message i will not
    receive it until i am back on wifi.
    What i want to achieve is to be able to receive sms messages from imessage users when i am not on wifi and then imessages when i am back on wifi.
    My assumption is that if i can unlink my mobile number from iMessage and only have it associated with my email address that this should work, but i cannot seem to remove my phone number from imessage, in the settings > iMessage > send and receive it will allow me to un-tick the associated email addresses but my phone number is greyed out and will not allow me to untick.
    On my home Mac i can go into messages app and deselect the phone number but not on the iphone.
    One solution says to deregister my phone on https://supportprofile.apple.com/ which i have tried (i can't see how that would work anyhow as there is no phone number in that registration)
    Any advice would be greatly appreciated,
    thanks, Andy

    Regardless if using your cell phone number or your Apple ID email address, iMessage requires an internet connection via an available wi-fi network or via your carrier's cellular network. Without a data plan and no internet access with your carrier's cellular network, an iMessage addressed to your email address can be received only when your iPhone is connected to an available wi-fi network no different when an iMessage is addressed to your cell phone number.
    You cannot deselect or remove your cell phone number below you can be reached by iMessage at with iMessage on an activated iPhone. The iPhone's phone number is activated along with your Apple ID.

  • I buy I phone from USA and I use this I phone in Iraq I get this message  Please insert another SIM card from a supported carrier or request that this iPhone be unlocked by your carrier so I need to solve this problem

    Dear ,
    I buied I phone from USA and I sent to  Iraq to use it there but when used it I get this message :
    The SIM card that you currently have installed in this iPhone is from a carrier that is not supported under the activation policy that is currently assigned by the activation server. This is not a hardware issue with the iPhone. Please insert another SIM card from a supported carrier or request that this iPhone be unlocked by your carrier
    so I need support to resolve this problem and  procedure  and how I can  iPhone be unlocked.
    BR,
    Ammar Jumaa

    ammarjr wrote:
    ... how I can  iPhone be unlocked.
    Sorry...  but...  ONLY the US Carrier it is Locked to can unlock it.
    You need to Contact them.
    Note:  No one here will know who that Carrier is.

  • I bought iphone 5s 32 gb from UAE and to use in Maldives, but unfortunatley I could not activate and steps followed as : - language, country (UAE- even tired many other country ) Wifi and finaly end up message "your iphone could not be activated bz server

    i bought iphone 5s from duabi and using in maldives
    but could not use, and message was " iphone could not connect server and try later,or contact your iphone support
    pls help to fix this problem

    To activate with iTunes, you'll need:
    Your iPhone
    The latest version of iTunes - Download
    Your Apple ID - What is an Apple ID?
    Just connect to your computer and iTunes will guide you through activation, as well as sync your music, video, bookmarks, and contacts.

  • I have iphone 5s bought from bahrain and am using it in india and am missing facetime in my iphone 5s please respond me asap

    I bought iphone 5s from bahrain now am using it in india and am missing facetime in my iphone 5s please respond me asap thanks

    Phones bought in Middle Eastern countries will not have FaceTime on them because it has been banned by the Governments there, so if your phone does not have FaceTime on it and you bought it in the Middle East, then there is absolutely nothing that you can do.
    Your phone will never have FaceTime on it and you can never get FaceTime on that phone.  The only thing that you can do to get FaceTime on your phone is to buy a new phone from a country that allows FaceTime.

  • Difference between Add from transaction and Add from Authorisatio default

    Hi All,
    Could anyone tell me the difference, from PFCG -> Menu -> Add from transaction and Add from Authorisatio default?
    Thanks and Regards, Pradeep

    I'm not a fan of "hiding" stuff from users so the not appearing in the menu part isn't a biggie for me.  If you do need to give background auths for something but don't want it to appear in a menu then this will let you do it without adding manual auths or changing standard object values
    Where I find it useful is that it allows you to assign & maintain indicators for stuff like Function Modules and Services.  No real business advantage other than it makes your security implementation cleaner.

  • Poor Sync between Blackberry 10 (Z10) and Goldmine using CompanionLink

    First off, I love my new Z10 and it's performance.  Blackberry is a superior business tool.
    However, for the same reasons identified in posts under syncing to Outlook, I must express astonishment that the sync function runs so poorly.
    I have over 2,900 contacts in our Goldmine CRM.  Over the years, I've used CompanionLink to sync via USB cable to my BB Curve 8310.  After the initial sync, regular daily syncs take about 2 minutes at best.  All contacts, calendar appts, to-do's, and notes transfer over to the BB.
    With my new Z10, I find that in order to sync from Goldmine, via CompanionLink, I have to use a Z10 installed program, called DejaHub.    DejaHub runs the sync from CompanionLink and Goldmine.
    However, while the sync ultimately works, it takes over 4 HOURS to complete a one-way sync from Goldmine to the Z10!!!   This is completely ridiculous and certainly not a productive use of business time.
    After speaking with CompanionLink tech support, they suggested that they are receiving many calls complaining about the LONG sync-times.  They indicated that this is a "Blackberry problem" as it's endemic to the BB10 OS.  CompanionLink suggested that for every 1,000 contacts, a sync would take over 1 hour - this is NORMAL?
    When I asked how long an iPhone takes to sync from Goldmine via CompanionLink, they said it was less than 5 minutes!!
    While I am a very loyal BB user and am rooting for the company's survival and success, I believe this is a major oversight to business customers who rely heavily on their central CRM systems.   A quick sync to my Z10 should not be a technical nightmare!
    I will struggle through this ... meaning that I can only consider syncing my Z10 once per week instead of 2-3 times per day.
    I want to know how serious Blackberry is in addressing this issue as, I'm sure, this is a deal breaker for many potential customers.
    Herb...
    Waterloo, ON

    Hey tlea,
    Welcome to the BlackBerry Support Community Forums.
    Thanks for the question.
    This is a supported feature.  Are you setup on a BlackBerry Enterprise Server?  Also have you downloaded the certificate through the browser on the BlackBerry Z10?
    I look forward to your reply.
    Cheers.
    -ViciousFerret
    Come follow your BlackBerry Technical Team on Twitter! @BlackBerryHelp
    Be sure to click Like! for those who have helped you.
    Click  Accept as Solution for posts that have solved your issue(s)!

  • How to Communicate a string between LabView 7.0 and VB using TCP/IP

    HI
    I want to know how to communicate , " by passing a string  "  between LabView 7.1  and VB 6.0  using tcp/ip . Please if anyone couild help me on this..
    Regards
    Ashish Doshi

    Ashish,
    I've got great news for you! LabVIEW has built in TCP functions. They are located in Data Communication>>Protocols>>TCP. From the LabVIEW side, I think you'll find everything you need in there. Good luck!
    Chris C
    Chris Cilino
    National Instruments
    LabVIEW Product Marketing Manager
    Certified LabVIEW Architect

Maybe you are looking for