Retrieving a gif from a URL

hello,
I need help on this topics. I don't know how to start... What I want to do is to connect to a url of the form "http://www.someplace.com/image/pic.gif" and save the file pic.gif to my harddisk.
Here how I started up:
package cartoonextractor;
import java.io.*;
import java.util.*;
import java.net.*;
public class Extractor {
  private final static String imageUrl = "www.someplace.com";
  private Socket connection;  //Our communication Socket
  private DataInputStream input;   //The input Stream from the Socket
  private DataOutputStream output; //The output stream from the Socket
  public Extractor() {
    byte bArrData[] = new byte[1000];
    String filepath = "/image/pic.gifgif";
    URL fileUrl = new URL("http", imageUrl, filepath);
    //The input stream from the url...
    input = new DataInputStream(fileUrl.openStream());
    //The file output stream
    FileWriter output = new FileWriter("pic.gif");
    //Now read from the URL until the end of the file and write what was read
    //to the file using the FileWriter
    int i = 0;
    while ( (i=input.read(bArrData)) !=-1){
      output.write(bArrData);
    //Close the Stream and the Socket
    output.close();
    input.close();
  public static void main(String[] args) {
    Extractor extractor1 = new Extractor();
}When compile I get the following error: "Extractor.java": Error #: 300 : method write(byte[]) not found in class java.io.FileWriter at line 36, column 14
Now I know what the error mean and why it says that, but what should I use for retrieving a datafile (later on I will need to retrieve other kind of data file.. such as zip, etc...) and writing it to my local disk?
I check DataOutputStream, but it's only for Java primitive type...
I you anybody could tell me how, or put a link for somekind of tutorial on the subject I would really apreciate it.
Thanks

You seem to be a little confused
URL url = yourURL; // whatever you want
URLConnection conn = url.openConnection();
byte[] buf;
buf = new byte[conn.getLength()];
int spot=0;
InputStream in = conn.getInputStream();
while (spot!=buf.length) {
buf[spot++] = in.read();
in.read(buf,spot,in.available());
Then print the buf[] array to a file using a fileoutputstream, which takes byte data.
DO NOT use a reader or writer. These will convert your 8 bit bytes into 7 bit characters.

Similar Messages

  • Retrieving Posted Data in a URL

    I am trying to retrieve data that a third-party vendor is posting to a URL that I supply. I think that I need to use "utl_http.request_pieces(url)" to retrieve the data, but I get "SIGNATURE (parameter names) MISMATCH VARIABLES IN FORM NOT IN PROCEDURE: NON-DEFAULT VARIABLES IN PROCEDURE NOT IN FORM:.." when I printout the contents of the table. Is this error from my retrieval of the url contents or from the third-party vendor's post to the url? Am I doing something wrong? Is this the correct procedure to use to retrieve posted data from a URL that is not passed as parameters?
    Any help would be appreciated.
    Thank you.

    The reason I used deep linking was that was the only way that I could access the variables that were being sent from the first file. It took me most of the day finding a solution that would work! Is there a better way to capture the variables when I link to a file?
    Here's what works for me in the file I've connetced to (the critical line is:  userName=o.connectionPw;):
    import mx.managers.BrowserManager;
    import mx.managers.IBrowserManager;
    import mx.utils.URLUtil;
    private var bm:IBrowserManager;      
    public function init():void{
        bm = BrowserManager.getInstance();               
        bm.init("");
    // The following code will parse a URL that passes string parameters after the "#" sign; for example:
        var o:Object = URLUtil.stringToObject(bm.fragment);               
        userName=o.connectionPw;

  • How to retrieve query string value from the URL in my portlet

    Hi,
    When user clicks on "Advance Search", i am redirecting to page in the community. At the same i am adding some more values to the query string (to the URL).
    My URL will look like this.
    http://ctp-mc0149/portal/server.pt?space=CommunityPage&parentname=CommunityPage&parentid=0&in_hi_userid=200&cached=true&control=SetCommunity&PageID=202&CommunityID=200&searchType=2
    Now in one of my portlet in that page, i want to retrieve the query string values from the URL.
    Please help me regarding this.
    Thanks in advance.
    Thanks,
    sreekanth.

    Hi,
    Look at the following threads,
    For programmatically getting the iview properties,
    Programmatically getting iView Properties
    Also,
    Get Properties of IView Programmatically
    Permanent change of iView property programmatically
    Hope these threads help u.
    Regards
    Srinivasan T

  • How to Get Parameter Values from the URL ?

    Hi,
    I have built a calendar called cal_test. I am calling this calendar with this URL:
    http://.../pls/.../xyz.cal_test.show?p_arg_names=p_sc_id&p_arg_values=2&p_arg_names=_start_date&p_arg_values=FEB-2002
    In the 'Additional PL/SQL Code' tab of cal_test, I need to call a procedure which requires me to pass in as parameters the values of p_sc_id and startdate embedded in the URL named above. How can I retrieve these 2 values from the URL ? Any advice will be appreicated !
    Dorothy

    Hi Daniel
    The following thread might help;
    if not, you could try posting the question in Application Server » Web Dynpro Java
    Thanks
    Kenny

  • Any way to retrieve this image from my cache? When saved it only saves as a 1.7KB blank file.

    I'm trying to retrieve an image from Firefox's cache but so far have had no luck in doing so. The picture was hosted on imageshack and I had it open in a window but when I refreshed the page several hours later it was gone. I refreshed the page several more times, tried messing with the url to see if that did anything, but no luck. I haven't cleared anything on Firefox so I'm hoping there's some way I can recover it from the cache.
    I followed the instructions on this page: http://groups.google.com/group/mozilla.support.firefox/msg/73bab3fb55ac5b42
    However, when I right clicked the URL and chose "Save Link As..." it only saved a 1.7KB file that none of my photo editing programs can recognize or open. I've tried going to cache entries for other image links and saving them and when I choose Save Link As for those they save just fine, and in full size, so I'm not sure why this one won't work...I'm using Offline Mode so I'm not sure why the picture no longer being hosted online should make a difference one way or the other. I'm just hoping that my act of refreshing the page and nothing being there didn't overwrite the cache file and thus erase the cache'd image.
    So is there any hope of retrieving this picture or is it gone for good?

    Hi.
    Once the image in question is replace with another one, the old one is erased. That is to say, if you open an image, say www.domain.com/image.png, and it's a 200x200 image, then you close it, it's still on cache, and you can access it through the cache. But if the image is changed in the server, that same exact url, and you access it again, at you see a 250x200 image (just an example), then the 200x200 is gone forever.
    Your hope is that you never accessed the same URL again, so the old cache wasn't erased. If you know the url of the image, simply select offline mode (File > Work Offline, I think) and access its url. It will load the cached version and not check for the online one. Only if there is a cached version, of course.
    I hope this helps.

  • How to catch URL parameter from Portal URL in Web Dynpro iView

    Hi All,
    I have a web dynpro application running as a portal iView successfully. Now the client wants to make it internationalized with 7 languages. Currently they access the portal - and via role assignment they get to the portal tab with the wd iView. Now they want to send a parameter for the language key with the portal URL. So when they are typing in http://myportal.mydomain.com now they want to type in http://myportal.mydomain.com?sap-locale=de or so. My question is how can I catch this parameter in the WD application when it is running inside a portal iView? Is it at all possible?
    I have written a very small application which is trying to catch a URL parameter named PARAM. The code I have written is the default one as below:
    String paramValue = WDWebContextAdapter.getWebContextAdapter().getRequestParameter("PARAM");
    When I run the application standalone and add the PARAM=something in last of the URL I can catch it. But when I create an iView and while previewing it I add the same PARAM value it is coming as null all the time. Same when I add this iView to a role and show it via role assignment in protal. Please help to let me know how to achieve this. I think if I can read the parameter value from Portal URL in the WD iView - then I can set it as the default locale of the application and then show language specific file to achieve internationalization.
    Your urgent help will be highly appreciated.
    Warm Regards,
    Shubho

    Hi Shubhadip
    Even if you get the parameters, how do you internationalize your application? Are you not following the standard way as described in the following link. In this case you never need to capture any such parameter. This is done by the WD runtime automatically .
    <a href="http://help.sap.com/saphelp_erp2005/helpdata/en/f4/d95664da179b4db731e21c2e470b72/frameset.htm">Internationalization of WD projects</a>
    You can retrieve application parameters specified at the creation of iview by "adding parameters(with the same name as in iview application parameters) to the default plug of the Component Interface View of the WD application". "onDefaultPlug" method of the interface view controller you get these values as parameters, which you can save in the context node of component controller for later use.This is guaranteed to work.
    But again this is not what you want exactly. You want the user to specify the value at runtime. If you have just 7 languages, you can create 7 set of iviews with different application parameter value indicating language key, and assign to 7 different set of roles, each representing one set of users with common language.
    I hope you find a solution.
    Regards
    kk

  • How to get the web of document from the URL

    Hi All,
    Need small help here,
    I have SharePoint doc URL as below:
    http://sharepoint.com/sub1/sub2/sub3/documents/TestFile.docx
    Here, TestFile existed in document library of Subsite i.e. sub3.
    If I give above URL as input, I should be able to get "sub3" web.
    How can achieve this programmatically. Overall we should get the leaf web from the URL.
    Thanks in advance.
    Krishnasandeep

    Hi Sanny521,
    The SPSite constructor does not care when you pass in the document library and filename as part of the url. you can use the following code:
    string myFileUrl = "http://sharepoint.com/sub1/sub2/sub3/documents/TestFile.docx";
    using (SPSite site = new SPSite(myFileUrl))
    using (SPWeb web = site.OpenWeb())
    SPFile file = web.GetFile(myFileUrl);
    string webUrl = web.ServerRelativeUrl;
    You pass the full url into the SPSIte constructor, it will retrieve the site collection, then the OpenWeb call will retrieve the proper web from the already passed full url, then you can retrieve the file and the url of the SPWeb.
    Mathieu Desmarais http://www.matdesmarais.com/

  • Urgent- using adobe flash player 10 to view files from a URL (in javascript)

    Hello
    I am trying to cereate a video search engine that retrieves and then plays videos. I have decided to use adobe flash player to play the given files, howver with no luck. I am successful at actually hosting the player in my html code, however, when I provide the player with the following URL to retrieve the video frmo it, I am completely unsuccessful at getting the video to play in the player.
    http://developer.truveo.com/apps/home/index.php?method=truveo.videos.getVideos&query=id%3A 4186222390&play=1
    what am I doing wrong? this is extremely urgent that I get this donem running against a close deadline. Kindly, advise me what is the best way to play the files from such URL's after the search engnie has found them. The whole thing I am trying to acheive is playing a given searched video within my current html page. So i decided to host the player in my code.
    Please, do take some time to consider my request. Your time is greatly appreciated
    Best

    This seems to be a problem for everyone. A
    ny new downloads to fix this issue?
    Thanks,

  • RE: Polymorphism - retrieving type information from thedatabase or how

    Don,
    Ok but if I was to model a real restaurant, I would then have a head chef
    that can then delegate to other chefs. This head chef would have the
    additional task of coordinating the completion of subservient chefs. This
    does not and would not mean that the head chef is stuck (or partitioned) in
    one part of the kitchen. Further a head chef would most likely also be a
    chef so that he would be running around the kitchen using and interacting
    with different objects to get his part of the recipe completed. Then once
    all chefs have completed their part of the recipe the head chef could return
    the meal.
    I would also point out that it does not make sense to me to be talking about
    the chef and its ability to scale. I would look that the resource limited
    devices that must be used to prepare meals to see scalability. In this case
    the grill, the stove and the microwave. Scalability of the restaurant is a
    function of the amount of resource limited devices versus the number of
    process (i.e. chefs) that need to use those devices concurrently and the
    amount of time they require access to those devices. By talking about chefs
    as if they are the scalability limiting factor seems to bring us back to the
    notion that the chef is a manager object that is shared. And again I come
    back to the question, why?
    You may now think that in a real restaurant, there are only so many chefs so
    why not make it a shared service? Well in a real restaurant there are only
    so many of any object, but this is not a consideration in our restaurant
    model. In our "virtual" restaurant hiring a chef is as easy as:
    Chef = new;
    And of course chefs are of zero mass so there can be a whole lot in the
    kitchen. Now assuming the Grill, Stove and Microwave map to physical
    objects in our computing environment, then that is the limiting factor and
    are therefore partitioned. Whenever communication has to go through a
    single source, then scalability breaks down. I fear that too many people
    make shared objects and create communication bottlenecks where they simply
    don't exist. The only place your scalability bottlenecks should exist is in
    the actual resource limited objects of your computing environment. Simply
    said, if something isn't a resource limited object, then why is it shared?
    If anyone is not clear how to architect an application independently of the
    business model, then I would suggest looking at various framework products
    and reading some technical architecture white papers to get a different, and
    possibly enlightening, point of view.
    Mark Perreira
    Sage IT Partners.
    -----Original Message-----
    From: Don Nelson [mailto:[email protected]]
    Sent: Wednesday, June 17, 1998 9:04 AM
    To: Mark Perreira
    Cc: [email protected]
    Subject: RE: Polymorphism - retrieving type information from the
    database
    Mark,
    First, I completely agree about the naming. I purposely used rather
    euphamistic names for these "managers", since I see many convoluted names
    for common things in various applications. But that is a topic for another
    thread...
    Simply because there is a "manager" of some type, does not imply that it is
    chained to a particular duty. However, let's look at a real life case. In
    a large restaurant, you would rarely see a chef chopping carrots or serving
    dishes to customers. Those are the responsibilities of the sous-chef and
    the waiter. So, we see that the chef does not really follow the food
    around. Why not? Because it simply doesn't scale. When scalability isn't
    a problem, (the restaurant isn't that popular, for example) the chef has
    some lattitude to accept more responsibility, and might even get involved
    with purchasing, etc.
    In the real world, the more scalable something has to be, the narrower the
    responsibilities are for each of the participating members.
    Don
    At 12:59 AM 6/17/98 -0700, Mark Perreira wrote:
    Don,
    One thing that always baffles me is when should an Object get the moniker
    "Manager." This practice seems to tell me a couple of things about these
    objects. In general when someone makes reference to a "Manager" objectthat
    it is probably a service object and probably contains no or very little
    attribution. The question is why? If I am developing an object model why
    am I thinking about such implementation issues.
    Surely if you are trying to model cooking an egg I would not see
    "SustenancePreparationManager" in your model. Using a more common term I
    would still be alarmed to see "CookManager" in your model. What does the
    CookManager manage? Does it manage other cooks or eggs. Maybe it shouldbe
    called an EggManager, but that doesn't make sense. How about just Cook.
    There that seems like the real world. And this brings me to a problem in
    the analogy. Conjuring up managers in a model can sometimes make you missa
    container. For example, I would say that if we wanted to model the real
    world, then eggs is a specialization of ingredient that is contained by
    recipe that can be given to a cook to be prepared.
    I may have many cooks (objects) that can prepare recipes and my application
    architecture not the object model needs to deal with how to best let those
    cooks utilize the grill, stove and microwave that sits on different
    partitions on my server. My cooks can move around and when they do they
    take their ability to know how to cook with them. In the real world Iwould
    expect a cook to use the right appliance to prepare the recipe based on its
    contents. I would not chain every cook to its appliance and them make me
    responsible for giving the right cook the right recipe. This is what
    managers can cause. They cause the consumer of cooks to know which cookcan
    prepare what recipes based on where they are chained. This then makes me
    know something about cooking. And if I don't know anything about cooking I
    can only image what my egg would look like if I accidentally gave therecipe
    to the cook stationed at the microwave.
    Ok Ok, I have seen many architectures use facades to hide the fact that I
    like to chain my cooks to their appliance. But what is that. I have gone
    to restaurants and I don't know what a cook facade is. If I ask themanager
    to present the cook facade manager employee I would probably be met by the
    bouncer employee.
    So what is the answer? Well for a start keep the application architecture
    out of the model. The model should stand alone in describing the
    interactions required to satisfy use cases. Second find an architecture
    that describes a more responsibility driven design and how that design and
    can map your business object behavior to a physical implementation with
    appliances and cooking rules. And lastly, don't be so quick to chain your
    cooks to their appliances. Give them some control over where they cook
    their recipes, after all that is what they do.
    Mark Perreira
    Sage IT Partners.
    -----Original Message-----
    From: [email protected]
    [<a href="mailto:[email protected]">mailto:[email protected]]On</a> Behalf Of Don Nelson
    Sent: Tuesday, June 16, 1998 2:07 PM
    To: Nick Willson
    Cc: [email protected]
    Subject: Re: Polymorphism - retrieving type information from the
    database
    This thread is switching context a bit, but I would add one thought tothe
    idea of encapsulating behavior. One of the advantages to OO is that it
    helps us model real world behavior. In the real world, I would not askan
    invoice to stuff itself into an envelope and mail itself to its
    customer; I
    would not ask my vehicle to fuel itself or change its own oil; I wouldnot
    tell an egg carton to ask one of its eggs to fry itself. Even if these
    things were physically feasible, I could list a number of reasons why I
    still wouldn't want to do them. That is why we haveVehicleRepairManagers
    and SustenancePreparationManagers (aka, "Mechanics" and "Cooks").
    Don
    At 11:28 PM 6/15/98 -0700, Nick Willson wrote:
    Tim,
    You've had lots of good suggestions so I hope you won't mind an attempt
    at another one. The consensus seems to be for your option (1) for the
    Vehicle table, and Steve's example of a GenericConstraint (taking the
    place of your Vehicle) is probably how most people would go about
    answering your question. I don't have much to add to that, just wanted
    to offer something about where the persistence mechanism lives and how
    things look to clients that depend on it.
    Suppose for a moment you think about the Vehicle classes' persistence as
    being just one aspect of their behavior. In addition to persistence,
    you might have to implement security, or locking for concurrent access,
    or caching of vehicle objects to improve performance, and of course you
    want to calculate the vehicle tax and probably do other things with
    Vehicles too.
    You can put the persistence aspect of Vehicles into a
    PersistenceObjectManager, but then the others need somewhere too. If
    you use a bunch of Managers (one for security, one for locking...) then
    each class's behavior is scattered across these various Manager classes,
    each of which has to know about many classes. Or if you use one Manager
    class, it's going to know still more, plus you are forced to implement
    all the behavior in (or at least via) that manager's partition.
    An alternative would be to keep all the Vehicle classes' behavior
    encapsulated together, so a client always makes requests to a Vehicle,
    and the Vehicle delegates the implementation of requests to a chain of
    handler objects that hang off the vehicle object (a handler for
    security, another for persistence, and so on).
    One of the nice things about this is, the handlers can be responsible
    for going to another partition (if necessary), e.g. to perform
    persistence operations, or for more business-specific operations like
    tax calculations. And because the handlers are smart, you don't have to
    put a lot of code into service objects, the SOs can stay pretty simple.
    This isn't an approach you'll see in Express, so I hope of it's of some
    interest.
    General wrote:
    Part 1.1 Type: Plain Text (text/plain)
    Encoding: quoted-printable--
    Nick Willson
    SCAFFOLDS Consultant,
    Sage IT Partners, Inc.
    (415) 392 7243 x 373
    [email protected]
    The Leaders in Internet Enabled Enterprise Computing
    To unsubscribe, email '[email protected]' with
    'unsubscribe forte-users' as the body of the message.
    Searchable thread archive <URL:<a href=
    "http://pinehurst.sageit.com/listarchive/">http://pinehurst.sageit.com/listarchive/</a>>
    >>>
    >>>
    >>
    >>
    ============================================
    Don Nelson
    Regional Consulting Manager - Rocky Mountain Region
    Forte Software, Inc.
    Denver, CO
    Phone: 303-265-7709
    Corporate voice mail: 510-986-3810
    aka: [email protected]
    ============================================
    "When you deal with higher numbers, you need higher math." - Hobbes
    To unsubscribe, email '[email protected]' with
    'unsubscribe forte-users' as the body of the message.
    Searchable thread archive <URL:<a href=
    "http://pinehurst.sageit.com/listarchive/">http://pinehurst.sageit.com/listarchive/</a>>
    >>
    >
    To unsubscribe, email '[email protected]' with
    'unsubscribe forte-users' as the body of the message.
    Searchable thread archive <URL:<a href=
    "http://pinehurst.sageit.com/listarchive/">http://pinehurst.sageit.com/listarchive/</a>>
    >
    >
    ============================================
    Don Nelson
    Regional Consulting Manager - Rocky Mountain Region
    Forte Software, Inc.
    Denver, CO
    Phone: 303-265-7709
    Corporate voice mail: 510-986-3810
    aka: [email protected]
    ============================================
    "When you deal with higher numbers, you need higher math." - Hobbes
    To unsubscribe, email '[email protected]' with
    'unsubscribe forte-users' as the body of the message.
    Searchable thread archive <URL:<a href=
    "http://pinehurst.sageit.com/listarchive/">http://pinehurst.sageit.com/listarchive/</a>>

    Don,
    You are absolutely correct. But this is where I honestly think you are
    missing the point. While the mail program sends the mail, my mail message
    has an interface (i.e. send button) which can delegate that to the mail
    program. This makes it nice and simple for me the consumer of the mail
    program. It also means I can think of mailing by focusing on the interface
    (i.e. the button). It would suck if every time I wanted to mail something I
    had to identify the correct pop server to send it to (i.e the MailManager).
    Mailing something is the collaboration of the setup information of the mail
    program and my mail message. If I were to model this my mail object would
    indeed have a send method that could delegate to the correct mail servers.
    This is just simplicity of interface and it is a good practice in UI
    development just as it is in business model development. A simpler
    interface, I think we can all agree, provides for a better and quicker
    understanding.
    Mark Perreira
    Sage IT Partners.
    -----Original Message-----
    From: [email protected]
    [<a href="mailto:[email protected]">mailto:[email protected]]On</a> Behalf Of Don Nelson
    Sent: Thursday, June 18, 1998 9:22 AM
    To: Nick Willson
    Cc: [email protected]
    Subject: Re: Polymorphism - retrieving type information from the
    database
    Nick,
    It turns out that your message does not, indeed send itself. Your mailing
    program does that.
    Don
    At 11:54 PM 6/17/98 -0700, Nick Willson wrote:
    Hey Don,
    In the real world, no, you can't tell an invoice to put itself into anenvelope
    and mail itself. You have to know about stamps and post boxes and wherethey
    are located. But isn't it nice that in software you don't have to followthe
    real world very closely if you don't want to?
    Above the top left hand corner of this message I'm typing right now, thereis a
    send button which lets me tell the message to 'stuff itself into anenvelope
    and mail itself'. Why wouldn't you want to do that?
    Don Nelson wrote:
    This thread is switching context a bit, but I would add one thought to
    the
    idea of encapsulating behavior. One of the advantages to OO is that it
    helps us model real world behavior. In the real world, I would not askan
    invoice to stuff itself into an envelope and mail itself to its customer;I
    would not ask my vehicle to fuel itself or change its own oil; I wouldnot
    tell an egg carton to ask one of its eggs to fry itself. Even if these
    things were physically feasible, I could list a number of reasons why I
    still wouldn't want to do them. That is why we haveVehicleRepairManagers
    and SustenancePreparationManagers (aka, "Mechanics" and "Cooks").
    Don
    At 11:28 PM 6/15/98 -0700, Nick Willson wrote:
    Tim,
    You've had lots of good suggestions so I hope you won't mind an attempt
    at another one. The consensus seems to be for your option (1) for the
    Vehicle table, and Steve's example of a GenericConstraint (taking the
    place of your Vehicle) is probably how most people would go about
    answering your question. I don't have much to add to that, just wanted
    to offer something about where the persistence mechanism lives and how
    things look to clients that depend on it.
    Suppose for a moment you think about the Vehicle classes' persistence as
    being just one aspect of their behavior. In addition to persistence,
    you might have to implement security, or locking for concurrent access,
    or caching of vehicle objects to improve performance, and of course you
    want to calculate the vehicle tax and probably do other things with
    Vehicles too.
    You can put the persistence aspect of Vehicles into a
    PersistenceObjectManager, but then the others need somewhere too. If
    you use a bunch of Managers (one for security, one for locking...) then
    each class's behavior is scattered across these various Manager classes,
    each of which has to know about many classes. Or if you use one Manager
    class, it's going to know still more, plus you are forced to implement
    all the behavior in (or at least via) that manager's partition.
    An alternative would be to keep all the Vehicle classes' behavior
    encapsulated together, so a client always makes requests to a Vehicle,
    and the Vehicle delegates the implementation of requests to a chain of
    handler objects that hang off the vehicle object (a handler for
    security, another for persistence, and so on).
    One of the nice things about this is, the handlers can be responsible
    for going to another partition (if necessary), e.g. to perform
    persistence operations, or for more business-specific operations like
    tax calculations. And because the handlers are smart, you don't have to
    put a lot of code into service objects, the SOs can stay pretty simple.
    This isn't an approach you'll see in Express, so I hope of it's of some
    interest.
    General wrote:
    Part 1.1 Type: Plain Text (text/plain)
    Encoding: quoted-printable--
    Nick Willson
    SCAFFOLDS Consultant,
    Sage IT Partners, Inc.
    (415) 392 7243 x 373
    [email protected]
    The Leaders in Internet Enabled Enterprise Computing
    To unsubscribe, email '[email protected]' with
    'unsubscribe forte-users' as the body of the message.
    Searchable thread archive <URL:<a href=
    "http://pinehurst.sageit.com/listarchive/">http://pinehurst.sageit.com/listarchive/</a>>
    >>>
    >>>
    >>
    ============================================
    Don Nelson
    Regional Consulting Manager - Rocky Mountain Region
    Forte Software, Inc.
    Denver, CO
    Phone: 303-265-7709
    Corporate voice mail: 510-986-3810
    aka: [email protected]
    ============================================
    "When you deal with higher numbers, you need higher math." - Hobbes--
    Nick
    To unsubscribe, email '[email protected]' with
    'unsubscribe forte-users' as the body of the message.
    Searchable thread archive <URL:<a href="http://pinehurst.sageit.com/listarchive/">http://pinehurst.sageit.com/listarchive/</a>>
    >
    >
    ============================================
    Don Nelson
    Regional Consulting Manager - Rocky Mountain Region
    Forte Software, Inc.
    Denver, CO
    Phone: 303-265-7709
    Corporate voice mail: 510-986-3810
    aka: [email protected]
    ============================================
    "When you deal with higher numbers, you need higher math." - Hobbes
    To unsubscribe, email '[email protected]' with
    'unsubscribe forte-users' as the body of the message.
    Searchable thread archive <URL:<a href=
    "http://pinehurst.sageit.com/listarchive/">http://pinehurst.sageit.com/listarchive/</a>>
    To unsubscribe, email '[email protected]' with
    'unsubscribe forte-users' as the body of the message.
    Searchable thread archive <URL:<a href=
    "http://pinehurst.sageit.com/listarchive/">http://pinehurst.sageit.com/listarchive/</a>>

  • Inserting an image from an URL in a BLOB

    Hello all,
    As it's said in the title, I need a PL/SQL procedure to insert a image from web URL in a BLOB table column.
    How can I do that?
    Thanks in advance for your help.
    Max

    found this on the internet http://www.oracle-base.com/articles/misc/RetrievingHTMLandBinariesIntoTablesOverHTTP.php
    CREATE TABLE http_blob_test (
      id    NUMBER(10),
      url   VARCHAR2(255),
      data  BLOB,
      CONSTRAINT http_blob_test_pk PRIMARY KEY (id)
    CREATE SEQUENCE http_blob_test_seq;
    CREATE OR REPLACE PROCEDURE load_binary_from_url (p_url  IN  VARCHAR2) AS
      l_http_request   UTL_HTTP.req;
      l_http_response  UTL_HTTP.resp;
      l_blob           BLOB;
      l_raw            RAW(32767);
    BEGIN
      -- Initialize the BLOB.
      DBMS_LOB.createtemporary(l_blob, FALSE);
      -- Make a HTTP request and get the response.
      l_http_request  := UTL_HTTP.begin_request(p_url);
      l_http_response := UTL_HTTP.get_response(l_http_request);
      -- Copy the response into the BLOB.
      BEGIN
        LOOP
          UTL_HTTP.read_raw(l_http_response, l_raw, 32767);
          DBMS_LOB.writeappend (l_blob, UTL_RAW.length(l_raw), l_raw);
        END LOOP;
      EXCEPTION
        WHEN UTL_HTTP.end_of_body THEN
          UTL_HTTP.end_response(l_http_response);
      END;
      -- Insert the data into the table.
      INSERT INTO http_blob_test (id, url, data)
      VALUES (http_blob_test_seq.NEXTVAL, p_url, l_blob);
      -- Relase the resources associated with the temporary LOB.
      DBMS_LOB.freetemporary(l_blob);
    EXCEPTION
      WHEN OTHERS THEN
        UTL_HTTP.end_response(l_http_response);
        DBMS_LOB.freetemporary(l_blob);
        RAISE;
    END load_binary_from_url;
    EXEC load_binary_from_url('http://forums.oracle.com/forums/themes/english/resources/oralogo_small.gif');

  • How to retrieve CRL information from a client computer

    Is possible to retrieve CRL information from a client computer and how?
    Thanks.

    CRL's do not normally live on workstations... normally these are hosted on servers. If you want to see what server are in the local revocation list then look at the certificates mmc snap-in and look at the revoked certificate list. If you want to test
    a CRL for a certificate then export the certificate and run "Certutil -url"
    Alan Burchill (MVP)
    http://www.grouppolicy.biz
    @alanburchill

  • HT5487 So we just got a new Macbook and I also installed the apple configurator tool. I'm using it to prepare the iPads for deployment and it won't let me prepare them? It gets an error stating "retrieving iOS info from apple" then it stops and says "inte

    So we just got a new Macbook and I also installed the apple configurator tool. I'm using it to prepare the iPads for deployment and it won't let me prepare them? It gets an error stating "retrieving iOS info from apple" then it stops and says "internet error". My Internet connection is fine with the Mac-book. It shows the iPad is listed under the Prepare logo up top as 1 but under supervise none are shown. Although it does show itself in iTunes. Also the profile I created is fresh and has no errors. We have tryed nearly everything I cna think of and online forums are not giving us to much info on this error. 

    A wag at this.  A port issue?
    "Apple Push Notification network setup
    When MDM servers and iOS devices are behind a firewall, some network configuration may need to take place in order for the MDM service to function properly. To send notifications from an MDM server to Apple Push Notification service, TCP port 2195 needs to be open. To reach the feedback service, TCP port 2196 will need to be open as well. For devices connecting to the push service over Wi-Fi, TCP port 5223 should
    be open."
    http://www.google.com/url?sa=t&rct=j&q=ports%20ios%20configure%20ipad&source=web &cd=1&ved=0CC0QFjAA&url=http%3A%2F%2Fimages.apple.com%2Fipad%2Fbusiness%2Fdocs%2 FiOS_MDM.pdf&ei=5lXGUPCcJMXx0gH2wYG4BA&usg=AFQjCNFzINvs7ktT-6o6Q_l4Qk2HkpjtCA&ca d=rja
    google: ports ios configure ipad
    Try it on your home network where there isn't a lot of 'controls' -- network filtering , firewalls, etc.
    Robert

  • Want to retrieve Account information from Siebel on demand thru web service

    Hi
    i have trial account on 'Siebel on demand' and want to retrieve the information from account or any object. There is one method mentioned in the 'OnDemWebSvcs.pdf' file as 'ContactQueryPage' ,but how to used this method is not clear.
    So can any body give any pointer on this?
    Thanks
    Yash

    Hi,
    Thanks for immd reply and it is really useful for new user like me.
    I converted the wsdl file to java. Now suppose i want to fetch all the record from User object on SOD, i wrote the following code snippet but got error as Internal Error: Session is not available. Aborting Server.
    Code : In java
    private static String mstrUrl="https://secure-ausomxega.crmondemand.com/Services/Integration";
    URL wsUrl = new URL(mstrUrl);
    Default_BindingStub defaultBindingStubObject=new Default_BindingStub(wsUrl,null);
    UserLocator []listOfUser=new UserLocator[1];
    UserLocator userLocatorObject=new UserLocator();
    //String xml ="<ListOfUser><User><FirstName /><UserLastName /><LastUpdated> (>='07/28/2004 06:30:00') AND (<='07/28/2009 06:45:00')</LastUpdated></User></ListOfUser>"
    UserWS_UserQueryPage_Input("1","1",listOfUser1,"1");
    UserWS_UserQueryPage_Input userWS_UserQueryPage_InputObject=new UserWS_UserQueryPage_Input("1","1",listOfUser,"1");
    UserWS_UserQueryPage_Output userWS_UserQueryPage_OutputObject = defaultBindingStubObject.userQueryPage(userWS_UserQueryPage_InputObject);
    Can any body provide any pointer on this, how to make a query in Siebel On Demand.
    Thanks
    Yash

  • Polymorphism - retrieving type information from thedatabase

     

    Daniel,
    Yes I have always thought, that modeling the real world can lead to objects
    that are unnecessary or overly complex relationships that do exist in the
    real world but may not have to in a computing environment. Many times,
    business models could be greatly simplified if the modelers factored out
    interfaces from objects so that these interfaces could be applied based on
    need of behavior without having to always construct class hierarchies in a
    particular behavioral structure. Or they could benefit greatly by applying
    design patterns to enhance delegation. But the problem with both of these
    pieces of advice is that they assume the modeler is well versed and
    understands how to apply these concepts. Many application developments I
    come across are being done by a group of people that have never used an OO
    tool before. With an audience such as this, how are they supposed to get
    started?
    Usually they will look and analyze the real-world. This will give them a
    starting point in which to conduct dialog for building an object model. I
    think I do know how these advanced strategies I described above are applied,
    yet I always ask a customer to explain the real-world example of something
    before I attempt at understanding their model and make any attempts at
    advising changes. This assures that I and they have a better physical
    understanding of an interaction before we attempt to describe an abstract
    model of the same interaction.
    As far as sharing of business objects, it is quite routine for a company to
    have one group of IT application developers create a subsystem with business
    objects that must be SHARED by another group of IT application developers.
    The different subsystems have points of interconnect. These points can be
    at the architectural level or business object level. So I don't think this
    situation is as rare as you state. Further, I can see that the marketplace
    is pushing more for run-time object sharing and collaboration so that this
    will be the norm and not the exception.
    I agree on the importance of custom routing for performance. I think it is
    complex enough that I would stop short of telling people to spend time
    building such a scheme. I would hate to see an application miss delivery
    because the developers got too entangled in technical problems like custom
    routing. But I do happen to know of a Framework product that has this as
    one of its features. :)
    I agree 100% with you the complexity of Forte is the marrying of object and
    distributed technologies. I don't agree that frameworks cannot provide the
    answer. I look at a framework as more than just a technical solution. We
    use our framework to help divide the responsibilities between Business
    Analyst, GUI Architect, Back-end Architect, GUI Developers and Back-End
    developers. At many customers, some people play all of these roles. At
    some customers, a developer may play just the GUI Developer role until he
    can come up to speed on how to build simple views that are used to build
    more complex windows. In this way, a large problem can be broken down into
    a set of much smaller problems to help the architects manage work load and
    education of the team. Without a framework that supports this sort of
    approach, the architects of the application would have to delay development
    until boundaries could be put in place. This can be very time consuming and
    cause application rewrites if the boundaries were guessed wrong. In the
    Forte marketplace today, there are products to help people set up those
    architectural boundaries. It simply is more cost effective to buy one of
    these solutions then it is to have your team spend time on this and add risk
    to your project. In other words, architecture for a Forte development can
    be bought much more cheaply than it can be created.
    Mark Perreira
    Sage IT Partners.
    -----Original Message-----
    From: Daniel Nguyen [mailto:[email protected]]
    Sent: Sunday, June 21, 1998 7:35 AM
    To: Mark Perreira
    Cc: [email protected]
    Subject: Re: Polymorphism - retrieving type information from the
    database
    Mark,
    The battle question was only a little provocation : it seems that Forte
    people and yours don't have exactly the same point of view about the way
    that distribution should be made.
    The problem I see on modeling the real world is that the hypothesis
    seems to
    be wrong : the world will never be as static as the modeling in my point
    of
    view. The fact is that when you try to model real world you will add
    many
    concepts you don't really need for the application. Those concepts may
    change
    with time. In my own experience I have seen that if you don't have a
    real
    concrete objective, it is very easy to imagine many things which won't
    be
    usefull when the real aim will come. That's why I think that in a
    pragmatic
    point of view it is better (in a cost view that's right) to focus on a
    good
    modeling of the system you have to build. For instance, in an exotic
    currencies options system, you can imagine modeling for the Front a
    system
    without the product concepts, but only rules, because it is the real
    world.
    But when you come to the Back Office, you realize that all is managed
    through
    product concept. Then you come back to the Front modeling and break a
    lot
    of work. In the real world, the product concept does not exist, that's
    right.
    But it is a way to manage operations.
    We all speak about Business Objects (and rules) share and re-use. I
    imagine
    that it is only applicable on some specific domains where the concepts
    are
    already shared as Insurance, Banking or Risk management on shares. This
    is
    because we have common rules for all companies : some financial markets
    are
    organized with public rules and constraints for instance. So the
    difference
    between companies is only on the service and not really in the business
    foundations. But, in most cases, the differences between competitors are
    on their business, their know how.
    I have some difficulties to imagine companies with specific know how
    sharing
    it with competitors! So I imagine that shared business objects will be
    very poor.
    The problem may be that Business components will be provided by editors
    like
    Microsoft or may be Forte (with Express evolutions may be). But, the
    business of their clients is not in the job of those providers : they
    may
    have a wrong view of the business of their customers, because they don't
    have their know how.
    On routage capabilities of manager, I agree on the technical point of
    view.
    This should be inherited from a service definition from Forte or a
    technical
    component. But, I have seen (on financial markets) that you also need
    business
    routage for scalability and performance. This is unfortunatly not in
    Forte and
    may be not really in technical frameworks on the market. Just an example
    You have a financial market which is managed on several physical sites
    (let's
    take 2 sites). When everything is ok, you have one instance of a service
    on each
    site, first one managing some kind of instances (futures for instance)
    and the
    second one managing other kinds of instances (options for instance). But
    when the
    first site falls, you need (at run-time and if possible without stopping
    the market)
    to reconfigure the second service to manage all the instances (futures
    and options).
    So this is linked to business really. That's right, I base the
    reflection on a very
    specific (and experienced) case where the cost of the IT system is very
    low compared
    to the money exchanged on the system : you can imagine very specific
    solutions.
    The main problem I see today is that people have real difficulties to
    integrate
    object and distribution concepts and that Forte is to hard for Cobol or
    Visual
    Basic developpers. So those kinds of product should be more encapsulated
    and
    packaged on a push button way. The solution of making frameworks may be
    very
    short term solution, because of the cost and limitations about coverage
    of the
    clients specific objectives. Those problems come from Client/server
    architectures
    and needs, in my opinion, and NOT specifically from Forte or other
    competitors.
    Daniel Nguyen
    Freelance Forte Consultant
    Mark Perreira wrote:
    Daniel,
    I hope not. For SCAFFOLDS works only because of Forte and when I make
    someone a happy SCAFFOLDS customer then they are also a happy Forte
    customer. So if we sell more SCAFFOLDS, Forte sells moreForte. If there
    is a battle between us, I certainly don't understand why,because we are on
    the same team with the same goal.
    I have always found customer have a different role than you have pointed
    out. While I agree with the objectives, I have found most clients do
    actually try to model the real world. They do it because it is an easy
    starting point. They also do it because most OO books on the subject of
    modeling point people in that direction. So they do indeedplay the role of
    God with the business object model. But I have found thesesame customers
    unwilling to play the role of God with the architecture. Theyare either
    new to Forte and distributed object systems or they feelcomfortable with
    the architecture to be documented and supported beyond thetenure of a set
    of consultants that could come in and build such a system. In this case
    they buy a pre-defined and built architecture.
    I also agree that a Forte Service Object in and of itself can be
    problematic. But I depart where you say a manager can dothings like custom
    routing. This is exactly why I think Forte can be too difficult for too
    many people. Any custom routing scheme is not to be takenlightly in its
    impact of the overall performance and makeup of a running system. The
    manager pattern does not describe a run-time environment withthe checks and
    balances needed to make sure a custom router can perform. I have talked
    with you Daniel and have complete faith in your ability todevelop such a
    system. I would be very concerned in having just anyone try toimplement
    custom routing in manager objects without a run-time environment that
    simplifies and protects the participants from the mountain of technical
    problems that would follow.
    Mark Perreira
    Sage IT Partners.
    To unsubscribe, email '[email protected]' with
    'unsubscribe forte-users' as the body of the message.
    Searchable thread archive <URL:http://pinehurst.sageit.com/listarchive/>

  • RE: Polymorphism - retrieving type information from thedatabase

    I would disagree with your statement that either the object or data model
    must be wrong. The problem is more fundamental-trying to store objects in a
    relational database. The object and relational paradigms can be made to
    work together, but usually only by compromising tenets of one or the other
    (or both). Now granted, there are many ways of making them work
    together-and some are definitely better than others.
    CJ
    Chris Johnson
    612-594-2535 (direct)
    612-510-4077 (pager)
    -----Original Message-----
    From: Rottier, Pascal [SMTP:[email protected]]
    Sent: Monday, June 15, 1998 8:17 AM
    To: Forte Users Mailing list
    Subject: RE: Polymorphism - retrieving type information from
    the database
    > ----------
    > From: Rottier, Pascal[SMTP:[email protected]]
    > Sent: Monday, June 15, 1998 8:17:16 AM
    > To: Forte Users Mailing list
    > Subject: RE: Polymorphism - retrieving type information from
    the database
    > Auto forwarded by a Rule
    >
    This issue has already passed this mailing list a couple of
    times in the past. To put it in more general terms, you have
    different classes which you store in the same DB table.
    This is always tricky. Nine out of ten times, this means
    either your Object model or your DataBase model is wrong.
    To unsubscribe, email '[email protected]' with
    'unsubscribe forte-users' as the body of the message.
    Searchable thread archive <URL:http://pinehurst.sageit.com/listarchive/>

    This issue has already passed this mailing list a couple of
    times in the past. To put it in more general terms, you have
    different classes which you store in the same DB table.
    This is always tricky. Nine out of ten times, this means
    either your Object model or your DataBase model is wrong.
    If you can differentiate between different classes, this
    means you're dealing with different entities, which should
    be stored in different tables. What if one class has an
    attribute the other one doesn't. This would mean you have
    to add a column to the database which is filled it the row
    represends one class and is NULL if the row represends
    another class. This is not good database practice!
    Differentiating between different classes by means of
    a "type" attribute is the classic procedural approach.
    The OO approach would be to create subclasses. How-
    ever, a relational database doesn't support subclasses.
    The best way, would be to have a different table for
    each subclass. If this gives you problems with norma-
    lizing your database, you can create a table with all
    the attributes generic to vehicle, and a table for each
    subclass with only the attributes relevant to this sub-
    class and a foreign key relation to the main table. If all
    of this is not feasable, you're left with the need to find
    some mechanism to identify what kind of class a cer-
    tain row represends and then instantiate this class. The
    tree solutions you suggested all work. It doesn't really
    matter which one you chose, they're all equally dirty.
    Hope this helps,
    Pascal.
    -----Original Message-----
    From: General [SMTP:[email protected]]
    Sent: Monday 15 June 1998 12:20
    To: [email protected]
    Subject: Polymorphism - retrieving type information from the
    database
    Suppose I have a class structure containing one base class with
    several specialisations. Say, "Vehicle", with specialisations of
    "Car", "Van" and "Truck". All vehicles are persisted in the database,
    in a rolled-up table, and I want a generic retrieval mechanism, which
    fetches a vehicle based on the license plate number. (It will probably
    be a service object, which I will call a Persistent Object Manager).
    I wish to retrieve ALL vehicles, and calculate the road tax for each.
    However, cars, vans and trucks are all subject to different tax rules,
    and require a different method to calculate their road tax. To put it
    another way, there is a polymorphic method 'CalculateRoadTax' on the
    "Vehicle" class.
    Q: As each vehicle is extracted from the database, how does the rest
    of the Forte application know what type of vehicle it is?
    I am sure that others must have solved this problem before, but it is
    new to us. We have come up with the following solutions:
    (1)  Add a "sub-type" column to the "Vehicle" table. Use the type
    information to instantiate a Forte object of the correct type
    (2)  Maintain a completely separate table linking the vehicle licence
    plate to its sub-type.
    (3)  Deduce the type of the object from the pattern of null columns in
    the row.
    I think (1) is the best solution, but I'm interested to know what the
    experts say!
    Incidentally, if Express can help or hinder in this situation, I would
    be interested in that as well.
    regards,
    Tim Kimber
    EDS (UK)
    To unsubscribe, email '[email protected]' with
    'unsubscribe forte-users' as the body of the message.
    Searchable thread archive <URL:http://pinehurst.sageit.com/listarchive/>

Maybe you are looking for

  • I am looking for a app that will allow me to build and form for staff review then log it back to a main computer across mutiple users

    Please help,  The app that I need is one that firstly build and set of question into a form,  then allow other staff member to fill in the answers and then generate a report back to a centre database for review.  Also within this app if it is able to

  • Object oriented programming on PXI-System

    Greetings, i've developed some object-oriented LV classes, wich i've succesfully tested on my desktop pc. The next step would have been to test them on a PXI-controller. However, the LV 8.20 methods of object oriented programming seam to be incompati

  • Why doesn't Spotlight reveal searched item if it is inside a Desktop folder

    Scvenario: I created a folder on Desktop called Test into which I placed two Word documents and one pdf document. Then I went to Spotlight and had it search for these documents. Spotlight listed every occurrence of these items EXCEPT their presence i

  • Photoshop CS6 problems with Lion OS!

    I am a Mac user of the creator suite and have not upgraded to the Lion OS because of many reported problems with Photoshop and lightroom running under Lion. Does anyone know if CS6 and Lightoom 4 have similar problems, or has Adobe fixed them in thes

  • Running Reports

    We produce a number of reports each month (Reports 6i) and the details of the reports are stored on a database. What I want to be able to do is automatically run a job that interrogates the database to determine which reports need to be run and run t