Web service in jsp

i have a people finder web service? how can i use that in my jsp?
thanks

Generally you should read the API documentation of the webservice and then just implement it.

Similar Messages

  • Using web service in jsp

    i am designing simple jsp page in which user can request their new account. they have to fill their first name, last name and intranet id and then when they click on submit. those values will come in the bean that i have made called requestaccount.java and frm that it will have to call webservice and search whether the values matches with user values. if matches then send mail to my manager and return jsp with message" ur details has been submitted. if it fails to serach in webservice then return error messge according like details doesnt exist or first name is empty, lastname is empty or intranetid is empty. how can i call webservice in jsp? any ideas?
    thanx

    Hi,
    What did you use to write your web service? I have been using Axis2. Typically, you write a client to access your webservice using the same framework that you used to generate the service. I would recommend writing a standalone client. Once you have that code written, you can move into a servlet and then use a JSP as a front end.

  • Consuming a Web Service using JSP and servlet

    I have created a Web Service in Netbeans IDE 5.5. I developed a JSP to provide input to the Web Service, and a servlet that will pass the input to the web service through a request and outputs the result.
    I am getting the following error:
    HTTP Status 500 -
    type Exception report
    message
    description The server encountered an internal error () that prevented it from fulfilling this request.
    exception
    javax.servlet.ServletException: Servlet.init() for servlet TestServlet threw exception
    root cause
    java.lang.RuntimeException: WEB5002: Exception in handleBeforeEvent.
    root cause
    com.sun.enterprise.InjectionException: Exception attempting to inject Env-Prop: test.org.TestServlet/service@Field-Injectable Resource. Class name = test.org.TestServlet Field name=[email protected]@@@ into class test.org.TestServlet
    root cause
    javax.naming.NamingException [Root exception is java.lang.reflect.InvocationTargetException]
    root cause
    java.lang.reflect.InvocationTargetException
    root cause
    javax.xml.ws.WebServiceException: java.io.FileNotFoundException: http://localhost:8080/TestWebApplication/TestWSService?wsdl
    root cause
    java.io.FileNotFoundException: http://localhost:8080/TestWebApplication/TestWSService?wsdl
    note The full stack traces of the exception and its root causes are available in the Sun Java System Application Server Platform Edition 9.0_01 logs.
    Any hints???

    You probably should post to either the NetBeans website mailing list, or the Sun forum that supports the Sun Application Server, as the error is the result of a configuration error of one or both of these products. A file can't be found:
    java.io.FileNotFoundException: http://localhost:8080/TestWebApplication/TestWSService?wsdl
    note The full stack traces of the exception and its root causes are available in the Sun Java System Application Server Platform Edition 9.0_01 logs.
    These forums are for support of the Java language.

  • Consuming a Web Service in JSP

    Hi All,
    I have exposed a BAPI as a web service using the material available on SDN, I had searched a lot but I am not able to find a satisfactory material which guides about how to consume this web service in a JSP page, can somebody help me in this regard.
    Regards
    Sid

    Hai,
    Create a new project of type web services under that select deployable proxy.
    right click on the project new client proxy definition for the web service .
    use that generated proxy classes in your jsp.
    http://help.sap.com/saphelp_nw2004s/helpdata/en/d6/f9bc3d52f39d33e10000000a11405a/frameset.htm
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/c2188ae5-0601-0010-dd93-c23e381ef41e
    otherwise
    /people/abhijeet.jangam/blog/2006/05/27/developing-single-document-wsdl-to-schedule-a-web-service
    regards,
    null
    Message was edited by:
            Naga Raju Meesala

  • Stub for web service in JSP

    How do i embed a scriptlet inside my JSP page for the stub of my web service? is there any examples that i can refer to?
    Thanks in advance. ;)

    Check out the 2 How To:
    9.0.4 / 10.1.2 "How to use OC4J JSP Tags for Web Services" [1].
    10.1.3 (preview) "Access J2EE 1.4 JAX-RPC Java Web Services from Web Clients" [2].
    Hope this helps,
    Eric
    [1] http://www.oracle.com/technology/sample_code/tech/java/codesnippet/webservices/wstags/index.html
    [2] http://www.oracle.com/technology/products/jdev/101/howtos/jaxrpc/java14_ws_web_clients.html

  • Web Services and JSP's

    Good afternoon
    If this is a noob question, I apologise. I have found the transition from Application programming to Web service programming hectic.
    Trying to access the following service for weather information:
    www.webservicex.net/globalweather.asmx?WSDL
    Main method source code is as follows:
    package WeatherSOAP;
    import oracle.soap.transport.http.OracleSOAPHTTPConnection;
    import org.apache.soap.encoding.soapenc.BeanSerializer;
    import org.apache.soap.encoding.SOAPMappingRegistry;
    import org.apache.soap.util.xml.QName;
    import java.util.Vector;
    import org.w3c.dom.Element;
    import java.net.URL;
    import org.apache.soap.Body;
    import org.apache.soap.Envelope;
    import org.apache.soap.messaging.Message;
    import oracle.jdeveloper.webservices.runtime.WrappedDocLiteralStub;
    public class GlobalWeatherStub extends WrappedDocLiteralStub {
    public GlobalWeatherStub() {
    m_httpConnection = new OracleSOAPHTTPConnection();
    public static void main(String[] args) {
    try {
    GlobalWeatherStub stub = new GlobalWeatherStub();
    //Input and Desired Output.
    System.out.println(stub.GetWeather("Jan Smuts" , "South Africa"));
    } catch(Exception ex) {
    ex.printStackTrace();
    public String endpoint = "http://www.webservicex.net/globalweather.asmx";
    private OracleSOAPHTTPConnection m_httpConnection = null;
    private SOAPMappingRegistry m_smr = null;
    public String GetCitiesByCountry(String CountryName) throws Exception
    public String GetWeather(String CityName, String CountryName) throws Exception
    The problem is getting the desired output:
    //Input and Desired Output.
    System.out.println(stub.GetWeather("Jan Smuts" , "South Africa"));
    into a JSP page.
    Included is the web.xml file
    And the Weather.jsp file
    Kind regards
    Toby

    hey Toby,
    If you have the stub with you & if you are obtaining the output on command prompt, getting it on jsp is straight forward.
    You need to move write a code that invokes this GlobalWeatherStub's GetWeather method. In your application server's CLASSPATH include the necessary JAR files for the application.
    <%@ page language="java"%>
    //Import Stub
    <%
    try //Instead of try/catch you can use a error page also.
    GlobalWeatherStub stub = new GlobalWeatherStub();
    String wsOutput = stub.GetWeather("Jan Smuts" , "South Africa");
    out.println("Weather : "+wsOutput);
    catch(Exception e)
    //Do whatever with the exception
    %>
    thanks,
    Sriram

  • Using Web Service from JSP

    hi all,
    i must read a html form and send these value to a web service and get return value (XML) from web service but i can't find how it has been done so i need help.
    Thanks.
    ps : my english is not too good. (i think you know this before.)
    : i'm very very tiro :)

    i must read a html form and send these value to a web
    service and get return value (XML) from web serviceHi,
    Check out Jakarta AXIS to create Web services and clients.
    http://ws.apache.org/axis/
    Understanding your situation, I think you can.
    1. Create a web service using AXIS. Deploy this in a web application say TESTAXIS in a container say TOMCAT. "Publish" the web service.
    2. Create another web application and have a servlet read the form code. Embed the client code in the servlet and send the data to the web service.
    Bingo !!! Your job is done !!!
    Regards.

  • Re: use web service by jsp ??

    mahrshi,
    Yes, you can do it. Just make sure that all the generate stubs are also in the WEB-INF/classes. For more information on web services, [http://soalib.com|http://soalib.com] may be handy.

    mahrshi,
    Yes, you can do it. Just make sure that all the generate stubs are also in the WEB-INF/classes. For more information on web services, [http://soalib.com|http://soalib.com] may be handy.

  • Calling web service from JSP

    Can anyone help??
    I'm trying to call a webservice from within a JSP and i havent a clue how its done,
    i have my IF and Impl and Client Coded and my stubs generated and service deployed and running, but i cannot figure out how to call the service from my JSP web-app.
    Any help appreciated!

    Hi ,
    Its easy to call a WS from jsp what you can do is this. Think in manner that u will be keeping the client classes on a particular container, then in same container you can refrence the classes and can invoke service through a jsp..this works in my case.. it depends what kind of client do u want to create may be static or proxy or DII

  • (401) Unauthorized Error on Consuming Web Service

    Hi
    I consumed my web service in JSP but when I deploy the page. I get this error.
    Application error occurred during request processing.
    Details:   java.rmi.RemoteException: Service call exception; nested exception is:
         com.sap.engine.services.webservices.jaxrpc.exceptions.InvalidResponseCodeException: Invalid Response Code: (401) Unauthorized. The requested URL was:"http://xxxx.xxx:xxxxx/WS_Preview/Config1?style=document"
    Exception id: [001CC43ABAC0005F0000E0C30000672B0004A5BFC2A357D2]
    I'm following this tutorial:
    [http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/f0cf9e42-ccb0-2c10-d0a4-f5aa8a79e19a?quicklink=index&overridelayout=true|http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/f0cf9e42-ccb0-2c10-d0a4-f5aa8a79e19a?quicklink=index&overridelayout=true]
    But I skipped the part in configuring my J2EE Visual Admin tool since I don't have access to our Visual Admin. Does it have to do with my access? BTW, I don't have access in our WS Navigator also.
    Thanks.

    I can't speak for MOSS for sure, but other Microsoft services such as MapPoint used to require Digest Authentication, which isn't quite as pervasive as Basic Authentication. You should doublecheck with the MOSS administrator about the proper credentials and access. You might even try a utility like SoapUI to see if things work from a test client before trying it on the application server.

  • Error in Web Services

    hi all,
    when i am consuming the google web services in Jsp Dynpage
    i am getting the following exception:
    com.sapportals.portal.prt.service.soap.exception.PRTFault
    Exception id: 06:24_30/11/05_0038_5877050
    can anyone help on this...
    regards,
    purushothaman.
    Message was edited by: purushothaman vyasarao
    Message was edited by: purushothaman vyasarao

    hi
    firstly thanks for your reply...
    as you said i tried in webservices checker with the URL of the webservices....
    it shows the following error in the wsdl descriptor...
    java.net.ConnectException: Connection timed out: connection
    please give solution to this....
    regards,
    purushothaman.

  • Dynamic Web Service Consumption

    Hi
    I want to know if it is possible to consume a web service dynamically. Or is there any other way to consume web service in JSP without using proxies.
    I have already done consumption using deployable proxies but the way of consuming the web service is hardcoded. We have 3 landscape boxes (development box, maintenance box, production box). The problem is the URL for each WSDL in each box is different. So if we move our code from say dev box to maintenance box we have to edit our code for consumption before moving our codes. I hope there's a way to consume our web service/ WSDL dynamically.
    Thanks.

    Hello Melanie, I wanted to ask you:
    how do you do a deployable proxy in 7.3 ?
    In 7.0 I used to make a "Deployable Proxy Project", and now I don't know how to go.
    I have tried with an "Entreprise App. Project" wich in it has a "EJB project" wich also has an "Web Service Client". I don't know if Im doing it the right way.
    Thanks.

  • Consuming Web Service Without Proxy

    Hi, it is possible to consume a web service in JSP page without using any proxy (deployable or standalone)?
    Thanks.

    Thanks for the response.  Although not sure that is necessarily the 'correct' way ("Or,
    enter a PSCredential object, such as one generated by the Get-Credential cmdlet.")
    but it had no effect either way.  I get the same error.

  • How to access and display a Web Service from a WSDL in JSP or JSTL ?

    Dear All,
    We need to access a Web Service which is hosted as WSDL How to access a WSDL file from JSP or JSTL, parse and display the SOAP response in JSP page.
    Any simple example or URL as reference to an example will be useful for me.
    It seems io tags of jakarta is able to send soap message, but how to display it in JSP.
    Yours,
    Sankar.B

    Dear Sir,
    Yes. I would like to know more about the Forte and how to consume WSDL file from JSTL. The following are my querirs.
    1. How to connect the declared JNDI from a JSP page. i.e: the Datasource - ex: booksDS
    2. We connect the Tomcat server using JNDI as jdbc/scott. But, if I give jdbc/scott in JSTL as datasource={jdbc/scott}, we could not able to connect. We use the following code in a JSP page to connect the DB from a JSP page. (Its quite easy to modify, so we use the connection in a JSP page.)
    3. How to Consume a WSDL url from JSTL. Ex: If there is a URL : http://localhost/ws/MathService.asmx?wsdl OR http://www.xmethods.com/test/BabelFish
    4. How to display the result. We tried via SOAP from io taglib of Jakarta, but gives us an SOAP (it also looks like xml) response. But, how to use the value from that soap response in IE client thru JSTL/JSP.
    5. Whether this JSTL tool will be available with Forte Enterprise/Community Edition. If so EE, whats the price.
    Please Reply Immediatly. We tried, trying, going to try to display a wsdl response, but not able to display in IE thru JSP/JSTL. But, weve tested the www.gotdotnet.com examples of asp.net web services, we are thru. Its quite easy it seems in .NET. But, we feel whether even there is not even one example in JSTL/ Java Web Services Dev. Pack to utilise a web service in full cycle. The example which uve given is thru servlets. We dont use servlets. Cos, its very easy to edit JSP pages, instead of compiling the serv. and using it.
    I hope ull reply for all the above queries, since ur from SUN.
    Expecting your fav. reply.
    Yours,
    Sankar.B

  • How to install eclipse and MyEclipse and use it for jsp-servlet-web service

    hi ,
    please help me to install eclipse 3.1 and How to integrate MyEclipse to do jsp-servlet programming and web services.
    please also help me to include application server like tomcat and axis and use that environment in MyEclipse ide.
    please help me.....

    At the time of installation , you can't change SID XE.
    After installation, you can add another service name
    Check following thread for more details
    Re: How to create service on Oracle 10g XE
    - Virag Sharma
    http://virag.sharma.googlepages.com
    http://viragsharma.blogspot.com

Maybe you are looking for

  • Can't download Podcasts.

    I am having a problem with the Podcast pages on iTunes via my iPod Touch. I press on 'iTunes' and then 'Podcasts' and can search & scroll through the lists of Podcasts but when I press on one the screen goes black and returns to the iPod Touch Home S

  • DVDs & CDs won't mount on my Macbook.

    I have a 2008 Macbook that will no longer play DVDs or CDs. When the disc is inserted, the drive makes some funny noises (more than just the usual crunching sound and whirring) then after about 10 seconds the disc is ejected. I have tried several dif

  • How can I delete the gap tool from the tools panel?

    I find it useless and I want the type tool where it has always been. I'd like the pallets to be layed out like indsign CS3. Thank You.

  • STL file in Web Documents

    Hi,        I am able to display 3D files of type STL inside DMS in R/3 and also inside cFolders. But when I try to display using Web Documents I am getting an error. Any setting needs to be done in the backend in order to display 3D files of type stl

  • Report instances disappearing after import

    Hi, we are trying to import a Deski report from XI R2 to XI 3.1 that has 58 historical instances as well as 1 recurring instance. The Import Wizard reports a successful import and then the report is viewable in the folders of the CMC in the 3.1 syste