Jsp webservice

I have written a webservice in PHP using NUSOAP. I now want to create a jsp page that uses this webservice. I am completely new to jsp. Can someone help me out here?
Thanks!!

Start with this:
http://java.sun.com/j2ee/tutorial/1_3-fcs/doc/JSPIntro.html
The best books on servlets and JSPs are Jason Hunter's O'Reilly book or Marty Hall's "Core Servlets and JSPs".
You'll need a servlet/JSP engine. Tomcat is Sun's reference implementation, and it's free:
http://jakarta.apache.org/tomcat
Once you've got servlets, JSPs, and Tomcat under your belt you'll want to make your pages look good. Learn JSTL, the Java Standard Tag Library, to do that:
http://jakarta.apache.org/taglibs
Get busy - there's a lot to learn here. - MOD

Similar Messages

  • Sending an itab to a jsp webservice

    can ne one help me with inputs for sending the data of an itab to a jsp web service .. ma R/3 is 6.20
    thanks

    Dear friend
    pls go to this link
    register your self,
    and download the white pare fromIBM
    http://whitepapers.silicon.com/0,39024759,60359572p,00.htm
    hope
    this will definatly works.
    rewards are expected.
    vivek srivastava

  • Can we support Map/HashMap in the webservice as one of internal parameters?

    Hi all,
    I have written a simple webservice. Which just prints the content of the input.
    public class ServiceClass {
         public MyVO printContents(MyVO vo) {
              System.out.println(vo.getName());
              System.out.println(vo.getParams());
              return vo;
    public class MyVO {
         private String name;
         private HashMap<String, Serializable> params;
         public String getName() {
              return name;
         public void setName(String name) {
              this.name = name;
         public HashMap<String, Serializable> getParams() {
              return params;
         public void setParams(HashMap<String, Serializable> params) {
              this.params = params;
    I am using Eclipse Java EE IDE for Web Developers.(Version: Helios Service Release 1) for generating stubs like this :
    New wizard , webservice, Selecting the server runtime (tomcat 6) and webruntime as Axis2. And clicking finish.
    It generates the project with name TestClient. And inside that 2 classes : ServiceClassCallbackHandler and ServiceClassStub.
    Once WebService is generated its also opening one JSP (WebService explorer) . In that I can see the WebService and clicking on basicwebservice it shows UI where I can input my data.
    But its not showing if I can add key/value for map.
    I am not sure how to test this?
    More importantly can I test my webservice that it prints the passed data?
    How to pass the test data to this webservice?
    Or how to pass MyVO object to the webservice?
    Thanks in advance.

    Hi Ronni
    This forum is not the right place where you can find your answer easily. To catch more answers you can try posting your question to one of the following forums:
    1. <a href="https://www.sdn.sap.com/sdn/collaboration.sdn?node=linkFnode1-1&contenttype=url&content=https%3A%2F%2Fforums.sdn.sap.com%2Fforum.jspa%3FforumID%3D41">EP Content Development Forum</a>
    2. <a href="https://www.sdn.sap.com/sdn/collaboration.sdn?node=linkFnode2-4&contenttype=url&content=https%3A%2F%2Fforums.sdn.sap.com%2Fforum.jspa%3FforumID%3D59">Java Programming Forum</a>
    *--Serdar
    Moved the post to Java Programming.
    Thanks for the post, Mark. 
    Message was edited by: Mark Finnern

  • Cannot attach a WS-Policy to Jax-RPC Web Service

    I am having trouble trying to associate a WS-Security Policy with a BEA Jax-RPC Web Service?
    I am following the following procedure to try to associate a the policy:
    http://edocs.bea.com/wls/docs100/ConsoleHelp/taskhelp/webservices/ConfigureWSPolicyFile.html
    The problem is that when I navigate on the Administration Console to
    Deployments
    => AdapterAdminService (this is the name of my application)
    => com.gateway.admin.wsdl.v10.AdminImpl (this is the name of my Web Service)
    => Configuration
    => WS-Policy
    The Web console displays a stacktrace mentioning an "IndexOutOfBoundsException" :
    Error opening /jsp/webservice/WebServiceConfigurationWebServicePoliciesForm.jsp.
    The source of this error is java.lang.IllegalArgumentException: The property you provided 'contents' of form 'deploymentPlanForm' must not be set to null. at com.bea.console.taglib.html.TableTag.registerDataSet(TableTag.java:1588) at com.bea.console.taglib.html.TreeTableTag.doRegisterDataSet(TreeTableTag.java:49) at com.bea.console.taglib.html.TableTag.doStartTag(TableTag.java:1360) at jsp_servlet._jsp._webservice.__webserviceconfigurationwebservicepoliciesform._jsp__tag9(__webserviceconfigurationwebservicepoliciesform.java:498) at jsp_servlet._jsp._webservice.__webserviceconfigurationwebservicepoliciesform._jsp__tag8(__webserviceconfigurationwebservicepoliciesform.java:459) at jsp_servlet._jsp._webservice.__webserviceconfigurationwebservicepoliciesform._jsp__tag7(__webserviceconfigurationwebservicepoliciesform.java:416) at jsp_servlet._jsp._webservice.__webserviceconfigurationwebservicepoliciesform._jspService(__webserviceconfigurationwebservicepoliciesform.java:265) at weblogic.servlet.jsp.JspBase.service(JspBase.java:34) at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:226) at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:124) at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:283) at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:175) at weblogic.servlet.internal.RequestDispatcherImpl.invokeServlet(RequestDispatcherImpl.java:528) at weblogic.servlet.internal.RequestDispatcherImpl.include(RequestDispatcherImpl.java:454) at org.apache.beehive.netui.pageflow.scoping.internal.ScopedRequestDispatcher.include(ScopedRequestDispatcher.java:119) at com.bea.netuix.servlets.controls.content.JspContent.beginRender(JspContent.java:551) at com.bea.netuix.servlets.controls.content.NetuiContent.beginRender(NetuiContent.java:363) at com.bea.netuix.nf.ControlLifecycle$7.visit(ControlLifecycle.java:483) at com.bea.netuix.nf.ControlTreeWalker.walkRecursiveRender(ControlTreeWalker.java:518) at com.bea.netuix.nf.ControlTreeWalker.walkRecursiveRender(ControlTreeWalker.java:529) at com.bea.netuix.nf.ControlTreeWalker.walkRecursiveRender(ControlTreeWalker.java:529) at com.bea.netuix.nf.ControlTreeWalker.walkRecursiveRender(ControlTreeWalker.java:529) at com.bea.netuix.nf.ControlTreeWalker.walkRecursiveRender(ControlTreeWalker.java:529) at com.bea.netuix.nf.ControlTreeWalker.walk(ControlTreeWalker.java:220) at com.bea.netuix.nf.Lifecycle.processLifecycles(Lifecycle.java:375) at com.bea.netuix.nf.Lifecycle.processLifecycles(Lifecycle.java:341) at com.bea.netuix.nf.Lifecycle.processLifecycles(Lifecycle.java:332) at com.bea.netuix.nf.Lifecycle.run(Lifecycle.java:306) at com.bea.netuix.nf.UIControl.render(UIControl.java:578) at com.bea.netuix.servlets.controls.PresentationContext.render(PresentationContext.java:482) at com.bea.netuix.servlets.util.RenderToolkit.renderChild(RenderToolkit.java:146) at com.bea.netuix.servlets.jsp.taglib.RenderChild.doStartTag(RenderChild.java:62) at jsp_servlet._framework._skeletons._default.__gridlayout._jspService(__gridlayout.java:285) at weblogic.servlet.jsp.JspBase.service(JspBase.java:34) at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:226) at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:124) at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:283) at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:175) at weblogic.servlet.internal.RequestDispatcherImpl.invokeServlet(RequestDispatcherImpl.java:528) at weblogic.servlet.internal.RequestDispatcherImpl.include(RequestDispatcherImpl.java:454) at com.bea.netuix.servlets.controls.application.laf.JspTools.renderJsp(JspTools.java:123) at com.bea.netuix.servlets.controls.application.laf.JspControlRenderer.beginRender(JspControlRenderer.java:72) at com.bea.netuix.servlets.controls.application.laf.PresentationControlRenderer.beginRender(PresentationControlRenderer.java:65) at com.bea.netuix.nf.ControlLifecycle$7.visit(ControlLifecycle.java:479) at com.bea.netuix.nf.ControlTreeWalker.walkRecursiveRender(ControlTreeWalker.java:518) at
    I have this issue with both IE7 and Firefox 2. My domain is a WLS 10.0MP1 domain and is deployed on my Windows XP laptop.
    I am generating the WS from WSDL with the following ant command:
              <wsdlc srcWsdl="${wsdl.location.path}/AdapterAdministration.wsdl"
                   destJwsDir="${gen.compiled.wsdl.dir}"
                   packagename="com.gateway.admin.wsdl.v10.server"
                   destImplDir="server_impl_example" />
    then
                   <jwsc     srcdir="${src.dir}" destdir="${dist.dir}" classpathref="project.class.path" debug="true">
                             <jws file="com/gateway/admin/wsdl/v10/AdminImpl.java"
                                  compiledWsdl="${gen.compiled.wsdl.dir}/AdapterAdministration_wsdl.jar" />
                        </jwsc>
    and finally, I deploy it with:
              <wldeploy action="deploy"
                   name="AdapterAdminService"
                   source="${dist.dir}/AdminImpl.war"
                   user="${wls.domain.user}"
                   password="${wls.domain.pwd}"
                   verbose="true"
                   stage="no"
                   upload="true"
                   adminurl="t3://${wls.domain.host}:${wls.domain.port}"
                   targets="${wls.domain.servername}" />
    Do you have any idea what might be wrong here?
    Thanks in advance,
    Svend

    Hi all,
    Some more information: I have created another very simple Jax-RPC Web Service, now using the @Policy annotation. The policy I specify is then correctly taken into account, but I still have the same symptom when I navigate to the Configuration => WS-Policy page on the Web Console (i.e., I cannot associate a WS-Policy to my WS with the Web Console)
    Beginning of the JWS file:
    @WebService(...)
    @WLHttpTransport(serviceUri = "", portName = "AdapterAdmin")
    @Binding(Binding.Type.SOAP12)
    @Policy(uri="Wssp1.2-Http-UsernameToken-Digest.xml")
    public class AdminImpl implements Admin {
    Ant task I use to build and deploy the service:
    <target name="build-service" depends="prepare">
              <mkdir dir="package"/>
              <mkdir dir="package/WEB-INF"/>
              <mkdir dir="package/WEB-INF/lib"/>
              <jwsc     
                   srcdir="${src.dir}"
                   destdir="package"
                   classpathref="project.class.path"
                   debug="true">
                   <jws
                        file="com/gateway/admin/wsdl/v10/AdminImpl.java"
                        contextpath="/AdminImpl2"
                        explode="true"
                   />
              </jwsc>
              <move todir="package/WEB-INF">
                   <fileset dir="package/com/gateway/admin/wsdl/v10/AdminImpl/WEB-INF"></fileset>
              </move>
              <move todir="package/META-INF">
                   <fileset dir="package/xsize/gateway/admin/wsdl/v10/AdminImpl/META-INF"></fileset>
              </move>
              <copy todir="package/WEB-INF/lib">
                   <fileset dir="${lib.dir}"
                                  includes="client-1.0.jar,
                                       tools.jar />
              </copy>
              <delete dir="package/com" />
              <jar destfile="${dist.dir}/simpleWS2.war" >
                   <fileset dir="package" />
              </jar>     
              <wldeploy action="deploy"
                   name="AdminService-withPolicyAnnotation"
                   source="${dist.dir}/simpleWS2.war"
                   user="weblogic"
                   password="weblogic"
                   verbose="true"
                   stage="no"
                   upload="true"
                   adminurl="t3://localhost:9001"
                   targets="AdminServer" />
         </target>
    "

  • Java Or Fortran ?

    Hello all master...i have one question. I need to build an application and it is about modeling for landslide. So i need some advice from you all. Which one between java or fortran is suitable as programming language for my project. For example software is [CHASM Software|http://chasm.info/] . Is java suitable as my project programming language ? This is because, i never learn about fortran before this and i also has some experience using java. For second question why scientist always use fortran ? Which is power between both of them ?
    Thanks. I hope someone will help me.

    carnado,
    I guess I'd be thinking FORTRAN for the engineering stuff, and Java for all the "application stuff".
    * Yes, you can produce .dll/.so's in Fortran and call them from Java via RMI. So you get the best of both worlds... speed/ease of calcs; and ease of "app development".
    * Hard core engineers still totally dig fortran, as they should. It's a specialised language which was designed to suit them to a tee. There's a massive existing investment in how to do "heaving lifting" in fortran... much of which doesn't translate. Lots of Holywood's CGI tools are still written in fortran... Hmmm... I wonder why?... Could It Be Because It Works?
    * Java is streets ahead in the "applications" space.... Swing, Servlets, JSP, WebServices... even underlying stuff like JDBC and LDAP/ActiveDirectories... and there's plenty of smart folks out there on the employment lines (more every day ;-( ) with experience in the java space.
    * I hate to admit it but C# is still way out in front for fat graphical clients.
    * The downside is that programmers who are competent in both Fortran, Java and C# are as rare as chickens lips... You'll probably be looking at a tripolar development team (who hate each other with religious passion)... trick is to find a team-leader with a bit of knowledge of all worlds, but not too much... and equip him a BIG stick, and an endless box of jelly donuts ;-)
    Cheers. Keith.

  • How to use UME API to assign user to group ?

    Hi all:
        I would like to write one jsp/ webservice to assign user to one group . Is there some example code ?
        the function can have 2 import parameter, userid, groupid, after the function is executed, the user and group is assigned
        Thanks a lot.

    Hi,
    Code is IGroupFactory     grpfact               = UMFactory.getGroupFactory();
              IUserFactory     userfact          = UMFactory.getUserFactory();
              IGroup               group               = grpfact.getGroup("GRUP.PRIVATE_DATASOURCE.un:Leave Pilot");
              IGroupFactory     grpFact               = UMFactory.getGroupFactory();
              int                nUserListSize     = strUsersList.length;
              for(int i=0;i<nUserListSize;i++)
                     IUser objUser = userfact.getUserByLogonID(strUsersList<i>);
                     grpFact.addUserToGroup(objUser.getUniqueID(),group.getUniqueID());

  • Console Error - WS-Policy - jax-ws - Ejb endpoint - WebLogic 10.3.0

    Hi,
    I've just deployed a simple webservice ( EJB stateless) and when I try to access the WS-Policy configuration page for this webservice in the adminitration console, Iv'e got the following error :
    Error opening /jsp/webservice/WebServiceConfigurationWebServicePoliciesForm.jsp.
    The source of this error is:
    java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
         at java.util.ArrayList.RangeCheck(ArrayList.java:547)
         at java.util.ArrayList.get(ArrayList.java:322)
    at com.bea.console.taglib.html.TreeTableTag.doRegisterDataSet(TreeTableTag.java:58)
         at com.bea.console.taglib.html.TableTag.doStartTag(TableTag.java:1142)
         at jsp_servlet._jsp._webservice.__webserviceconfigurationwebservicepoliciesform._jsp__tag9(__webserviceconfigurationwebservicepoliciesform.java:515)
         at jsp_servlet._jsp._webservice.__webserviceconfigurationwebservicepoliciesform._jsp__tag8(__webserviceconfigurationwebservicepoliciesform.java:474)
         at jsp_servlet._jsp._webservice.__webserviceconfigurationwebservicepoliciesform._jsp__tag7(__webserviceconfigurationwebservicepoliciesform.java:426)
         at jsp_servlet._jsp._webservice.__webserviceconfigurationwebservicepoliciesform._jspService(__webserviceconfigurationwebservicepoliciesform.java:263)
         at weblogic.servlet.jsp.JspBase.service(JspBase.java:34)
    Is it a known bug ?
    regards,
    Pascal

    Child element should be added like this at the client side.
    SOAPElement message = payload.addChildElement("Info","",targetNameSpace);

  • While Consuming a WebService in JSP Dyn Page - There is an Error

    Hi Friends,
    I have a web service created in ASP.NET web Service.
    And I have Consumed the Web Service using WSDL URL.
    I need to write a code to refer that class in the JSP DynPage
    I have created like this in DoIntialization
    MyServiceName obj=(MyServiceName) PortalRuntime.getRuntimeResources().getService(MyServiceName.KEY);
    int a = 10;
    int b = 20;
    obj.Add1(a,b);
    but it shows an error
    "The method Add1 Method(Add1 Method) is the type. MySErviceName is not Applicable for the arguements(int,int)"
    Please Help me in this regard.
    Thanks in Advance
    Thanks & Regards,
    Palani

    Hi Andy,
    I will let u know the sequence which i followed to consume the Webservice.
    NWDS --> File --> New --> Project --> Portal Application --> Create New Portal App Project.
    The Project is created.....
    After that i want to consume the Webservice for the same project...
    for that...
    NWDS --> File --> New --> Other --> Portal Application --> Create New Portal Application Object --> Selecting My Project?(intended prjct) --> Portal Webservice --> Portal Service from WSDL file - Client Side --> My WSDL URL --> Selecting the methods which i need to expose from the Webservice --> I gave unique name for my 1) Service 2) Alias 3) Package....and that was done....(other way is to add from portalapp.xml ??)
    After that i created a new JSPDyn page for my application in DoInitialization() method i tried to access the method from that webservice using the following code...
    MyServiceName obj=(MyServiceName) PortalRuntime.getRuntimeResources().getService(MyServiceName.KEY);
    I am successfully able to access the method from the webservice using the object which i have created but i am not able to pass arguments to that method...???
    I tried consuming same webservice created in .NET in .NET itself and i am able to pass arguments successfully.
    I tried to consume webservice created in ABAP in .NET and able to implement successfully...
    but the same ABAP webservice when  i tried to consume its not working with this NWDS.
    Is there any thing else i need to follow while consuming a webservice in the EP Perspectice of NWDS ???
    Deployable Proxy is required for that ?? if required how to create and use that ??
    Thanks in Advance,
    Palani

  • How to Consume a WebService in JSP DynPage

    Hi Friends,
    We have created a Web Service and We want to Consume that in my JSP Dyn Page.
    Please let me know how to consume the Web Services that are created.
    I am having a WSDL File and need to consume it in Enterprise Portal Applications.
    Thanks in Advance.
    Regards,
    Palani

    Hi Palani,
       Create a Portal Application and access the External Web Service (Say for example, http://api.google.com/GoogleSearch.wsdl ).  Create the Portal Application Object -> Portal Web Service -> Portal WebService from wsdl file -> Client Side -> Enter the Wsdl file as http://api.google.com/GoogleSearch.wsdl -> Select the methods to expose -> Enter the service name, Alias and package name should be a unique one. and finish.
    Create bean to set the values.
    In your JSPDynpage Component enter the following code:
    public void doInitialization(){
       YourServiceName obj=(YourServiceName) PortalRuntime.getRuntimeResources().getService(YourServiceName.KEY);
      MyBean beanObj = new MyBean();
      beanObj.setterMethod(obj.calltheMethodinWSDL());
    And in your JSP page, call the bean getter method.
      It's overview only, you can do it.
    Regards,
    Venkatesh. K

  • Using a .JSP file for the webservice

    Hello,
    I am using a .JSP file to view my webservice, just like in this tutorial: http://otn.oracle.com/tech/webservices/htdocs/series/news/content.html
    But when I try to run my JSP file i get this error:
    500 Internal Server Error
    OracleJSP:
    JSP Error:
    Request URI:/InternAdressen-InternAdresProj-context-root/internadres.jsp
    Exception:
    java.lang.NoClassDefFoundError: _InternAdres
         java.lang.Class java.lang.ClassLoader.defineClass0(java.lang.String, byte[], int, int, java.security.ProtectionDomain)
              native code
         java.lang.Class java.lang.ClassLoader.defineClass(java.lang.String, byte[], int, int, java.security.ProtectionDomain)
              ClassLoader.java:493
    and a lot more of errors like this. Can you help me?

    It didn't work. I still get this error:
    500 Internal Server Error
    OracleJSP:
    JSP Error:
    Request URI:/InternAdressen-InternAdresProj-context-root/internadres.jsp
    Exception:
    java.lang.NoClassDefFoundError: _InternAdres
         java.lang.Class java.lang.ClassLoader.defineClass0(java.lang.String, byte[], int, int, java.security.ProtectionDomain)
              native code
         java.lang.Class java.lang.ClassLoader.defineClass(java.lang.String, byte[], int, int, java.security.ProtectionDomain)
              ClassLoader.java:493
         java.lang.Class java.security.SecureClassLoader.defineClass(java.lang.String, byte[], int, int, java.security.CodeSource)
              SecureClassLoader.java:111
         java.lang.Class oracle.jsp.app.JspClassLoader.loadClass(java.lang.String, boolean)
              JspClassLoader.java:682
         java.lang.Class java.lang.ClassLoader.loadClass(java.lang.String)
              ClassLoader.java:255
         oracle.jsp.runtimev2.JspPageInstFacade oracle.jsp.runtimev2.JspPageInfo.getInstFacade(oracle.jsp.provider.JspClassProvider, javax.servlet.http.HttpServletRequest)
              JspPageInfo.java:160
         oracle.jsp.runtimev2.JspPageInstFacade oracle.jsp.runtimev2.JspPageTable.getInstFacade(javax.servlet.htt[i]Long postings are being truncated to ~1 kB at this time.

  • How to call webservice server application in jsp

    Hi Friends
    I followed this link http://www.eclipse.org/webtools/community/tutorials/BottomUpAxis2WebService/bu_tutorial.html and run the server and client web service application successfully. How to call the Webservice server application in JSP instead of using client (java main method) java appliaction. Is there any tutorial or code for accessing the webservice server application in jsp.
    Thanks and Regards
    Sherin Pooja

    797526 wrote:
    Hi
    I feel that JSP is just a view page.Not a feeling, it actually is :)
    So it is not good practise to write the scriplet code in JSP page. Absolutely right.
    Is there any other way to call the webservice server application in my client(JSP) page?
    What is it that you want to do? If despite all you have said, you still wish to call the webservice from a jsp, read my response above.
    You would do well to rephrase your question if there's something else that you are asking.
    ram.
    Edited by: ramp on Dec 27, 2010 12:35 PM

  • BPM process interactive activity(JSP) - external webservice method interac

    I am using Oracle BPM studio 10.3.1.0.
    I have one external web service published on glassfish application server, I have introspected it in my BPM process using its WSDL.
    Now one of my BPM process interactive activity is there, which is represented by one JSP, I am giving some input to my JSP.
    I want this input to be passed to the web service method as a parameter, and it should fetch the output, so basically I want to invoke the web service method, could you please guide me how to do it?
    Thanks & Regards
    Ashish

    Hy Ashih
    I dont know if this is best way to do that, but I have a similar situation here, and I'm using AJAX do call the webservice method by BPM and retrieve data.
    Something like this:
    1 - Create the XMLHttpRequest() object in your jsp (if you need I have the entire code)
    2 - Create the a JavaScript method for to call the OBPM method in your component
    function mymethod(arg1, arg2, arg3)
    xmlhttp.onreadystatechange=function()
                                                      if( xmlhttp.readyState==4 )
                                                           document.getElementById("AnyDIV").innerHTML = xmlhttp.responseText;
         var resp = "<f:invokeUrl var='YourComponenteName' methodName='YourMethodName'/>";
    //Incude how many args your need here
         resp+="&arg1=" + arg1;
         resp+="&arg2=" + arg2;
         resp+="&arg3=" + arg3;
         xmlhttp.open("POST",resp,true);
         xmlhttp.send(null);
    3 - You'll need a div html tag called "AnyDIV" to receive the BPM answer
    4 - On you BPM component, in YourMethodName method (needs to be ServerSide = no), create two args, the first is httpRequest type (name request), and the second is httpResponse type (name response) (fuego lib)
    5 - Type the code below in your BPM method to send info back to the JSP
    //getting the args
    String arg1 = request.getParameter(string : "arg1");
    String arg2 = request.getParameter(string : "arg2");
    String arg3     = request.getParameter(string : "arg3");
    //Do the webservice call here, prepare the html answer and put it into an string variable
    strReturn = "bla bla bla";
    //Send the anwser back to the jsp
    response.bodyTextContent(arg1 : strReturn);
    Or you can do this using xml answer and deal with the tags with javascript
    that's it

  • Consume Axis2 webservice in a JSP using Tomcat

    Hey,
    I desperately try to consume a Netbeans created Axis2 web service in a jsp.
    i am able to consume the web service in a Java test class as well as in j2me using the created stubs from WTK.
    But now I would like to consume the webservice in a jsp.
    First i tried to use the netbeans client generator (which does work out in a regular test class), As soon as i try to invoke the webservice in the jsp, i get an exception (i currently don't have access to the exact message, i will append that asap) . It stated, my part tag needed a type value (currently there's an element attribute included as i am using document style). I tried the same using a hello world class generated by netbeans using netbeans stubs...same error.
    Then I switched to java2wsdl, when using those stubs, i got another exception "axis2 webservice could not be generated".
    Then i tried using a soap call with the axis service class for preventing auto generated stubs. all of the 3 ways did work out in a java test class.
    But now i get the following exception:
    org.apache.jasper.JasperException: javax.servlet.ServletException: java.lang.NoClassDefFoundError: org.apache.commons.logging.LogFactory
    org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:522)
    org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:398)
    org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:337)
    org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
    root cause
    javax.servlet.ServletException: java.lang.NoClassDefFoundError: org.apache.commons.logging.LogFactory
    org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:850)
    org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:779)
    org.apache.jsp.test_jsp._jspService(test_jsp.java:102)
    org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
    org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:374)
    org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:337)
    org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:803).
    The thing is: i did include the common-logging.jar in the project lib and it seems to work out smoothly when compiling. but at runtime i always get the same exception.
    i also put the library in the tomcat lib folder (after that in the lib/common folder) - same result. i tried downloading a new jar. still no changes (all of those folder arse included in my classpath).
    then i included the logging jar in my java/lib/ext folder.
    After that a new jar was missing (mail.jar). but my axis2 engine doesn't run anymore (apparently some conflict with other libraries).
    Now i dunno what to do anymore. even the simpelst hrllo world web service doesn't work in jsp.
    If i tried to invoke non axis2 webservices in a jsp - it does work out. but that's not an option for me

    There is a folder for shared packages
    tomcat_root\lib; or
    tomcat_root\common
    also most versions have a lib or common folder for each webapp for packages that are not to be shared.
    tomcat_root\webapps\appname\web-inf\lib
    Agreed that it is strange to allow servlets to import from the classes foler but not JSPs. It should make no difference but it is convension to place single classes in the same folder as the app's directory and packages (especially jar's) in the lib directory.

  • Webservice client in jsp

    hey, im making a webservice client (implemented in jsp for a course), ive made a simple one in straight java and it works fine, but when made the necessary changes to make it a jsp page, i keep gettting an error when the page is displayed
    org.apache.jasper.JasperException: javax/mail/internet/MimeMultipart
    javax.servlet.ServletException: javax/mail/internet/MimeMultipart
    here is my jsp code, and below is the original client i wrote that works...
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
    <HTML>
    <HEAD>
    <TITLE>Uvic Best Quote Travel</TITLE>
    <META NAME="author" CONTENT="[email protected]">
    <META NAME="keywords" CONTENT="...">
    <META NAME="description" CONTENT="...">
    <LINK REL=STYLESHEET
    HREF="Site-Styles.css"
    TYPE="text/css">
    </HEAD>
    <BODY>
    <%@ include file="./top.htm" %>
    <%@ page import="javax.xml.rpc.Stub,uk.co.dsdata.ws.travel.sbg.SBGAirFareQuotes.*"%>
    <%@ page import="java.util.Calendar" %>
    <%
              try{
              uk.co.dsdata.ws.travel.sbg.SBGAirFareQuotes.AirFareQuote outQuotes[];     
              uk.co.dsdata.ws.travel.sbg.SBGAirFareQuotes.AirFareQuoteRequest in0= new uk.co.dsdata.ws.travel.sbg.SBGAirFareQuotes.AirFareQuoteRequest();
              Calendar outwardDate=Calendar.getInstance();
              outwardDate.set(2003, 11, 22, 13,04,34);
              Calendar returnDate = Calendar.getInstance();
              returnDate.set(2003, 11, 29, 13, 04, 34);
              String originAirport = "yvr";
              String destinationAirport = "lax";
              in0.setOutwardDate(outwardDate);
              in0.setReturnDate(returnDate);
              in0.setOriginAirport(originAirport);
              in0.setDestinationAirport(destinationAirport);
              SBGGetAirFareQuoteService afs = new SBGGetAirFareQuoteServiceLocator();
              SBGGetAirFareQuote af = afs.getSBGGetAirFareQuote();
              outQuotes=af.getAirFareQuote(in0);
              int i=0;
              while(i<outQuotes.length){
                   System.out.println("quote " + i + "returned: " + outQuotes.getAirlineName() +outQuotes[i].getFare());
                   i++;
              }catch(Exception e){
              System.err.println("Execution failed. Exception: " + e);
         %>
    <!-- Part specific to this page ... -->
    </BODY>
    </HTML>
    now the .java original client code...
    package uk.co.dsdata.ws.travel.sbg.SBGAirFareQuotes;
    import java.util.Calendar;
    public class AirFareQuoteClient{
         public static void main(String[] args){
              try{
              uk.co.dsdata.ws.travel.sbg.SBGAirFareQuotes.AirFareQuote outQuotes[];     
              System.out.println("1");
              uk.co.dsdata.ws.travel.sbg.SBGAirFareQuotes.AirFareQuoteRequest in0= new uk.co.dsdata.ws.travel.sbg.SBGAirFareQuotes.AirFareQuoteRequest();
              Calendar outwardDate=Calendar.getInstance();
              System.out.println("2");
              outwardDate.set(2003, 11, 22, 13,04,34);
              System.out.println("3");
              Calendar returnDate = Calendar.getInstance();
              returnDate.set(2003, 11, 29, 13, 04, 34);
              System.out.println("4");
              String originAirport = "yvr";
              String destinationAirport = "lax";
              System.out.println("5");
              in0.setOutwardDate(outwardDate);
              in0.setReturnDate(returnDate);
              in0.setOriginAirport(originAirport);
              in0.setDestinationAirport(destinationAirport);
              System.out.println("6");
              SBGGetAirFareQuoteService afs = new SBGGetAirFareQuoteServiceLocator();
              System.out.println("7");
                   SBGGetAirFareQuote af = afs.getSBGGetAirFareQuote();
              System.out.println("8");
                   outQuotes=af.getAirFareQuote( in0);
              int i=0;
              while(i<outQuotes.length){
                   System.out.println("quote " + i + "returned: " + outQuotes[i].getAirlineName() +outQuotes[i].getFare());
                   i++;
              }catch(Exception e){
              System.err.println("Execution failed. Exception: " + e);
    thanks
    casey

    I know that there are tool that can do this conversion try google

  • How to call a webservice from JSP

    I want to call a webservice from JSP? How can I do that .

    Check out this OBE and I think it's pretty well documented in JDeveloper help.
    http://www.oracle.com/technology/obe/obe1013jdev/10131/wsfromplsqlpackage/devwsfrom%20plsql.htm
    Thanks, Rob

Maybe you are looking for

  • Dynamic creation of class and calling methods

    I've got and interface called Transformation and then two implementations called TxA and TxB, where TxA and TxB have their own attribtues and setter and getters for these attributes. The question is, I need to create instances of TxA and TxB and call

  • Displaying text in two columns in SAP Script

    Moved to correct forum.  Please use a meaningful subject in future - I've edited it for you this time. Hello Everybody, I have a text to be displayed in Scripts. I want to split the text into 2 columns. Like in news paper. aaaaaaaaaaaaaaaa   aaaaaaaa

  • How to find our PIA is installed with multiple domains

    Hi, How would we find the is our environment has multiple PIA and multiple webservers.In which tables we get those details.Please give me information on that Regards, Ashok

  • Utility comparable to dcmnctl in 10.1.3

    In 10.1.2 we used the following commands when our instances were caching the configuration files and we needed to re-sync them ./dcmctl shell resyncInstance resetfiletransaction and others. In Oracle 10.1.3 we do not have dcmctl. What is the comparab

  • What can I do after IMPORT_PROPER error

    I want update sp 09-15, now error occurs, I can't reset the  queue status either: You cannot reset the queue from import phase 'IMPORT_PROPER' What can I do to rescue the system? SE16,SE38 can't work.