Simple Question about a web service

Hi,
I have been playing with Java and the graphics api to build some multitouch desktop apps, but now I have a new project but don't even know where to begin.
What would be the best way to create a very simple webpage with buttons that when clicked would send a message or call a service that would then call a method in my java code running on my server?
Is Soap the way to go? Is there any simple tutorial explaining what I'd like to do? I just don't even know what to search for :/
Thanks!
Edited by: phil.harlow on Jul 13, 2009 10:22 PM

Hi Tolls,
That's exactly it. A very simple ajax page with buttons, that when clicked, send a message to my server so I can run some java code. Eg, I want to have a "hello world" button on a webpage that I view on my iphone, and when I click it, I want to see a hello world trace out on my server. To be more specific I just got a java app working on my server that will control x10 (automated lighting) via usb and I want to build a webfront to turn lights on/off.
I actually got it working using GWT, but I think the servlets are what I want to do. (I think) GWT doesn't give me full control over the page and only lets me use prebuilt js objects. Plus, I have to keep eclipse and the GWT tool thing open while the server is running.
I just setup my tomcat installation before trying GWT, do you know of any simple tutorial for starting with servlets to accomplish this simple task? I will start browsing now.
Thanks for all your help!

Similar Messages

  • Please answer the simple question about publishing Web Services!

    I have implemented my first web service GetDate, using JDeveloper.
    Could anybody tell me please how can I place now this web service on the web, on my web page?

    Dear Shay, thank you a lot!
    But it seems to me that you didn't understand my question or may be I have explained it not in the best way.
    I have done every step from this tutorial, I have deployed me web service to OC4J Server, and it works.
    What I need now, is to make this service available on my home page, which doesn't have Oracle Application Server, so that every person on the internet (even if he also doesn't have this application server installed on his computer) can use it.
    Is it possible to do so or not?

  • Question about get web service result in actionscript and convert data format

    Hi, All
    I have question about how to get dataset from web services
    and put it in tree structure. I have 2 questions about this:
    1, How can I get data correctly in actionscript?
    I have no problem to get data by
    <mx:ArrayCollection id="acFolder"
    source="{mx.utils.ArrayUtil.toArray(MyGServices.getFolder.lastResult)}"
    />
    And display in datagrid.
    But when I try to use
    public function
    handleFolderContents(event:mx.rpc.events.ResultEvent):void{
    arData=mx.utils.ArrayUtil.toArray(event.result);
    acData=new ArrayCollection(arData);
    input.text=acData.getItemAt(0).id;
    Seems I can’t get data, it always say:
    TypeError: Error #1009: Cannot access a property or method of
    a null object reference.
    2, how to convert data format
    I get data from web service and want to convert it to tree
    structure, as mention below:
    I get:
    <Array>
    <id>111</id>
    <Name>Production1</Name>
    </Array>
    <Array>
    <id>222</id>
    <Name>Production2</Name>
    </Array>
    Convert to:
    <mx:XMLList id="treeData">
    <node>
    <node label="Production1" data="111">
    <node label="Production2" data="222"/>
    </node>
    </node>
    </mx:XMLList>
    Please help me.
    Thanks.

    First, don't specify the package path in the argument
    declaration. Instead import the event object:
    import mx.rpc.events.ResultEvent;
    The docs state this emphatically.
    Second, try "lastResult", in place of "result":
    arData=mx.utils.ArrayUtil.toArray(event.lastResult); // I am
    not positive about this. I maybe recall reading that result was ok
    for the event object, but maybe not.
    Finally, why do you want to convert the xml? You certainly
    could, but it would be a manual process, recursively reading the
    existing xml nodes and building the new structure, but again, why?
    Just use a labelFunction if necessary to display the nodes as
    you wish.
    Tracy

  • Questions about SPML Web Service ( OIM 9.1 )

    I need to launch a provisioning process on a target by using a generic connector (Web Service).
    Scenario:
    ==========
    Host A is where the OIM server is installed. A generic connector is defined here.
    Host B is the target where users must be created. A webservice (axis) is installed here.
    Requirements:
    ===========
    OIM server (Host A) sends a request to WebService (Host B). The Web service receives, process and sends a response with the result to the OIM server.
    Version 9.0.3
    ==============
    On Version 9.0.3 I got the expected results but a problem appeared: there wasn't feedback error control because the web service response could'nt be processed.
    I followed the next steps:
    1º deploy axis on application server
    2º write SendWSResponse.jws including public method "doProvisioning". Copy this file to ..\server\default\deploy\axis.war\
    3º compile SendWSResponse.jws (from a browser)
    4º Create generic connector (for reconciliation and provisioning). Definition of parameters and mappings.
    Note: In 9.0.3 version only three parameters were required for Web Service Definition:
    Web Service URL=http://host:8080/axis/SendWSResponse.jws
    Operation Name = doProvisioning
    SPML-->Target ID=4201
    Version 9.1
    ==============
    On the new version, the connector definition is more complicated. Also they have added an ear-application or web service (OIMSpmlWS) related to this connector .
    The first question is:
    Is this ear-application addressed to process the reponses that are sent by the target?
    The second question is:
    Must I install the OIMSpmlWS on Host B? and if the answer is affirmative, how can I include the logic to my provisioning process.
    And the most important?
    How might the connector be configured and the webServices in this usual scenario?
    Many thanks in advance

    There is no "sample" WSDL file, there is THE WSDL file. It is located in the OIMSpmlWS.ear EAR file, in spmlws.war WAR file in the directory WEB-INF/wsdl.

  • Question about creating Web service for Xcelsius

    Has anyone successfully written a Web service in .Net C# that Xcelsius can use? I was just trying to create something simple and it will not work. I get data in my Xcelsius report, but it is all lumped into one 'cell' and the XML tags are still in there. If anyone has some sample code that does work it would be much appreciated.
    Here is what I have:
    public string getTableInfo()
    SqlDataAdapter dbadapter = null;
    DataSet returnDS = new DataSet();
    using (SqlConnection dbconn = new SqlConnection(
    "Server=SERVER;"
    + "Database=DB_NAME;"
    + "User ID=ACCOUNT;"
    + "Password=PW123;"
    + "Trusted_Connection=False;"))
    SqlCommand cmd = new SqlCommand();
    string sqlQuery = "select FIELD1, FIELD2 from TABLE";
    cmd.CommandText = sqlQuery;
    cmd.Connection = dbconn;
    dbadapter = new SqlDataAdapter(cmd);
    dbadapter.Fill(returnDS);
    return returnDS.GetXml();
    thanks!!!

    Hi Jeremy,
    This might get you closer (VB.net): VB.net code to create XML
    Regards,
    Matt

  • Question about FlyNet Web service generator

    I downloaded the 30 day free trial of Xcelsius Engage Server so I could check out the FlyNet product.  Can you not just take the compiled asmx and supporting files and drop them to a .Net Web server?  When I do this my Web service returns this error in Xcelsius:
    Error accessing CAL management service.  Please check that the service is running.
    If something needs to be configured on the .Net Web server then it will never work here since I will never be able to convince the server support area to install and maintain it.
    thanks

    Hello Jeremy,
    Web Services generated with our Web service Generator have the connection string encrypted and must be used on the machine they were generated on. You cannot just take the .asmx object etc. and place on another server.
    The Engage Server version of our product also uses CAL Licensing and checks that the Flynet CAL Licence Manager is running on the machine that the Web Service is generated on, it also requires a valid Engage Server key (the Xcelsius Engage Server key) to run.
    Hope that answers your questions. If you need any further information on Flynet Web service Generator then please contact us here at Flynet.
    E.Mail support AT Flynetviewer.com  or you can e.mail me direct.
    [http://www.flynetviewer.com/Default.aspx]
    Edited by: Ian Learmonth on Mar 24, 2009 6:49 PM

  • Question about calling Web Services with SJSC

    I am trying to call the web serivces with SJSC, I read this article Accessing WebServices(http://developers.sun.com/prodtech/javatools/jscreator/learning/tutorials/2/webservices.html
    Following the article, I successed add TravelWS.wsdl to the IDE Servers window, and I also tested getPersons method and got the result.
    After that, I did the same way to add another WSDL to the IDE Servers Window, but I got the InvocationTargetException error message when I tested the methods of this web services. I am sure the Deployment Server and Bundled Database Server are running.
    The following is the error messages I got:
    InvocationTargetException com.sun.rave.websvc.ui.ReflectionHelper.callMethodWithParams(ReflectionHelper.java:459) com.sun.rave.websvc.ui.TestWebServiceMethodDlg$MethodTask.run(TestWebServiceMethodDlg.java:1031) java.lang.Thread.run(Thread.java:595) null sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) java.lang.reflect.Method.invoke(Method.java:585) com.sun.rave.websvc.ui.ReflectionHelper.callMethodWithParams(ReflectionHelper.java:450) com.sun.rave.websvc.ui.TestWebServiceMethodDlg$MethodTask.run(TestWebServiceMethodDlg.java:1031) java.lang.Thread.run(Thread.java:595) java.lang.NullPointerException com.sun.xml.rpc.client.StreamingSender._raiseFault(StreamingSender.java:478) com.sun.xml.rpc.client.StreamingSender._send(StreamingSender.java:294) webservice.neuronwebservice.NeuronWebServiceSoap_Stub.getAvailableProjectNames(NeuronWebServiceSoap_Stub.java:609) webservice.neuronwebservice.neuronwebservice.NeuronWebServiceClient.getAvailableProjectNames(NeuronWebServiceClient.java:36) sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) java.lang.reflect.Method.invoke(Method.java:585) com.sun.rave.websvc.ui.ReflectionHelper.callMethodWithParams(ReflectionHelper.java:450) com.sun.rave.websvc.ui.TestWebServiceMethodDlg$MethodTask.run(TestWebServiceMethodDlg.java:1031) java.lang.Thread.run(Thread.java:595)
    Any helps?
    Thanks
    Message was edited by:
    King666

    I also tested the webservice from PDB. (its WSDL url is http://www.rcsb.org/pdbws/rcsbWebService?wsdl). Only method getIDStatus works. and others such as getAtomSite do not work. And I got the same error message (invocationTargetException).
    The insteresting thing is that I wrote a standalone java program and I could sucessfully call all web services method from there. It looks like something wrong with my JSC configuration.
    Can anyone give me some help?
    Thanks in advance,

  • A question about axis web service

    Does "AdminClient" command creates stubs and skeletons for my web service or do i have to do it manually by "WSDL2JAVA" command?

    Having a look into the Axis' AdminClient spec tells me AdminClient is more like a Web service console and no kind of a generic web service client.
    I would say "WSDL2JAVA" is the right thing.
    Edited by: JBStonehenge on Mar 4, 2010 3:11 PM

  • Question about XI Web Service

    Hi all
    Use soap sender adapter, we are able to expose the XI interface as web service. But we cannot find these xi web services via http://server:port/wsnavigator. And they are also not listed in http://server:port/inspection.wsil.
    Does anyone know hot to make xi web services a "normal" web services?
    Regards,
    Hui

    hi
    Check the following links. May be they can solve your problem
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/336365d3-0401-0010-9884-a651295aeaa9
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/5f3ee9d7-0901-0010-1096-f5b548ac1555
    Thanks & Regards
    Harsimran

  • I want to question about the official service at the service center of Sony.

    I want to question about the official service at the service center of Sony.
    long since I like the models and items sony. from start playstation, cameras, camcorders up, I've ever had. and a new camera that I bought two years ie compact cameras Sony Cybershot DSC H200. as of a month ago, a camera was having problems in lenses that would not close. and setting the automatic mode to move by itself. I came to the Sony Service Center in Makassar, precisely on Jl. Shop Pengayomann A5 / 05 (0411) 442340.
    operator initially said only two weeks to work on my camera. but this week has been more dau even want to go in a month tomorrow, dated July 9, no news from the service center. and I kept the call to the office service. as well as assorted reasons. there are no spare parts or technical constraints, and the last one I call to his office, he said the factory spare part is damaged. imported directly from Singapore. I think, ko new spare part it can be damaged before using that? how the quality of this Sony spare part? ugly? not good? why?
    I was disappointed with this situation, where soon it will Eid, want to return home as well to Java. but the camera has not been settled workmanship?
    nah, roughly what is the solution of the Sony plagued with this problem? please help, because he did not know to whom to complain. operator had just said: it's up to the father alone.
    once again I asked for his help. solution. if you can before Eid arrived.
    Thank you,
    AD. Rusmianto

    Hi awwee107, 
    Welcome to the Sony Community! 
    We have forwarded your query to the relevant team for their further assistance and someone from local CC will contact you.
    Thanks!
     

  • Simple question about mount and delay script

    Hello, I have a simple question about mounting volumes on start up.
    My computer wakes up auto - and then auto there are serveral applescript tasks (mount and start up programs)
    I use this script (daily) for serveral connections with external volumes I always need the connect to. ( In the script I use this code 3 times for other locations) I do this on start up.
    set Uname to "XXX"
    set Pword to "XXX"
    set someVolume to "afp://XXX.XXX.XXX.XXX/XXX/XXX
    mount volume someVolume as user name Uname with password Pword
    (same code for 2 other locations)
    When i do this on start up sometimes the script says there is no connection possible. I guess it's because on start up the connection isn't there. And 1 minute later when computer is total ready the connection is ok. When I run the script then It works. Just sometimes ( In the morning) 'It' want to connect but the script stops. When i do it manually(I run the script again) it works just fine.
    Is it possible that I need a delay? Can someone explain this?
    How would I make a delay handler for this script? Is that the best solution?
    Thanks in advance. This is something small i'm wondering about.
    Colin

    BTW, If you saved the script as an application +(and not as an application bundle)+ you could drop the script on to *Drop Script Backgrounder* (freeware).
    Then the script would run in the background, so, you wouldn't see it running in the Finder.
    <http://www.macupdate.com/info.php/id/7922/drop-script-backgrounder-x>
    Tom

  • Persistance question for conversational web services.

    I don't know if this should be posted here or on the workshop group but....
    When you create web servce that is conversational states weblogic creates a table
    that holds information about that web service. They are CG_ID, LAST_ACCESS_TIME
    , and CG_DATA.
    I assume that CG_ID is the converstation ID, LAST_ACCESS_TIME is used for timeout
    information, , but what is CG_DATA used for. I need to know if when you create
    an object inside a
    web service that supports conversation's is the column (CG_DATA) used to hold
    the internal state
    of the web service? I need to know if object persistance is handled automatically
    or if I have
    to do it myself.

    Object persistence is handled for you; all of the non-transient
    serializable state should be stored in the database.
    Tim Bounds wrote:
    I don't know if this should be posted here or on the workshop group but....
    When you create web servce that is conversational states weblogic creates a table
    that holds information about that web service. They are CG_ID, LAST_ACCESS_TIME
    , and CG_DATA.
    I assume that CG_ID is the converstation ID, LAST_ACCESS_TIME is used for timeout
    information, , but what is CG_DATA used for. I need to know if when you create
    an object inside a
    web service that supports conversation's is the column (CG_DATA) used to hold
    the internal state
    of the web service? I need to know if object persistance is handled automatically
    or if I have
    to do it myself.

  • A simple question about combo box

    Dear All,
    Just got a simple question about combo box: I have one of these selectors with labels based on filtered rows from a table.
    Is it possible to have one more label that would select all options?
    Like:
    Product A
    Product B
    Product C
    All Product
    Many thanks for your help!
    Gilles

    Hi Gilles,
    The purpose of ComboBox itself to select single option out of many.
    For your purpose, you may have to use "List Builder" which can accomodate 1 or more  to select.
    Please revert for more clarification if you need.
    With best wishes
    BaaRaa.

  • A simple question about performance!

    Hi! I have a simple question about performance. Suppouse that you have a servlet or a class with DB access, and you need to use a value several times in that page. What is best, to assign the value from say, a resultset or a request.getParameter() to a variable or to call the resultset or the request every time you need to retrieve that value? Which option uses less memory, which is faster, etc.?
    Hoping the best fou u
    Raul

    If you need more values from a db, the best is to open some connections (connection pool) and use the for accessing the db.
    To get the data only once, open the connection, get the data, store the data whereever you want: variable (class), hidden control (if you want to send from one page to another by request) and close the connection as quicky as possible.
    The advantage of the first method is that the most time consuming activity (connections opening) is done only once.

  • Newbie question to java web services....

    hi,
    I used to be a .net programmer for a few years, and am have done web services in .net.... (using IIS, of course)
    And i moved onto Java side recently - and am pretty new to tomcat / axis..etc..
    I looked at the netbeans ide tutorial, and it covered on how to create a web services and a client using the IDE - with that is with the sun app server. Since I want to stick with Tomcat (which is a servlet container, i believe), the compilation complained that the HelloWSImpl.java is not a servlet, and will not let me run the web app. I have tried the WSDP 2.0 tutorial as well, but I first got the FastSetsource.jar not found? Then I got some other classes not found..etc... so, until now - i still am not able to create a web service, and a cliet to talk back and forth.
    I have the following questions..
    1. I am confused that how come tomcat itself is already a webserver, why would people use it on top of apache http server, which is another web server?
    2. To create a web services, (I am thinking of the .net web services that i have done - that once you deploy it with IIS, and you browse to that service, if the function takes 2 parameter, there will be 2 textboxes waiting for you to put data to, then once you post - the xml response will come back...), does java allow front end interface automatically like that in .net? Or you have to code the JSP pages to include those textboxes yourself, and do a manual post to the web services address?
    3. Are there any book out there, explains how to use tomcat for webservices? I have looked thru some of the java books that talks about web services, they mainly explain what webservices are, what is xml..etc... and of course, they did talk about the differenct type of messaging format available. (JAX-RPC..etc..)
    4. In the java world - how do you use webservices? Is it the same way that i am familiar with? Like, that we have a front end gui, that it will call the web services, pass it a few param, and get the xml result back, and parse it and display / store.. it? Or that is not the correct way to consume the web services in java world?
    5. In .net - as long as i have the .net framework sdk, and a IIS - i am good to go. In java - what do i need in order to deploy a web services?? I already have tomcat / jdk / wsdp / IDE - do i have enough to create a simple ws? if so, can you show me a basic tutorial??
    based on some reading, i understand that the ws on the service side, needs an SEI implementing java.rmi.remote, and we need another class implementing this SEI. But I would really want to see more example, or downloads, where i can just download / view the whole thing all at once... I googled "java web service", "jax-rpc example"..etc.. most of the return links are from either java.sun.com, or ibm, or some other vendor's web site, explaining the architecture... I really want to look at the code, to get a better understand, what is the relationship between each of these softwares (tomcat, apache http server, axis...)
    Any suggestions??
    Thanks,
    T

    I think I can answer your Q1
    Apache is very good at serving simple HTML pages
    Tomcat is capable of serving active content
    So the two complement each other
    Or that's how I understand it.
    Steaker

Maybe you are looking for

  • Window.opener

    HI, We've got an external ITS application with a popup window to call. we called it with: var w1=window.open('', '', windowprops); w1.document.write("<html><head></head><body>Hello World</body></html>"); and it worked well. But on internal ITS it doe

  • Users and authorizations

    Hi All, I have created a report which shows users and their authorization in each object class. Now i want to the add the field values for each object related to the object class. Suppose in MM class user can only post the PO with amount between 1000

  • Data fetched from buffer or database

    Hi, How to check tin the select query the data is being fetched from buffer or database .Is there any method to trace that  or it is just the setting we are  doing while creating a table.. Pls suggest

  • How to configure Gnome 3.0?

    Hi, I just installed gnome from [testing], the first thing is that there are some conflicts in "gnome" group (for instance gnome-themes and gnome-themes-standard), but more important thing is that I have no idea how to configure it. Previously I was

  • An automated update has rendered my laptop Firefox browser unable to connect to any websites, how do I fix this issue?

    When the update for my browser took place, on 5/5/14 @ approximately 12:15 am, it rendered the browser unable to connect to any websites. It does work in safe mode, but not in regular mode. I am on an hp pavilion dv7, running windows 7. I need to res